--- deliantra/server/common/region.C 2006/12/13 02:55:50 1.10 +++ deliantra/server/common/region.C 2007/01/15 21:06:18 1.16 @@ -1,25 +1,26 @@ /* - CrossFire, A Multiplayer game for X-windows - - Copyright (C) 2001-2003 Mark Wedel & Crossfire Development Team - Copyright (C) 1992 Frank Tore Johansen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - The authors can be reached via e-mail at -*/ + * CrossFire, A Multiplayer game for X-windows + * + * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team + * Copyright (C) 2001-2003 Mark Wedel & Crossfire Development Team + * Copyright (C) 1992 Frank Tore Johansen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * The authors can be reached via e-mail at + */ #include @@ -75,14 +76,16 @@ { region *reg; - if (m->region != NULL) + if (m->region) return m->region->name; + for (reg = first_region; reg != NULL; reg = reg->next) { if (reg->fallback) return reg->name; } - LOG (llevInfo, "map %s had no region and I couldn't find a fallback to use.\n", m->name); + + LOG (llevInfo, "map %s had no region and I couldn't find a fallback to use.\n", &m->name); return "unknown"; } @@ -347,7 +350,7 @@ { *end = 0; newreg = get_region_struct (); - newreg->name = strdup_local (value); + newreg->name = strdup (value); } else if (!strcmp (key, "parent")) { @@ -357,12 +360,12 @@ * parsed. */ *end = 0; - newreg->parent_name = strdup_local (value); + newreg->parent_name = strdup (value); } else if (!strcmp (key, "longname")) { *end = 0; - newreg->longname = strdup_local (value); + newreg->longname = strdup (value); } else if (!strcmp (key, "jail")) { @@ -375,7 +378,7 @@ LOG (llevError, "region.c: malformated regions entry: jail %s\n", value); continue; } - newreg->jailmap = strdup_local (path); + newreg->jailmap = strdup (path); newreg->jailx = x; newreg->jaily = y; } @@ -397,7 +400,7 @@ * so better do it here too... */ if (msgpos != 0) - newreg->msg = strdup_local (msgbuf); + newreg->msg = strdup (msgbuf); /* we have to reset msgpos, or the next region will store both msg blocks. */ msgpos = 0; @@ -449,5 +452,5 @@ } region_count++; } - LOG (llevDebug, "Assigned %u regions with %u parents.", region_count, parent_count); + LOG (llevDebug, "Assigned %u regions with %u parents.\n", region_count, parent_count); }