/*===========================================================================*/
/*   (Read/load.scm)                                                         */
/*   Bigloo (2.6b)                                                           */
/*   Inria -- Sophia Antipolis (c)       Mon Dec 15 12:14:36 CET 2003        */
/*===========================================================================*/
/* COMPILATION: (/users/serrano/prgm/project/bigloo/bin/bigloo -q -afile .afile -fsharing -fno-reflection -cc gcc-2.95 -lib-dir /users/serrano/prgm/project/bigloo/lib/2.6b -unsafev -no-hello -O2 -rm -unsafe -s -indent Read/load.scm)*/
/* GC selection */
#define THE_GC BOEHM_GC

#include <bigloo.h>


/* Object type definitions */
typedef struct BgL_typez00_bgl {
   header_t header;
   obj_t widening;
   obj_t BgL_idz00;
   obj_t BgL_namez00;
   obj_t BgL_siza7eza7;
   obj_t BgL_classz00;
   obj_t BgL_coercezd2tozd2;
   obj_t BgL_parentsz00;
   bool_t BgL_initzf3zf3;
   bool_t BgL_magiczf3zf3;
   obj_t BgL_z42z42;
   obj_t BgL_aliasz00;
   obj_t BgL_pointedzd2tozd2byz00;
   obj_t BgL_tvectorz00;
   obj_t BgL_locationz00;
   obj_t BgL_importzd2locationzd2;
} *BgL_typez00_bglt;


BGL_EXPORTED_DECL obj_t BGl_modulezd2initializa7ationz75zzread_loadz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zztools_tracez00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zztools_errorz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zztools_speekz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zztype_typez00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zzast_identz00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__osz00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__bexitz00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__readerz00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__evalz00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_strings_6_7z00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_ports_6_10_1z00(long, char *);
static obj_t BGl_methodzd2initzd2zzread_loadz00();
extern obj_t BGl_verbosez00zztools_speekz00(obj_t, obj_t);
extern obj_t BGl_userzd2errorzd2zztools_errorz00(obj_t, obj_t, obj_t, obj_t);
BGL_IMPORT obj_t BGl_findzd2filezf2pathz20zz__osz00(obj_t, obj_t);
BGL_IMPORT obj_t open_input_string(obj_t);
BGL_IMPORT obj_t BGl_readz00zz__readerz00(obj_t);
BGL_IMPORT obj_t BGl_unwindzd2untilz12zc0zz__bexitz00(obj_t, obj_t);
BGL_IMPORT obj_t BGl_loadqz00zz__evalz00(obj_t);
BGL_IMPORT obj_t BGl_openzd2inputzd2filez00zz__r4_ports_6_10_1z00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_loadzd2modulezd2zzread_loadz00(obj_t, obj_t);
static obj_t BGl_cnstzd2initzd2zzread_loadz00();
BGL_IMPORT obj_t close_input_port(obj_t);
static obj_t BGl_zc3exitza31120ze3z83zzread_loadz00(obj_t, obj_t);
BGL_IMPORT obj_t BGl_stringzd2appendzd2zz__r4_strings_6_7z00(obj_t);
static obj_t BGl_importedzd2moduleszd2initz00zzread_loadz00();
static obj_t BGl_requirezd2initializa7ationz75zzread_loadz00 = BUNSPEC;
static obj_t BGl__loadzd2module1207zd2zzread_loadz00(obj_t, obj_t, obj_t);
BGL_IMPORT obj_t BGl_za2loadzd2pathza2zd2zz__evalz00;
BGL_IMPORT obj_t BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(obj_t);
static obj_t BGl_libraryzd2moduleszd2initz00zzread_loadz00();
BGL_IMPORT obj_t BGl_readerzd2resetz12zc0zz__readerz00();
static obj_t __cnst[ 1 ] ;


