=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/ox_texmacs.c,v retrieving revision 1.16 retrieving revision 1.22 diff -u -p -r1.16 -r1.22 --- OpenXM/src/kxx/ox_texmacs.c 2004/03/09 07:10:46 1.16 +++ OpenXM/src/kxx/ox_texmacs.c 2006/01/19 12:24:15 1.22 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kxx/ox_texmacs.c,v 1.15 2004/03/09 02:53:05 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kxx/ox_texmacs.c,v 1.21 2005/06/16 05:07:24 takayama Exp $ */ #include #include @@ -25,18 +25,21 @@ #define DATA_BEGIN_V "" /* "\002verbatim:" */ #define DATA_BEGIN_L "" /* "\002latex:" */ #define DATA_BEGIN_P "" /* "\002channel:prompt " */ +#define DATA_BEGIN_PS "" /* "\002ps: " */ #define DATA_END "" /* "\005" */ #else #define DATA_BEGIN_V "\002verbatim:" #define DATA_BEGIN_L "\002latex:" #define DATA_BEGIN_P "\002prompt:" +#define DATA_BEGIN_PS "\002ps:" #define DATA_END "\005" #endif /* -#define END_OF_INPUT '#' +#define TEXMACS_END_OF_INPUT '#' */ -#define END_OF_INPUT '\n' +#define TEXMACS_END_OF_INPUT '\n' +#define CFEP_END_OF_INPUT 0x5 /* Table for the engine type. */ #define ASIR 1 @@ -45,9 +48,16 @@ extern int Quiet; extern JMP_BUF EnvOfStackMachine; +extern int Calling_ctrlC_hook; +extern int RestrictedMode, RestrictedMode_saved; int Format=1; /* 1 : latex mode */ int OutputLimit_for_TeXmacs = (1024*10); +/* Type of View part (user interface engine) */ +#define V_TEXMACS 1 +#define V_CFEP 2 +int View = V_TEXMACS ; + int TM_Engine = ASIR ; int TM_asirStarted = 0; int TM_sm1Started = 0; @@ -65,8 +75,12 @@ static char *readString(FILE *fp,char *prolog, char *e static void printv(char *s); static void printl(char *s); static void printp(char *s); +static void printps(char *s); static void printCopyright(char *s); static int startEngine(int type,char *msg); +static int isPS(char *s); +static int end_of_input(int c); +static void setDefaultParameterForCfep(); /* tail -f /tmp/debug-texmacs.txt Debug output to understand the timing problem of pipe interface. @@ -77,7 +91,7 @@ main(int argc,char *argv[]) { char *s; char *r; char *sys; - struct object ob; + struct object ob = OINIT; int irt=0; int vmode=1; char *openxm_home; @@ -99,22 +113,31 @@ main(int argc,char *argv[]) { /* Set consts */ Quiet = 1; for (i=1; i