No Clock  1.0.2
Verbose printing

Print too many messages. More...

Functions

int fverbosef (FILE *stream, const char *format,...)
 fprintf(3) when the verbose mode is enabled. More...
 
int snverbosef (char *str, size_t size, const char *format,...)
 snprintf(3) when the verbose mode is enabled. More...
 
int sverbosef (char *str, const char *format,...)
 sprintf(3) when the verbose mode is enabled. More...
 
void verbose_mode_disable (void)
 Disable the verbose mode. More...
 
void verbose_mode_enable (void)
 Enable the verbose mode. More...
 
bool verbose_mode_state (void)
 Get the verbose mode state. More...
 
int verbosef (const char *format,...)
 printf(3) when the verbose mode is enabled. More...
 

Detailed Description

Print too many messages.

Since
version 1.0.0

Verbose mode

The verbose mode status can be inspected using verbose_mode_state(). It can either be enabled or disabled using verbose_mode_enable() or verbose_mode_disable().

Usage

When the verbose mode is enabled, the following functions behave as their *printf(3) counterparts:

verbose printing function *printf(3) function
verbosef() printf(3)
fverbosef() fprintf(3)
sverbosef() sprintf(3)
snverbosef() snprintf(3)

On the other hand, if the debugging mode is disabled, these functions do nothing except returning 0.

Function Documentation

int fverbosef ( FILE *  stream,
const char *  format,
  ... 
)

#include <include/noclock/verbose.h>

fprintf(3) when the verbose mode is enabled.

Since
version 1.0.0
Parameters
streamThe destination stream.
formatThe format string.
Returns
The number of written characters.
Return values
0if the verbose mode is disabled.
See also
fprintf(3)
int snverbosef ( char *  str,
size_t  size,
const char *  format,
  ... 
)

#include <include/noclock/verbose.h>

snprintf(3) when the verbose mode is enabled.

Since
version 1.0.0
Parameters
strThe destination string.
sizeThe maximum number of characters to write.
formatThe format string.
Returns
The number of written characters.
Return values
0if the verbose mode is disabled.
See also
snprintf(3)
int sverbosef ( char *  str,
const char *  format,
  ... 
)

#include <include/noclock/verbose.h>

sprintf(3) when the verbose mode is enabled.

Since
version 1.0.0
Parameters
strThe destination string.
formatThe format string.
Returns
The number of written characters.
Return values
0if the verbose mode is disabled.
See also
sprintf(3)
void verbose_mode_disable ( void  )

#include <include/noclock/verbose.h>

Disable the verbose mode.

Since
version 1.0.0
void verbose_mode_enable ( void  )

#include <include/noclock/verbose.h>

Enable the verbose mode.

Since
version 1.0.0
bool verbose_mode_state ( void  )

#include <include/noclock/verbose.h>

Get the verbose mode state.

Since
version 1.0.0
Return values
trueif the verbose mode is enabled.
falseotherwise.
int verbosef ( const char *  format,
  ... 
)

#include <include/noclock/verbose.h>

printf(3) when the verbose mode is enabled.

Since
version 1.0.0
Parameters
formatThe format string.
Returns
The number of written characters.
Return values
0if the verbose mode is disabled.
See also
printf(3)