| version 1.13, 2003/08/21 02:30:23 |
version 1.18, 2011/10/05 05:46:14 |
|
|
| /* $OpenXM: OpenXM/src/kan96xx/Kan/option.c,v 1.12 2003/08/20 01:39:17 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/option.c,v 1.17 2006/12/21 05:29:49 takayama Exp $ */ |
| #include <stdio.h> |
#include <stdio.h> |
| #include "datatype.h" |
#include "datatype.h" |
| #include "stackm.h" |
#include "stackm.h" |
| Line 17 struct object KsystemVariable(ob) |
|
| Line 17 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 56 struct object KsystemVariable(ob) |
|
| Line 57 struct object KsystemVariable(ob) |
|
| extern int TraceLift; |
extern int TraceLift; |
| extern int DoCancel; |
extern int DoCancel; |
| extern int DebugContentReduction; |
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 69 struct object KsystemVariable(ob) |
|
| Line 76 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 183 struct object KsystemVariable(ob) |
|
| Line 192 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) { |
}else if (strcmp(ob1.lc.str,"Ecart")==0) { |
| rob = KpoInteger(Ecart); |
rob = KpoInteger(Ecart); |
| }else if (strcmp(ob1.lc.str,"EcartAutomaticHomogenization")==0) { |
}else if (strcmp(ob1.lc.str,"EcartAutomaticHomogenization")==0) { |
| Line 193 struct object KsystemVariable(ob) |
|
| Line 204 struct object KsystemVariable(ob) |
|
| rob = KpoInteger(DoCancel); |
rob = KpoInteger(DoCancel); |
| }else if (strcmp(ob1.lc.str,"DebugContentReduction")==0) { |
}else if (strcmp(ob1.lc.str,"DebugContentReduction")==0) { |
| rob = KpoInteger(DebugContentReduction); |
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 217 struct object KsystemVariable(ob) |
|
| Line 232 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 311 struct object KsystemVariable(ob) |
|
| Line 329 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) { |
}else if (strcmp(ob1.lc.str,"Ecart") == 0) { |
| Ecart = KopInteger(ob2); |
Ecart = KopInteger(ob2); |
| rob = KpoInteger(Ecart); |
rob = KpoInteger(Ecart); |
| Line 326 struct object KsystemVariable(ob) |
|
| Line 352 struct object KsystemVariable(ob) |
|
| }else if (strcmp(ob1.lc.str,"DebugContentReduction") == 0) { |
}else if (strcmp(ob1.lc.str,"DebugContentReduction") == 0) { |
| DebugContentReduction = KopInteger(ob2); |
DebugContentReduction = KopInteger(ob2); |
| rob = KpoInteger(DebugContentReduction); |
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"); |
| } |
} |