DEFINE_EXPORT_PROCEDURE( BGl_loadzd2modulezd2envz00zzread_loadz00, BgL_bgl__loadza7d2module1207za7d2za7za7read_loadza7001262za7, BGl__loadzd2module1207zd2zzread_loadz00, 0L, 2 );
DEFINE_STRING( BGl_string1233z00zzread_loadz00, BgL_bgl_string1233za700za7za7read_loadza7001263z00, "module ", 7 );
DEFINE_STRING( BGl_string1232z00zzread_loadz00, BgL_bgl_string1232za700za7za7read_loadza7001264z00, "Illegal module declaration", 26 );
DEFINE_STRING( BGl_string1231z00zzread_loadz00, BgL_bgl_string1231za700za7za7read_loadza7001265z00, "conflict in module's name: ", 27 );
DEFINE_STRING( BGl_string1230z00zzread_loadz00, BgL_bgl_string1230za700za7za7read_loadza7001266z00, " vs ", 4 );
DEFINE_STRING( BGl_string1229z00zzread_loadz00, BgL_bgl_string1229za700za7za7read_loadza7001267z00, "Can't find file", 15 );
DEFINE_STRING( BGl_string1228z00zzread_loadz00, BgL_bgl_string1228za700za7za7read_loadza7001268z00, "Can't open such file", 20 );
DEFINE_STRING( BGl_string1227z00zzread_loadz00, BgL_bgl_string1227za700za7za7read_loadza7001269z00, "load-module", 11 );
DEFINE_STRING( BGl_string1226z00zzread_loadz00, BgL_bgl_string1226za700za7za7read_loadza7001270z00, "      [reading loaded module ", 29 );
DEFINE_STRING( BGl_string1225z00zzread_loadz00, BgL_bgl_string1225za700za7za7read_loadza7001271z00, "]", 1 );



/* module-initialization */
BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zzread_loadz00(long BgL_checksumz00_155, char * BgL_fromz00_156)
{ AN_OBJECT;
{ 
if(
CBOOL(BGl_requirezd2initializa7ationz75zzread_loadz00))
{ 
BGl_requirezd2initializa7ationz75zzread_loadz00 = 
BBOOL(((bool_t)0)); 
BGl_libraryzd2moduleszd2initz00zzread_loadz00(); 
BGl_cnstzd2initzd2zzread_loadz00(); 
BGl_importedzd2moduleszd2initz00zzread_loadz00(); 
return BUNSPEC;}  else 
{ 
return BUNSPEC;} } 
}



/* library-modules-init */
obj_t BGl_libraryzd2moduleszd2initz00zzread_loadz00()
{ AN_OBJECT;
{ /* ./Read/load.scm 15 */
BGl_modulezd2initializa7ationz75zz__osz00(((long)0), "read_load"); 
BGl_modulezd2initializa7ationz75zz__readerz00(((long)0), "read_load"); 
BGl_modulezd2initializa7ationz75zz__bexitz00(((long)0), "read_load"); 
BGl_modulezd2initializa7ationz75zz__evalz00(((long)0), "read_load"); 
BGl_modulezd2initializa7ationz75zz__r4_ports_6_10_1z00(((long)0), "read_load"); 
BGl_modulezd2initializa7ationz75zz__r4_strings_6_7z00(((long)0), "read_load"); 
return BUNSPEC;} 
}



/* cnst-init */
obj_t BGl_cnstzd2initzd2zzread_loadz00()
{ AN_OBJECT;
{ /* ./Read/load.scm 15 */
{ /* ./Read/load.scm 15 */
obj_t BgL_cportz00_148;
BgL_cportz00_148 = 
open_input_string(BGl_string1233z00zzread_loadz00); 
{ 
long BgL_iz00_149;
BgL_iz00_149 = ((long)0); 
BgL_loopz00_150:
{ /* ./Read/load.scm 15 */
bool_t BgL_test1235z00_151;
BgL_test1235z00_151 = 
(BgL_iz00_149==((long)-1)); 
if(BgL_test1235z00_151)
{ /* ./Read/load.scm 15 */
return BUNSPEC;}  else 
{ /* ./Read/load.scm 15 */
{ /* ./Read/load.scm 15 */
obj_t BgL_arg1237z00_152;
{ /* ./Read/load.scm 15 */
obj_t BgL_list1240z00_153;
BgL_list1240z00_153 = 
MAKE_PAIR(BgL_cportz00_148, BNIL); 
BgL_arg1237z00_152 = 
BGl_readz00zz__readerz00(BgL_list1240z00_153); } 
{ /* ./Read/load.scm 15 */
int BgL_auxz00_174;
BgL_auxz00_174 = 
(int)(BgL_iz00_149); 
CNST_TABLE_SET(BgL_auxz00_174, BgL_arg1237z00_152); } } 
{ /* ./Read/load.scm 15 */
int BgL_auxz00_154;
{ /* ./Read/load.scm 15 */
long BgL_auxz00_177;
BgL_auxz00_177 = 
(BgL_iz00_149-((long)1)); 
BgL_auxz00_154 = 
(int)(BgL_auxz00_177); } 
{ 
long BgL_iz00_180;
BgL_iz00_180 = 
(long)(BgL_auxz00_154); 
BgL_iz00_149 = BgL_iz00_180; 
goto BgL_loopz00_150;} } } } } } } 
}



