COOPY » Guide  version 0.6.5
/home/paulfitz/cvs/coopy_scm/coopy/src/libcoopy_core/include/coopy/Dbg.h
Go to the documentation of this file.
00001 #ifndef COOPY_DBG
00002 #define COOPY_DBG
00003 
00004 #include <stdio.h>
00005 #include <stdlib.h>
00006 
00007 extern bool _csv_verbose;
00008 #define dbg_printf if (_csv_verbose) printf
00009 
00010 void coopy_set_verbose(bool verbose);
00011 bool coopy_is_verbose();
00012 
00013 void coopy_set_strict(bool strict);
00014 bool coopy_is_strict();
00015 
00016 void coopy_set_default_table_name(const char *name);
00017 const char *coopy_get_default_table_name();
00018 
00019 void coopy_set_default_eol_style(const char *name);
00020 const char *coopy_get_default_eol_style();
00021 const char *coopy_eol();
00022 
00023  
00024 void coopy_print_trace(FILE *out, const char *file, int line);
00025 
00026 #define COOPY_ASSERT(x) if (!(x)) { printf("Assertion failure %s:%d  !(%s)\n",__FILE__,__LINE__, #x ); coopy_print_trace(stdout,__FILE__,__LINE__); exit(1); }
00027 
00028 #define COOPY_MEMORY(x) if (!(x)) { printf("Memory allocation failure %s:%d  !(%s)\n",__FILE__,__LINE__, #x ); coopy_print_trace(stdout,__FILE__,__LINE__); exit(1); }
00029 
00030 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines