/*===========================================================================*/
/*   (Llib/foreign.scm)                                                      */
/*   Bigloo (2.6b)                                                           */
/*   Inria -- Sophia Antipolis (c)       Mon Dec 15 12:14:36 CET 2003        */
/*===========================================================================*/
/* COMPILATION: (/users/serrano/prgm/project/bigloo/bin/bigloo -O4 -mklib -cc gcc-2.95 -fsharing -q -s -copt -DBGL_NO_PIC -unsafe -c Llib/foreign.scm -indent -o objs/obj_u/Llib/foreign.c)*/
/* GC selection */
#define THE_GC BOEHM_GC

#include <bigloo.h>
#include <signal.h>

BGL_EXPORTED_DECL obj_t BGl_modulezd2initializa7ationz75zz__foreignz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zz__errorz00(long, char *);
static obj_t BGl__objzd2ze3cobjz31zz__foreignz00(obj_t, obj_t);
BGL_EXPORTED_DECL bool_t BGl_foreignzd2nullzf3z21zz__foreignz00(obj_t);
BGL_EXPORTED_DECL bool_t BGl_foreignzf3zf3zz__foreignz00(obj_t);
extern long obj_to_cobj(obj_t);
static obj_t BGl__foreignzf3zf3zz__foreignz00(obj_t, obj_t);
BGL_EXPORTED_DECL bool_t BGl_foreignzd2eqzf3z21zz__foreignz00(obj_t, obj_t);
static obj_t BGl_importedzd2moduleszd2initz00zz__foreignz00();
static obj_t BGl__foreignzd2nullzf3z21zz__foreignz00(obj_t, obj_t);
static obj_t BGl__voidza2zd2nullzf3z83zz__foreignz00(obj_t, obj_t);
static obj_t BGl_requirezd2initializa7ationz75zz__foreignz00 = BUNSPEC;
static obj_t BGl__foreignzd2eqzf3z21zz__foreignz00(obj_t, obj_t, obj_t);
BGL_EXPORTED_DECL bool_t BGl_voidza2zd2nullzf3z83zz__foreignz00(void *);
BGL_EXPORTED_DECL bool_t BGl_stringzd2ptrzd2nullzf3zf3zz__foreignz00(char *);
BGL_EXPORTED_DECL long BGl_objzd2ze3cobjz31zz__foreignz00(obj_t);
static obj_t BGl__stringzd2ptrzd2nullzf3zf3zz__foreignz00(obj_t, obj_t);
static obj_t *__cnst;


DEFINE_EXPORT_PROCEDURE( BGl_stringzd2ptrzd2nullzf3zd2envz21zz__foreignz00, BgL_bgl__stringza7d2ptrza7d2nullza7f3za7f3za7za7__foreignza7001550za7, BGl__stringzd2ptrzd2nullzf3zf3zz__foreignz00, 0L, 1 );
DEFINE_STRING( BGl_string1545z00zz__foreignz00, BgL_bgl_string1545za700za7za7__foreignza7001551z00, "not a foreign object", 20 );
DEFINE_STRING( BGl_string1544z00zz__foreignz00, BgL_bgl_string1544za700za7za7__foreignza7001552z00, "foreign-null?", 13 );
DEFINE_EXPORT_PROCEDURE( BGl_foreignzd2eqzf3zd2envzf3zz__foreignz00, BgL_bgl__foreignza7d2eqza7f3za721za7za7__foreignza7001553z00, BGl__foreignzd2eqzf3z21zz__foreignz00, 0L, 2 );
DEFINE_EXPORT_PROCEDURE( BGl_voidza2zd2nullzf3zd2envz51zz__foreignz00, BgL_bgl__voidza7a2za7d2nullza7f3za783za7za7__foreignza7001554za7, BGl__voidza2zd2nullzf3z83zz__foreignz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_foreignzf3zd2envz21zz__foreignz00, BgL_bgl__foreignza7f3za7f3za7za7__foreignza7001555za7, BGl__foreignzf3zf3zz__foreignz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_objzd2ze3cobjzd2envze3zz__foreignz00, BgL_bgl__objza7d2za7e3cobjza731za7za7__foreignza7001556z00, BGl__objzd2ze3cobjz31zz__foreignz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_foreignzd2nullzf3zd2envzf3zz__foreignz00, BgL_bgl__foreignza7d2nullza7f3za721za7za7__foreignza7001557z00, BGl__foreignzd2nullzf3z21zz__foreignz00, 0L, 1 );



/* module-initialization */
BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zz__foreignz00(long BgL_checksumz00_426, char * BgL_fromz00_427)
{ AN_OBJECT;
{ 
if(
CBOOL(BGl_requirezd2initializa7ationz75zz__foreignz00))
{ 
BGl_requirezd2initializa7ationz75zz__foreignz00 = 
BBOOL(((bool_t)0)); 
BGl_importedzd2moduleszd2initz00zz__foreignz00(); 
return BUNSPEC;}  else 
{ 
return BUNSPEC;} } 
}



/* foreign? */
BGL_EXPORTED_DEF bool_t BGl_foreignzf3zf3zz__foreignz00(obj_t BgL_objz00_1)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 78 */
return 
FOREIGNP(BgL_objz00_1);} 
}



