/*===========================================================================*/
/*   (Tools/misc.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 Tools/misc.scm)*/
/* GC selection */
#define THE_GC BOEHM_GC

#include <bigloo.h>

static obj_t BGl__stringzd2split1364zd2zztools_miscz00(obj_t, obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_stringza2zd2ze3stringz93zztools_miscz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_modulezd2initializa7ationz75zztools_miscz00(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__r4_pairs_and_lists_6_3z00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_numbers_6_5z00(long, char *);
BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_strings_6_7z00(long, char *);
BGL_EXPORTED_DECL obj_t BGl_epairifyzd2reczd2zztools_miscz00(obj_t, obj_t);
BGL_IMPORT obj_t BGl_listzd2ze3stringz31zz__r4_strings_6_7z00(obj_t);
BGL_IMPORT bool_t bigloo_strncmp(obj_t, obj_t, int);
BGL_IMPORT obj_t open_input_string(obj_t);
static obj_t BGl__replacez12z12zztools_miscz00(obj_t, obj_t, obj_t);
BGL_IMPORT bool_t BGl_2ze3zd3z30zz__r4_numbers_6_5z00(obj_t, obj_t);
static obj_t BGl__stringzd2replacezd2zztools_miscz00(obj_t, obj_t, obj_t, obj_t);
static obj_t BGl__epairifyz00zztools_miscz00(obj_t, obj_t, obj_t);
static obj_t BGl__buildzd2pathzd2fromzd2shellzd2variablez00zztools_miscz00(obj_t, obj_t);
BGL_IMPORT obj_t bgl_reverse(obj_t);
BGL_IMPORT obj_t string_append(obj_t, obj_t);
static obj_t BGl__epairifyzd2reczd2zztools_miscz00(obj_t, obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_epairifyza2za2zztools_miscz00(obj_t, obj_t);
BGL_IMPORT obj_t BGl_unwindzd2untilz12zc0zz__bexitz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_stringzd2splitzd2zztools_miscz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_stringzd2replacez12zc0zztools_miscz00(obj_t, obj_t, obj_t);
BGL_IMPORT bool_t rgc_fill_buffer(obj_t);
BGL_EXPORTED_DECL obj_t BGl_buildzd2pathzd2fromzd2shellzd2variablez00zztools_miscz00(obj_t);
static obj_t BGl_case_else1012z00zztools_miscz00(long);
BGL_EXPORTED_DECL obj_t BGl_replacez12z12zztools_miscz00(obj_t, obj_t);
BGL_IMPORT obj_t BGl_stringzd2copyzd2zz__r4_strings_6_7z00(obj_t);
BGL_IMPORT obj_t BGl_getenvz00zz__osz00(char *);
static obj_t BGl_zc3anonymousza31184ze3z83zztools_miscz00(obj_t, obj_t, obj_t);
static obj_t BGl_STATEzd20zd21007z00zztools_miscz00(obj_t, obj_t, obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_epairifyz00zztools_miscz00(obj_t, obj_t);
static obj_t BGl__epairifyza2za2zztools_miscz00(obj_t, obj_t, obj_t);
static obj_t BGl_zc3exitza31177ze3z83zztools_miscz00(obj_t);
BGL_IMPORT obj_t close_input_port(obj_t);
static obj_t BGl__stringza2zd2ze3string1359z93zztools_miscz00(obj_t, obj_t);
BGL_IMPORT obj_t c_substring(obj_t, int, int);
static obj_t BGl_thezd2stringzd2zztools_miscz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_stringzd2replacezd2zztools_miscz00(obj_t, obj_t, obj_t);
static obj_t BGl_requirezd2initializa7ationz75zztools_miscz00 = BUNSPEC;
BGL_IMPORT obj_t rgc_buffer_substring(obj_t, int, int);
BGL_IMPORT obj_t BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_uncygdrivez00zztools_miscz00(obj_t);
static obj_t BGl__uncygdrive1371z00zztools_miscz00(obj_t, obj_t);
static obj_t BGl_libraryzd2moduleszd2initz00zztools_miscz00();
static obj_t BGl__stringzd2replacez12zc0zztools_miscz00(obj_t, obj_t, obj_t, obj_t);
static obj_t BGl_ignorez00zztools_miscz00(obj_t, obj_t, obj_t, obj_t);
BGL_IMPORT obj_t string_append_3(obj_t, obj_t, obj_t);
static obj_t *__cnst;


DEFINE_EXPORT_PROCEDURE( BGl_uncygdrivezd2envzd2zztools_miscz00, BgL_bgl__uncygdrive1371za700za7za7tools_miscza7001442z00, BGl__uncygdrive1371z00zztools_miscz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_buildzd2pathzd2fromzd2shellzd2variablezd2envzd2zztools_miscz00, BgL_bgl__buildza7d2pathza7d2fromza7d2shellza7d2variableza700za7za7tools_miscza7001443z00, BGl__buildzd2pathzd2fromzd2shellzd2variablez00zztools_miscz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_epairifyzd2reczd2envz00zztools_miscz00, BgL_bgl__epairifyza7d2recza7d2za7za7tools_miscza7001444za7, BGl__epairifyzd2reczd2zztools_miscz00, 0L, 2 );
DEFINE_EXPORT_PROCEDURE( BGl_replacez12zd2envzc0zztools_miscz00, BgL_bgl__replaceza712za712za7za7tools_miscza7001445za7, BGl__replacez12z12zztools_miscz00, 0L, 2 );
DEFINE_STRING( BGl_string1431z00zztools_miscz00, BgL_bgl_string1431za700za7za7tools_miscza7001446z00, "/cygdrive/", 10 );
DEFINE_STRING( BGl_string1429z00zztools_miscz00, BgL_bgl_string1429za700za7za7tools_miscza7001447z00, "Illegal match", 13 );
DEFINE_STRING( BGl_string1428z00zztools_miscz00, BgL_bgl_string1428za700za7za7tools_miscza7001448z00, "regular-grammar", 15 );
DEFINE_STRING( BGl_string1427z00zztools_miscz00, BgL_bgl_string1427za700za7za7tools_miscza7001449z00, "", 0 );
DEFINE_STRING( BGl_string1426z00zztools_miscz00, BgL_bgl_string1426za700za7za7tools_miscza7001450z00, " ", 1 );
DEFINE_STATIC_PROCEDURE( BGl_proc1430z00zztools_miscz00, BgL_bgl_stateza7d20za7d21007za700za7za7tools_miscza7001451z00, BGl_STATEzd20zd21007z00zztools_miscz00, 0L, 3 );
DEFINE_EXPORT_PROCEDURE( BGl_epairifyza2zd2envz70zztools_miscz00, BgL_bgl__epairifyza7a2za7a2za7za7tools_miscza7001452za7, va_generic_entry, BGl__epairifyza2za2zztools_miscz00, -2 );
DEFINE_EXPORT_PROCEDURE( BGl_stringzd2replacezd2envz00zztools_miscz00, BgL_bgl__stringza7d2replaceza7d2za7za7tools_miscza7001453za7, BGl__stringzd2replacezd2zztools_miscz00, 0L, 3 );
DEFINE_EXPORT_PROCEDURE( BGl_stringzd2splitzd2envz00zztools_miscz00, BgL_bgl__stringza7d2split1364za7d2za7za7tools_miscza7001454za7, BGl__stringzd2split1364zd2zztools_miscz00, 0L, 2 );
DEFINE_EXPORT_PROCEDURE( BGl_stringzd2replacez12zd2envz12zztools_miscz00, BgL_bgl__stringza7d2replaceza712za7c0za7za7tools_miscza7001455z00, BGl__stringzd2replacez12zc0zztools_miscz00, 0L, 3 );
DEFINE_EXPORT_PROCEDURE( BGl_stringza2zd2ze3stringzd2envz41zztools_miscz00, BgL_bgl__stringza7a2za7d2za7e3string1359za793za7za7tools_miscza7001456za7, BGl__stringza2zd2ze3string1359z93zztools_miscz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_epairifyzd2envzd2zztools_miscz00, BgL_bgl__epairifyza700za7za7tools_miscza7001457z00, BGl__epairifyz00zztools_miscz00, 0L, 2 );



/* module-initialization */
BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zztools_miscz00(long BgL_checksumz00_440, char * BgL_fromz00_441)
{ AN_OBJECT;
{ 
if(
CBOOL(BGl_requirezd2initializa7ationz75zztools_miscz00))
{ 
BGl_requirezd2initializa7ationz75zztools_miscz00 = 
BBOOL(((bool_t)0)); 
BGl_libraryzd2moduleszd2initz00zztools_miscz00(); 
return BUNSPEC;}  else 
{ 
return BUNSPEC;} } 
}



/* library-modules-init */
obj_t BGl_libraryzd2moduleszd2initz00zztools_miscz00()
{ AN_OBJECT;
{ /* ./Tools/misc.scm 15 */
BGl_modulezd2initializa7ationz75zz__r4_strings_6_7z00(((long)0), "tools_misc"); 
BGl_modulezd2initializa7ationz75zz__r4_numbers_6_5z00(((long)0), "tools_misc"); 
BGl_modulezd2initializa7ationz75zz__r4_pairs_and_lists_6_3z00(((long)0), "tools_misc"); 
BGl_modulezd2initializa7ationz75zz__bexitz00(((long)0), "tools_misc"); 
BGl_modulezd2initializa7ationz75zz__osz00(((long)0), "tools_misc"); 
BGl_modulezd2initializa7ationz75zz__readerz00(((long)0), "tools_misc"); 
return BUNSPEC;} 
}



/* string*->string */
BGL_EXPORTED_DEF obj_t BGl_stringza2zd2ze3stringz93zztools_miscz00(obj_t BgL_lz00_1)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 30 */
{ 
obj_t BgL_lz00_20;obj_t BgL_rz00_21;
{ /* ./Tools/misc.scm 31 */
obj_t BgL_arg1015z00_23;
BgL_arg1015z00_23 = 
bgl_reverse(BgL_lz00_1); 
BgL_lz00_20 = BgL_arg1015z00_23; 
BgL_rz00_21 = BGl_string1427z00zztools_miscz00; 
BgL_loopz00_22:
{ /* ./Tools/misc.scm 33 */
bool_t BgL_test1019z00_25;
BgL_test1019z00_25 = 
NULLP(BgL_lz00_20); 
if(BgL_test1019z00_25)
{ /* ./Tools/misc.scm 33 */
return BgL_rz00_21;}  else 
{ /* ./Tools/misc.scm 35 */
obj_t BgL_arg1021z00_26;obj_t BgL_arg1022z00_27;
BgL_arg1021z00_26 = 
CDR(BgL_lz00_20); 
{ /* ./Tools/misc.scm 36 */
obj_t BgL_arg1026z00_28;
BgL_arg1026z00_28 = 
CAR(BgL_lz00_20); 
BgL_arg1022z00_27 = 
string_append_3(BgL_arg1026z00_28, BGl_string1426z00zztools_miscz00, BgL_rz00_21); } 
{ 
obj_t BgL_rz00_459;obj_t BgL_lz00_458;
BgL_lz00_458 = BgL_arg1021z00_26; 
BgL_rz00_459 = BgL_arg1022z00_27; 
BgL_rz00_21 = BgL_rz00_459; 
BgL_lz00_20 = BgL_lz00_458; 
goto BgL_loopz00_22;} } } } } } 
}



/* _string*->string1359 */
obj_t BGl__stringza2zd2ze3string1359z93zztools_miscz00(obj_t BgL_envz00_381, obj_t BgL_lz00_382)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 30 */
return 
BGl_stringza2zd2ze3stringz93zztools_miscz00(BgL_lz00_382);} 
}



