version 1.4, 2003/11/17 09:55:52 |
version 1.6, 2004/07/04 11:38:42 |
|
|
/* $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.5 2003/11/27 14:18:43 iwane Exp $ */ |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
#define FP stdout |
#define FP stdout |
#define EPRINTF(x) fprintf x; fflush(FP) |
#define EPRINTF(x) fprintf x; 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 28 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 166 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 201 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 302 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 409 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 714 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(); |
} |
} |