URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
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) {
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.