version 1.4, 2003/11/17 09:55:52 |
version 1.7, 2004/07/11 00:32:17 |
|
|
/* $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 <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
#include "oxserv.h" |
#include "oxserv.h" |
#include "oxstack.h" |
#include "oxstack.h" |
|
|
|
#include "gmp.h" |
#include "gc/gc.h" |
#include "gc/gc.h" |
|
|
#define DPRINTF(x) printf x; fflush(stdout) |
#define DPRINTF(x) printf x; (void)fflush(stdout) |
|
|
#define FP stdout |
#define FP stdout |
#define EPRINTF(x) fprintf x; fflush(FP) |
#define EPRINTF(x) fprintf x; (void)fflush(FP) |
|
|
#if 1 |
|
/*===========================================================================* |
|
* for DEBUG |
|
*===========================================================================*/ |
|
#include <stdarg.h> |
|
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 |
* MACRO |
*===========================================================================*/ |
*===========================================================================*/ |
Line 50 dprintf(const char *fmt, ...) |
|
Line 29 dprintf(const char *fmt, ...) |
|
do { \ |
do { \ |
if (c != NULL) { \ |
if (c != NULL) { \ |
if (G_DeleteCmo != NULL) \ |
if (G_DeleteCmo != NULL) \ |
G_DeleteCmo(c); \ |
G_DeleteCmo((cmo *)c); \ |
else \ |
else \ |
c = NULL; \ |
c = NULL; \ |
} \ |
} \ |
Line 188 oxserv_sm_popString(OXFILE *fd) |
|
Line 167 oxserv_sm_popString(OXFILE *fd) |
|
send_ox_cmo(fd, (cmo *)m_str); |
send_ox_cmo(fd, (cmo *)m_str); |
|
|
oxserv_delete_cmo(m); |
oxserv_delete_cmo(m); |
oxserv_delete_cmo((cmo *)m_str); |
oxserv_delete_cmo(m_str); |
|
|
/* free(str); */ |
/* free(str); */ |
} |
} |
Line 223 oxserv_sm_pops() |
|
Line 202 oxserv_sm_pops() |
|
oxserv_delete_cmo(m); |
oxserv_delete_cmo(m); |
} |
} |
|
|
oxserv_delete_cmo((cmo *)c); |
oxserv_delete_cmo(c); |
|
|
} |
} |
|
|
Line 324 oxserv_mathcap_init(int ver, char *vstr, char *sysname |
|
Line 303 oxserv_mathcap_init(int ver, char *vstr, char *sysname |
|
|
|
mathcap_init(ver, vstr, sysname, cmos, sms); |
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()); |
G_oxserv_mathcap = mathcap_get(new_mathcap()); |
} |
} |
Line 431 oxserv_sm_executeFunction(void) |
|
Line 410 oxserv_sm_executeFunction(void) |
|
oxserv_delete_cmo(arg[i]); |
oxserv_delete_cmo(arg[i]); |
} |
} |
|
|
oxserv_delete_cmo((cmo *)name); |
oxserv_delete_cmo(name); |
oxserv_delete_cmo((cmo *)cnt); |
oxserv_delete_cmo(cnt); |
|
|
free(arg); |
free(arg); |
} |
} |
Line 736 oxserv_set(int mode, void *ptr, void *rsv) |
|
Line 715 oxserv_set(int mode, void *ptr, void *rsv) |
|
void |
void |
oxserv_dest() |
oxserv_dest() |
{ |
{ |
oxserv_delete_cmo((cmo *)G_oxserv_mathcap); |
oxserv_delete_cmo(G_oxserv_mathcap); |
|
|
oxstack_dest(); |
oxstack_dest(); |
} |
} |