/* .----------------------------------------------------------------------.
/ 4. C<<1 data declaration and allocation, updated 2008-01-31 xCh.
'----------------------------------------------------------------------- */
-#define def_mem(TYPE) typedef struct _##TYPE##_t * TYPE; struct _##TYPE##_t
+#define def_type(TYPE) typedef struct _##TYPE##_struct * TYPE
+#define def_mem(TYPE) def_type(TYPE); struct _##TYPE##_struct
#define get_mem(TYPE) _GET_MEM(TYPE)
#define get_buf(SIZE) (buf)malloc(SIZE) /* temporary solution */
-#define size_of_mem(TYPE) sizeof(struct _##TYPE##_t)
-#define copy_of_mem(TYPE,SRC) _cll1_mem_cpy(sizeof(struct _##TYPE##_t),SRC)
+#define size_of_mem(TYPE) sizeof(struct _##TYPE##_struct)
+#define copy_of_mem(TYPE,SRC) _cll1_mem_cpy(sizeof(struct _##TYPE##_struct),SRC)
#define list(TYPE) TYPE __next
#define tree(TYPE) TYPE __next; TYPE __seek
#define dict(TYPE) tree(TYPE); str __key
/* .----------------------------------------------------------------------.
/ 8. C<<1 object oriented infrastructure, updated 2008-02-04
'----------------------------------------------------------------------- */
-#define def_type(TYPE) typedef struct _##TYPE##_t * TYPE;
-#define def_obj(TYPE) struct _##TYPE##_t
+#define def_interface(TYPE,INTERFACE) def_type(TYPE); def_mem(INTERFACE)
+#define def_obj(TYPE) struct _##TYPE##_struct
#define interface(TYPE) TYPE __interface
#define interface_of(SELF) SELF->__interface
#define method(NAME) (*NAME)
#define _CTX (_CTXatom->CTX)
#define _ARG1(ARG1,...) ARG1
#define _ASSERT(EXPR) assert(EXPR) /* later... _cll1_assert(EXPR,handler) */
-#define _GET_MEM(TYPE) ((TYPE)malloc(sizeof(struct _##TYPE##_t))) /* later... ((TYPE)_cll1_malloc(sizeof(struct _##TYPE##_t))) */
+#define _GET_MEM(TYPE) ((TYPE)malloc(sizeof(struct _##TYPE##_struct))) /* later... ((TYPE)_cll1_malloc(sizeof(struct _##TYPE##_struct))) */
#define _ANYATOM(TYPE,NAME) def_mem(_##NAME##Atom ) { TYPE NAME; int c; list( _##NAME##Atom ); }
#define _FOR_COLUMNS(A,B,C) _NEW(I,0) for( prefix(A,B,C) ; A ; ((A!=B)&&prefix(A,B,C)||(A=NULL) ),_I++ )
#define _FOR_VALID_COLUMNS(A,B,C) _NEW(I,0) for( prefix(A,B,C) ; A ; ((A!=B)&&prefix(A,B,C))||(A=NULL) ) if(*A&&++_I)