=================================================================== RCS file: /home/cvs/OpenXM/src/ox_ntl/oxserv.h,v retrieving revision 1.2 retrieving revision 1.4 diff -u -p -r1.2 -r1.4 --- OpenXM/src/ox_ntl/oxserv.h 2003/11/08 12:34:00 1.2 +++ OpenXM/src/ox_ntl/oxserv.h 2003/11/17 09:55:52 1.4 @@ -1,8 +1,13 @@ -/* $OpenXM: OpenXM/src/ox_ntl/oxserv.h,v 1.1 2003/11/03 03:11:21 iwane Exp $ */ +/* $OpenXM: OpenXM/src/ox_ntl/oxserv.h,v 1.3 2003/11/15 09:06:20 iwane Exp $ */ #ifndef __OX_SERVE_H__ #define __OX_SERVE_H__ +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include #include "ox_toolkit.h" #ifndef OXSERV_FAILURE @@ -14,14 +19,29 @@ extern "C" { #endif -void oxserv_delete_cmo (cmo *); +/* signal */ +extern int G_oxserv_sigusr1cnt; +extern int G_oxserv_sigusr1flag; +#define BLOCK_INPUT() do { \ + G_oxserv_sigusr1cnt++; \ +} while(0) + +#define UNBLOCK_INPUT() do { \ + G_oxserv_sigusr1cnt--; \ + if (G_oxserv_sigusr1cnt == 0 && G_oxserv_sigusr1flag) { \ + oxserv_sm_control_reset_connection(0); \ + } \ +} while(0) + /* c.f. mathcap_init in ox_toolkit */ int oxserv_init (OXFILE *, int, char *, char *, int *, int *); void oxserv_dest (void); int oxserv_receive (OXFILE *); +void oxserv_sm_control_reset_connection(int); + int oxserv_set (int mode, void *, void *); #define OXSERV_SET_EXECUTE_STRING_PARSER (0x01) @@ -30,6 +50,8 @@ int oxserv_set (int mode, void *, void *); #define OXSERV_SET_DELETE_CMO (0x04) #define OXSERV_SET_GET_CMOTAG (0x05) +/* debug */ +void dprintf(const char *, ...); #ifdef __cplusplus }