5 Apr
2007
5 Apr
'07
6:20 a.m.
On 4/4/07, James <iphitus@gmail.com> wrote:
I havn't actually written anything in C for a long time, this was based on the example and some fumbling so... criticism is welcome I guess. Depends on iniparser in community.
Only point would be that returning 2 and 3 from main are sort of undefined (only 1 and 0 are standard)... I wouldn't use numbers to indicate where it failed like that, though that's personal preference... I'd just return 1 for any error. Another think that *might* be useful depending on the lib: - fprintf(stderr, "Cannot parse file [%s]\n", file); + fprintf(stderr, "Cannot parse file [%s]: %s\n", + file, strerror(errno));