/* replace! */
BGL_EXPORTED_DEF obj_t BGl_replacez12z12zztools_miscz00(obj_t BgL_p1z00_2, obj_t BgL_p2z00_3)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 41 */
{ /* ./Tools/misc.scm 42 */
bool_t BgL_test1032z00_30;
{ /* ./Tools/misc.scm 42 */
bool_t BgL_test1041z00_33;
BgL_test1041z00_33 = 
PAIRP(BgL_p1z00_2); 
if(BgL_test1041z00_33)
{ /* ./Tools/misc.scm 42 */
bool_t BgL_test1042z00_34;
BgL_test1042z00_34 = 
PAIRP(BgL_p2z00_3); 
if(BgL_test1042z00_34)
{ /* ./Tools/misc.scm 42 */
bool_t BgL_test1043z00_35;
BgL_test1043z00_35 = 
EXTENDED_PAIRP(BgL_p2z00_3); 
if(BgL_test1043z00_35)
{ /* ./Tools/misc.scm 42 */
BgL_test1032z00_30 = ((bool_t)0); }  else 
{ /* ./Tools/misc.scm 42 */
BgL_test1032z00_30 = ((bool_t)1); } }  else 
{ /* ./Tools/misc.scm 42 */
BgL_test1032z00_30 = ((bool_t)0); } }  else 
{ /* ./Tools/misc.scm 42 */
BgL_test1032z00_30 = ((bool_t)0); } } 
if(BgL_test1032z00_30)
{ /* ./Tools/misc.scm 42 */
{ /* ./Tools/misc.scm 44 */
obj_t BgL_arg1034z00_31;
BgL_arg1034z00_31 = 
CAR(BgL_p2z00_3); 
SET_CAR(BgL_p1z00_2, BgL_arg1034z00_31); } 
{ /* ./Tools/misc.scm 45 */
obj_t BgL_arg1038z00_32;
BgL_arg1038z00_32 = 
CDR(BgL_p2z00_3); 
SET_CDR(BgL_p1z00_2, BgL_arg1038z00_32); } 
return BgL_p1z00_2;}  else 
{ /* ./Tools/misc.scm 42 */
return BgL_p2z00_3;} } } 
}



