diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/arm/nds/tools/bin2s.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/arm/nds/tools/bin2s.c b/c/src/lib/libbsp/arm/nds/tools/bin2s.c index 34cc76cf18..7c24fb788b 100644 --- a/c/src/lib/libbsp/arm/nds/tools/bin2s.c +++ b/c/src/lib/libbsp/arm/nds/tools/bin2s.c @@ -1,6 +1,6 @@ /*--------------------------------------------------------------------------------- $Id$ - + bin2s: convert a binary file to a gcc asm module for gfx/foo.bin it'll write foo_bin (an array of char) foo_bin_end, and foo_bin_len (an unsigned int) @@ -31,9 +31,15 @@ IN THE SOFTWARE. $Log$ + Revision 1.2 2008/08/19 15:47:04 joel + 2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> + + * bin2s.c: Fix various warnings by fixing prototypes. Remove unused + .bin files. Convert all files to UNIX CF/LF. + Revision 1.1 2008/04/16 18:37:33 joel 2008-04-16 Matthieu Bucchianeri <mbucchia@gmail.com> - + * ChangeLog, Makefile.am, README, bsp_specs, configure.ac, mk_libnds.sh, patch.libnds, preinstall.am, block/block.c, clock/clock.c, console/console.c, coproc/coproc.S, coproc/coproc.c, @@ -168,17 +174,17 @@ touchscreen/reco.h, touchscreen/touchscreen.c, touchscreen/touchscreen.h, wifi/compat.c, wifi/compat.h, wifi/wifi.c: New files. - + Revision 1.3 2005/08/03 05:14:53 wntrmute corrected typo _size, not _len Revision 1.2 2005/08/01 03:42:53 wntrmute strip path from input file - + Revision 1.1 2005/07/21 13:03:05 wntrmute renamed labels to conform with previous bin2o added user configurable alignment - + ---------------------------------------------------------------------------------*/ @@ -247,7 +253,7 @@ int main(int argc, char **argv) { switch (argv[arg][1]) { case 'a': - + alignment = (argc > arg) ? strtoul(argv[++arg], 0, 0) : 0; if ( alignment == 0 ) alignment =4; @@ -255,7 +261,7 @@ int main(int argc, char **argv) { } continue; } - + fin = fopen(argv[arg], "rb"); @@ -278,28 +284,28 @@ int main(int argc, char **argv) { char *ptr = argv[arg]; char chr; char *filename = NULL; - + while ( (chr=*ptr) ) { if ( chr == '\\' || chr == '/') { - + filename = ptr; } ptr++; } - - if ( NULL != filename ) { + + if ( NULL != filename ) { filename++; } else { filename = argv[arg]; } - + /*--------------------------------------------------------------------------------- Generate the prolog for each included file. It has two purposes: - + 1. provide length info, and - 2. align to user defined boundary, default is 32bit + 2. align to user defined boundary, default is 32bit ---------------------------------------------------------------------------------*/ fprintf( stdout, "/* Generated by BIN2S - please don't edit directly */\n" @@ -319,10 +325,10 @@ int main(int argc, char **argv) { while(filelen > 0) { unsigned char c = fgetc(fin); - + printf("%3u", (unsigned int)c); filelen--; - + /* don't put a comma after the last item */ if(filelen) { |