Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
#include<stdio.h>
#include<stdlib.h>
int main(int argc,char** argv)
{
FILE *fi,*fo;
int count=0;
int ch;
fi
=fopen("image.bin","rb");
fo
=fopen("image.c","wb");
if((ch
=getc(fi
))!=EOF
) {fprintf(fo
,"0x%02X",ch
);count
++;}
while((ch
=getc(fi
))!=EOF
) {fprintf(fo
,",0x%02X",ch
);count
++;}
fprintf(fo
,"};\nint HOSimagesize=%d;\n",count
);
return EXIT_SUCCESS;
}