--- stack/stack.c 2002/03/12 14:53:19 1.105 +++ stack/stack.c 2002/03/12 21:05:11 1.107 @@ -37,12 +37,15 @@ #include /* EX_NOINPUT, EX_USAGE */ #include + +#ifdef __linux__ /* mtrace, muntrace */ #include /* ioctl */ #include /* KDMKTONE */ #include +#endif /* __linux__ */ #include "stack.h" @@ -883,7 +886,9 @@ if(env->free_string!=NULL) free(env->free_string); +#ifdef __linux__ muntrace(); +#endif exit(EXIT_SUCCESS); } @@ -958,7 +963,9 @@ int c; /* getopt option character */ +#ifdef __linux__ mtrace(); +#endif init_env(&myenv); @@ -989,7 +996,7 @@ } if(myenv.interactive) { - printf("Stack version $Revision: 1.105 $\n\ + printf("Stack version $Revision: 1.107 $\n\ Copyright (C) 2002 Mats Alritzson and Teddy Hogeborn\n\ Stack comes with ABSOLUTELY NO WARRANTY; for details type `warranty;'.\n\ This is free software, and you are welcome to redistribute it\n\ @@ -1362,6 +1369,26 @@ eval(env); } +extern void sx_656c7365(environment *env) +{ + if(env->head==NULL || CDR(env->head)==NULL + || CDR(CDR(env->head))==NULL || CDR(CDR(CDR(env->head)))==NULL) { + printerr("Too Few Arguments"); + env->err= 1; + return; + } + + if(CAR(CDR(env->head))->type!=symb + || strcmp(CAR(CDR(env->head))->content.sym->id, "if")!=0) { + printerr("Bad Argument Type"); + env->err= 2; + return; + } + + swap(env); toss(env); + ifelse(env); +} + /* "while" */ extern void sx_7768696c65(environment *env) { @@ -1652,6 +1679,7 @@ return sx_72656164(env); } +#ifdef __linux__ extern void beep(environment *env) { int freq, dur, period, ticks; @@ -1694,6 +1722,7 @@ abort(); } } +#endif /* __linux__ */ /* "wait" */ extern void sx_77616974(environment *env)