version 1.2 | | version 1.3 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: region.c,v 1.2 2005/03/23 21:34:30 cavesomething Exp $"; | | * "$Id: region.c,v 1.3 2005/03/24 22:35:26 cavesomething Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
region *get_region_from_string(char *name) { | | region *get_region_from_string(char *name) { |
region *reg; | | region *reg; |
char *substr; | | char *substr; |
| | char *p; |
sint16 i; | | sint16 i; |
| | |
if (name==NULL) { | | if (name==NULL) { |
for (reg=first_region;reg->parent!=NULL;reg=reg->parent); | | for (reg=first_region;reg->parent!=NULL;reg=reg->parent); |
return reg; | | return reg; |
} | | } |
char *p = strchr(name, '\n'); | | p = strchr(name, '\n'); |
if (p) *p = '\0'; | | if (p) *p = '\0'; |
for (reg=first_region;reg!=NULL;reg=reg->next) | | for (reg=first_region;reg!=NULL;reg=reg->next) |
if (!strcasecmp(reg->name, name)) return reg; | | if (!strcasecmp(reg->name, name)) return reg; |