ARB
defines.h
Go to the documentation of this file.
1 #ifndef DEFINES_H
2 #define DEFINES_H
3 
4 #ifndef _STDIO_H
5 #include <stdio.h>
6 #endif
7 #ifndef ATTRIBUTES_H
8 #include <attributes.h>
9 #endif
10 
11 // ----------------
12 // Defines
13 
14 #define outOfMemory() def_outOfMemory(__FILE__, __LINE__)
15 #define assert(c) do { static int assCnt; assCnt++; if (!(c)) def_assert(#c, __FILE__, __LINE__, assCnt); } while (0)
16 
17 // --------------
18 // Typen
19 
20 typedef char *str;
21 typedef const char *cstr;
22 
23 // ---------------------
24 // Hilfroutinen
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30  void error (cstr message);
31  void errorf (cstr format, ...) __ATTR__FORMAT(1);
32 
33  void warning (cstr message);
34  void warningf (cstr format, ...) __ATTR__FORMAT(1);
35 
36  void def_outOfMemory (cstr source, int lineno);
37  void def_assert (cstr whatFailed, cstr source, int lineno, int cnt);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 
44 #endif
void def_assert(cstr whatFailed, cstr source, int lineno, int cnt)
Definition: defines.c:37
AliDataPtr format(AliDataPtr data, const size_t wanted_len, GB_ERROR &error)
Definition: insdel.cxx:615
void warning(cstr message)
Definition: defines.c:11
#define __ATTR__FORMAT(pos)
Definition: attributes.h:60
void error(cstr message)
Definition: defines.c:7
void warningf(cstr format,...) __ATTR__FORMAT(1)
Definition: defines.c:24
void message(char *errortext)
char * str
Definition: defines.h:20
void def_outOfMemory(cstr source, int lineno)
Definition: defines.c:34
void errorf(cstr format,...) __ATTR__FORMAT(1)
Definition: defines.c:14
const char * cstr
Definition: defines.h:21