version 1.79 | | version 1.80 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.79 2005/09/04 15:44:44 tchize Exp $"; | | * "$Id: map.c,v 1.80 2005/09/04 16:58:12 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
strcpy(pathname, create_pathname(filename)); | | strcpy(pathname, create_pathname(filename)); |
| | |
if((fp=open_and_uncompress(pathname, 0, &comp))==NULL) { | | if((fp=open_and_uncompress(pathname, 0, &comp))==NULL) { |
LOG(llevError,"Can't open %s\n", pathname); | | LOG(llevError, "Can't open %s: %s\n", pathname, strerror_local(errno)); |
perror("Can't read map file"); | | |
return (NULL); | | return (NULL); |
} | | } |
| | |
| | |
} | | } |
| | |
if((fp=open_and_uncompress(m->tmpname,0, &comp))==NULL) { | | if((fp=open_and_uncompress(m->tmpname,0, &comp))==NULL) { |
LOG(llevError,"Can't open %s\n",m->tmpname); | | LOG(llevError, "Cannot open %s: %s\n",m->tmpname, strerror_local(errno)); |
perror("Can't read map file"); | | |
strcpy(buf, m->path); | | strcpy(buf, m->path); |
delete_map(m); | | delete_map(m); |
m = load_original_map(buf, 0); | | m = load_original_map(buf, 0); |
| | |
fp = fopen(filename, "w"); | | fp = fopen(filename, "w"); |
| | |
if(fp == NULL) { | | if(fp == NULL) { |
perror("Can't open file for saving"); | | LOG(llevError, "Cannot write %s: %s\n", filename, strerror_local(errno)); |
return -1; | | return -1; |
} | | } |
| | |