=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/main.c,v retrieving revision 1.4 retrieving revision 1.10 diff -u -p -r1.4 -r1.10 --- OpenXM_contrib2/asir2000/parse/main.c 2000/08/21 08:31:47 1.4 +++ OpenXM_contrib2/asir2000/parse/main.c 2001/08/20 09:03:28 1.10 @@ -23,7 +23,7 @@ * shall be made on your publication or presentation in any form of the * results obtained by use of the SOFTWARE. * (4) In the event that you modify the SOFTWARE, you shall notify FLL by - * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification + * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification * for such modification or the source code of the modified part of the * SOFTWARE. * @@ -45,13 +45,10 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/main.c,v 1.3 2000/02/08 04:47:12 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/main.c,v 1.9 2000/12/22 10:03:32 saito Exp $ */ #include "ca.h" #include "parse.h" -#if defined(THINK_C) -#include -#endif #if PARI #include "genpari.h" @@ -59,12 +56,26 @@ extern jmp_buf environnement; #endif -extern jmp_buf env; -extern int *StackBottom; +extern jmp_buf main_env; +#if defined(INTERVAL) +#ifndef ASIRRCNAME +#define ASIRRCNAME "int_asirrc" +#endif +#else +#ifndef ASIRRCNAME +#define ASIRRCNAME "asirrc" +#endif +#endif + + double get_current_time(); extern int mpi_nprocs,mpi_myid; +#if MPI +int *StackBottom; +#endif + #if defined(VISUAL_LIB) void Main(argc,argv) #else @@ -89,8 +100,8 @@ char *argv[]; char *slash,*binname; char *ptr; - StackBottom = &tmp + 1; /* XXX */ #if MPI + StackBottom = &tmp; mpi_init(); if ( mpi_myid ) { int slave_argc; @@ -129,15 +140,9 @@ char *argv[]; srandom((int)get_current_time()); /* mt_sgenrand((unsigned long)get_current_time()); */ -#if defined(THINK_C) - param_init(); -#endif rtime_init(); env_init(); endian_init(); -#if 0 && !defined(VISUAL) && !defined(THINK_C) - check_key(); -#endif GC_init(); process_args(--argc,++argv); #if PARI @@ -165,9 +170,6 @@ char *argv[]; if ( ptr = getenv("ASIR_CONFIG") ) strcpy(ifname,ptr); else { -#if defined(THINK_C) - sprintf(ifname,"asirrc"); -#else homedir = getenv("HOME"); if ( !homedir ) { char rootname[BUFSIZ]; @@ -175,13 +177,12 @@ char *argv[]; get_rootdir(rootname,sizeof(rootname)); homedir = rootname; } - sprintf(ifname,"%s/.asirrc",homedir); -#endif + sprintf(ifname,"%s/." ASIRRCNAME,homedir); } if ( do_asirrc && (ifp = fopen(ifname,"r")) ) { input_init(ifp,ifname); - if ( !setjmp(env) ) { + if ( !setjmp(main_env) ) { read_exec_file = 1; read_eval_loop(); read_exec_file = 0; @@ -202,7 +203,7 @@ char *argv[]; resetenv(""); } #endif - if ( setjmp(env) ) + if ( setjmp(main_env) ) prompt(); read_eval_loop(); }