X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fconcord.git;a=blobdiff_plain;f=cos.h;h=741100930d36f98725c0a8b4e392f5250b5df726;hp=42ff7a245136c09b28bffbf7c2461cff4969ec0c;hb=699b570aa571b288dcb6532518dc8194ed0b70ec;hpb=f9f2aa38a4147d7ce3e4d31bd74aa5c341194f52 diff --git a/cos.h b/cos.h index 42ff7a2..7411009 100644 --- a/cos.h +++ b/cos.h @@ -28,6 +28,9 @@ extern "C" { } #endif +#include + + typedef void* COS_object; typedef struct COS_Object_ent COS_Object_ent; @@ -40,13 +43,13 @@ int cos_release_object (COS_object obj); typedef intptr_t COS_C_Int; COS_object cos_make_int (COS_C_Int num); -COS_C_Int cos_int_value (COS_object obj); int cos_int_p (COS_object obj); +COS_C_Int cos_int_value (COS_object obj); COS_object cos_make_char (int code); -int cos_char_id (COS_object obj); int cos_char_p (COS_object obj); +int cos_char_id (COS_object obj); typedef struct COS_String_ent COS_String_ent; @@ -66,16 +69,25 @@ typedef struct COS_Symbol_ent* COS_Symbol; COS_Symbol cos_intern (COS_object name); +int cos_symbol_p (COS_object obj); + COS_String cos_symbol_name (COS_Symbol symbol); +extern COS_Symbol cos_Qnil; +extern COS_Symbol cos_Qt; + typedef struct COS_Cons_ent COS_Cons_ent; typedef struct COS_Cons_ent* COS_Cons; COS_Cons cos_cons (COS_object car, COS_object cdr); +int cos_cons_p (COS_object obj); COS_object cos_car (COS_Cons pair); COS_object cos_cdr (COS_Cons pair); +COS_Cons cos_assoc (COS_object key, COS_Cons alist); +COS_object cos_alist_get (COS_Cons alist, COS_object key); + typedef struct COS_Container_ent COS_Container_ent; typedef struct COS_Container_ent* COS_Container; @@ -88,6 +100,9 @@ typedef struct COS_Sexp_ent* COS_Sexp; typedef struct COS_Binary_ent COS_Binary_ent; typedef struct COS_Binary_ent* COS_Binary; + +void cos_print_object (COS_object obj); + #if 0 { #endif