Annotation of OpenXM/src/kan96xx/Kan/sm.c, Revision 1.3
1.3 ! takayama 1: /* sm.c $OpenXM: OpenXM/src/kan96xx/Kan/sm.c,v 1.2 1999/10/30 02:20:54 takayama Exp $ */
! 2: #define DATE "1999/11/06"
! 3: #define RELEASE "2.991106" /* This "string" must be an increasing seq.*/
1.1 maekawa 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.*/
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.
20: New project on CMO starts.
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)
33: int argc;
34: char *argv[];
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) {
42: StandardMacros = 0; /* disable of the standard macros */
43: }else if (strcmp(argv[i],"-f") == 0) {
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];
52: }else if (strcmp(argv[i],"-s") == 0) {
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];
63: } else if (strcmp(argv[i],"-q") == 0) {
64: Quiet = 1;
65: }else{
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);
71: }
72: }
73: }
74:
75:
76: stackmachine_init();
77: if (!Quiet) {
78: fprintf(Fstack,"\n");
79: fprintf(Fstack,"Kan/StackMachine1");
80: fprintf(Fstack," 1991 April --- 1998.\n");
81: fprintf(Fstack," Release %s (C) N. Takayama\n",
82: RELEASE);
83: fprintf(Fstack,"gc 4.14 (C) Boehm, Demers, GNU MP 2.0.2 (C) Free Software Foundation,\n");
84: fprintf(Fstack,"Open XM. \n");
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>