129 |
if the arguments to STR() (or CONC()) are themselves macros, they will |
if the arguments to STR() (or CONC()) are themselves macros, they will |
130 |
be expanded before being quoted. */ |
be expanded before being quoted. */ |
131 |
#ifndef STR |
#ifndef STR |
132 |
# define _STR(arg) #arg |
# define _STR(arg) #arg |
133 |
# define STR(arg) _STR(arg) |
# define STR(arg) _STR(arg) |
134 |
#endif |
#endif |
135 |
|
|
136 |
#ifndef CONC |
#ifndef CONC |
137 |
# define _CONC(a, b) a##b |
# define _CONC(a, b) a##b |
138 |
# define CONC(a, b) _CONC(a, b) |
# define CONC(a, b) _CONC(a, b) |
139 |
#endif |
#endif |
140 |
|
|
167 |
#define XCALLOC(type, num) ((type *) xcalloc ((num), sizeof(type))) |
#define XCALLOC(type, num) ((type *) xcalloc ((num), sizeof(type))) |
168 |
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) |
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) |
169 |
#define XREALLOC(type, p, num) ((type *) xrealloc ((p), (num) * sizeof(type))) |
#define XREALLOC(type, p, num) ((type *) xrealloc ((p), (num) * sizeof(type))) |
170 |
#define XFREE(p) M4_STMT_START { if (p) free (p); (p) = 0; } M4_STMT_END |
#define XFREE(p) ((p) = xfree (p)) |
171 |
|
|
172 |
extern void *xcalloc (size_t n, size_t s); |
extern void *xcalloc (size_t n, size_t s); |
173 |
extern void *xmalloc (size_t n); |
extern void *xmalloc (size_t n); |
174 |
extern void *xrealloc (void *p, size_t n); |
extern void *xrealloc (void *p, size_t n); |
175 |
extern void xfree (void *stale); |
extern void *xfree (void *stale); |
176 |
|
|
177 |
extern char *xstrdup (const char *string); |
extern char *xstrdup (const char *string); |
178 |
|
|