version 1.18, 2005/03/28 09:20:38 |
version 1.20, 2006/02/08 02:11:19 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.17 2005/03/24 23:40:50 takayama Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.19 2006/02/05 08:28:04 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 103 char *search_executable(char *name); |
|
Line 103 char *search_executable(char *name); |
|
extern char *asir_libdir; |
extern char *asir_libdir; |
extern char *asir_contrib_dir; |
extern char *asir_contrib_dir; |
extern char *asir_pager; |
extern char *asir_pager; |
extern int read_exec_file; |
|
extern int main_parser; |
extern int main_parser; |
extern JMP_BUF exec_env; |
extern JMP_BUF exec_env; |
|
|
Line 385 void loadasirfile(char *name0) |
|
Line 384 void loadasirfile(char *name0) |
|
void execasirfile(char *name) |
void execasirfile(char *name) |
{ |
{ |
loadasirfile(name); |
loadasirfile(name); |
read_exec_file = 1; |
if ( !SETJMP(asir_infile->jmpbuf) ) { |
read_eval_loop(); |
asir_infile->ready_for_longjmp = 1; |
read_exec_file = 0; |
|
} |
|
|
|
void load_and_execfile(char *name) |
|
{ |
|
FILE *fp; |
|
INFILE save_asir_infile; |
|
int save_prresult; |
|
extern prresult; |
|
|
|
savepvs(); |
|
save_asir_infile = asir_infile; |
|
save_prresult = prresult; |
|
fp = fopen(name,"rb"); |
|
input_init(fp,name); |
|
if ( !SETJMP(exec_env) ) { |
|
/* XXX : information for asir_teriminate() */ |
|
read_exec_file = 2; |
|
read_eval_loop(); |
read_eval_loop(); |
read_exec_file = 0; |
|
} |
} |
fclose(fp); |
closecurrentinput(); |
restorepvs(); |
|
asir_infile = save_asir_infile; |
|
prresult = save_prresult; |
|
} |
} |
|
|
static NODE objfile = 0; |
static NODE objfile = 0; |