Mercurial > hg > dmlib
comparison testpl.c @ 77:c6cdaa675801
Add the file mode parameter to dmf_create_stdio() calls, and throw in some
cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Oct 2012 05:52:35 +0300 |
parents | 7b97df6f8a97 |
children | 43312a36811f |
comparison
equal
deleted
inserted
replaced
76:7d201aed1fd9 | 77:c6cdaa675801 |
---|---|
122 sname = argv[1]; | 122 sname = argv[1]; |
123 | 123 |
124 // Open the files | 124 // Open the files |
125 if (sname == NULL) | 125 if (sname == NULL) |
126 file = dmf_create_stdio_stream(stdin); | 126 file = dmf_create_stdio_stream(stdin); |
127 else if ((file = dmf_create_stdio(sname)) == NULL) | 127 else if ((file = dmf_create_stdio(sname, "rb")) == NULL) |
128 { | 128 { |
129 fprintf(stderr, "Error opening input file '%s'. (%s)\n", sname, strerror(errno)); | 129 fprintf(stderr, "Error opening input file '%s'. (%s)\n", |
130 sname, strerror(errno)); | |
130 return 1; | 131 return 1; |
131 } | 132 } |
132 | 133 |
133 // Initialize miniJSS | 134 // Initialize miniJSS |
134 fprintf(stderr, "Initializing miniJSS\n"); | 135 fprintf(stderr, "Initializing miniJSS\n"); |