162
162
/* ---------------------------------------------------------------------- */
165
167
convert the output to a greymap. Return greymap in *gmp. Return 0
166
168
on success, -1 on error with errno set, -2 on bad file format (with
167
169
error message in gm_read_error), and 1 on premature end of file, -3
168
170
on empty file (including files with only whitespace and comments),
169
171
-4 if wrong magic number. If the return value is >=0, *gmp is
174
174
int gm_read(FILE *f, greymap_t **gmp) {