version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: region.c,v 1.6 2005/07/17 11:00:03 ryo_saeba Exp $"; | | * "$Id: region.c,v 1.7 2005/10/28 19:08:53 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
else if(r->parent!=NULL) | | else if(r->parent!=NULL) |
return get_region_longname(r->parent); | | return get_region_longname(r->parent); |
else { | | else { |
return "no name can be found for the current region"; | | |
LOG(llevDebug,"NOTICE region %s has no parent and no longname.\n", r->name); | | LOG(llevDebug,"NOTICE region %s has no parent and no longname.\n", r->name); |
| | return "no name can be found for the current region"; |
} | | } |
} | | } |
| | |
| | |
else if(r->parent!=NULL) | | else if(r->parent!=NULL) |
return get_region_msg(r->parent); | | return get_region_msg(r->parent); |
else { | | else { |
return "no description can be found for the current region"; | | |
LOG(llevDebug,"NOTICE region %s has no parent and no msg.\n", r->name); | | LOG(llevDebug,"NOTICE region %s has no parent and no msg.\n", r->name); |
| | return "no description can be found for the current region"; |
} | | } |
} | | } |
| | |
| | |
| | |
char buf[HUGE_BUF], msgbuf[HUGE_BUF], *key=NULL, *value, *end; | | char buf[HUGE_BUF], msgbuf[HUGE_BUF], *key=NULL, *value, *end; |
int msgpos=0; | | int msgpos=0; |
| | |
| | new = NULL; |
while (fgets(buf, HUGE_BUF-1, fp)!=NULL) { | | while (fgets(buf, HUGE_BUF-1, fp)!=NULL) { |
buf[HUGE_BUF-1] = 0; | | buf[HUGE_BUF-1] = 0; |
key = buf; | | key = buf; |
| | |
| | |
if (reg==NULL) first_region=new; | | if (reg==NULL) first_region=new; |
else reg->next=new; | | else reg->next=new; |
| | new = NULL; |
} | | } |
else if (!strcmp(key,"nomore")) { | | else if (!strcmp(key,"nomore")) { |
/* we have reached the end of the region specs....*/ | | /* we have reached the end of the region specs....*/ |