|
From: Peep P. <so...@us...> - 2004-07-23 17:06:53
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13914 Modified Files: object.c net.c Log Message: Removed debug(); renamed stringdup to xstrdup Index: object.c =================================================================== RCS file: /cvsroot/agd/server/src/object.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- object.c 21 Jul 2004 11:55:39 -0000 1.18 +++ object.c 23 Jul 2004 17:06:43 -0000 1.19 @@ -57,9 +57,6 @@ list_remove(&all_objects, ob); list_push(&to_be_dested, ob); -#ifdef DEBUG - debug("dfun", "destructed \"%s\"\n", ob->name); -#endif } void actual_destruct(object_t *ob) @@ -204,7 +201,7 @@ /* path = remove_extension(path); ? */ ob = xmalloc(sizeof(object_t)); memset(ob, 0, sizeof(object_t)); - ob->name = stringdup(path); + ob->name = xstrdup(path); this_ob = ob; @@ -240,9 +237,6 @@ return NULL; } -#ifdef DEBUG - debug("dfun", "cloning object %s\n", path); -#endif /* ref_ob(base_ob, NULL);*/ new_ob = xmalloc(sizeof(object_t)); @@ -260,7 +254,7 @@ variable_t *v = &new_ob->globals[i]; *v = base_ob->globals[i]; if(v->name) - v->name = stringdup(v->name); + v->name = xstrdup(v->name); } apply(new_ob, "create", NULL); Index: net.c =================================================================== RCS file: /cvsroot/agd/server/src/net.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- net.c 21 Jul 2004 11:56:28 -0000 1.19 +++ net.c 23 Jul 2004 17:06:43 -0000 1.20 @@ -101,7 +101,7 @@ player_ob = xmalloc(sizeof(object_t)); player_ob->iaob = p; /* So find_object() won't barf. Have to copy because it will be freed. */ - player_ob->name = stringdup("LOGIN"); + player_ob->name = xstrdup("LOGIN"); player_ob->prog = NULL; this_ob = p->ob = player_ob; @@ -124,7 +124,6 @@ if(this_player == p && p->ob == player_ob) /* wasn't changed. */ return; - debug("net_accept", "player object was changed to %p (%s); freeing player_ob %p (%s)\n", p->ob, p->ob->name, player_ob, player_ob->name); /* player_ob is not needed anymore if we get this far. */ free(player_ob); } @@ -163,7 +162,10 @@ char *c; if(!p->input_to) { - debug("net", "player %p (with iaob %s) doesn't have input_to set\n", p->ob? p->ob->name :NULL, p); +#ifdef DEBUG + if(conf.debuglevel) + printf("[net] player %p (with iaob %s) doesn't have input_to set\n", p->ob? p->ob->name :NULL, p); +#endif goto out; } |