/* load-module */
BGL_EXPORTED_DEF obj_t BGl_loadzd2modulezd2zzread_loadz00(obj_t BgL_modulez00_1, obj_t BgL_fnamesz00_2)
{ AN_OBJECT;
{ /* ./Read/load.scm 26 */
{ /* ./Read/load.scm 27 */
obj_t BgL_list1095z00_59;
{ /* ./Read/load.scm 27 */
obj_t BgL_arg1098z00_61;
{ /* ./Read/load.scm 27 */
obj_t BgL_arg1101z00_62;
{ /* ./Read/load.scm 27 */
obj_t BgL_arg1105z00_64;
{ /* ./Read/load.scm 27 */
obj_t BgL_auxz00_182;
BgL_auxz00_182 = 
BCHAR(((unsigned char)'\n')); 
BgL_arg1105z00_64 = 
MAKE_PAIR(BgL_auxz00_182, BNIL); } 
BgL_arg1101z00_62 = 
MAKE_PAIR(BGl_string1225z00zzread_loadz00, BgL_arg1105z00_64); } 
BgL_arg1098z00_61 = 
MAKE_PAIR(BgL_modulez00_1, BgL_arg1101z00_62); } 
BgL_list1095z00_59 = 
MAKE_PAIR(BGl_string1226z00zzread_loadz00, BgL_arg1098z00_61); } 
BGl_verbosez00zztools_speekz00(
BINT(((long)1)), BgL_list1095z00_59); } 
{ /* ./Read/load.scm 28 */
obj_t BgL_filez00_65;
BgL_filez00_65 = 
CAR(BgL_fnamesz00_2); 
{ /* ./Read/load.scm 28 */
obj_t BgL_fnamez00_66;
BgL_fnamez00_66 = 
BGl_findzd2filezf2pathz20zz__osz00(BgL_filez00_65, BGl_za2loadzd2pathza2zd2zz__evalz00); 
{ /* ./Read/load.scm 29 */

{ /* ./Read/load.scm 30 */
bool_t BgL_test1108z00_67;
BgL_test1108z00_67 = 
STRINGP(BgL_fnamez00_66); 
if(BgL_test1108z00_67)
{ /* ./Read/load.scm 32 */
obj_t BgL_portz00_68;
BgL_portz00_68 = 
BGl_openzd2inputzd2filez00zz__r4_ports_6_10_1z00(BgL_fnamez00_66, BNIL); 
BGl_readerzd2resetz12zc0zz__readerz00(); 
{ /* ./Read/load.scm 34 */
bool_t BgL_test1110z00_69;
BgL_test1110z00_69 = 
INPUT_PORTP(BgL_portz00_68); 
if(BgL_test1110z00_69)
{ /* ./Read/load.scm 36 */
obj_t BgL_val1089z00_70;
BgL_val1089z00_70 = 
BGl_zc3exitza31120ze3z83zzread_loadz00(BgL_modulez00_1, BgL_portz00_68); 
close_input_port(BgL_portz00_68); 
{ /* ./Read/load.scm 52 */
bool_t BgL_test1112z00_71;
{ /* ./Read/load.scm 52 */
obj_t BgL_auxz00_200;
BgL_auxz00_200 = 
BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(BgL_val1089z00_70); 
BgL_test1112z00_71 = 
CBOOL(BgL_auxz00_200); } 
if(BgL_test1112z00_71)
{ /* ./Read/load.scm 52 */
obj_t BgL_arg1114z00_72;obj_t BgL_arg1115z00_73;
BgL_arg1114z00_72 = 
CAR(BgL_val1089z00_70); 
BgL_arg1115z00_73 = 
CDR(BgL_val1089z00_70); 
BGl_unwindzd2untilz12zc0zz__bexitz00(BgL_arg1114z00_72, BgL_arg1115z00_73); }  else 
{ /* ./Read/load.scm 52 */BgL_val1089z00_70; } } }  else 
{ /* ./Read/load.scm 34 */
BGl_userzd2errorzd2zztools_errorz00(BGl_string1227z00zzread_loadz00, BGl_string1228z00zzread_loadz00, BgL_filez00_65, BNIL); } } }  else 
{ /* ./Read/load.scm 30 */
BGl_userzd2errorzd2zztools_errorz00(BGl_string1227z00zzread_loadz00, BGl_string1229z00zzread_loadz00, BgL_filez00_65, BNIL); } } } } } 
{ 
obj_t BgL_l1092z00_101;
{ /* ./Read/load.scm 53 */
bool_t BgL_auxz00_209;
BgL_l1092z00_101 = BgL_fnamesz00_2; 
BgL_forzd2each1093zd2_102:
{ /* ./Read/load.scm 53 */
bool_t BgL_test1182z00_103;
BgL_test1182z00_103 = 
PAIRP(BgL_l1092z00_101); 
if(BgL_test1182z00_103)
{ /* ./Read/load.scm 53 */
{ /* ./Read/load.scm 53 */
obj_t BgL_arg1187z00_104;
BgL_arg1187z00_104 = 
CAR(BgL_l1092z00_101); 
BGl_loadqz00zz__evalz00(BgL_arg1187z00_104); } 
{ /* ./Read/load.scm 53 */
obj_t BgL_arg1191z00_105;
BgL_arg1191z00_105 = 
CDR(BgL_l1092z00_101); 
{ 
obj_t BgL_l1092z00_215;
BgL_l1092z00_215 = BgL_arg1191z00_105; 
BgL_l1092z00_101 = BgL_l1092z00_215; 
goto BgL_forzd2each1093zd2_102;} } }  else 
{ /* ./Read/load.scm 53 */
BgL_auxz00_209 = ((bool_t)1); } } 
return 
BBOOL(BgL_auxz00_209);} } } 
}



