Annotation of OpenXM/src/kan96xx/Kan/sm.c, Revision 1.24
1.24 ! takayama 1: /* sm.c $OpenXM: OpenXM/src/kan96xx/Kan/sm.c,v 1.23 2004/02/23 04:54:45 takayama Exp $ */
1.23 takayama 2: #define DATE "2004/02/23"
3: #define RELEASE "3.040223" /* 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;
1.24 ! takayama 31: extern unsigned int GC_version;
1.1 maekawa 32:
33: main(argc,argv)
1.15 takayama 34: int argc;
35: char *argv[];
1.1 maekawa 36: {
37: int i;
38: StandardMacros = 1;
39: VersionString = RELEASE;
40: if (argc > 1) {
41: for (i=1; i<argc; i++) {
42: if (strcmp(argv[i],"-standardmacros") == 0) {
1.15 takayama 43: StandardMacros = 0; /* disable of the standard macros */
1.1 maekawa 44: }else if (strcmp(argv[i],"-f") == 0) {
1.15 takayama 45: StartAFile = 1;
46: i++;
47: if (i >= argc) {
48: fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
49: fprintf(stderr,"3. sm1 -standardmacros\n");
50: exit(15);
51: }
52: StartFile = argv[i];
1.1 maekawa 53: }else if (strcmp(argv[i],"-s") == 0) {
1.15 takayama 54: StartAString = 1;
55: i++;
56: if (i >= argc) {
57: fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
58: fprintf(stderr,"3. sm1 -standardmacros\n");
59: fprintf(stderr,"4. sm1 -q (quiet)\n");
60: fprintf(stderr,"5. sm1 -s \"command strings\" \n");
61: exit(15);
62: }
63: StartString = argv[i];
1.1 maekawa 64: } else if (strcmp(argv[i],"-q") == 0) {
1.15 takayama 65: Quiet = 1;
1.1 maekawa 66: }else{
1.15 takayama 67: fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
68: fprintf(stderr,"3. sm1 -standardmacros\n");
69: fprintf(stderr,"4. sm1 -q (quiet)\n");
70: fprintf(stderr,"5. sm1 -s \"command strings\" \n");
71: exit(15);
1.1 maekawa 72: }
73: }
74: }
75:
76:
77: stackmachine_init();
78: if (!Quiet) {
79: fprintf(Fstack,"\n");
80: fprintf(Fstack,"Kan/StackMachine1");
1.20 takayama 81: fprintf(Fstack," 1991 April --- 2003.\n");
1.1 maekawa 82: fprintf(Fstack," Release %s (C) N. Takayama\n",
1.15 takayama 83: RELEASE);
1.24 ! takayama 84: fprintf(Fstack,"gc %d.%d-%d (C) Boehm, Demers, Xerox, SGI, HP,\nGNU MP 4.1 (C) Free Software Foundation,\n",GC_version >>16, (GC_version >> 8)&0xff,GC_version & 0xff);
1.20 takayama 85: fprintf(Fstack,"OpenXM RFC100, 101, 103 (C) OpenXM developing team. \n");
1.1 maekawa 86: fprintf(Fstack,"This software may be freely distributed as is ");
1.20 takayama 87: fprintf(Fstack,"with no warranty expressed. \nSee OpenXM/Copyright/Copyright.generic\n");
1.1 maekawa 88: fprintf(Fstack,"Info: http://www.math.kobe-u.ac.jp/KAN, kan@math.kobe-u.ac.jp. ? for help.\n");
89: #ifdef NOGC
90: fprintf(Fstack,"No garbage collector is installed.\n");
91: #endif
92: }
93: KinitKan();
94: if (!Quiet) {
95: fprintf(Fstack,"\nReady\n\n");
96: }
97: scanner();
98: Kclose(); stackmachine_close();
99: }
100:
101:
102:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>