50 #define GetCurrentDir _getcwd
51 #define PATH_MAX MAX_PATH
54 #define GetCurrentDir getcwd
58 #define strcmpi strcasecmp
59 #define DIR_DELIMITER '/'
61 #ifdef HAVE_CXX11_FULL
62 #define OPERATOR_NEW_THROW_EXCEPTION
64 #define OPERATOR_NEW_THROW_EXCEPTION throw(std::bad_alloc)
104 #define xprintf(...) _xprintf(__FILE__, __func__, __LINE__, __VA_ARGS__)
106 int _xprintf(
const char *
const xprintf_file,
const char *
const xprintf_func,
const int xprintf_line,
MessageType type,
const char *
const fmt, ... );
108 void *
xrealloc(
void * ptr,
size_t size );
113 do { if (p) { free(p); (p)=NULL; } \
131 void operator delete(
void *p)
throw();
132 void operator delete[](
void *p)
throw();
139 int xmkdir(
const char *s );
140 int xchdir(
const char *s );
143 int xrename(
const char * oldname,
const char * newname );
149 char *
xstrtok(
char *s,
int position = -1);
150 char *
xstrtok(
char*,
const char* delim,
int position = -1);
char * xstrtok(char *s, int position=-1)
STRTOK WITH ERROR HANDLING and whitespace delimiters.
struct SystemInfo SystemInfo
System structure for various global variables.
#define OPERATOR_NEW_THROW_EXCEPTION
int xremove(const char *s)
Remove file or directory (function)
int xrename(const char *oldname, const char *newname)
Rename file (function)
char * get_log_file(void)
void resume_log_file(void)
System structure for various global variables.
char * get_log_fname(void)
void * xrealloc(void *ptr, size_t size)
Reallocation of memory block with checking.
void system_set_from_options()
void * xmalloc(size_t size)
Memory allocation with checking.
MessageType
Identifiers for various output messages.
char * xstrcpy(const char *)
MAKE BRAND NEW COPY OF STRING.
int xsystem(const char *)
SYSTEM with err handling.
int _xprintf(const char *const xprintf_file, const char *const xprintf_func, const int xprintf_line, MessageType type, const char *const fmt,...)
Multi-purpose printing routine: messages, warnings, errors.
int xchdir(const char *s)
Change directory (GLIBC function, original in )
char * xgetcwd(void)
Get current working directory (GLIBC function, original in )
int xchomp(char *s)
Delete trailing whitespace characters (space,tab,CR,NL).
int xmkdir(const char *s)
Operations on files and directories.