/* <exit:1120> */
obj_t BGl_zc3exitza31120ze3z83zzread_loadz00(obj_t BgL_modulez00_147, obj_t BgL_portz00_146)
{ AN_OBJECT;
{ /* ./Read/load.scm 52 */
jmp_buf jmpbuf; 
obj_t BgL_an_exit1090z00_75;
if( SET_EXIT(BgL_an_exit1090z00_75) ) { 
return 
_exit_value_;
} else {
BgL_an_exit1090z00_75 = 
(obj_t)jmpbuf; 
{ /* ./Read/load.scm 52 */

PUSH_EXIT(BgL_an_exit1090z00_75, ((bool_t)0)); 
{ /* ./Read/load.scm 36 */
obj_t BgL_val1091z00_76;
{ /* ./Read/load.scm 36 */
obj_t BgL_declz00_77;
{ /* ./Read/load.scm 36 */
obj_t BgL_list1169z00_97;
BgL_list1169z00_97 = 
MAKE_PAIR(BgL_portz00_146, BNIL); 
BgL_declz00_77 = 
BGl_readz00zz__readerz00(BgL_list1169z00_97); } 
{ /* ./Read/load.scm 37 */
bool_t BgL_test1125z00_78;
if(
PAIRP(BgL_declz00_77))
{ /* ./Read/load.scm 38 */
obj_t BgL_auxz00_226;obj_t BgL_auxz00_224;
BgL_auxz00_226 = 
CNST_TABLE_REF(((long)0)); 
BgL_auxz00_224 = 
CAR(BgL_declz00_77); 
BgL_test1125z00_78 = 
(BgL_auxz00_224==BgL_auxz00_226); }  else 
{ /* ./Read/load.scm 37 */
BgL_test1125z00_78 = ((bool_t)0); } 
if(BgL_test1125z00_78)
{ /* ./Read/load.scm 44 */
bool_t BgL_test1126z00_79;
{ /* ./Read/load.scm 44 */
obj_t BgL_auxz00_230;
{ /* ./Read/load.scm 44 */
obj_t BgL_auxz00_231;
BgL_auxz00_231 = 
CDR(BgL_declz00_77); 
BgL_auxz00_230 = 
CAR(BgL_auxz00_231); } 
BgL_test1126z00_79 = 
(BgL_auxz00_230==BgL_modulez00_147); } 
if(BgL_test1126z00_79)
{ /* ./Read/load.scm 44 */
BgL_val1091z00_76 = BFALSE; }  else 
{ /* ./Read/load.scm 45 */
obj_t BgL_arg1130z00_81;
{ /* ./Read/load.scm 47 */
obj_t BgL_arg1135z00_84;obj_t BgL_arg1137z00_86;
BgL_arg1135z00_84 = 
SYMBOL_TO_STRING(BgL_modulez00_147); 
{ /* ./Read/load.scm 50 */
obj_t BgL_arg1152z00_91;
{ /* ./Read/load.scm 50 */
obj_t BgL_auxz00_237;
BgL_auxz00_237 = 
CDR(BgL_declz00_77); 
BgL_arg1152z00_91 = 
CAR(BgL_auxz00_237); } 
BgL_arg1137z00_86 = 
SYMBOL_TO_STRING(BgL_arg1152z00_91); } 
{ /* ./Read/load.scm 47 */
obj_t BgL_list1139z00_87;
{ /* ./Read/load.scm 47 */
obj_t BgL_arg1141z00_88;
{ /* ./Read/load.scm 47 */
obj_t BgL_arg1144z00_89;
{ /* ./Read/load.scm 47 */
obj_t BgL_arg1147z00_90;
BgL_arg1147z00_90 = 
MAKE_PAIR(BgL_arg1137z00_86, BNIL); 
BgL_arg1144z00_89 = 
MAKE_PAIR(BGl_string1230z00zzread_loadz00, BgL_arg1147z00_90); } 
BgL_arg1141z00_88 = 
MAKE_PAIR(BgL_arg1135z00_84, BgL_arg1144z00_89); } 
BgL_list1139z00_87 = 
MAKE_PAIR(BGl_string1231z00zzread_loadz00, BgL_arg1141z00_88); } 
BgL_arg1130z00_81 = 
BGl_stringzd2appendzd2zz__r4_strings_6_7z00(BgL_list1139z00_87); } } 
BgL_val1091z00_76 = 
BGl_userzd2errorzd2zztools_errorz00(BGl_string1227z00zzread_loadz00, BgL_arg1130z00_81, BgL_declz00_77, BNIL); } }  else 
{ /* ./Read/load.scm 37 */
BgL_val1091z00_76 = 
BGl_userzd2errorzd2zztools_errorz00(BGl_string1227z00zzread_loadz00, BGl_string1232z00zzread_loadz00, BgL_declz00_77, BNIL); } } } 
POP_EXIT(); 
return BgL_val1091z00_76;} } 
} } 
}



