[BACK]Return to option.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/option.c between version 1.5 and 1.20

version 1.5, 2001/05/04 01:06:24 version 1.20, 2016/03/31 05:27:34
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/option.c,v 1.4 2000/02/24 12:33:47 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/option.c,v 1.19 2016/03/31 03:22:54 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 7 
Line 7 
 #include "kclass.h"  #include "kclass.h"
 #include "lookup.h"  #include "lookup.h"
 #include <signal.h>  #include <signal.h>
   #include "mysig.h"
   
 extern void ctrlC();  extern void ctrlC();
   
Line 17  struct object KsystemVariable(ob)
Line 18  struct object KsystemVariable(ob)
   /* Don't forget to write the keys in usage.c */    /* Don't forget to write the keys in usage.c */
   extern int PrintDollar;    extern int PrintDollar;
   extern int Wrap;    extern int Wrap;
     extern int COutput;
   extern struct ring *CurrentRingp;    extern struct ring *CurrentRingp;
   extern int Verbose;    extern int Verbose;
   extern int UseCriterion1;    extern int UseCriterion1;
Line 45  struct object KsystemVariable(ob)
Line 47  struct object KsystemVariable(ob)
   extern int Homogenize_vec;    extern int Homogenize_vec;
   extern int CmoDMSOutputOption;    extern int CmoDMSOutputOption;
   extern int DebugReductionRed; /* hidden option */    extern int DebugReductionRed; /* hidden option */
     extern int DebugReductionEcart;
   extern char *VersionString;    extern char *VersionString;
   extern int AvoidTheSameRing;    extern int AvoidTheSameRing;
   extern char *LeftBracket;    extern char *LeftBracket;
   extern char *RightBracket;    extern char *RightBracket;
   extern int SecureMode;    extern int SecureMode;
     extern int Ecart;
     extern int EcartAutomaticHomogenization;
     extern int TraceLift;
     extern int DoCancel;
     extern int DebugContentReduction;
     extern int QuoteMode;
     extern int RestrictedMode, RestrictedMode_saved;
     extern int UseDsmall;
   
   int n,i;    int n,i;
   struct object ob1,ob2,ob3,ob4;    struct object ob1 = OINIT;
     struct object ob2 = OINIT;
     struct object ob3 = OINIT;
     struct object ob4 = OINIT;
   struct object rob = NullObject;    struct object rob = NullObject;
   switch (getoaSize(ob)) {    switch (getoaSize(ob)) {
   case 1:   /* get the value */    case 1:   /* get the value */
Line 63  struct object KsystemVariable(ob)
Line 77  struct object KsystemVariable(ob)
         rob = KpoInteger(PrintDollar);          rob = KpoInteger(PrintDollar);
       }else if (strcmp(ob1.lc.str,"Wrap") == 0) {        }else if (strcmp(ob1.lc.str,"Wrap") == 0) {
         rob = KpoInteger(Wrap);          rob = KpoInteger(Wrap);
         }else if (strcmp(ob1.lc.str,"COutput") == 0) {
           rob = KpoInteger(COutput);
       }else if (strcmp(ob1.lc.str,"P") == 0) {        }else if (strcmp(ob1.lc.str,"P") == 0) {
         rob = KpoInteger(CurrentRingp->p);          rob = KpoInteger(CurrentRingp->p);
       }else if (strcmp(ob1.lc.str,"N") == 0) {        }else if (strcmp(ob1.lc.str,"N") == 0) {
Line 177  struct object KsystemVariable(ob)
Line 193  struct object KsystemVariable(ob)
         rob = KpoString(RightBracket);          rob = KpoString(RightBracket);
       }else if (strcmp(ob1.lc.str,"SecureMode")==0) {        }else if (strcmp(ob1.lc.str,"SecureMode")==0) {
         rob = KpoInteger(SecureMode);          rob = KpoInteger(SecureMode);
         }else if (strcmp(ob1.lc.str,"RestrictedMode")==0) {
           rob = KpoInteger(RestrictedMode);
         }else if (strcmp(ob1.lc.str,"Ecart")==0) {
           rob = KpoInteger(Ecart);
         }else if (strcmp(ob1.lc.str,"EcartAutomaticHomogenization")==0) {
           rob = KpoInteger(EcartAutomaticHomogenization);
         }else if (strcmp(ob1.lc.str,"TraceLift")==0) {
           rob = KpoInteger(TraceLift);
         }else if (strcmp(ob1.lc.str,"DoCancel")==0) {
           rob = KpoInteger(DoCancel);
         }else if (strcmp(ob1.lc.str,"DebugContentReduction")==0) {
           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{        }else{
         warningKan("KsystemVariable():Unknown key word.\n");          warningKan("KsystemVariable():Unknown key word.\n");
       }        }
Line 201  struct object KsystemVariable(ob)
Line 233  struct object KsystemVariable(ob)
           P = ob2.lc.ival;  Q should be set here too.            P = ob2.lc.ival;  Q should be set here too.
           CurrentRingp->p = P;            CurrentRingp->p = P;
           rob = KpoInteger(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) {        }else if (strcmp(ob1.lc.str,"NN") == 0) {
         if (ob2.lc.ival <= CurrentRingp->n && ob2.lc.ival >= CurrentRingp->m) {          if (ob2.lc.ival <= CurrentRingp->n && ob2.lc.ival >= CurrentRingp->m) {
           CurrentRingp->nn = ob2.lc.ival;            CurrentRingp->nn = ob2.lc.ival;
Line 249  struct object KsystemVariable(ob)
Line 284  struct object KsystemVariable(ob)
         rob = KpoInteger(Strict2);          rob = KpoInteger(Strict2);
       }else if (strcmp(ob1.lc.str,"SigIgn") == 0) {        }else if (strcmp(ob1.lc.str,"SigIgn") == 0) {
         SigIgn = ob2.lc.ival;          SigIgn = ob2.lc.ival;
         if (SigIgn) signal(SIGINT,SIG_IGN);          if (SigIgn) mysignal(SIGINT,SIG_IGN);
         else signal(SIGINT,ctrlC);          else mysignal(SIGINT,ctrlC);
         rob = KpoInteger(SigIgn);          rob = KpoInteger(SigIgn);
       }else if (strcmp(ob1.lc.str,"KSPushEnvMode") == 0) {        }else if (strcmp(ob1.lc.str,"KSPushEnvMode") == 0) {
         KSPushEnvMode = ob2.lc.ival;          KSPushEnvMode = ob2.lc.ival;
Line 282  struct object KsystemVariable(ob)
Line 317  struct object KsystemVariable(ob)
       }else if (strcmp(ob1.lc.str,"DebugReductionRed") == 0) {        }else if (strcmp(ob1.lc.str,"DebugReductionRed") == 0) {
         DebugReductionRed = KopInteger(ob2);          DebugReductionRed = KopInteger(ob2);
         rob = KpoInteger(DebugReductionRed);          rob = KpoInteger(DebugReductionRed);
         }else if (strcmp(ob1.lc.str,"DebugReductionEcart") == 0) {
           DebugReductionEcart = KopInteger(ob2);
           rob = KpoInteger(DebugReductionEcart);
       }else if (strcmp(ob1.lc.str,"AvoidTheSameRing") == 0) {        }else if (strcmp(ob1.lc.str,"AvoidTheSameRing") == 0) {
         AvoidTheSameRing = KopInteger(ob2);          AvoidTheSameRing = KopInteger(ob2);
         rob = KpoInteger(AvoidTheSameRing);          rob = KpoInteger(AvoidTheSameRing);
Line 292  struct object KsystemVariable(ob)
Line 330  struct object KsystemVariable(ob)
           errorKan1("%s\n","You cannot weaken the security level.");            errorKan1("%s\n","You cannot weaken the security level.");
         }          }
         rob = KpoInteger(SecureMode);          rob = KpoInteger(SecureMode);
         }else if (strcmp(ob1.lc.str,"RestrictedMode") == 0) {
           if (KopInteger(ob2) >= RestrictedMode) {
             RestrictedMode = KopInteger(ob2);
             RestrictedMode_saved = RestrictedMode;
           }else{
             errorKan1("%s\n","You cannot weaken the RestrictedMode level.");
           }
           rob = KpoInteger(RestrictedMode);
         }else if (strcmp(ob1.lc.str,"Ecart") == 0) {
           Ecart = KopInteger(ob2);
           rob = KpoInteger(Ecart);
         }else if (strcmp(ob1.lc.str,"EcartAutomaticHomogenization") == 0) {
           EcartAutomaticHomogenization = KopInteger(ob2);
           rob = KpoInteger(EcartAutomaticHomogenization);
         }else if (strcmp(ob1.lc.str,"TraceLift") == 0) {
           TraceLift = KopInteger(ob2);
           rob = KpoInteger(TraceLift);
         }else if (strcmp(ob1.lc.str,"DoCancel") == 0) {
           DoCancel = KopInteger(ob2);
           rob = KpoInteger(DoCancel);
         }else if (strcmp(ob1.lc.str,"DebugContentReduction") == 0) {
           DebugContentReduction = KopInteger(ob2);
           rob = KpoInteger(DebugContentReduction);
         }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{        }else{
         warningKan("KsystemVariable():Unknown key word.\n");          warningKan("KsystemVariable():Unknown key word.\n");
       }        }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.20

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>