Contains prototypes for functions implemented in misc.c.
More...
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Detailed Description
Contains prototypes for functions implemented in misc.c.
- Author:
- Henry Chen (chchen@cse.cuhk.edu.hk)
Define Documentation
malloc() with error-handling
Value:do { \
fprintf(stderr, "%c[1;31;40m", 0x1B); \
fprintf(stderr, "%s(%d) in %s:: ", __FILE__, __LINE__, __func__); \
perror(call); \
fprintf(stderr, "%c[0m", 0x1B); \
exit(-1); } while (0)
Print error details with perror() and exit.
Value:do { \
fprintf(stderr, "%c[1;31;40m", 0x1B); \
fprintf(stderr, "%s(%d) in %s:: ", __FILE__, __LINE__, __func__); \
errno = errnum; \
perror(call); \
fprintf(stderr, "%c[0m", 0x1B); \
exit(-1); } while (0)
Print pthread_related error details and exit.
Typedef Documentation
Function Documentation
print an n x m matrix A for debug use