CLISH  0.7.3
Functions

This utility provides a simple hierachical debugging mechanism. More...

Functions

int lub_dump_printf (const char *fmt,...)
 
void lub_dump_indent (void)
 
void lub_dump_undent (void)
 

Detailed Description

This utility provides a simple hierachical debugging mechanism.

By indenting and undenting the output, printing nested debug messages is made easy.

Function Documentation

void lub_dump_indent ( void  )

This operation indicates that the offset for messages should be increased by one level.

Precondition
  • none
Postcondition
  • An indentation divider will be sent to stdout to emphasise the change in offset.
  • Subsequent calls to lub_dump_printf() will output at this new offset.
  • Client may call lub_undent() to restore offset.
int lub_dump_printf ( const char *  fmt,
  ... 
)

This operation behaves identically to the standard printf() function with the exception that the offset at the begining of the line is determined by the current indent settings.

Precondition
  • none
Returns
The number of characters sent to stdout.
Postcondition
  • The formatted message will be sent to stdout.
Parameters
fmtprintf-like format string
void lub_dump_undent ( void  )

This operation indicates that the offset for messages should be decreased by one level.

Precondition
  • lub_dump_indent() should have been called at least one more time than this function.
Postcondition
  • An indentation divider will be sent to stdout to emphasise the change in offset.
  • Subsequent calls to lub_dump_printf() will output at this new offset.