=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/option.c,v retrieving revision 1.16 retrieving revision 1.20 diff -u -p -r1.16 -r1.20 --- OpenXM/src/kan96xx/Kan/option.c 2005/06/16 05:07:23 1.16 +++ OpenXM/src/kan96xx/Kan/option.c 2016/03/31 05:27:34 1.20 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/option.c,v 1.15 2004/09/17 02:42:57 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/option.c,v 1.19 2016/03/31 03:22:54 takayama Exp $ */ #include #include "datatype.h" #include "stackm.h" @@ -7,6 +7,7 @@ #include "kclass.h" #include "lookup.h" #include +#include "mysig.h" extern void ctrlC(); @@ -17,6 +18,7 @@ struct object KsystemVariable(ob) /* Don't forget to write the keys in usage.c */ extern int PrintDollar; extern int Wrap; + extern int COutput; extern struct ring *CurrentRingp; extern int Verbose; extern int UseCriterion1; @@ -58,6 +60,7 @@ struct object KsystemVariable(ob) extern int DebugContentReduction; extern int QuoteMode; extern int RestrictedMode, RestrictedMode_saved; + extern int UseDsmall; int n,i; struct object ob1 = OINIT; @@ -74,6 +77,8 @@ struct object KsystemVariable(ob) rob = KpoInteger(PrintDollar); }else if (strcmp(ob1.lc.str,"Wrap") == 0) { rob = KpoInteger(Wrap); + }else if (strcmp(ob1.lc.str,"COutput") == 0) { + rob = KpoInteger(COutput); }else if (strcmp(ob1.lc.str,"P") == 0) { rob = KpoInteger(CurrentRingp->p); }else if (strcmp(ob1.lc.str,"N") == 0) { @@ -202,6 +207,8 @@ struct object KsystemVariable(ob) rob = KpoInteger(DebugContentReduction); }else if (strcmp(ob1.lc.str,"QuoteMode")==0) { rob = KpoInteger(QuoteMode); + }else if (strcmp(ob1.lc.str,"UseDsmall")==0) { + rob = KpoInteger(UseDsmall); }else{ warningKan("KsystemVariable():Unknown key word.\n"); } @@ -226,6 +233,9 @@ struct object KsystemVariable(ob) P = ob2.lc.ival; Q should be set here too. CurrentRingp->p = P; rob = KpoInteger(P); */ + }else if (strcmp(ob1.lc.str,"COutput") == 0) { + COutput = ob2.lc.ival; + rob = KpoInteger(COutput); }else if (strcmp(ob1.lc.str,"NN") == 0) { if (ob2.lc.ival <= CurrentRingp->n && ob2.lc.ival >= CurrentRingp->m) { CurrentRingp->nn = ob2.lc.ival; @@ -274,8 +284,8 @@ struct object KsystemVariable(ob) rob = KpoInteger(Strict2); }else if (strcmp(ob1.lc.str,"SigIgn") == 0) { SigIgn = ob2.lc.ival; - if (SigIgn) signal(SIGINT,SIG_IGN); - else signal(SIGINT,ctrlC); + if (SigIgn) mysignal(SIGINT,SIG_IGN); + else mysignal(SIGINT,ctrlC); rob = KpoInteger(SigIgn); }else if (strcmp(ob1.lc.str,"KSPushEnvMode") == 0) { KSPushEnvMode = ob2.lc.ival; @@ -346,6 +356,9 @@ struct object KsystemVariable(ob) }else if (strcmp(ob1.lc.str,"QuoteMode") == 0) { QuoteMode = KopInteger(ob2); rob = KpoInteger(QuoteMode); + }else if (strcmp(ob1.lc.str,"UseDsmall") == 0) { + UseDsmall = KopInteger(ob2); + rob = KpoInteger(UseDsmall); }else{ warningKan("KsystemVariable():Unknown key word.\n"); }