koitsu / nsfinfo Goto Github PK
View Code? Open in Web Editor NEWDump information about NSF (NES Sound Format) files
License: Other
Dump information about NSF (NES Sound Format) files
License: Other
Hi!
Thanks for a great program in well-written C.
In the struct
the offsets are the same as the ones in the spec.
char name[32]; /* offset 0x0e */
char artist[32]; /* offset 0x2e */
char copyright[32]; /* offset 0x4e */
However the actual code swaps the offsets for artist and copyright.
Error messages are printed to stdout
instead of stderr
:
$ ./nsfinfo /tmp/does-not-exist.nsf > info.txt
$ echo $?
66
$ cat info.txt
fopen() failed
I tried building on an old Linux machine running gcc 4.6.3 (2011) and GNU make 3.81 (2006) and ran into failures:
cc -c -g3 -ggdb -Werror -Wall -Wextra -Wformat-security -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wunreachable-code -Wwrite-strings -o md5.o md5.c
cc -c -g3 -ggdb -Werror -Wall -Wextra -Wformat-security -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wunreachable-code -Wwrite-strings -o sha256.o sha256.c
cc -g3 -ggdb -Werror -Wall -Wextra -Wformat-security -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wunreachable-code -Wwrite-strings -o nsfinfo nsfinfo.c md5.o sha256.o
nsfinfo.c: In function 'my_MD5_File':
nsfinfo.c:107:2: error: 'for' loop initial declarations are only allowed in C99 mode
nsfinfo.c:107:2: note: use option -std=c99 or -std=gnu99 to compile your code
nsfinfo.c: In function 'my_SHA256_File':
nsfinfo.c:163:2: error: 'for' loop initial declarations are only allowed in C99 mode
make: *** [nsfinfo] Error 1
I added -std=c99
to the CFLAGS
and then I got POSIX related failures instead:
nsfinfo.c: In function 'main':
nsfinfo.c:235:2: error: implicit declaration of function 'getopt' [-Werror=implicit-function-declaration]
nsfinfo.c:235:2: error: nested extern declaration of 'getopt' [-Werror=nested-externs]
nsfinfo.c:247:10: error: 'optind' undeclared (first use in this function)
nsfinfo.c:247:10: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
make: *** [nsfinfo] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.