/* _replace! */
obj_t BGl__replacez12z12zztools_miscz00(obj_t BgL_envz00_383, obj_t BgL_p1z00_384, obj_t BgL_p2z00_385)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 41 */
return 
BGl_replacez12z12zztools_miscz00(BgL_p1z00_384, BgL_p2z00_385);} 
}



/* string-replace */
BGL_EXPORTED_DEF obj_t BGl_stringzd2replacezd2zztools_miscz00(obj_t BgL_strz00_4, obj_t BgL_fromz00_5, obj_t BgL_toz00_6)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 52 */
{ /* ./Tools/misc.scm 53 */
obj_t BgL_strz00_249;
BgL_strz00_249 = 
BGl_stringzd2copyzd2zz__r4_strings_6_7z00(BgL_strz00_4); 
BGl_stringzd2replacez12zc0zztools_miscz00(BgL_strz00_249, BgL_fromz00_5, BgL_toz00_6); 
return BgL_strz00_249;} } 
}



/* _string-replace */
obj_t BGl__stringzd2replacezd2zztools_miscz00(obj_t BgL_envz00_386, obj_t BgL_strz00_387, obj_t BgL_fromz00_388, obj_t BgL_toz00_389)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 52 */
return 
BGl_stringzd2replacezd2zztools_miscz00(BgL_strz00_387, BgL_fromz00_388, BgL_toz00_389);} 
}



/* string-replace! */
BGL_EXPORTED_DEF obj_t BGl_stringzd2replacez12zc0zztools_miscz00(obj_t BgL_strz00_7, obj_t BgL_fromz00_8, obj_t BgL_toz00_9)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 60 */
{ /* ./Tools/misc.scm 61 */
int BgL_lenz00_37;
BgL_lenz00_37 = 
STRING_LENGTH(BgL_strz00_7); 
{ 
long BgL_iz00_38;
BgL_iz00_38 = ((long)0); 
BgL_loopz00_39:
{ /* ./Tools/misc.scm 64 */
bool_t BgL_test1050z00_40;
{ /* ./Tools/misc.scm 64 */
long BgL_auxz00_477;
BgL_auxz00_477 = 
(long)(BgL_lenz00_37); 
BgL_test1050z00_40 = 
(BgL_iz00_38==BgL_auxz00_477); } 
if(BgL_test1050z00_40)
{ /* ./Tools/misc.scm 64 */
return BgL_strz00_7;}  else 
{ /* ./Tools/misc.scm 66 */
bool_t BgL_test1051z00_41;
{ /* ./Tools/misc.scm 66 */
unsigned char BgL_auxz00_485;unsigned char BgL_auxz00_481;
BgL_auxz00_485 = 
(unsigned char)CCHAR(BgL_fromz00_8); 
{ /* ./Tools/misc.scm 66 */
int BgL_auxz00_482;
BgL_auxz00_482 = 
(int)(BgL_iz00_38); 
BgL_auxz00_481 = 
STRING_REF(BgL_strz00_7, BgL_auxz00_482); } 
BgL_test1051z00_41 = 
(BgL_auxz00_481==BgL_auxz00_485); } 
if(BgL_test1051z00_41)
{ /* ./Tools/misc.scm 66 */
{ /* ./Tools/misc.scm 67 */
int BgL_kz00_258;unsigned char BgL_charz00_259;
BgL_kz00_258 = 
(int)(BgL_iz00_38); 
BgL_charz00_259 = 
(unsigned char)CCHAR(BgL_toz00_9); 
STRING_SET(BgL_strz00_7, BgL_kz00_258, BgL_charz00_259); } 
{ /* ./Tools/misc.scm 68 */
long BgL_arg1054z00_42;
BgL_arg1054z00_42 = 
(BgL_iz00_38+((long)1)); 
{ 
long BgL_iz00_493;
BgL_iz00_493 = BgL_arg1054z00_42; 
BgL_iz00_38 = BgL_iz00_493; 
goto BgL_loopz00_39;} } }  else 
{ /* ./Tools/misc.scm 66 */
{ /* ./Tools/misc.scm 70 */
long BgL_arg1058z00_43;
BgL_arg1058z00_43 = 
(BgL_iz00_38+((long)1)); 
{ 
long BgL_iz00_495;
BgL_iz00_495 = BgL_arg1058z00_43; 
BgL_iz00_38 = BgL_iz00_495; 
goto BgL_loopz00_39;} } } } } } } } 
}



/* _string-replace! */
obj_t BGl__stringzd2replacez12zc0zztools_miscz00(obj_t BgL_envz00_390, obj_t BgL_strz00_391, obj_t BgL_fromz00_392, obj_t BgL_toz00_393)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 60 */
return 
BGl_stringzd2replacez12zc0zztools_miscz00(BgL_strz00_391, BgL_fromz00_392, BgL_toz00_393);} 
}



