=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/ox_texmacs.c,v retrieving revision 1.33 retrieving revision 1.40 diff -u -p -r1.33 -r1.40 --- OpenXM/src/kxx/ox_texmacs.c 2006/03/06 08:55:31 1.33 +++ OpenXM/src/kxx/ox_texmacs.c 2016/08/24 22:38:12 1.40 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kxx/ox_texmacs.c,v 1.32 2006/03/03 10:55:33 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kxx/ox_texmacs.c,v 1.39 2016/03/31 05:27:34 takayama Exp $ */ #include #include @@ -9,14 +9,14 @@ #include "serversm.h" #include "ox_pathfinder.h" -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__MSYS__) #define JMP_BUF sigjmp_buf -#define SETJMP(env) sigsetjmp(env,1) -#define LONGJMP(env,p) siglongjmp(env,p) +#define SETJMP(env) MYSIGSETJMP(env,1) +#define LONGJMP(env,p) MYSIGLONGJMP(env,p) #else #define JMP_BUF jmp_buf -#define SETJMP(env) setjmp(env) -#define LONGJMP(env,p) longjmp(env,p) +#define SETJMP(env) MYSETJMP(env) +#define LONGJMP(env,p) MYLONGJMP(env,p) #endif /* @@ -28,32 +28,38 @@ #define GENERIC 0 /* DEBUG, xml */ #define V_TEXMACS 1 #define V_CFEP 2 +#define V_QFEP 3 int View = V_TEXMACS ; char *Data_begin_v[] = { "", "\002verbatim:", "\002", + "" }; char *Data_begin_l[] = { "", "\002latex:", - "\002latex:" + "\002latex:", + "" }; char *Data_begin_p[] = { "", "\002prompt:", - "\002prompt:" + "\002prompt:", + "" }; char *Data_begin_ps[] = { "", "\002ps:", - "\002ps:" + "\002ps:", + "" }; char *Data_end[] = { "", "\005", - "\n\005" /* \n is not a part of the protocol. */ + "\n\005", /* \n is not a part of the protocol. */ + "" }; /* todo: start_of_input */ @@ -61,7 +67,8 @@ char *Data_end[] = { char End_of_input[] = { 0x5, /* Use ^E and Return to end the input. */ '\n', /* TEXMACS_END_OF_INPUT. 0xd should be used for multiple lines. */ - 0x5 /* CFEP_END_OF_INPUT */ + 0x5, /* CFEP_END_OF_INPUT */ + 0x5 }; /* Table for the engine type. */ @@ -143,6 +150,9 @@ main(int argc,char *argv[]) { Dfp = fopen("/tmp/debug-texmacs.txt","w"); #endif + /* Initialize kanlib (gc is also initialized) */ + KSstart(); + /* Set consts */ Quiet = 1; for (i=1; i