version 1.65 | | version 1.66 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.65 2004/08/18 06:29:24 mwedel Exp $"; | | * "$Id: map.c,v 1.66 2004/08/24 06:37:41 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
static int load_map_header(FILE *fp, mapstruct *m) | | static int load_map_header(FILE *fp, mapstruct *m) |
{ | | { |
char buf[HUGE_BUF], msgbuf[HUGE_BUF], *key, *value, *end; | | char buf[HUGE_BUF], msgbuf[HUGE_BUF], *key=NULL, *value, *end; |
int msgpos=0; | | int msgpos=0; |
| | |
while (fgets(buf, HUGE_BUF-1, fp)!=NULL) { | | while (fgets(buf, HUGE_BUF-1, fp)!=NULL) { |
| | |
LOG(llevError,"Got unknown value in map header: %s %s\n", key, value); | | LOG(llevError,"Got unknown value in map header: %s %s\n", key, value); |
} | | } |
} | | } |
if (strcmp(key,"end")) { | | if (!key || strcmp(key,"end")) { |
LOG(llevError,"Got premature eof on map header!\n"); | | LOG(llevError,"Got premature eof on map header!\n"); |
return 1; | | return 1; |
} | | } |