Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Added new macro for printing errors with formatting | 
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA1: | 
8efd79fae07391b3f24cddf9618548b2 | 
| User & Date: | rkeene 2013-03-04 23:28:46 | 
Context
| 
   2013-03-04 
 | ||
| 23:29 | Updated module loading to print out loading failure reason Leaf check-in: b95899fb13 user: rkeene tags: trunk | |
| 23:28 | Added new macro for printing errors with formatting check-in: 8efd79fae0 user: rkeene tags: trunk | |
| 23:28 | Updated patch-magic-file to be more robust check-in: b37c953e31 user: rkeene tags: trunk | |
Changes
Changes to dact.h.
| ︙ | ︙ | |||
151 152 153 154 155 156 157 158 159 160 161 162 163 164  | 
#define PRINT_LINE fprintf(stderr, "%s:%07i:%s(): ", __FILE__, __LINE__, __func__)
#else
#define PRINT_LINE /**/
#endif
#define PERROR_L(errnum, error) { PRINT_LINE; fprintf(stderr, "dact: %s: %s\n", error, strerror(abs(errnum))); }
#define PRINTERR(error) { PRINT_LINE; fprintf(stderr, "dact: " error "\n"); }
#define PERROR(error) PERROR_L(errno, error)
/* #define PERROR(error) { PRINT_LINE; perror("dact: " error); } */
#ifdef DEBUG
#define SHOWVAL(x...) { PRINT_LINE; fprintf(stderr, "dact: %s=%li\n", #x, (long) (x)); }
#define SPOTVAR_NUM(x) { PRINT_LINE; fprintf(stderr, "dact: %s=%li\n", #x, (long) x); }
#define SPOTVAR_STR(x) { PRINT_LINE; fprintf(stderr, "dact: %s=\"%s\"\n", #x, x); }
 | >  | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165  | 
#define PRINT_LINE fprintf(stderr, "%s:%07i:%s(): ", __FILE__, __LINE__, __func__)
#else
#define PRINT_LINE /**/
#endif
#define PERROR_L(errnum, error) { PRINT_LINE; fprintf(stderr, "dact: %s: %s\n", error, strerror(abs(errnum))); }
#define PRINTERR(error) { PRINT_LINE; fprintf(stderr, "dact: " error "\n"); }
#define PRINTERRF(error...) { PRINT_LINE; fprintf(stderr, "dact: " error); fprintf(stderr, "\n"); }
#define PERROR(error) PERROR_L(errno, error)
/* #define PERROR(error) { PRINT_LINE; perror("dact: " error); } */
#ifdef DEBUG
#define SHOWVAL(x...) { PRINT_LINE; fprintf(stderr, "dact: %s=%li\n", #x, (long) (x)); }
#define SPOTVAR_NUM(x) { PRINT_LINE; fprintf(stderr, "dact: %s=%li\n", #x, (long) x); }
#define SPOTVAR_STR(x) { PRINT_LINE; fprintf(stderr, "dact: %s=\"%s\"\n", #x, x); }
 | 
| ︙ | ︙ |