/* string-split */
BGL_EXPORTED_DEF obj_t BGl_stringzd2splitzd2zztools_miscz00(obj_t BgL_strz00_10, obj_t BgL_separatorz00_11)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 75 */
BGl_stringzd2splitzd2zztools_miscz00:
{ /* ./Tools/misc.scm 76 */
int BgL_strzd2lengthzd2_45;
BgL_strzd2lengthzd2_45 = 
STRING_LENGTH(BgL_strz00_10); 
{ /* ./Tools/misc.scm 77 */
bool_t BgL_test1069z00_46;
{ /* ./Tools/misc.scm 77 */
long BgL_auxz00_498;
BgL_auxz00_498 = 
(long)(BgL_strzd2lengthzd2_45); 
BgL_test1069z00_46 = 
(BgL_auxz00_498==((long)0)); } 
if(BgL_test1069z00_46)
{ /* ./Tools/misc.scm 77 */
return BNIL;}  else 
{ 
long BgL_iz00_47;
BgL_iz00_47 = ((long)0); 
BgL_loopz00_48:
{ /* ./Tools/misc.scm 80 */
bool_t BgL_test1071z00_49;
BgL_test1071z00_49 = 
BGl_2ze3zd3z30zz__r4_numbers_6_5z00(
BINT(BgL_iz00_47), 
BINT(BgL_strzd2lengthzd2_45)); 
if(BgL_test1071z00_49)
{ /* ./Tools/misc.scm 80 */
{ /* ./Tools/misc.scm 81 */
obj_t BgL_list1073z00_50;
BgL_list1073z00_50 = 
MAKE_PAIR(BgL_strz00_10, BNIL); 
return BgL_list1073z00_50;} }  else 
{ /* ./Tools/misc.scm 82 */
bool_t BgL_test1076z00_51;
{ /* ./Tools/misc.scm 82 */
unsigned char BgL_auxz00_511;unsigned char BgL_auxz00_507;
BgL_auxz00_511 = 
(unsigned char)CCHAR(BgL_separatorz00_11); 
{ /* ./Tools/misc.scm 82 */
int BgL_auxz00_508;
BgL_auxz00_508 = 
(int)(BgL_iz00_47); 
BgL_auxz00_507 = 
STRING_REF(BgL_strz00_10, BgL_auxz00_508); } 
BgL_test1076z00_51 = 
(BgL_auxz00_507==BgL_auxz00_511); } 
if(BgL_test1076z00_51)
{ /* ./Tools/misc.scm 82 */
{ /* ./Tools/misc.scm 83 */
bool_t BgL_test1077z00_52;
BgL_test1077z00_52 = 
(BgL_iz00_47==((long)0)); 
if(BgL_test1077z00_52)
{ /* ./Tools/misc.scm 84 */
obj_t BgL_arg1079z00_53;
{ /* ./Tools/misc.scm 84 */
int BgL_startz00_272;
BgL_startz00_272 = 
(int)(((long)1)); 
BgL_arg1079z00_53 = 
c_substring(BgL_strz00_10, BgL_startz00_272, BgL_strzd2lengthzd2_45); } 
{ 
obj_t BgL_strz00_519;
BgL_strz00_519 = BgL_arg1079z00_53; 
BgL_strz00_10 = BgL_strz00_519; 
goto BGl_stringzd2splitzd2zztools_miscz00;} }  else 
{ /* ./Tools/misc.scm 85 */
obj_t BgL_arg1084z00_54;obj_t BgL_arg1085z00_55;
{ /* ./Tools/misc.scm 85 */
int BgL_startz00_275;int BgL_endz00_276;
BgL_startz00_275 = 
(int)(((long)0)); 
BgL_endz00_276 = 
(int)(BgL_iz00_47); 
BgL_arg1084z00_54 = 
c_substring(BgL_strz00_10, BgL_startz00_275, BgL_endz00_276); } 
{ /* ./Tools/misc.scm 86 */
obj_t BgL_arg1089z00_56;
{ /* ./Tools/misc.scm 86 */
long BgL_arg1092z00_57;
BgL_arg1092z00_57 = 
(BgL_iz00_47+((long)1)); 
{ /* ./Tools/misc.scm 86 */
int BgL_startz00_278;
BgL_startz00_278 = 
(int)(BgL_arg1092z00_57); 
BgL_arg1089z00_56 = 
c_substring(BgL_strz00_10, BgL_startz00_278, BgL_strzd2lengthzd2_45); } } 
BgL_arg1085z00_55 = 
BGl_stringzd2splitzd2zztools_miscz00(BgL_arg1089z00_56, BgL_separatorz00_11); } 
return 
MAKE_PAIR(BgL_arg1084z00_54, BgL_arg1085z00_55);} } }  else 
{ /* ./Tools/misc.scm 82 */
{ /* ./Tools/misc.scm 89 */
long BgL_arg1097z00_58;
BgL_arg1097z00_58 = 
(BgL_iz00_47+((long)1)); 
{ 
long BgL_iz00_529;
BgL_iz00_529 = BgL_arg1097z00_58; 
BgL_iz00_47 = BgL_iz00_529; 
goto BgL_loopz00_48;} } } } } } } } } 
}



/* _string-split1364 */
obj_t BGl__stringzd2split1364zd2zztools_miscz00(obj_t BgL_envz00_394, obj_t BgL_strz00_395, obj_t BgL_separatorz00_396)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 75 */
return 
BGl_stringzd2splitzd2zztools_miscz00(BgL_strz00_395, BgL_separatorz00_396);} 
}



/* epairify */
BGL_EXPORTED_DEF obj_t BGl_epairifyz00zztools_miscz00(obj_t BgL_pairz00_12, obj_t BgL_epairz00_13)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 99 */
{ /* ./Tools/misc.scm 100 */
bool_t BgL_test1107z00_60;
BgL_test1107z00_60 = 
EXTENDED_PAIRP(BgL_epairz00_13); 
if(BgL_test1107z00_60)
{ /* ./Tools/misc.scm 101 */
obj_t BgL_arg1109z00_61;obj_t BgL_arg1110z00_62;obj_t BgL_arg1111z00_63;
BgL_arg1109z00_61 = 
CAR(BgL_pairz00_12); 
BgL_arg1110z00_62 = 
CDR(BgL_pairz00_12); 
BgL_arg1111z00_63 = 
CER(BgL_epairz00_13); 
{ /* ./Tools/misc.scm 101 */
obj_t BgL_res1354z00_287;
BgL_res1354z00_287 = 
MAKE_EXTENDED_PAIR(BgL_arg1109z00_61, BgL_arg1110z00_62, BgL_arg1111z00_63); 
return BgL_res1354z00_287;} }  else 
{ /* ./Tools/misc.scm 100 */
return BgL_pairz00_12;} } } 
}



/* _epairify */
obj_t BGl__epairifyz00zztools_miscz00(obj_t BgL_envz00_397, obj_t BgL_pairz00_398, obj_t BgL_epairz00_399)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 99 */
return 
BGl_epairifyz00zztools_miscz00(BgL_pairz00_398, BgL_epairz00_399);} 
}



/* epairify-rec */
BGL_EXPORTED_DEF obj_t BGl_epairifyzd2reczd2zztools_miscz00(obj_t BgL_pz00_14, obj_t BgL_epz00_15)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 109 */
{ /* ./Tools/misc.scm 111 */
bool_t BgL_test1117z00_64;
BgL_test1117z00_64 = 
PAIRP(BgL_pz00_14); 
if(BgL_test1117z00_64)
{ /* ./Tools/misc.scm 113 */
bool_t BgL_test1118z00_65;
BgL_test1118z00_65 = 
EXTENDED_PAIRP(BgL_epz00_15); 
if(BgL_test1118z00_65)
{ /* ./Tools/misc.scm 113 */
{ /* ./Tools/misc.scm 116 */
obj_t BgL_arg1120z00_66;obj_t BgL_arg1121z00_67;obj_t BgL_arg1122z00_68;
{ /* ./Tools/misc.scm 116 */
obj_t BgL_arg1125z00_69;obj_t BgL_arg1126z00_70;
BgL_arg1125z00_69 = 
CAR(BgL_pz00_14); 
BgL_arg1126z00_70 = 
CAR(BgL_epz00_15); 
BgL_arg1120z00_66 = 
BGl_epairifyzd2reczd2zztools_miscz00(BgL_arg1125z00_69, BgL_arg1126z00_70); } 
{ /* ./Tools/misc.scm 117 */
obj_t BgL_arg1131z00_71;obj_t BgL_arg1132z00_72;
BgL_arg1131z00_71 = 
CDR(BgL_pz00_14); 
BgL_arg1132z00_72 = 
CDR(BgL_epz00_15); 
BgL_arg1121z00_67 = 
BGl_epairifyzd2reczd2zztools_miscz00(BgL_arg1131z00_71, BgL_arg1132z00_72); } 
BgL_arg1122z00_68 = 
CER(BgL_epz00_15); 
{ /* ./Tools/misc.scm 116 */
obj_t BgL_res1355z00_298;
BgL_res1355z00_298 = 
MAKE_EXTENDED_PAIR(BgL_arg1120z00_66, BgL_arg1121z00_67, BgL_arg1122z00_68); 
return BgL_res1355z00_298;} } }  else 
{ /* ./Tools/misc.scm 113 */
return BgL_pz00_14;} }  else 
{ /* ./Tools/misc.scm 111 */
return BgL_pz00_14;} } } 
}



