Git Product home page Git Product logo

nsfinfo's People

Contributors

koitsu avatar ullenius avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

erdoukki ullenius

nsfinfo's Issues

Error messages printed to stdout

Error messages are printed to stdout instead of stderr:

$ ./nsfinfo /tmp/does-not-exist.nsf > info.txt
$ echo $?
66
$ cat info.txt
fopen() failed

Build breaks on old versions of GCC

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

Artist and copyright offsets mixed up

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.