=================================================================== RCS file: /home/cvs/OpenXM/src/ox_ntl/oxserv.c,v retrieving revision 1.4 retrieving revision 1.7 diff -u -p -r1.4 -r1.7 --- OpenXM/src/ox_ntl/oxserv.c 2003/11/17 09:55:52 1.4 +++ OpenXM/src/ox_ntl/oxserv.c 2004/07/11 00:32:17 1.7 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/ox_ntl/oxserv.c,v 1.3 2003/11/15 09:06:20 iwane Exp $ */ +/* $OpenXM: OpenXM/src/ox_ntl/oxserv.c,v 1.6 2004/07/04 11:38:42 iwane Exp $ */ #include #include @@ -10,36 +10,15 @@ #include "oxserv.h" #include "oxstack.h" +#include "gmp.h" #include "gc/gc.h" -#define DPRINTF(x) printf x; fflush(stdout) +#define DPRINTF(x) printf x; (void)fflush(stdout) #define FP stdout -#define EPRINTF(x) fprintf x; fflush(FP) +#define EPRINTF(x) fprintf x; (void)fflush(FP) -#if 1 -/*===========================================================================* - * for DEBUG - *===========================================================================*/ -#include -void -dprintf(const char *fmt, ...) -{ - FILE *fp; - va_list ap; - va_start(ap, fmt); - - fp = fopen("error.txt", "a"); - vfprintf(fp, fmt, ap); - - fflush(fp); - fclose(fp); - - va_end(ap); -} -#endif - /*===========================================================================* * MACRO *===========================================================================*/ @@ -50,7 +29,7 @@ dprintf(const char *fmt, ...) do { \ if (c != NULL) { \ if (G_DeleteCmo != NULL) \ - G_DeleteCmo(c); \ + G_DeleteCmo((cmo *)c); \ else \ c = NULL; \ } \ @@ -188,7 +167,7 @@ oxserv_sm_popString(OXFILE *fd) send_ox_cmo(fd, (cmo *)m_str); oxserv_delete_cmo(m); - oxserv_delete_cmo((cmo *)m_str); + oxserv_delete_cmo(m_str); /* free(str); */ } @@ -223,7 +202,7 @@ oxserv_sm_pops() oxserv_delete_cmo(m); } - oxserv_delete_cmo((cmo *)c); + oxserv_delete_cmo(c); } @@ -324,7 +303,7 @@ oxserv_mathcap_init(int ver, char *vstr, char *sysname mathcap_init(ver, vstr, sysname, cmos, sms); - oxserv_delete_cmo((cmo *)G_oxserv_mathcap); + oxserv_delete_cmo(G_oxserv_mathcap); G_oxserv_mathcap = mathcap_get(new_mathcap()); } @@ -431,8 +410,8 @@ oxserv_sm_executeFunction(void) oxserv_delete_cmo(arg[i]); } - oxserv_delete_cmo((cmo *)name); - oxserv_delete_cmo((cmo *)cnt); + oxserv_delete_cmo(name); + oxserv_delete_cmo(cnt); free(arg); } @@ -736,7 +715,7 @@ oxserv_set(int mode, void *ptr, void *rsv) void oxserv_dest() { - oxserv_delete_cmo((cmo *)G_oxserv_mathcap); + oxserv_delete_cmo(G_oxserv_mathcap); oxstack_dest(); } @@ -781,7 +760,7 @@ main(int argc, char *argv[]) oxserv_set(OXSERV_SET_EXECUTE_FUNCTION, oxserv_executeFunction, NULL); - oxserv_init(oxfp, 0, "$Date: 2003/11/17 09:55:52 $", "oxserv", NULL, NULL); + oxserv_init(oxfp, 0, "$Date: 2004/07/11 00:32:17 $", "oxserv", NULL, NULL); ret = oxserv_receive(oxfp);