Defines | |
#define | EXPAND_(a) # a |
Macro expansion. | |
#define | EXPAND(a) EXPAND_(a) |
#define | LOG_FILELINE __FILE__ ":" EXPAND(__LINE__) |
Concatenate the file name and the line number. | |
#define | LOG_HEAD ":" LOG_FILELINE ": " |
Create a log message header. | |
#define | ABORT(message) |
Lightweight implementation for error handling. | |
#define | LOG_DEBUG_F(printf_args) printf printf_args |
Lightweight macro to replace a standard C assert() . | |
#define | LOG_ASSERT(assertion, message) |
#define EXPAND_ | ( | a | ) | # a |
Macro expansion.
It is used, for example, to combine a filename and a line number in __FILELINE__
macro.
#define EXPAND | ( | a | ) | EXPAND_(a) |
#define LOG_FILELINE __FILE__ ":" EXPAND(__LINE__) |
Concatenate the file name and the line number.
#define LOG_HEAD ":" LOG_FILELINE ": " |
Create a log message header.
#define ABORT | ( | message | ) |
Value:
{ \ fprintf(stderr, "Internal error" LOG_HEAD message); \ fflush(stderr); \ abort(); \ }
It prints a simple string message to stderr and exits the program. This macro call should be used when logging subsystem is not yet fully initialized.
#define LOG_DEBUG_F | ( | printf_args | ) | printf printf_args |
Lightweight macro to replace a standard C assert()
.
#define LOG_ASSERT | ( | assertion, | |||
message | ) |
Value:
{ \ if (!(assertion)) { \ ABORT("Assert failed" message # assertion); \ } \ }
Genereated on Tue Mar 11 19:25:23 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.