src/main.h

Go to the documentation of this file.
00001 /* -*- Mode: objc; c-basic-offset: 2; tab-width: 2 indent-tabs-mode: nil -*- */
00002 /* vim: set filetype=objc ts=2 sw=2 expandtab: */
00003 
00004 /*
00005  * Copyright (C) 2007 Neil Dantam
00006  *               2007 Jeff Seibert
00007  *
00008  * This program is free software: you can redistribute it and/or modify it
00009  * under the terms of the GNU General Public License, verson 3 ONLY, as
00010  * published by the Free Software Foundation.
00011  * 
00012  * This program is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00015  * more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License along with
00018  * this program.  If not, see <http://www.gnu.org/licenses/>.
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 //printed when assert would fail
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 

Generated on Mon Dec 24 06:11:58 2007 for gfront by  doxygen 1.5.2