/* _epairify-rec */
obj_t BGl__epairifyzd2reczd2zztools_miscz00(obj_t BgL_envz00_400, obj_t BgL_pz00_401, obj_t BgL_epz00_402)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 109 */
return 
BGl_epairifyzd2reczd2zztools_miscz00(BgL_pz00_401, BgL_epz00_402);} 
}



/* epairify* */
BGL_EXPORTED_DEF obj_t BGl_epairifyza2za2zztools_miscz00(obj_t BgL_defz00_16, obj_t BgL_srcsz00_17)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 123 */
{ 
obj_t BgL_srcsz00_73;
BgL_srcsz00_73 = BgL_srcsz00_17; 
BgL_loopz00_74:
{ /* ./Tools/misc.scm 126 */
bool_t BgL_test1140z00_75;
BgL_test1140z00_75 = 
NULLP(BgL_srcsz00_73); 
if(BgL_test1140z00_75)
{ /* ./Tools/misc.scm 126 */
return BgL_defz00_16;}  else 
{ /* ./Tools/misc.scm 128 */
bool_t BgL_test1141z00_76;
{ /* ./Tools/misc.scm 128 */
obj_t BgL_arg1162z00_82;
BgL_arg1162z00_82 = 
CAR(BgL_srcsz00_73); 
BgL_test1141z00_76 = 
EXTENDED_PAIRP(BgL_arg1162z00_82); } 
if(BgL_test1141z00_76)
{ /* ./Tools/misc.scm 128 */
{ /* ./Tools/misc.scm 129 */
obj_t BgL_arg1144z00_77;obj_t BgL_arg1147z00_78;obj_t BgL_arg1148z00_79;
BgL_arg1144z00_77 = 
CAR(BgL_defz00_16); 
BgL_arg1147z00_78 = 
CDR(BgL_defz00_16); 
{ /* ./Tools/misc.scm 129 */
obj_t BgL_auxz00_558;
BgL_auxz00_558 = 
CAR(BgL_srcsz00_73); 
BgL_arg1148z00_79 = 
CER(BgL_auxz00_558); } 
{ /* ./Tools/misc.scm 129 */
obj_t BgL_res1356z00_309;
BgL_res1356z00_309 = 
MAKE_EXTENDED_PAIR(BgL_arg1144z00_77, BgL_arg1147z00_78, BgL_arg1148z00_79); 
return BgL_res1356z00_309;} } }  else 
{ /* ./Tools/misc.scm 128 */
{ /* ./Tools/misc.scm 131 */
obj_t BgL_arg1158z00_81;
BgL_arg1158z00_81 = 
CDR(BgL_srcsz00_73); 
{ 
obj_t BgL_srcsz00_563;
BgL_srcsz00_563 = BgL_arg1158z00_81; 
BgL_srcsz00_73 = BgL_srcsz00_563; 
goto BgL_loopz00_74;} } } } } } } 
}



/* _epairify* */
obj_t BGl__epairifyza2za2zztools_miscz00(obj_t BgL_envz00_403, obj_t BgL_defz00_404, obj_t BgL_srcsz00_405)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 123 */
return 
BGl_epairifyza2za2zztools_miscz00(BgL_defz00_404, BgL_srcsz00_405);} 
}



/* build-path-from-shell-variable */
BGL_EXPORTED_DEF obj_t BGl_buildzd2pathzd2fromzd2shellzd2variablez00zztools_miscz00(obj_t BgL_varz00_18)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 136 */
{ /* ./Tools/misc.scm 137 */
obj_t BgL_valz00_83;
BgL_valz00_83 = 
BGl_getenvz00zz__osz00(
BSTRING_TO_STRING(BgL_varz00_18)); 
{ /* ./Tools/misc.scm 138 */
bool_t BgL_test1166z00_84;
BgL_test1166z00_84 = 
STRINGP(BgL_valz00_83); 
if(BgL_test1166z00_84)
{ /* ./Tools/misc.scm 139 */
obj_t BgL_port1003z00_85;
BgL_port1003z00_85 = 
open_input_string(BgL_valz00_83); 
{ /* ./Tools/misc.scm 139 */
obj_t BgL_val1004z00_86;
BgL_val1004z00_86 = 
BGl_zc3exitza31177ze3z83zztools_miscz00(BgL_port1003z00_85); 
close_input_port(BgL_port1003z00_85); 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1168z00_87;
{ /* ./Tools/misc.scm 139 */
obj_t BgL_auxz00_572;
BgL_auxz00_572 = 
BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(BgL_val1004z00_86); 
BgL_test1168z00_87 = 
CBOOL(BgL_auxz00_572); } 
if(BgL_test1168z00_87)
{ /* ./Tools/misc.scm 139 */
obj_t BgL_arg1171z00_88;obj_t BgL_arg1172z00_89;
BgL_arg1171z00_88 = 
CAR(BgL_val1004z00_86); 
BgL_arg1172z00_89 = 
CDR(BgL_val1004z00_86); 
return 
BGl_unwindzd2untilz12zc0zz__bexitz00(BgL_arg1171z00_88, BgL_arg1172z00_89);}  else 
{ /* ./Tools/misc.scm 139 */
return BgL_val1004z00_86;} } } }  else 
{ /* ./Tools/misc.scm 138 */
return BNIL;} } } } 
}



/* <exit:1177> */
obj_t BGl_zc3exitza31177ze3z83zztools_miscz00(obj_t BgL_port1003z00_429)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 139 */
jmp_buf jmpbuf; 
obj_t BgL_an_exit1005z00_91;
if( SET_EXIT(BgL_an_exit1005z00_91) ) { 
return 
_exit_value_;
} else {
BgL_an_exit1005z00_91 = 
(obj_t)jmpbuf; 
{ /* ./Tools/misc.scm 139 */

PUSH_EXIT(BgL_an_exit1005z00_91, ((bool_t)0)); 
{ /* ./Tools/misc.scm 139 */
obj_t BgL_val1006z00_92;
{ /* ./Tools/misc.scm 139 */
obj_t BgL_arg1182z00_93;
{ /* ./Tools/misc.scm 139 */
obj_t BgL_thezd2rgczd2contextz00_94;
BgL_thezd2rgczd2contextz00_94 = 
MAKE_CELL(BUNSPEC); 
{ /* ./Tools/misc.scm 139 */
obj_t BgL_zc3anonymousza31184ze3z83_410;
{ 
int BgL_auxz00_582;
BgL_auxz00_582 = 
(int)(((long)1)); 
BgL_zc3anonymousza31184ze3z83_410 = 
MAKE_EL_PROCEDURE_1(BgL_auxz00_582); } 
{ /* ./Tools/misc.scm 139 */
int BgL_auxz00_585;
BgL_auxz00_585 = 
(int)(((long)0)); 
PROCEDURE_1_EL_SET(BgL_zc3anonymousza31184ze3z83_410, BgL_auxz00_585, BgL_thezd2rgczd2contextz00_94); } 
BgL_arg1182z00_93 = BgL_zc3anonymousza31184ze3z83_410; } } 
BgL_val1006z00_92 = 
BGl_zc3anonymousza31184ze3z83zztools_miscz00(BgL_arg1182z00_93, BgL_port1003z00_429, BFALSE); } 
POP_EXIT(); 
return BgL_val1006z00_92;} } 
} } 
}



