00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #ifndef _MAIN_H_
00028 #define _MAIN_H_
00029
00030 #include <assert.h>
00031
00032 #define VERSION "0.01"
00033
00034
00035 #define TYPEASSERT(val, type) ( assert( typeassert( val, [type class] ) ) )
00036
00037
00038 #define DEBUGSTART(...) (fputs("* ", stderr) )
00039 #define DEBUGF(...) (fprintf(stderr, __VA_ARGS__) )
00040
00041 #define BUGF(...) (fprintf(stderr, __VA_ARGS__) )
00042
00043 #define ERRORF(...) (fprintf(stderr, __VA_ARGS__) )
00044 #define WARNF(...) (fprintf(stderr, __VA_ARGS__) )
00045
00046 #define ISKINDOF(inst,type) ( [(inst) isKindOf: [type class]] )
00047
00048 #define QUOTE(x) #x
00049
00050 #ifdef TYPEASSERT
00051 int typeassert( id val, Class class );
00052
00056 extern int translation_error;
00057 #endif
00058
00063 void ofree( id o, ... );
00064
00065
00115 #endif
00116