Last change
on this file was
5127,
checked in by westram, 16 years ago
|
- ATTRXXX instead of attribute
- removed my own strange defines
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1000 bytes
|
Line | |
---|
1 | #ifndef __DEFINES_H |
---|
2 | #define __DEFINES_H |
---|
3 | |
---|
4 | #ifndef __STDIO_H |
---|
5 | #include <stdio.h> |
---|
6 | #endif |
---|
7 | |
---|
8 | #ifndef ATTRIBUTES_H |
---|
9 | #include <attributes.h> |
---|
10 | #endif |
---|
11 | |
---|
12 | /* /-----------\ */ |
---|
13 | /* | Defines | */ |
---|
14 | /* \-----------/ */ |
---|
15 | |
---|
16 | #define outOfMemory() def_outOfMemory(__FILE__, __LINE__) |
---|
17 | #define assert(c) do { static int assCnt; assCnt++; if (!(c)) def_assert(#c, __FILE__, __LINE__, assCnt); } while(0) |
---|
18 | |
---|
19 | /* /---------\ */ |
---|
20 | /* | Typen | */ |
---|
21 | /* \---------/ */ |
---|
22 | |
---|
23 | typedef char *str; |
---|
24 | typedef const char *cstr; |
---|
25 | |
---|
26 | /* /----------------\ */ |
---|
27 | /* | Hilfroutinen | */ |
---|
28 | /* \----------------/ */ |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif |
---|
33 | |
---|
34 | void error (cstr message); |
---|
35 | void errorf (cstr format, ...) __ATTR__FORMAT(1); |
---|
36 | |
---|
37 | void warning (cstr message); |
---|
38 | void warningf (cstr format, ...) __ATTR__FORMAT(1); |
---|
39 | |
---|
40 | void def_outOfMemory (cstr source, int lineno); |
---|
41 | void def_assert (cstr whatFailed, cstr source, int lineno, int cnt); |
---|
42 | |
---|
43 | #ifdef __cplusplus |
---|
44 | } |
---|
45 | #endif |
---|
46 | |
---|
47 | |
---|
48 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.