/* _build-path-from-shell-variable */
obj_t BGl__buildzd2pathzd2fromzd2shellzd2variablez00zztools_miscz00(obj_t BgL_envz00_411, obj_t BgL_varz00_412)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 136 */
return 
BGl_buildzd2pathzd2fromzd2shellzd2variablez00zztools_miscz00(BgL_varz00_412);} 
}



/* ignore */
obj_t BGl_ignorez00zztools_miscz00(obj_t BgL_statezd20zd21007z00_416, obj_t BgL_thezd2rgczd2contextz00_415, obj_t BgL_procz00_414, obj_t BgL_inputzd2portzd2_413)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 139 */
BGl_ignorez00zztools_miscz00:
RGC_START_MATCH(BgL_inputzd2portzd2_413); 
{ /* ./Tools/misc.scm 139 */
long BgL_matchz00_120;
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1198z00_126;
BgL_test1198z00_126 = 
PROCEDUREP(BgL_procz00_414); 
if(BgL_test1198z00_126)
{ /* ./Tools/misc.scm 139 */
obj_t BgL_auxz00_595;
BgL_auxz00_595 = 
PROCEDURE_ENTRY(BgL_procz00_414)(BgL_procz00_414, BgL_statezd20zd21007z00_416, BgL_inputzd2portzd2_413, 
BINT(((long)2)), 
CELL_REF(BgL_thezd2rgczd2contextz00_415), BEOA); 
BgL_matchz00_120 = 
(long)CINT(BgL_auxz00_595); }  else 
{ /* ./Tools/misc.scm 139 */
obj_t BgL_auxz00_600;
BgL_auxz00_600 = 
BGl_STATEzd20zd21007z00zztools_miscz00(BgL_statezd20zd21007z00_416, BgL_inputzd2portzd2_413, 
BINT(((long)2)), 
CELL_REF(BgL_thezd2rgczd2contextz00_415)); 
BgL_matchz00_120 = 
(long)CINT(BgL_auxz00_600); } } 
RGC_SET_FILEPOS(BgL_inputzd2portzd2_413); 
switch( BgL_matchz00_120) { case ((long)2) : 

return BNIL;break;case ((long)1) : 

{ 

goto BGl_ignorez00zztools_miscz00;} break;case ((long)0) : 

{ /* ./Tools/misc.scm 141 */
obj_t BgL_strz00_124;
BgL_strz00_124 = 
BGl_thezd2stringzd2zztools_miscz00(BgL_inputzd2portzd2_413); 
{ /* ./Tools/misc.scm 141 */
obj_t BgL_resz00_125;
BgL_resz00_125 = 
BGl_ignorez00zztools_miscz00(BgL_statezd20zd21007z00_416, BgL_thezd2rgczd2contextz00_415, BgL_procz00_414, BgL_inputzd2portzd2_413); 
{ /* ./Tools/misc.scm 142 */

return 
MAKE_PAIR(BgL_strz00_124, BgL_resz00_125);} } } break;
default: 
return 
BGl_case_else1012z00zztools_miscz00(BgL_matchz00_120);} } } 
}



/* the-string */
obj_t BGl_thezd2stringzd2zztools_miscz00(obj_t BgL_inputzd2portzd2_417)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
int BgL_arg1258z00_159;
{ /* ./Tools/misc.scm 139 */
int BgL_res1357z00_321;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_610;
BgL_auxz00_610 = 
RGC_BUFFER_LENGTH(BgL_inputzd2portzd2_417); 
BgL_res1357z00_321 = 
(int)(BgL_auxz00_610); } 
BgL_arg1258z00_159 = BgL_res1357z00_321; } 
{ /* ./Tools/misc.scm 139 */
int BgL_startz00_323;
BgL_startz00_323 = 
(int)(((long)0)); 
return 
rgc_buffer_substring(BgL_inputzd2portzd2_417, BgL_startz00_323, BgL_arg1258z00_159);} } } 
}



/* case_else1012 */
obj_t BGl_case_else1012z00zztools_miscz00(long BgL_matchz00_418)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
obj_t BgL_objectz00_318;
BgL_objectz00_318 = 
BINT(BgL_matchz00_418); 
FAILURE(BGl_string1428z00zztools_miscz00,BGl_string1429z00zztools_miscz00,BgL_objectz00_318);} } 
}



/* <anonymous:1184> */
obj_t BGl_zc3anonymousza31184ze3z83zztools_miscz00(obj_t BgL_envz00_419, obj_t BgL_inputzd2portzd2_421, obj_t BgL_procz00_422)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
obj_t BgL_thezd2rgczd2contextz00_420;
{ /* ./Tools/misc.scm 139 */
int BgL_auxz00_617;
BgL_auxz00_617 = 
(int)(((long)0)); 
BgL_thezd2rgczd2contextz00_420 = 
PROCEDURE_1_EL_REF(BgL_envz00_419, BgL_auxz00_617); } 
{ 
obj_t BgL_inputzd2portzd2_95;obj_t BgL_procz00_96;
BgL_inputzd2portzd2_95 = BgL_inputzd2portzd2_421; 
BgL_procz00_96 = BgL_procz00_422; 
return 
BGl_ignorez00zztools_miscz00(BGl_proc1430z00zztools_miscz00, BgL_thezd2rgczd2contextz00_420, BgL_procz00_96, BgL_inputzd2portzd2_95);} } } 
}



