version 1.6, 2000/01/16 07:55:41 |
version 1.30, 2020/10/06 11:33:47 |
|
|
/* sm.c $OpenXM: OpenXM/src/kan96xx/Kan/sm.c,v 1.5 1999/11/27 01:41:10 takayama Exp $ */ |
/* sm.c $OpenXM: OpenXM/src/kan96xx/Kan/sm.c,v 1.29 2015/09/29 01:52:14 takayama Exp $ */ |
#define DATE "2000/01/16" |
#define DATE "2005/06/15" |
#define RELEASE "3.000116" /* This "string" must be an increasing seq.*/ |
#define RELEASE "3.050615" /* This "string" must be an increasing seq.*/ |
/* You should write the same string in global.c |
/* You should write the same string in global.c |
VersionString for ox_sm1. |
VersionString for ox_sm1. |
Change also OxVersion in plugin/oxmisc.c |
Change also OxVersion in plugin/oxmisc.c |
if you install new openXM protocol.*/ |
if you install new openXM protocol.*/ |
|
|
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
#include "extern.h" |
#include "extern.h" |
|
|
bugfix : KdefaultPolyRing, hilbert.c |
bugfix : KdefaultPolyRing, hilbert.c |
Release 2.981123 bugfix : flush for solaris. bugfix : lockctrlCForOx(). |
Release 2.981123 bugfix : flush for solaris. bugfix : lockctrlCForOx(). |
Release 2.981217 Rather stable release. |
Release 2.981217 Rather stable release. |
New project on CMO starts. |
New project on CMO starts. |
|
|
*/ |
*/ |
|
|
Line 28 extern int StartAString; |
|
Line 30 extern int StartAString; |
|
extern char *StartString; |
extern char *StartString; |
extern int Quiet; |
extern int Quiet; |
extern char *VersionString; |
extern char *VersionString; |
|
//extern unsigned int GC_version; |
|
|
main(argc,argv) |
int main(argc,argv) |
int argc; |
int argc; |
char *argv[]; |
char *argv[]; |
{ |
{ |
int i; |
int i; |
|
int gc_version; |
StandardMacros = 1; |
StandardMacros = 1; |
VersionString = RELEASE; |
VersionString = RELEASE; |
if (argc > 1) { |
if (argc > 1) { |
for (i=1; i<argc; i++) { |
for (i=1; i<argc; i++) { |
if (strcmp(argv[i],"-standardmacros") == 0) { |
if (strcmp(argv[i],"-standardmacros") == 0) { |
StandardMacros = 0; /* disable of the standard macros */ |
StandardMacros = 0; /* disable of the standard macros */ |
}else if (strcmp(argv[i],"-f") == 0) { |
}else if (strcmp(argv[i],"-f") == 0) { |
StartAFile = 1; |
StartAFile = 1; |
i++; |
i++; |
if (i >= argc) { |
if (i >= argc) { |
fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n"); |
fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n"); |
fprintf(stderr,"3. sm1 -standardmacros\n"); |
fprintf(stderr,"3. sm1 -standardmacros\n"); |
exit(15); |
exit(15); |
} |
} |
StartFile = argv[i]; |
StartFile = argv[i]; |
}else if (strcmp(argv[i],"-s") == 0) { |
}else if (strcmp(argv[i],"-s") == 0) { |
StartAString = 1; |
StartAString = 1; |
i++; |
i++; |
if (i >= argc) { |
if (i >= argc) { |
fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n"); |
fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n"); |
fprintf(stderr,"3. sm1 -standardmacros\n"); |
fprintf(stderr,"3. sm1 -standardmacros\n"); |
fprintf(stderr,"4. sm1 -q (quiet)\n"); |
fprintf(stderr,"4. sm1 -q (quiet)\n"); |
fprintf(stderr,"5. sm1 -s \"command strings\" \n"); |
fprintf(stderr,"5. sm1 -s \"command strings\" \n"); |
exit(15); |
exit(15); |
} |
} |
StartString = argv[i]; |
StartString = argv[i]; |
} else if (strcmp(argv[i],"-q") == 0) { |
} else if (strcmp(argv[i],"-q") == 0) { |
Quiet = 1; |
Quiet = 1; |
}else{ |
}else{ |
fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n"); |
fprintf(stderr,"Usage: 1. sm1\n2. sm1 -f filename\n"); |
fprintf(stderr,"3. sm1 -standardmacros\n"); |
fprintf(stderr,"3. sm1 -standardmacros\n"); |
fprintf(stderr,"4. sm1 -q (quiet)\n"); |
fprintf(stderr,"4. sm1 -q (quiet)\n"); |
fprintf(stderr,"5. sm1 -s \"command strings\" \n"); |
fprintf(stderr,"5. sm1 -s \"command strings\" \n"); |
exit(15); |
exit(15); |
} |
} |
} |
} |
} |
} |
|
|
|
stackmachine_init(); /* GC is also initialized here */ |
stackmachine_init(); |
gc_version = GC_get_version(); |
if (!Quiet) { |
if (!Quiet) { |
fprintf(Fstack,"\n"); |
fprintf(Fstack,"\n"); |
fprintf(Fstack,"Kan/StackMachine1"); |
fprintf(Fstack,"Kan/StackMachine1"); |
fprintf(Fstack," 1991 April --- 1998.\n"); |
fprintf(Fstack," 1991 April --- 2004.\n"); |
fprintf(Fstack," Release %s (C) N. Takayama\n", |
fprintf(Fstack," Release %s (C) N. Takayama\n", |
RELEASE); |
RELEASE); |
fprintf(Fstack,"gc 4.14 (C) Boehm, Demers, GNU MP 2.0.2 (C) Free Software Foundation,\n"); |
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); |
fprintf(Fstack,"Open XM. \n"); |
fprintf(Fstack,"OpenXM RFC100, 101, 103 (C) OpenXM developing team. \n"); |
fprintf(Fstack,"This software may be freely distributed as is "); |
fprintf(Fstack,"This software may be freely distributed "); |
fprintf(Fstack,"with no warranty expressed.\n"); |
fprintf(Fstack,"with no warranty expressed. \nSee OpenXM/Copyright/Copyright.generic\n"); |
fprintf(Fstack,"Info: http://www.math.kobe-u.ac.jp/KAN, kan@math.kobe-u.ac.jp. ? for help.\n"); |
fprintf(Fstack,"Info: http://www.math.kobe-u.ac.jp/KAN, kan@math.kobe-u.ac.jp. ? for help.\n"); |
#ifdef NOGC |
#ifdef NOGC |
fprintf(Fstack,"No garbage collector is installed.\n"); |
fprintf(Fstack,"No garbage collector is installed.\n"); |
|
|
} |
} |
scanner(); |
scanner(); |
Kclose(); stackmachine_close(); |
Kclose(); stackmachine_close(); |
|
return(0); |
} |
} |
|
|
|
|