source: trunk/TREEGEN/defines.h

Last change on this file was 7811, checked in by westram, 13 years ago

merge from dev [7748] [7749] [7750]

  • comments (C→C++ style)
  • fixed umlauts in TREEGEN
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 911 bytes
Line 
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
20typedef char          *str;
21typedef const char    *cstr;
22
23// ---------------------
24//      Hilfroutinen
25
26#ifdef __cplusplus
27extern "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
Note: See TracBrowser for help on using the repository browser.