/* STATE-0-1007 */
obj_t BGl_STATEzd20zd21007z00zztools_miscz00(obj_t BgL_envz00_423, obj_t BgL_inputzd2portzd2_424, obj_t BgL_lastzd2matchzd2_425, obj_t BgL_thezd2rgczd2contextz00_426)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 139 */
{ 
obj_t BgL_inputzd2portzd2_182;obj_t BgL_lastzd2matchzd2_183;obj_t BgL_thezd2rgczd2contextz00_184;
BgL_inputzd2portzd2_182 = BgL_inputzd2portzd2_424; 
BgL_lastzd2matchzd2_183 = BgL_lastzd2matchzd2_425; 
BgL_thezd2rgczd2contextz00_184 = BgL_thezd2rgczd2contextz00_426; 
BgL_zc3anonymousza31292ze3z83_185:
{ 
obj_t BgL_inputzd2portzd2_162;obj_t BgL_lastzd2matchzd2_163;obj_t BgL_thezd2rgczd2contextz00_164;obj_t BgL_inputzd2portzd2_172;long BgL_lastzd2matchzd2_173;obj_t BgL_thezd2rgczd2contextz00_174;
{ /* ./Tools/misc.scm 139 */
int BgL_currentzd2charzd2_186;
BgL_currentzd2charzd2_186 = 
RGC_BUFFER_GET_CHAR(BgL_inputzd2portzd2_182); 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1293z00_187;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_622;
BgL_auxz00_622 = 
(long)(BgL_currentzd2charzd2_186); 
BgL_test1293z00_187 = 
(BgL_auxz00_622==((long)0)); } 
if(BgL_test1293z00_187)
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1294z00_188;
BgL_test1294z00_188 = 
RGC_BUFFER_EMPTY(BgL_inputzd2portzd2_182); 
if(BgL_test1294z00_188)
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1295z00_189;
BgL_test1295z00_189 = 
rgc_fill_buffer(BgL_inputzd2portzd2_182); 
if(BgL_test1295z00_189)
{ 

goto BgL_zc3anonymousza31292ze3z83_185;}  else 
{ /* ./Tools/misc.scm 139 */
return BgL_lastzd2matchzd2_183;} }  else 
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_630;
BgL_inputzd2portzd2_162 = BgL_inputzd2portzd2_182; 
BgL_lastzd2matchzd2_163 = BgL_lastzd2matchzd2_183; 
BgL_thezd2rgczd2contextz00_164 = BgL_thezd2rgczd2contextz00_184; 
BgL_zc3anonymousza31264ze3z83_165:
{ /* ./Tools/misc.scm 139 */
long BgL_newzd2matchzd2_166;
RGC_STOP_MATCH(BgL_inputzd2portzd2_162); 
BgL_newzd2matchzd2_166 = ((long)0); 
{ /* ./Tools/misc.scm 139 */
int BgL_currentzd2charzd2_167;
BgL_currentzd2charzd2_167 = 
RGC_BUFFER_GET_CHAR(BgL_inputzd2portzd2_162); 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1265z00_168;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_633;
BgL_auxz00_633 = 
(long)(BgL_currentzd2charzd2_167); 
BgL_test1265z00_168 = 
(BgL_auxz00_633==((long)0)); } 
if(BgL_test1265z00_168)
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1266z00_169;
BgL_test1266z00_169 = 
RGC_BUFFER_EMPTY(BgL_inputzd2portzd2_162); 
if(BgL_test1266z00_169)
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1267z00_170;
BgL_test1267z00_170 = 
rgc_fill_buffer(BgL_inputzd2portzd2_162); 
if(BgL_test1267z00_170)
{ 

goto BgL_zc3anonymousza31264ze3z83_165;}  else 
{ /* ./Tools/misc.scm 139 */
BgL_auxz00_630 = BgL_newzd2matchzd2_166
; } }  else 
{ /* ./Tools/misc.scm 139 */
BgL_inputzd2portzd2_172 = BgL_inputzd2portzd2_162; 
BgL_lastzd2matchzd2_173 = BgL_newzd2matchzd2_166; 
BgL_thezd2rgczd2contextz00_174 = BgL_thezd2rgczd2contextz00_164; 
BgL_zc3anonymousza31278ze3z83_175:
{ /* ./Tools/misc.scm 139 */
long BgL_newzd2matchzd2_176;
RGC_STOP_MATCH(BgL_inputzd2portzd2_172); 
BgL_newzd2matchzd2_176 = ((long)0); 
{ /* ./Tools/misc.scm 139 */
int BgL_currentzd2charzd2_177;
BgL_currentzd2charzd2_177 = 
RGC_BUFFER_GET_CHAR(BgL_inputzd2portzd2_172); 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1279z00_178;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_643;
BgL_auxz00_643 = 
(long)(BgL_currentzd2charzd2_177); 
BgL_test1279z00_178 = 
(BgL_auxz00_643==((long)0)); } 
if(BgL_test1279z00_178)
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1280z00_179;
BgL_test1280z00_179 = 
RGC_BUFFER_EMPTY(BgL_inputzd2portzd2_172); 
if(BgL_test1280z00_179)
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1281z00_180;
BgL_test1281z00_180 = 
rgc_fill_buffer(BgL_inputzd2portzd2_172); 
if(BgL_test1281z00_180)
{ 

goto BgL_zc3anonymousza31278ze3z83_175;}  else 
{ /* ./Tools/misc.scm 139 */
BgL_auxz00_630 = BgL_newzd2matchzd2_176
; } }  else 
{ 
long BgL_lastzd2matchzd2_651;
BgL_lastzd2matchzd2_651 = BgL_newzd2matchzd2_176; 
BgL_lastzd2matchzd2_173 = BgL_lastzd2matchzd2_651; 
goto BgL_zc3anonymousza31278ze3z83_175;} } }  else 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1286z00_181;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_652;
BgL_auxz00_652 = 
(long)(BgL_currentzd2charzd2_177); 
BgL_test1286z00_181 = 
(BgL_auxz00_652==((long)58)); } 
if(BgL_test1286z00_181)
{ /* ./Tools/misc.scm 139 */
BgL_auxz00_630 = BgL_newzd2matchzd2_176; }  else 
{ /* ./Tools/misc.scm 139 */
{ 
long BgL_lastzd2matchzd2_656;
BgL_lastzd2matchzd2_656 = BgL_newzd2matchzd2_176; 
BgL_lastzd2matchzd2_173 = BgL_lastzd2matchzd2_656; 
goto BgL_zc3anonymousza31278ze3z83_175;} } } } } } } } }  else 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1272z00_171;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_657;
BgL_auxz00_657 = 
(long)(BgL_currentzd2charzd2_167); 
BgL_test1272z00_171 = 
(BgL_auxz00_657==((long)58)); } 
if(BgL_test1272z00_171)
{ /* ./Tools/misc.scm 139 */
BgL_auxz00_630 = BgL_newzd2matchzd2_166; }  else 
{ /* ./Tools/misc.scm 139 */
{ 
obj_t BgL_thezd2rgczd2contextz00_663;long BgL_lastzd2matchzd2_662;obj_t BgL_inputzd2portzd2_661;
BgL_inputzd2portzd2_661 = BgL_inputzd2portzd2_162; 
BgL_lastzd2matchzd2_662 = BgL_newzd2matchzd2_166; 
BgL_thezd2rgczd2contextz00_663 = BgL_thezd2rgczd2contextz00_164; 
BgL_thezd2rgczd2contextz00_174 = BgL_thezd2rgczd2contextz00_663; 
BgL_lastzd2matchzd2_173 = BgL_lastzd2matchzd2_662; 
BgL_inputzd2portzd2_172 = BgL_inputzd2portzd2_661; 
goto BgL_zc3anonymousza31278ze3z83_175;} } } } } } 
return 
BINT(BgL_auxz00_630);} } }  else 
{ /* ./Tools/misc.scm 139 */
bool_t BgL_test1300z00_190;
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_665;
BgL_auxz00_665 = 
(long)(BgL_currentzd2charzd2_186); 
BgL_test1300z00_190 = 
(BgL_auxz00_665==((long)58)); } 
if(BgL_test1300z00_190)
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
long BgL_newzd2matchzd2_351;
RGC_STOP_MATCH(BgL_inputzd2portzd2_182); 
BgL_newzd2matchzd2_351 = ((long)1); 
return 
BINT(BgL_newzd2matchzd2_351);} }  else 
{ /* ./Tools/misc.scm 139 */
{ /* ./Tools/misc.scm 139 */
long BgL_auxz00_671;
{ 
obj_t BgL_thezd2rgczd2contextz00_674;obj_t BgL_lastzd2matchzd2_673;obj_t BgL_inputzd2portzd2_672;
BgL_inputzd2portzd2_672 = BgL_inputzd2portzd2_182; 
BgL_lastzd2matchzd2_673 = BgL_lastzd2matchzd2_183; 
BgL_thezd2rgczd2contextz00_674 = BgL_thezd2rgczd2contextz00_184; 
BgL_thezd2rgczd2contextz00_164 = BgL_thezd2rgczd2contextz00_674; 
BgL_lastzd2matchzd2_163 = BgL_lastzd2matchzd2_673; 
BgL_inputzd2portzd2_162 = BgL_inputzd2portzd2_672; 
goto BgL_zc3anonymousza31264ze3z83_165;} 
return 
BINT(BgL_auxz00_671);} } } } } } } } 
}



