Crossfire Server, Trunk
compat.h
Go to the documentation of this file.
1 
6 #ifndef _COMPAT_H
7 #define _COMPAT_H
8 
9 // Maintain backward compatibility with original macros.
10 #ifndef TRUE
11 #define TRUE true
12 #endif
13 #ifndef FALSE
14 #define FALSE false
15 #endif
16 #define FMT64 PRId64
17 #define FMT64U PRIu64
18 
19 
20 #ifndef MIN
21 #define MIN(x, y) ((x) < (y) ? (x) : (y))
22 #endif
23 #ifndef MAX
24 #define MAX(x, y) ((x) > (y) ? (x) : (y))
25 #endif
26 
27 #define safe_strncpy strlcpy
28 #define strcasestr_local strcasestr
29 #define strdup_local strdup
30 
31 #define CALLOC(x, y) calloc(x, y)
32 #define object_decrease_nrof_by_one(xyz) object_decrease_nrof(xyz, 1)
33 
34 #include <string.h>
35 
36 void safe_strcat(char *dest, const char *orig, size_t *curlen, size_t maxlen);
37 
38 #if 0
39 #ifndef HAVE_STRCASESTR
40 char *strcasestr(const char *s, const char *find);
41 #endif
42 
43 #ifndef HAVE_STRDUP
44 char *strdup(const char *str);
45 #endif
46 #endif
47 
48 #ifndef HAVE_STRLCPY
49 size_t strlcpy(char *dst, const char *src, size_t size);
50 #endif
51 
52 #if 0
53 #ifndef HAVE_TEMPNAM
54 char *tempnam(const char *tmpdir, const char *prefix);
55 #endif
56 #endif
57 
58 #endif
castle_read.prefix
string prefix
Definition: castle_read.py:31
safe_strcat
void safe_strcat(char *dest, const char *orig, size_t *curlen, size_t maxlen)
Definition: porting.cpp:202
make_face_from_files.str
str
Definition: make_face_from_files.py:30
strlcpy
size_t strlcpy(char *dst, const char *src, size_t size)
Definition: porting.cpp:222
strcasestr
const char * strcasestr(const char *s, const char *find)
convert.dest
dest
Definition: convert.py:25