Annotation of OpenXM/src/kan96xx/Kan/sm.c, Revision 1.27
1.27 ! ohara 1: /* sm.c $OpenXM: OpenXM/src/kan96xx/Kan/sm.c,v 1.26 2005/06/15 02:22:51 takayama Exp $ */
1.26 takayama 2: #define DATE "2005/06/15"
3: #define RELEASE "3.050615" /* 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>
1.27 ! ohara 10: #include <stdlib.h>
1.1 maekawa 11: #include "datatype.h"
12: #include "stackm.h"
13: #include "extern.h"
14: /* Release 2.981108 (1998, 11/8 --Sunday) ftp, source, binary-linux
15: packages; bfunction, hol, gkz, appell.
16: Release 2.981117 (1998, 11/17 --Tuesday)
17: packages; resol0, r-interface (new), oxasir(new)
18: bugfix : KdefaultPolyRing, hilbert.c
19: Release 2.981123 bugfix : flush for solaris. bugfix : lockctrlCForOx().
20: Release 2.981217 Rather stable release.
1.15 takayama 21: New project on CMO starts.
1.1 maekawa 22:
23: */
24:
25: extern int StandardMacros;
26: extern int StartAFile;
27: extern char *StartFile;
28: extern int StartAString;
29: extern char *StartString;
30: extern int Quiet;
31: extern char *VersionString;
1.24 takayama 32: extern unsigned int GC_version;
1.1 maekawa 33:
34: main(argc,argv)
1.15 takayama 35: int argc;
36: char *argv[];
1.1 maekawa 37: {
38: int i;
39: StandardMacros = 1;
40: VersionString = RELEASE;
41: if (argc > 1) {
42: for (i=1; i<argc; i++) {
43: if (strcmp(argv[i],"-standardmacros") == 0) {
1.15 takayama 44: StandardMacros = 0; /* disable of the standard macros */
1.1 maekawa 45: }else if (strcmp(argv[i],"-f") == 0) {
1.15 takayama 46: StartAFile = 1;
47: i++;
48: if (i >= argc) {
49: fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
50: fprintf(stderr,"3. sm1 -standardmacros\n");
51: exit(15);
52: }
53: StartFile = argv[i];
1.1 maekawa 54: }else if (strcmp(argv[i],"-s") == 0) {
1.15 takayama 55: StartAString = 1;
56: i++;
57: if (i >= argc) {
58: fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
59: fprintf(stderr,"3. sm1 -standardmacros\n");
60: fprintf(stderr,"4. sm1 -q (quiet)\n");
61: fprintf(stderr,"5. sm1 -s \"command strings\" \n");
62: exit(15);
63: }
64: StartString = argv[i];
1.1 maekawa 65: } else if (strcmp(argv[i],"-q") == 0) {
1.15 takayama 66: Quiet = 1;
1.1 maekawa 67: }else{
1.15 takayama 68: fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n");
69: fprintf(stderr,"3. sm1 -standardmacros\n");
70: fprintf(stderr,"4. sm1 -q (quiet)\n");
71: fprintf(stderr,"5. sm1 -s \"command strings\" \n");
72: exit(15);
1.1 maekawa 73: }
74: }
75: }
76:
77:
78: stackmachine_init();
79: if (!Quiet) {
80: fprintf(Fstack,"\n");
81: fprintf(Fstack,"Kan/StackMachine1");
1.25 takayama 82: fprintf(Fstack," 1991 April --- 2004.\n");
1.1 maekawa 83: fprintf(Fstack," Release %s (C) N. Takayama\n",
1.15 takayama 84: RELEASE);
1.24 takayama 85: 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 86: fprintf(Fstack,"OpenXM RFC100, 101, 103 (C) OpenXM developing team. \n");
1.25 takayama 87: fprintf(Fstack,"This software may be freely distributed ");
1.20 takayama 88: fprintf(Fstack,"with no warranty expressed. \nSee OpenXM/Copyright/Copyright.generic\n");
1.1 maekawa 89: fprintf(Fstack,"Info: http://www.math.kobe-u.ac.jp/KAN, kan@math.kobe-u.ac.jp. ? for help.\n");
90: #ifdef NOGC
91: fprintf(Fstack,"No garbage collector is installed.\n");
92: #endif
93: }
94: KinitKan();
95: if (!Quiet) {
96: fprintf(Fstack,"\nReady\n\n");
97: }
98: scanner();
99: Kclose(); stackmachine_close();
100: }
101:
102:
103:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>