From: Peep P. <so...@us...> - 2004-03-15 18:53:19
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1907 Modified Files: dfuns.c Log Message: Cleanup. Index: dfuns.c =================================================================== RCS file: /cvsroot/agd/server/src/dfuns.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dfuns.c 12 Mar 2004 13:50:43 -0000 1.10 --- dfuns.c 15 Mar 2004 18:44:09 -0000 1.11 *************** *** 1,7 **** - /* - Functions dealing with dfuns, and the dfun - hooks (the function that gets called by call_dfun() and - needs to pop the arguments off the stack). - */ #include "std.h" #include "lpc_incl.h" --- 1,2 ---- *************** *** 24,28 **** init_array(&global_ids); ! dfptr = xmalloc(sizeof(void(*)(void*)) * NUM_DF); for(i=0;i<NUM_DF;i++) { dfptr[i] = decl[i].fun; --- 19,23 ---- init_array(&global_ids); ! dfptr = xmalloc(sizeof(void(*)(void)) * NUM_DF); for(i=0;i<NUM_DF;i++) { dfptr[i] = decl[i].fun; *************** *** 42,50 **** define_id(decl[i].name, ID_DFUN, decl[i].ret, args); - /* define_name(type, decl[i].name, decl[i].ret, args, 0); - nametable_add(type, decl[i].name, numofdecl, &global_nametable); - numofdecl++;*/ } - /* nametable_sort(&global_nametable);*/ } --- 37,41 ---- *************** *** 84,89 **** } - /* Hooks begin here. */ - void df_write(void) { int ret; --- 75,78 ---- *************** *** 95,98 **** --- 84,88 ---- void df_input_to(void) { this_player->input_to = fp->u.s; + this_player->input_to_called = 0; pop_stack(); push_void(); *************** *** 150,154 **** variable_t *saved_fp; - show_stack(); saved_fp = fp; fp++; --- 140,143 ---- *************** *** 208,211 **** --- 197,201 ---- } + /* Should be done in the mudlib - much easier in LPC. */ #define WRITE_BUFFER(plur, sing) if(plur) { if(bufptr > buf) bufptr[-1] = ' ';\ bufptr += sprintf(bufptr, "%d "#sing"%c", plur, plur>1?'s':0) + (plur>1); } *************** *** 217,221 **** days = hrs = mins = 0; - fp->u.i += 3670; secs = fp->u.i; if(secs >= 60) { --- 207,210 ---- |