Print debugging information.
More...
|
| int | debug (const char *format,...) |
| | printf(3) when DEBUG is defined. More...
|
| |
| bool | debug_mode_state (void) |
| | Determine whether the debug mode has been enabled at compile time. More...
|
| |
| int | fdebug (FILE *stream, const char *format,...) |
| | fprintf(3) when DEBUG is defined. More...
|
| |
| int | sdebug (char *str, const char *format,...) |
| | sprintf(3) when DEBUG is defined. More...
|
| |
| int | sndebug (char *str, size_t size, const char *format,...) |
| | snprintf(3) when DEBUG is defined. More...
|
| |
Print debugging information.
- Since
- version
1.0.0
The debugging mode is determined at compilation time. One can inspect its state using debug_mode_state().
When the debugging mode is enabled, the following functions behave as their *printf(3) counterparts:
On the other hand, if the debugging mode is disabled, these functions do nothing except returning 0.
| int debug |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
#include <include/noclock/debug.h>
printf(3) when DEBUG is defined.
- Since
- version
1.0.0
- Parameters
-
- Returns
- The number of written characters.
- Return values
-
- See also
- printf(3)
| bool debug_mode_state |
( |
void |
| ) |
|
#include <include/noclock/debug.h>
Determine whether the debug mode has been enabled at compile time.
- Since
- version
1.0.0
- Return values
-
| true | if the debug mode is enabled. |
| false | otherwise. |
| int fdebug |
( |
FILE * |
stream, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
#include <include/noclock/debug.h>
fprintf(3) when DEBUG is defined.
- Since
- version
1.0.0
- Parameters
-
| stream | The destination stream. |
| format | The format string. |
- Returns
- The number of written characters.
- Return values
-
- See also
- fprintf(3)
| int sdebug |
( |
char * |
str, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
#include <include/noclock/debug.h>
sprintf(3) when DEBUG is defined.
- Since
- version
1.0.0
- Parameters
-
| str | The destination string. |
| format | The format string. |
- Returns
- The number of written characters.
- Return values
-
- See also
- sprintf(3)
| int sndebug |
( |
char * |
str, |
|
|
size_t |
size, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
#include <include/noclock/debug.h>
snprintf(3) when DEBUG is defined.
- Since
- version
1.0.0
- Parameters
-
| str | The destination string. |
| size | The maximum number of characters to write. |
| format | The format string. |
- Returns
- The number of written characters.
- Return values
-
- See also
- snprintf(3)