/* uncygdrive */
BGL_EXPORTED_DEF obj_t BGl_uncygdrivez00zztools_miscz00(obj_t BgL_strz00_19)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 156 */
{ /* ./Tools/misc.scm 157 */
bool_t BgL_test1312z00_221;
{ /* ./Tools/misc.scm 157 */
int BgL_lenz00_362;
BgL_lenz00_362 = 
(int)(((long)10)); 
BgL_test1312z00_221 = 
bigloo_strncmp(BGl_string1431z00zztools_miscz00, BgL_strz00_19, BgL_lenz00_362); } 
if(BgL_test1312z00_221)
{ /* ./Tools/misc.scm 158 */
bool_t BgL_test1313z00_222;
{ /* ./Tools/misc.scm 158 */
bool_t BgL_test1336z00_231;
{ /* ./Tools/misc.scm 158 */
long BgL_auxz00_679;
{ /* ./Tools/misc.scm 158 */
int BgL_auxz00_680;
BgL_auxz00_680 = 
STRING_LENGTH(BgL_strz00_19); 
BgL_auxz00_679 = 
(long)(BgL_auxz00_680); } 
BgL_test1336z00_231 = 
(BgL_auxz00_679>((long)12)); } 
if(BgL_test1336z00_231)
{ /* ./Tools/misc.scm 159 */
bool_t BgL_test1338z00_232;
{ /* ./Tools/misc.scm 159 */
unsigned char BgL_arg1344z00_234;
{ /* ./Tools/misc.scm 159 */
int BgL_auxz00_685;
BgL_auxz00_685 = 
(int)(((long)10)); 
BgL_arg1344z00_234 = 
STRING_REF(BgL_strz00_19, BgL_auxz00_685); } 
{ /* ./Tools/misc.scm 159 */
bool_t BgL_res1358z00_369;
BgL_res1358z00_369 = 
isalpha(BgL_arg1344z00_234); 
BgL_test1338z00_232 = BgL_res1358z00_369; } } 
if(BgL_test1338z00_232)
{ /* ./Tools/misc.scm 160 */
unsigned char BgL_auxz00_690;
{ /* ./Tools/misc.scm 160 */
int BgL_auxz00_691;
BgL_auxz00_691 = 
(int)(((long)11)); 
BgL_auxz00_690 = 
STRING_REF(BgL_strz00_19, BgL_auxz00_691); } 
BgL_test1313z00_222 = 
(BgL_auxz00_690==((unsigned char)'/')); }  else 
{ /* ./Tools/misc.scm 159 */
BgL_test1313z00_222 = ((bool_t)0); } }  else 
{ /* ./Tools/misc.scm 158 */
BgL_test1313z00_222 = ((bool_t)0); } } 
if(BgL_test1313z00_222)
{ /* ./Tools/misc.scm 161 */
obj_t BgL_arg1315z00_223;obj_t BgL_arg1316z00_224;
{ /* ./Tools/misc.scm 161 */
unsigned char BgL_arg1319z00_225;
{ /* ./Tools/misc.scm 161 */
int BgL_auxz00_696;
BgL_auxz00_696 = 
(int)(((long)10)); 
BgL_arg1319z00_225 = 
STRING_REF(BgL_strz00_19, BgL_auxz00_696); } 
{ /* ./Tools/misc.scm 161 */
obj_t BgL_list1321z00_226;
{ /* ./Tools/misc.scm 161 */
obj_t BgL_arg1323z00_227;
{ /* ./Tools/misc.scm 161 */
obj_t BgL_arg1326z00_228;
{ /* ./Tools/misc.scm 161 */
obj_t BgL_auxz00_699;
BgL_auxz00_699 = 
BCHAR(((unsigned char)'/')); 
BgL_arg1326z00_228 = 
MAKE_PAIR(BgL_auxz00_699, BNIL); } 
{ /* ./Tools/misc.scm 161 */
obj_t BgL_auxz00_702;
BgL_auxz00_702 = 
BCHAR(((unsigned char)':')); 
BgL_arg1323z00_227 = 
MAKE_PAIR(BgL_auxz00_702, BgL_arg1326z00_228); } } 
{ /* ./Tools/misc.scm 161 */
obj_t BgL_auxz00_705;
BgL_auxz00_705 = 
BCHAR(BgL_arg1319z00_225); 
BgL_list1321z00_226 = 
MAKE_PAIR(BgL_auxz00_705, BgL_arg1323z00_227); } } 
BgL_arg1315z00_223 = 
BGl_listzd2ze3stringz31zz__r4_strings_6_7z00(BgL_list1321z00_226); } } 
{ /* ./Tools/misc.scm 162 */
int BgL_arg1332z00_230;
BgL_arg1332z00_230 = 
STRING_LENGTH(BgL_strz00_19); 
{ /* ./Tools/misc.scm 162 */
int BgL_startz00_379;
BgL_startz00_379 = 
(int)(((long)12)); 
BgL_arg1316z00_224 = 
c_substring(BgL_strz00_19, BgL_startz00_379, BgL_arg1332z00_230); } } 
return 
string_append(BgL_arg1315z00_223, BgL_arg1316z00_224);}  else 
{ /* ./Tools/misc.scm 158 */
return BgL_strz00_19;} }  else 
{ /* ./Tools/misc.scm 157 */
return BgL_strz00_19;} } } 
}



/* _uncygdrive1371 */
obj_t BGl__uncygdrive1371z00zztools_miscz00(obj_t BgL_envz00_427, obj_t BgL_strz00_428)
{ AN_OBJECT;
{ /* ./Tools/misc.scm 156 */
return 
BGl_uncygdrivez00zztools_miscz00(BgL_strz00_428);} 
}