/* _foreign? */
obj_t BGl__foreignzf3zf3zz__foreignz00(obj_t BgL_envz00_402, obj_t BgL_objz00_403)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 78 */
{ /* ./Llib/foreign.scm 79 */
bool_t BgL_auxz00_433;
BgL_auxz00_433 = 
FOREIGNP(BgL_objz00_403); 
return 
BBOOL(BgL_auxz00_433);} } 
}



/* foreign-eq? */
BGL_EXPORTED_DEF bool_t BGl_foreignzd2eqzf3z21zz__foreignz00(obj_t BgL_o1z00_2, obj_t BgL_o2z00_3)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 84 */
return 
FOREIGN_EQP(BgL_o1z00_2, BgL_o2z00_3);} 
}



/* _foreign-eq? */
obj_t BGl__foreignzd2eqzf3z21zz__foreignz00(obj_t BgL_envz00_404, obj_t BgL_o1z00_405, obj_t BgL_o2z00_406)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 84 */
{ /* ./Llib/foreign.scm 85 */
bool_t BgL_auxz00_437;
BgL_auxz00_437 = 
FOREIGN_EQP(BgL_o1z00_405, BgL_o2z00_406); 
return 
BBOOL(BgL_auxz00_437);} } 
}



/* foreign-null? */
BGL_EXPORTED_DEF bool_t BGl_foreignzd2nullzf3z21zz__foreignz00(obj_t BgL_objz00_4)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 90 */
if(
FOREIGNP(BgL_objz00_4))
{ /* ./Llib/foreign.scm 91 */
return 
FOREIGN_NULLP(BgL_objz00_4);}  else 
{ /* ./Llib/foreign.scm 91 */
FAILURE(BGl_string1544z00zz__foreignz00,BGl_string1545z00zz__foreignz00,BgL_objz00_4);} } 
}



/* _foreign-null? */
obj_t BGl__foreignzd2nullzf3z21zz__foreignz00(obj_t BgL_envz00_407, obj_t BgL_objz00_408)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 90 */
{ /* ./Llib/foreign.scm 91 */
bool_t BgL_auxz00_444;
if(
FOREIGNP(BgL_objz00_408))
{ /* ./Llib/foreign.scm 91 */
BgL_auxz00_444 = 
FOREIGN_NULLP(BgL_objz00_408)
; }  else 
{ /* ./Llib/foreign.scm 91 */
FAILURE(BGl_string1544z00zz__foreignz00,BGl_string1545z00zz__foreignz00,BgL_objz00_408);} 
return 
BBOOL(BgL_auxz00_444);} } 
}



/* string-ptr-null? */
BGL_EXPORTED_DEF bool_t BGl_stringzd2ptrzd2nullzf3zf3zz__foreignz00(char * BgL_objz00_5)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 98 */
return 
STRING_PTR_NULL(BgL_objz00_5);} 
}



/* _string-ptr-null? */
obj_t BGl__stringzd2ptrzd2nullzf3zf3zz__foreignz00(obj_t BgL_envz00_409, obj_t BgL_objz00_410)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 98 */
{ /* ./Llib/foreign.scm 99 */
bool_t BgL_auxz00_451;
{ /* ./Llib/foreign.scm 99 */
char * BgL_auxz00_452;
BgL_auxz00_452 = 
BSTRING_TO_STRING(BgL_objz00_410); 
BgL_auxz00_451 = 
STRING_PTR_NULL(BgL_auxz00_452); } 
return 
BBOOL(BgL_auxz00_451);} } 
}



/* obj->cobj */
BGL_EXPORTED_DEF long BGl_objzd2ze3cobjz31zz__foreignz00(obj_t BgL_objz00_6)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 104 */
return 
obj_to_cobj(BgL_objz00_6);} 
}



/* _obj->cobj */
obj_t BGl__objzd2ze3cobjz31zz__foreignz00(obj_t BgL_envz00_411, obj_t BgL_objz00_412)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 104 */
{ /* ./Llib/foreign.scm 105 */
long BgL_auxz00_457;
BgL_auxz00_457 = 
obj_to_cobj(BgL_objz00_412); 
return 
(obj_t)(BgL_auxz00_457);} } 
}



/* void*-null? */
BGL_EXPORTED_DEF bool_t BGl_voidza2zd2nullzf3z83zz__foreignz00(void * BgL_objz00_7)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 110 */
return 
FOREIGN_PTR_NULL(BgL_objz00_7);} 
}



/* _void*-null? */
obj_t BGl__voidza2zd2nullzf3z83zz__foreignz00(obj_t BgL_envz00_413, obj_t BgL_objz00_414)
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 110 */
{ /* ./Llib/foreign.scm 111 */
bool_t BgL_auxz00_461;
{ /* ./Llib/foreign.scm 111 */
void * BgL_auxz00_462;
BgL_auxz00_462 = 
FOREIGN_TO_COBJ(BgL_objz00_414); 
BgL_auxz00_461 = 
FOREIGN_PTR_NULL(BgL_auxz00_462); } 
return 
BBOOL(BgL_auxz00_461);} } 
}



/* imported-modules-init */
obj_t BGl_importedzd2moduleszd2initz00zz__foreignz00()
{ AN_OBJECT;
{ /* ./Llib/foreign.scm 18 */
return 
BGl_modulezd2initializa7ationz75zz__errorz00(((long)11084), "__foreign");} 
}

