version 1.6, 2004/07/04 11:38:42 |
version 1.9, 2013/10/18 01:28:52 |
|
|
/* $OpenXM: OpenXM/src/ox_ntl/oxserv.c,v 1.5 2003/11/27 14:18:43 iwane Exp $ */ |
/* $OpenXM: OpenXM/src/ox_ntl/oxserv.c,v 1.8 2008/09/19 10:55:40 iwane Exp $ */ |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.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) |
|
|
|
|
|
|
/*===========================================================================* |
/*===========================================================================* |
* MACRO |
* MACRO |
*===========================================================================*/ |
*===========================================================================*/ |
#define oxserv_get_cmo_tag(m) ((G_getCmoTag == NULL) ? m->tag : G_getCmoTag(m)) |
#define oxserv_get_cmo_tag(m) ((G_getCmoTag == NULL) ? (m)->tag : G_getCmoTag(m)) |
|
|
|
|
#define oxserv_delete_cmo(c) \ |
#define oxserv_delete_cmo(C) \ |
do { \ |
do { \ |
|
if (C != NULL) { \ |
|
if ((C)->c) { FREE((C)->c); } \ |
|
oxserv_delete_cmo_usr(((C)->p)); \ |
|
oxserv_free(C, 0); \ |
|
C = NULL; \ |
|
} \ |
|
} while (0) |
|
|
|
#define oxserv_delete_cmo_usr(c) \ |
|
do { \ |
if (c != NULL) { \ |
if (c != NULL) { \ |
if (G_DeleteCmo != NULL) \ |
if (G_DeleteCmo != NULL) \ |
G_DeleteCmo((cmo *)c); \ |
G_DeleteCmo((cmo *)c); \ |
Line 48 int G_oxserv_sigusr1cnt = 0; |
|
Line 59 int G_oxserv_sigusr1cnt = 0; |
|
static jmp_buf G_jmpbuf; |
static jmp_buf G_jmpbuf; |
|
|
/* User Function */ |
/* User Function */ |
static void (*G_userExecuteFunction)(const char *, cmo **, int) = NULL; |
static void (*G_userExecuteFunction)(const char *, oxstack_node **, int) = NULL; |
static void (*G_userExecuteStringParser)(const char *) = NULL; |
static void (*G_userExecuteStringParser)(const char *) = NULL; |
|
|
static cmo *(*G_convertCmo)(cmo *) = NULL; /* convert user object ==> cmo */ |
static cmo *(*G_convertCmo)(void *) = NULL; /* convert user object ==> cmo */ |
|
static char *(*G_convertStr)(void *) = NULL; /* convert user object ==> string */ |
|
|
static void (*G_DeleteCmo)(cmo *) = NULL; |
static void (*G_DeleteCmo)(cmo *) = NULL; |
|
|
|
|
oxserv_push_errormes(char *msg) |
oxserv_push_errormes(char *msg) |
{ |
{ |
EPRINTF((FP, "%s\n", msg)); |
EPRINTF((FP, "%s\n", msg)); |
oxstack_push((cmo *)new_cmo_error2_string(msg)); |
oxstack_push_cmo((cmo *)new_cmo_error2_string(msg)); |
} |
} |
|
|
/*===========================================================================* |
/*===========================================================================* |
Line 121 oxserv_realloc(void *org, size_t old, size_t size) |
|
Line 133 oxserv_realloc(void *org, size_t old, size_t size) |
|
static void |
static void |
oxserv_sm_popCMO(OXFILE *fd) |
oxserv_sm_popCMO(OXFILE *fd) |
{ |
{ |
cmo *m, *n; |
cmo *m; |
m = oxstack_pop(); |
oxstack_node *p; |
if (m == NULL) { |
int flag = 0; |
|
p = oxstack_pop(); |
|
if (p == NULL) { |
EPRINTF((FP, "stack underflow in popCMO\n")); |
EPRINTF((FP, "stack underflow in popCMO\n")); |
m = new_cmo_null(); |
m = new_cmo_null(); |
} else if (G_convertCmo) { |
/* asir $B$NF0$-$K=>$&(B */ |
n = G_convertCmo(m); |
} else { |
if (m != n) { |
if (p->c != NULL) { |
oxserv_delete_cmo(m); |
m = p->c; |
m = n; |
} else if (p->p != NULL) { |
|
if (G_convertCmo) { |
|
m = G_convertCmo(p->p); |
|
} else { |
|
m = NULL; |
|
} |
|
if (m == NULL) { |
|
m = (cmo *)new_cmo_error2((cmo *)new_cmo_string("convert failed")); |
|
flag = 1; |
|
|
|
} |
|
} else { |
|
EPRINTF((FP, "converter not defined\n")); |
|
m = (cmo *)new_cmo_error2((cmo *)new_cmo_string("converter not defined")); |
|
flag = 1; |
} |
} |
|
|
|
if (flag) { |
|
/* |
|
* $B$;$C$+$/7k2L$,$"$k$N$K>C$7$F$7$^$&$N$O(B |
|
* $B$b$C$?$$$J$$$N$G;D$9$3$H$K$9$k(B. |
|
*/ |
|
oxstack_push(p); |
|
} else { |
|
oxserv_delete_cmo(p); |
|
} |
} |
} |
|
|
|
|
send_ox_cmo(fd, m); |
send_ox_cmo(fd, m); |
|
|
oxserv_delete_cmo(m); |
FREE(m); |
} |
} |
|
|
/***************************************************************************** |
/***************************************************************************** |
|
|
oxserv_sm_popString(OXFILE *fd) |
oxserv_sm_popString(OXFILE *fd) |
{ |
{ |
char *str; |
char *str; |
cmo *m = oxstack_pop(); |
oxstack_node *p; |
|
cmo *m; |
cmo_string *m_str; |
cmo_string *m_str; |
|
|
if (m == NULL) { |
p = oxstack_pop(); |
EPRINTF((FP, "stack underflow in popString\n")); |
if (p == NULL) { |
|
/* @@TODO |
|
* http://www.math.kobe-u.ac.jp/OpenXM/1.2.1/html/OpenXM-ja/OpenXM/node12.html |
|
* $B%9%?%C%/$,6u$N>l9g$K$O(B (char *)NULL $B$rJV$9(B. |
|
* CMO $B$NMQ8l$G=q$+$l$F$$$J$$$+$i2?$rJV$9$Y$-$+$o$+$i$J$$(B. |
|
*/ |
m = new_cmo_null(); |
m = new_cmo_null(); |
|
str = new_string_set_cmo(m); |
|
} else { |
|
if (p->c) { |
|
m = NULL; |
|
str = new_string_set_cmo(p->c); |
|
} else if (p->p) { |
|
if (G_convertStr) { |
|
str = G_convertStr(p->p); |
|
m = NULL; |
|
} else { |
|
if (G_convertCmo) { |
|
m = G_convertCmo(p->p); |
|
} else { |
|
/* @@TODO |
|
* $BJQ49$G$-$J$$>l9g$O(B... CMO_ERROR2 $B$rLa$9$Y$-$G$"$k(B? |
|
* $B$=$N$H$-$N(B stack $B$N>uBV$O$I$&$9$Y$-!)(B |
|
*/ |
|
m = NULL; |
|
} |
|
str = new_string_set_cmo(m); |
|
} |
|
} else { |
|
m = new_cmo_null(); |
|
str = new_string_set_cmo(m); |
|
} |
|
|
|
oxserv_delete_cmo(p); |
} |
} |
|
|
str = new_string_set_cmo(m); |
|
|
|
m_str = new_cmo_string(str); |
m_str = new_cmo_string(str); |
|
|
send_ox_cmo(fd, (cmo *)m_str); |
send_ox_cmo(fd, (cmo *)m_str); |
|
|
oxserv_delete_cmo(m); |
FREE(m); |
oxserv_delete_cmo(m_str); |
FREE(m_str); |
|
|
/* free(str); */ |
/* free(str); */ |
} |
} |
Line 181 oxserv_sm_popString(OXFILE *fd) |
|
Line 251 oxserv_sm_popString(OXFILE *fd) |
|
static void |
static void |
oxserv_sm_pops() |
oxserv_sm_pops() |
{ |
{ |
|
oxstack_node *p, *m; |
cmo_int32 *c; |
cmo_int32 *c; |
cmo *m; |
|
int n; |
int n; |
int i; |
int i; |
|
|
c = (cmo_int32 *)oxstack_pop(); /* suppose */ |
p = oxstack_pop(); |
|
if (p == NULL) { |
|
EPRINTF((FP, "stack underflow in pops\n")); |
|
return ; |
|
} |
|
|
|
c = (cmo_int32 *)p->c; /* suppose */ |
if (c == NULL) { |
if (c == NULL) { |
EPRINTF((FP, "stack underflow in pops\n")); |
EPRINTF((FP, "stack underflow in pops\n")); |
return ; |
return ; |
Line 201 oxserv_sm_pops() |
|
Line 277 oxserv_sm_pops() |
|
oxserv_delete_cmo(m); |
oxserv_delete_cmo(m); |
} |
} |
|
|
oxserv_delete_cmo(c); |
oxserv_delete_cmo(p); |
|
|
} |
} |
|
|
|
|
oxserv_sm_getsp() |
oxserv_sm_getsp() |
{ |
{ |
cmo_int32 *m = new_cmo_int32(oxstack_get_stack_pointer()); |
cmo_int32 *m = new_cmo_int32(oxstack_get_stack_pointer()); |
oxstack_push((cmo *)m); |
oxstack_push_cmo((cmo *)m); |
} |
} |
|
|
/***************************************************************************** |
/***************************************************************************** |
Line 302 oxserv_mathcap_init(int ver, char *vstr, char *sysname |
|
Line 378 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(G_oxserv_mathcap); |
if (G_oxserv_mathcap) { |
|
FREE(G_oxserv_mathcap); |
|
} |
|
|
G_oxserv_mathcap = mathcap_get(new_mathcap()); |
G_oxserv_mathcap = mathcap_get(new_mathcap()); |
} |
} |
Line 321 oxserv_sm_mathcap() |
|
Line 399 oxserv_sm_mathcap() |
|
oxserv_mathcap_init(0, "", "oxserv", NULL, NULL); |
oxserv_mathcap_init(0, "", "oxserv", NULL, NULL); |
} |
} |
|
|
oxstack_push((cmo *)G_oxserv_mathcap); |
oxstack_push_cmo((cmo *)G_oxserv_mathcap); |
} |
} |
|
|
/***************************************************************************** |
/***************************************************************************** |
Line 335 oxserv_sm_mathcap() |
|
Line 413 oxserv_sm_mathcap() |
|
static void |
static void |
oxserv_sm_executeStringByLocalParserInBatchMode(void) |
oxserv_sm_executeStringByLocalParserInBatchMode(void) |
{ |
{ |
cmo_string *str = (cmo_string *)oxstack_peek(); |
oxstack_node *p; |
|
cmo_string *str; |
|
|
|
p = oxstack_peek(); |
|
if (p == NULL) { |
|
oxserv_push_errormes("stack underflow in executeStringByLocalParserInBatchMode"); |
|
return ; |
|
} |
|
|
|
str = (cmo_string *)p->c; |
if (str == NULL) { |
if (str == NULL) { |
oxserv_push_errormes("stack underflow in executeStringByLocalParserInBatchMode"); |
oxserv_push_errormes("stack underflow in executeStringByLocalParserInBatchMode"); |
return ; |
return ; |
Line 354 oxserv_sm_executeStringByLocalParserInBatchMode(void) |
|
Line 441 oxserv_sm_executeStringByLocalParserInBatchMode(void) |
|
static void |
static void |
oxserv_sm_executeStringByLocalParser(void) |
oxserv_sm_executeStringByLocalParser(void) |
{ |
{ |
cmo_string *str = (cmo_string *)oxstack_pop(); |
oxstack_node *p; |
|
cmo_string *str; |
|
|
|
p = oxstack_pop(); |
|
if (p == NULL) { |
|
oxserv_push_errormes("stack underflow in executeStringByLocalParserInBatchMode"); |
|
return ; |
|
} |
|
|
|
str = (cmo_string *)p->c; |
if (str == NULL) { |
if (str == NULL) { |
oxserv_push_errormes("stack underflow in executeStringByLocalParser"); |
oxserv_push_errormes("stack underflow in executeStringByLocalParser"); |
return ; |
return ; |
} |
} |
G_userExecuteStringParser(str->s); |
G_userExecuteStringParser(str->s); |
|
oxserv_delete_cmo(p); |
} |
} |
|
|
|
|
|
|
oxserv_sm_executeFunction(void) |
oxserv_sm_executeFunction(void) |
{ |
{ |
int i; |
int i; |
cmo_string *name = (cmo_string *)oxstack_pop(); |
oxstack_node *p1, *p2; |
cmo_int32 *cnt = (cmo_int32 *)oxstack_pop(); |
cmo_string *name; |
cmo **arg; |
cmo_int32 *cnt; |
|
int total; |
|
oxstack_node **arg; |
|
|
|
if (G_userExecuteFunction == NULL) { |
|
oxserv_push_errormes("G_userExecuteFunction not defined"); |
|
return ; |
|
} |
|
|
|
p1 = oxstack_pop(); |
|
p2 = oxstack_pop(); |
|
|
|
name = (cmo_string *)p1->c; |
|
cnt = (cmo_int32 *)p2->c; |
|
|
|
|
|
|
if (name == NULL || cnt == NULL) { |
if (name == NULL || cnt == NULL) { |
oxserv_push_errormes("stack underflow in executeFunction"); |
oxserv_push_errormes("stack underflow in executeFunction[name,cnt]"); |
return ; |
return ; |
} |
} |
|
if (name->tag != CMO_STRING) { |
|
oxstack_push(p2); |
|
oxstack_push(p1); |
|
oxserv_push_errormes("invalid parameter #1 not cmo_string"); |
|
return ; |
|
} |
|
|
arg = (cmo **)malloc(cnt->i * sizeof(cmo *)); |
if (cnt->tag != CMO_INT32) { |
for (i = 0; i < cnt->i; i++) { |
oxstack_push(p2); |
|
oxstack_push(p1); |
|
printf("command name=%s\n", name->s); |
|
oxserv_push_errormes("invalid parameter #2 not cmo_int32"); |
|
return ; |
|
} |
|
|
|
total = cnt->i; |
|
|
|
arg = (oxstack_node **)oxserv_malloc(total * sizeof(oxstack_node *)); |
|
for (i = 0; i < total; i++) { |
arg[i] = oxstack_pop(); |
arg[i] = oxstack_pop(); |
if (arg[i] == NULL) { |
if (arg[i] == NULL) { |
oxserv_push_errormes("stack underflow in executeFunction"); |
oxserv_push_errormes("stack underflow in executeFunction"); |
|
|
for (i--; i >= 0; i--) |
for (i--; i >= 0; i--) { |
oxserv_delete_cmo(arg[i]); |
oxserv_delete_cmo(arg[i]); |
free(arg); |
} |
|
oxserv_free(arg, 0); |
return ; |
return ; |
} |
} |
} |
} |
|
|
/* user function */ |
/* user function */ |
G_userExecuteFunction(name->s, arg, cnt->i); |
G_userExecuteFunction(name->s, arg, total); |
|
|
|
|
for (i = 0; i < cnt->i; i++) { |
for (i = 0; i < total; i++) { |
oxserv_delete_cmo(arg[i]); |
oxserv_delete_cmo(arg[i]); |
} |
} |
|
|
oxserv_delete_cmo(name); |
oxserv_delete_cmo(p1); |
oxserv_delete_cmo(cnt); |
oxserv_delete_cmo(p2); |
|
oxserv_free(arg, 0); |
free(arg); |
|
} |
} |
|
|
/***************************************************************************** |
/***************************************************************************** |
* -- SM_pushCMOtag -- |
* -- SM_pushCMOtag -- |
* push the CMO tag of the top object on the stack. |
* push the CMO tag of the top object on the stack. |
* |
* |
|
* |
|
* |
* PARAM : NONE |
* PARAM : NONE |
* RETURN: NONE |
* RETURN: NONE |
*****************************************************************************/ |
*****************************************************************************/ |
static void |
static void |
oxserv_sm_pushCMOtag() |
oxserv_sm_pushCMOtag() |
{ |
{ |
cmo *c = oxstack_peek(); |
oxstack_node *p = oxstack_peek(); |
cmo_int32 *tag = new_cmo_int32(oxserv_get_cmo_tag(c)); |
cmo *c = p->c; |
oxstack_push((cmo *)tag); |
cmo_int32 *tag; |
|
|
|
if (c == NULL) { |
|
if (p->p != NULL && G_convertCmo) { |
|
c = p->c = G_convertCmo(p->p); |
|
} |
|
} |
|
|
|
if (c == NULL) { |
|
tag = new_cmo_int32(oxserv_get_cmo_tag(c)); |
|
} else { |
|
tag = (cmo_int32 *)new_cmo_error2_string("convert from MathObj to CMO failed"); |
|
} |
|
oxstack_push_cmo((cmo *)tag); |
} |
} |
|
|
|
|
Line 440 oxserv_sm_pushCMOtag() |
|
Line 582 oxserv_sm_pushCMOtag() |
|
static void |
static void |
oxserv_sm_dupErrors() |
oxserv_sm_dupErrors() |
{ |
{ |
|
oxstack_node *p; |
cmo_list *list; |
cmo_list *list; |
cmo *c; |
|
int i; |
int i; |
|
|
list = new_cmo_list(); |
list = new_cmo_list(); |
|
|
for (i = 0; i < oxstack_get_stack_pointer(); i++) { |
for (i = 0; i < oxstack_get_stack_pointer(); i++) { |
c = oxstack_get(i); |
p = oxstack_get(i); |
if (c->tag == CMO_ERROR2) { |
if (p->c && p->c->tag == CMO_ERROR2) { |
list_append(list, c); |
list_append(list, p->c); |
} |
} |
} |
} |
|
|
oxstack_push((cmo *)list); |
oxstack_push_cmo((cmo *)list); |
} |
} |
|
|
|
|
Line 543 oxserv_execute_sm_command(OXFILE *fd, int code) |
|
Line 685 oxserv_execute_sm_command(OXFILE *fd, int code) |
|
oxstack_pop(); |
oxstack_pop(); |
break; |
break; |
case SM_executeFunction: /* 269 */ |
case SM_executeFunction: /* 269 */ |
if (G_userExecuteFunction) |
oxserv_sm_executeFunction(); |
oxserv_sm_executeFunction(); |
|
break; |
break; |
case SM_pushCMOtag: /* 277 */ |
case SM_pushCMOtag: /* 277 */ |
oxserv_sm_pushCMOtag(); |
oxserv_sm_pushCMOtag(); |
Line 585 oxserv_ox_receive(OXFILE *fd) |
|
Line 726 oxserv_ox_receive(OXFILE *fd) |
|
int code; |
int code; |
|
|
tag = receive_ox_tag(fd); |
tag = receive_ox_tag(fd); |
|
printf("get ox=[%d=0x%x]\n", tag, tag); fflush(stdout); |
|
|
switch (tag) { |
switch (tag) { |
case OX_DATA: |
case OX_DATA: |
Line 592 oxserv_ox_receive(OXFILE *fd) |
|
Line 734 oxserv_ox_receive(OXFILE *fd) |
|
c = receive_cmo(fd); |
c = receive_cmo(fd); |
UNBLOCK_INPUT(); |
UNBLOCK_INPUT(); |
DPRINTF(("[CMO:%d=0x%x]", c->tag, c->tag)); |
DPRINTF(("[CMO:%d=0x%x]", c->tag, c->tag)); |
oxstack_push(c); |
oxstack_push_cmo(c); |
break; |
break; |
|
|
case OX_COMMAND: |
case OX_COMMAND: |
Line 614 oxserv_receive(OXFILE *fd) |
|
Line 756 oxserv_receive(OXFILE *fd) |
|
int i = 0; |
int i = 0; |
int ret; |
int ret; |
|
|
|
|
|
/*-----------------------------------------* |
|
* initialize |
|
*-----------------------------------------*/ |
|
|
ret = setjmp(G_jmpbuf); |
ret = setjmp(G_jmpbuf); |
if (ret == 0) { |
if (ret == 0) { |
DPRINTF(("setjmp first time -- %d\n", ret)); |
DPRINTF(("setjmp first time -- %d\n", ret)); |
Line 621 oxserv_receive(OXFILE *fd) |
|
Line 768 oxserv_receive(OXFILE *fd) |
|
DPRINTF(("setjmp return from longjmp() -- %d -- \n", ret)); |
DPRINTF(("setjmp return from longjmp() -- %d -- \n", ret)); |
} |
} |
|
|
|
/*-----------------------------------------* |
|
* main loop |
|
*-----------------------------------------*/ |
for (;; i++) { |
for (;; i++) { |
ret = oxserv_ox_receive(fd); |
ret = oxserv_ox_receive(fd); |
if (ret != OXSERV_SUCCESS) |
if (ret != OXSERV_SUCCESS) |
break; |
break; |
} |
} |
|
|
return (ret); |
return (ret); |
} |
} |
|
|
Line 682 oxserv_set(int mode, void *ptr, void *rsv) |
|
Line 833 oxserv_set(int mode, void *ptr, void *rsv) |
|
{ |
{ |
switch (mode) { |
switch (mode) { |
case OXSERV_SET_EXECUTE_FUNCTION: |
case OXSERV_SET_EXECUTE_FUNCTION: |
G_userExecuteFunction = (void (*)(const char *, cmo **, int))ptr; |
G_userExecuteFunction = (void (*)(const char *, oxstack_node **, int))ptr; |
break; |
break; |
case OXSERV_SET_EXECUTE_STRING_PARSER: |
case OXSERV_SET_EXECUTE_STRING_PARSER: |
G_userExecuteStringParser = (void (*)(const char *))ptr; |
G_userExecuteStringParser = (void (*)(const char *))ptr; |
break; |
break; |
case OXSERV_SET_CONVERT_CMO: |
case OXSERV_SET_CONVERT_CMO: |
G_convertCmo = (cmo *(*)(cmo *))ptr; |
G_convertCmo = (cmo *(*)(void *))ptr; |
break; |
break; |
|
case OXSERV_SET_CONVERT_STR: |
|
G_convertStr = (char *(*)(void *))ptr; |
|
break; |
case OXSERV_SET_DELETE_CMO: |
case OXSERV_SET_DELETE_CMO: |
G_DeleteCmo = (void (*)(cmo *))ptr; |
G_DeleteCmo = (void (*)(cmo *))ptr; |
break; |
break; |
Line 714 oxserv_set(int mode, void *ptr, void *rsv) |
|
Line 868 oxserv_set(int mode, void *ptr, void *rsv) |
|
void |
void |
oxserv_dest() |
oxserv_dest() |
{ |
{ |
oxserv_delete_cmo(G_oxserv_mathcap); |
FREE(G_oxserv_mathcap); |
|
|
oxstack_dest(); |
oxstack_dest(); |
} |
} |
|
|
Line 746 oxserv_executeFunction(const char *func, cmo **arg, in |
|
Line 899 oxserv_executeFunction(const char *func, cmo **arg, in |
|
* PARAM : NONE |
* PARAM : NONE |
* RETURN: NONE |
* RETURN: NONE |
*****************************************************************************/ |
*****************************************************************************/ |
|
static FILE *dfp = NULL; |
int |
int |
main(int argc, char *argv[]) |
main(int argc, char *argv[]) |
{ |
{ |
int fd = 3; |
int fd = 10; |
int i; |
|
int ret; |
|
|
|
|
dfp = fopen("/tmp/oxserv,log", "w"); |
OXFILE *oxfp = oxf_open(fd); |
OXFILE *oxfp = oxf_open(fd); |
|
|
ox_stderr_init(stderr); |
fprintf(dfp, "stderr.init start\n"); fflush(dfp); |
|
ox_stderr_init(dfp); |
|
|
oxserv_set(OXSERV_SET_EXECUTE_FUNCTION, oxserv_executeFunction, NULL); |
fprintf(dfp, "set start\n"); fflush(dfp); |
|
oxserv_set(OXSERV_SET_EXECUTE_FUNCTION, oxserv_executeFunction, NULL); |
|
|
|
fprintf(dfp, "init start\n"); fflush(dfp); |
oxserv_init(oxfp, 0, "$Date$", "oxserv", NULL, NULL); |
oxserv_init(oxfp, 0, "$Date$", "oxserv", NULL, NULL); |
|
|
ret = oxserv_receive(oxfp); |
fprintf(dfp, "recv start\n"); fflush(dfp); |
|
oxserv_receive(oxfp); |
|
|
oxserv_dest(); |
oxserv_dest(); |
oxf_close(oxfp); |
oxf_close(oxfp); |