9#ifndef CTAGS_MAIN_ROUTINES_H
10#define CTAGS_MAIN_ROUTINES_H
23#define xMalloc(n,Type) (Type *)eMalloc((size_t)(n) * sizeof (Type))
24#define xCalloc(n,Type) (Type *)eCalloc((size_t)(n), sizeof (Type))
25#define xRealloc(p,n,Type) (Type *)eRealloc((p), (n) * sizeof (Type))
27#define ARRAY_SIZE(X) (sizeof (X) / sizeof (X[0]))
28#define ARRAY_AND_SIZE(X) (X), ARRAY_SIZE(X)
30#define STRINGIFY(X) STRINGIFY_(X)
31#define STRINGIFY_(X) #X
45#ifdef NEED_PROTO_MALLOC
46extern void *malloc (
size_t);
47extern void *realloc (
void *
ptr,
size_t);
49extern void *
eMalloc (
const size_t size);
50extern void *
eCalloc (
const size_t count,
const size_t size);
51extern void *
eRealloc (
void *
const ptr,
const size_t size);
57extern int struppercmp (
const char *s1,
const char *s2);
58extern int strnuppercmp (
const char *s1,
const char *s2,
size_t n);
60extern char*
strstr (
const char *str,
const char *substr);
62extern char*
strrstr (
const char *str,
const char *substr);
63extern char*
eStrdup (
const char* str);
64extern char*
eStrndup (
const char* str,
size_t len);
69extern bool strToUInt(
const char *
const str,
int base,
unsigned int *value);
70extern bool strToULong(
const char *
const string,
int base,
unsigned long *value);
71extern bool strToInt(
const char *
const str,
int base,
int *value);
72extern bool strToLong(
const char *
const string,
int base,
long *value);
75extern const char *
baseFilename (
const char *
const filePath);
#define CTAGS_ATTR_PRINTF(s, f)
char * eStrndup(const char *str, size_t len)
void error(const errorSelection selection, const char *const format,...)
bool strToUInt(const char *const str, int base, unsigned int *value)
bool strToInt(const char *const str, int base, int *value)
int struppercmp(const char *s1, const char *s2)
char * newLowerString(const char *str)
int strnuppercmp(const char *s1, const char *s2, size_t n)
bool strToULong(const char *const string, int base, unsigned long *value)
void * eMalloc(const size_t size)
void toLowerString(char *str)
char * newUpperString(const char *str)
void eFreeNoNullCheck(void *const ptr)
const char * fileExtension(const char *const fileName)
char * strstr(const char *str, const char *substr)
void eFreeIndirect(void **ptr)
bool strToLong(const char *const string, int base, long *value)
void * eRealloc(void *const ptr, const size_t size)
char * eStrdup(const char *str)
void eFree(void *const ptr)
const char * baseFilename(const char *const filePath)
void toUpperString(char *str)
char * strrstr(const char *str, const char *substr)
void * eCalloc(const size_t count, const size_t size)