/* _load-module1207 */
obj_t BGl__loadzd2module1207zd2zzread_loadz00(obj_t BgL_envz00_143, obj_t BgL_modulez00_144, obj_t BgL_fnamesz00_145)
{ AN_OBJECT;
{ /* ./Read/load.scm 26 */
return 
BGl_loadzd2modulezd2zzread_loadz00(BgL_modulez00_144, BgL_fnamesz00_145);} 
}



/* method-init */
obj_t BGl_methodzd2initzd2zzread_loadz00()
{ AN_OBJECT;
{ /* ./Read/load.scm 15 */
return BUNSPEC;} 
}



/* imported-modules-init */
obj_t BGl_importedzd2moduleszd2initz00zzread_loadz00()
{ AN_OBJECT;
{ /* ./Read/load.scm 15 */
BGl_modulezd2initializa7ationz75zztools_tracez00(((long)59211), "read_load"); 
BGl_modulezd2initializa7ationz75zztools_errorz00(((long)25566), "read_load"); 
BGl_modulezd2initializa7ationz75zztools_speekz00(((long)23537), "read_load"); 
BGl_modulezd2initializa7ationz75zztype_typez00(((long)19090), "read_load"); 
return 
BGl_modulezd2initializa7ationz75zzast_identz00(((long)51504), "read_load");} 
}

