[BACK]Return to k2.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097

Diff for /OpenXM/src/k097/k2.c between version 1.1.1.1 and 1.6

version 1.1.1.1, 1999/10/08 02:12:15 version 1.6, 2015/10/10 11:29:46
Line 1 
Line 1 
   /* $OpenXM: OpenXM/src/k097/k2.c,v 1.5 2015/09/29 01:52:14 takayama Exp $ */
 /* k2.c main program of k. */  /* k2.c main program of k. */
   
 #define DATE "1998,12/15"  #define DATE "1998,12/15"
 #include <stdio.h>  #include <stdio.h>
   #include <string.h>
   #include <stdlib.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
 #include "extern.h"  #include "extern.h"
Line 19  extern int DebugMode;
Line 22  extern int DebugMode;
 extern int K00_verbose;  extern int K00_verbose;
   
 int Startupk2 = 1;  int Startupk2 = 1;
 int FactorA = 0;  /* sm1(" (aa) run "); does not work. */  
   
   
 main(int argc,char *argv[]) {  main(int argc,char *argv[]) {
   extern int Saki;    extern int Saki;
   extern int Interactive;    extern int Interactive;
Line 33  main(int argc,char *argv[]) {
Line 36  main(int argc,char *argv[]) {
       if (strcmp(argv[i],"-d") == 0) {        if (strcmp(argv[i],"-d") == 0) {
         fprintf(stderr,"DebugCompiler = 1\n");          fprintf(stderr,"DebugCompiler = 1\n");
         DebugCompiler = 1;          DebugCompiler = 1;
       }else if (strcmp(argv[i],"-f") == 0) {  
         fprintf(stderr,"Loading factor-a.sm1\n");  
         FactorA = 1;  
       }else if (strcmp(argv[i],"-nostartup") == 0) {        }else if (strcmp(argv[i],"-nostartup") == 0) {
         fprintf(stderr,"Do not load startup.k\n");          fprintf(stderr,"Do not load startup.k\n");
         Startupk2 = 0;          Startupk2 = 0;
Line 46  main(int argc,char *argv[]) {
Line 46  main(int argc,char *argv[]) {
       }else{        }else{
         fprintf(stderr,"Usage: 1: k\n");          fprintf(stderr,"Usage: 1: k\n");
         fprintf(stderr,"       2: k -d  (DebugCompiler=1)\n");          fprintf(stderr,"       2: k -d  (DebugCompiler=1)\n");
         fprintf(stderr,"       3: k -f  (load factor-a.sm1)\n");          fprintf(stderr,"       3: k -nostartup  (do not load startup.k)\n");
         fprintf(stderr,"       4: k -nostartup  (do not load startup.k)\n");          fprintf(stderr,"       4: k -v (verbose) or k -vv \n");
         fprintf(stderr,"       5: k -v (verbose) or k -vv \n");  
         exit(1);          exit(1);
       }        }
     }      }
   }    }
 #ifdef CALLASIR  #ifdef CALLASIR
   GC_init();    GC_INIT(); /* GC_init(); */
   KasirKanAsirInit();    KasirKanAsirInit();
 #endif  #endif
   KSstart();   /********  initialize ***********/    KSstart();   /********  initialize ***********/
Line 63  main(int argc,char *argv[]) {
Line 62  main(int argc,char *argv[]) {
   
   fprintf(stderr,"This is kan/k0 Version %s",DATE);    fprintf(stderr,"This is kan/k0 Version %s",DATE);
   fprintf(stderr,"\n");    fprintf(stderr,"\n");
     fprintf(stderr,"WARNING: This is an EXPERIMENTAL version\n");
   if (K00_verbose == 1) {    if (K00_verbose == 1) {
     KSexecuteString(" /K00_verbose 1 def ");      KSexecuteString(" /K00_verbose 1 def ");
   }else if (K00_verbose == 2) {    }else if (K00_verbose == 2) {
Line 73  main(int argc,char *argv[]) {
Line 73  main(int argc,char *argv[]) {
   execFile("var.sm1"); KSexecuteString(" strictMode ");    execFile("var.sm1"); KSexecuteString(" strictMode ");
   execFile("incmac.sm1");    execFile("incmac.sm1");
   execFile("slib.sm1");    execFile("slib.sm1");
   if (FactorA) execFile("factor-b.sm1");  
   
   printf("\n\nIn(1)=");    printf("\n\nIn(1)= ");
   s = "startup.k";    s = "startup.k";
   if (Startupk2) {    if (Startupk2) {
     strcpy(tname,s);      strcpy(tname,s);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.6

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