along with C<<1 header file; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- ------------------------------------------------------------------- */
-#ifndef __CLL1H__
-#define __CLL1H__
+*/
+
+#ifndef _CLL1_H
+#define _CLL1_H
#include <string.h>
#include <malloc.h>
#define textfile(TYPE,LINE) struct TYPE { char *LINE; char _eoln; list(TYPE); }
#define date(S) { time_t _T; _T=time(NULL); duplicate(ctime(&_T),S); }
-#ifdef USE_LIBRARY_MYSQL
/* ------------------------------------------------------------------- */
/* MySQL Infrastructure and basic macros - updated 2007-12-19 by xCh. */
/* ------------------------------------------------------------------- */
+#ifdef USE_LIBRARY_MYSQL
#define mysql_connect(S,U,P,D) (create(_Matom,_MStack) && push(_Matom,_Mstack) && (_Matom->M=mysql_init(NULL)),(_Matom->M && mysql_real_connect(_Matom->M,S,U,P,D,0,NULL,0)?_Matom->M:NULL))
#endif
-
+/* ------------------------------------------------------------------- */
+/* Object infrastructure and basic macros - updated 2008-01-13 by xCh. */
+/* unfinished */
+#define uses_interface(TYPE) struct TYPE *__class
+#define method(NAME)
+#define interface_implementation(IFACE,TYPE) struct TYPE *__get_##_##IFACE(void) { struct TYPE *_FACE=get_mem(TYPE); __bind_##_##IFACE(_FACE); return _IFC; } void __bind_##_##IFACE(struct TYPE *_FACE)
+#define bind_method(METHOD,FUNCTION) _IFACE->METHOD=FUNCTION
+#define get_interface(IFACE) __get_##_##IFACE(void)
+// must be function #define get_object(TYPE) (_CLL1_MALLOC(TYPE),CLL1_ASSERT(),)
+#define _(OBJECT,FUNCTION) OBJECT==NULL?NULL::(*(OBJECT->__class->METHOD))(OBJECT
#endif
+/* ------------------------------------------------------------------- */
+/* some general ideas, unfinished */
+#define _CLL1_THROW(ERR)
+#define _CLL1_TRY _NEW_E for(;;) if () {.... if(_Eatom->SYS) { if(_Eatom->RET) return; else break;} else { }
+#define _CLL1_ASSERT(EXPR) assert(EXPR)
+#define _CLL1_MALLOC(TYPE) malloc(sizeof(TYPE))