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

Annotation of OpenXM/src/kan96xx/Kan/sm.c, Revision 1.15

1.15    ! takayama    1: /* sm.c   $OpenXM: OpenXM/src/kan96xx/Kan/sm.c,v 1.14 2000/12/03 07:29:38 takayama Exp $ */
1.14      takayama    2: #define DATE "2000/12/03"
                      3: #define RELEASE "3.001203"    /* This "string" must be an increasing seq.*/
1.15    ! takayama    4: /* You should write the same string in global.c
        !             5:                      VersionString for ox_sm1.
        !             6:                  Change also OxVersion in plugin/oxmisc.c
        !             7:                  if you install new openXM protocol.*/
1.1       maekawa     8:
                      9: #include <stdio.h>
                     10: #include "datatype.h"
                     11: #include "stackm.h"
                     12: #include "extern.h"
                     13: /*  Release 2.981108 (1998, 11/8 --Sunday) ftp, source, binary-linux
                     14:                      packages; bfunction, hol, gkz, appell.
                     15:     Release 2.981117 (1998, 11/17 --Tuesday)
                     16:                      packages; resol0, r-interface (new), oxasir(new)
                     17:                      bugfix : KdefaultPolyRing, hilbert.c
                     18:     Release 2.981123 bugfix : flush for solaris. bugfix : lockctrlCForOx().
                     19:     Release 2.981217 Rather stable release.
1.15    ! takayama   20:     New project on CMO starts.
1.1       maekawa    21:
                     22: */
                     23:
                     24: extern int StandardMacros;
                     25: extern int StartAFile;
                     26: extern char *StartFile;
                     27: extern int StartAString;
                     28: extern char *StartString;
                     29: extern int Quiet;
                     30: extern char *VersionString;
                     31:
                     32: main(argc,argv)
1.15    ! takayama   33:      int argc;
        !            34:      char *argv[];
1.1       maekawa    35: {
                     36:   int i;
                     37:   StandardMacros = 1;
                     38:   VersionString = RELEASE;
                     39:   if (argc > 1) {
                     40:     for (i=1; i<argc; i++) {
                     41:       if (strcmp(argv[i],"-standardmacros") == 0) {
1.15    ! takayama   42:         StandardMacros = 0; /* disable of the standard macros */
1.1       maekawa    43:       }else if (strcmp(argv[i],"-f") == 0) {
1.15    ! takayama   44:         StartAFile = 1;
        !            45:         i++;
        !            46:         if (i >= argc) {
        !            47:           fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
        !            48:           fprintf(stderr,"3. sm1 -standardmacros\n");
        !            49:           exit(15);
        !            50:         }
        !            51:         StartFile = argv[i];
1.1       maekawa    52:       }else if (strcmp(argv[i],"-s") == 0) {
1.15    ! takayama   53:         StartAString = 1;
        !            54:         i++;
        !            55:         if (i >= argc) {
        !            56:           fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
        !            57:           fprintf(stderr,"3. sm1 -standardmacros\n");
        !            58:           fprintf(stderr,"4. sm1 -q  (quiet)\n");
        !            59:           fprintf(stderr,"5. sm1 -s \"command strings\" \n");
        !            60:           exit(15);
        !            61:         }
        !            62:         StartString = argv[i];
1.1       maekawa    63:       } else if (strcmp(argv[i],"-q") == 0) {
1.15    ! takayama   64:         Quiet = 1;
1.1       maekawa    65:       }else{
1.15    ! takayama   66:         fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
        !            67:         fprintf(stderr,"3. sm1 -standardmacros\n");
        !            68:         fprintf(stderr,"4. sm1 -q  (quiet)\n");
        !            69:         fprintf(stderr,"5. sm1 -s \"command strings\" \n");
        !            70:         exit(15);
1.1       maekawa    71:       }
                     72:     }
                     73:   }
                     74:
                     75:
                     76:   stackmachine_init();
                     77:   if (!Quiet) {
                     78:     fprintf(Fstack,"\n");
                     79:     fprintf(Fstack,"Kan/StackMachine1");
1.7       takayama   80:     fprintf(Fstack,"                         1991 April --- 2000.\n");
1.1       maekawa    81:     fprintf(Fstack,"                              Release %s (C) N. Takayama\n",
1.15    ! takayama   82:             RELEASE);
1.1       maekawa    83:     fprintf(Fstack,"gc 4.14 (C) Boehm, Demers, GNU MP 2.0.2 (C) Free Software Foundation,\n");
1.7       takayama   84:     fprintf(Fstack,"OpenXM (C) OpenXM developing team. \n");
1.1       maekawa    85:     fprintf(Fstack,"This software may be freely distributed as is ");
                     86:     fprintf(Fstack,"with no warranty expressed.\n");
                     87:     fprintf(Fstack,"Info: http://www.math.kobe-u.ac.jp/KAN, kan@math.kobe-u.ac.jp. ? for help.\n");
                     88: #ifdef NOGC
                     89:     fprintf(Fstack,"No garbage collector is installed.\n");
                     90: #endif
                     91:   }
                     92:   KinitKan();
                     93:   if (!Quiet) {
                     94:     fprintf(Fstack,"\nReady\n\n");
                     95:   }
                     96:   scanner();
                     97:   Kclose();  stackmachine_close();
                     98: }
                     99:
                    100:
                    101:

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