version 1.1.1.1, 1999/10/08 02:12:02 |
version 1.3, 2000/02/24 12:33:47 |
|
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.2 1999/11/07 13:24:19 takayama Exp $ */ |
/* primitive.c */ |
/* primitive.c */ |
/* The functions in this module were in stackmachine.c */ |
/* The functions in this module were in stackmachine.c */ |
|
|
|
|
{ |
{ |
int size; |
int size; |
int i; |
int i; |
|
extern char *LeftBracket, *RightBracket; |
size = ob.lc.ival; |
size = ob.lc.ival; |
fprintf(fp,"[ "); |
fprintf(fp,"%s ",LeftBracket); |
for (i=0; i<size; i++) { |
for (i=0; i<size; i++) { |
if (PrintComma && (i != 0)) { |
if (PrintComma && (i != 0)) { |
fprintf(fp," , "); |
fprintf(fp," , "); |
|
|
} |
} |
printObject((ob.rc.op)[i],0,fp); |
printObject((ob.rc.op)[i],0,fp); |
} |
} |
fprintf(fp," ] "); |
fprintf(fp," %s ",RightBracket); |
if (nl) fprintf(fp,"\n"); |
if (nl) fprintf(fp,"\n"); |
} |
} |
|
|
Line 431 struct object ob; |
|
Line 433 struct object ob; |
|
extern int History; |
extern int History; |
extern struct ring *CurrentRingp; |
extern struct ring *CurrentRingp; |
extern TimerOn; |
extern TimerOn; |
|
extern SecureMode; |
|
|
if (DebugStack >= 2) { |
if (DebugStack >= 2) { |
fprintf(Fstack,"In execute %d\n",ob.lc.ival); printOperandStack(); |
fprintf(Fstack,"In execute %d\n",ob.lc.ival); printOperandStack(); |
Line 1047 struct object ob; |
|
Line 1050 struct object ob; |
|
/* ob2 ob1 */ |
/* ob2 ob1 */ |
ob1 = Kpop(); |
ob1 = Kpop(); |
ob2 = Kpop(); |
ob2 = Kpop(); |
|
if (SecureMode) errorStackmachine("Security violation: you cannot open a file."); |
switch(ob1.tag) { |
switch(ob1.tag) { |
case Sdollar: break; |
case Sdollar: break; |
default: errorStackmachine("Usage:file"); |
default: errorStackmachine("Usage:file"); |
Line 1179 struct object ob; |
|
Line 1183 struct object ob; |
|
case Sstring: break; |
case Sstring: break; |
default: errorStackmachine("Usage:system"); |
default: errorStackmachine("Usage:system"); |
} |
} |
|
if (SecureMode) errorStackmachine("Security violation."); |
system( ob1.lc.str ); |
system( ob1.lc.str ); |
break; |
break; |
|
|