OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [orp/] [orp_soc/] [sw/] [utils/] [bin2flimg.c] - Diff between revs 1268 and 1289

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1268 Rev 1289
Line 1... Line 1...
#include <stdio.h>
#include <stdio.h>
 
#include <stdlib.h>
 
 
int main(int argc, char **argv)
int main(int argc, char **argv)
{
{
 
 
        FILE  *fd;
        FILE  *fd;
        int c, i, j, width;
        int c, j, width;
        unsigned long word;
        unsigned long word;
 
 
        if(argc < 3) {
        if(argc < 3) {
                printf("no input file specified");
                fprintf(stderr,"no input file specified\n");
 
                exit(1);
 
        }
 
        if(argc > 3) {
 
                fprintf(stderr,"too many input files (more than one) specified\n");
                exit(1);
                exit(1);
        }
        }
 
 
        width = atoi(argv[1]);
        width = atoi(argv[1]);
 
 
        fd = fopen( argv[2], "r" );
        fd = fopen( argv[2], "r" );
 
        if (fd == NULL) {
 
                fprintf(stderr,"failed to open input file: %s\n",argv[1]);
 
                exit(1);
 
        }
 
 
        while (!feof(fd)) {
        while (!feof(fd)) {
                j = 0;
                j = 0;
                word = 0;
                word = 0;
                while (j < width) {
                while (j < width) {

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.