version 1.9 | | version 1.10 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: region.c,v 1.9 2006/02/08 01:52:58 cavesomething Exp $"; | | * "$Id: region.c,v 1.10 2006/02/09 00:48:36 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* the map code. | | * the map code. |
*/ | | */ |
| | |
const char *get_name_of_region_for_map(mapstruct *m) { | | const char *get_name_of_region_for_map(const mapstruct *m) { |
region *reg; | | region *reg; |
if (m->region!=NULL) return m->region->name; | | if (m->region!=NULL) return m->region->name; |
for (reg=first_region;reg!=NULL;reg=reg->next) { | | for (reg=first_region;reg!=NULL;reg=reg->next) { |
| | |
* if passed a NULL region returns -1 | | * if passed a NULL region returns -1 |
*/ | | */ |
| | |
int region_is_child_of_region(region *child, region *r) { | | int region_is_child_of_region(const region *child, const region *r) { |
| | |
if (r==NULL) | | if (r==NULL) |
return -1; | | return -1; |
| | |
* 3. return a obviously wrong string if we can't get a longname, this should | | * 3. return a obviously wrong string if we can't get a longname, this should |
* never happen. We also log a debug message. | | * never happen. We also log a debug message. |
*/ | | */ |
const char *get_region_longname(region *r) { | | const char *get_region_longname(const region *r) { |
| | |
if (r->longname!=NULL) | | if (r->longname!=NULL) |
return r->longname; | | return r->longname; |
| | |
} | | } |
} | | } |
| | |
const char *get_region_msg(region *r) { | | const char *get_region_msg(const region *r) { |
if (r->msg!=NULL) | | if (r->msg!=NULL) |
return r->msg; | | return r->msg; |
else if(r->parent!=NULL) | | else if(r->parent!=NULL) |