Main Page | Modules | Data Structures | File List | Globals | Related Pages

Debug.h File Reference


Detailed Description

A set of functions that help your programs produce debugging output in a consistent way.

Go to the source code of this file.

Functions

void DebugWarn (int condition, char *str)
 Outputs string to the current target if condition is non-zero.

void DebugError (int condidion, char *str)
 If condition is non-zero outputs string to the current target and halts the program.

void DebugSetMessageLevel (int level)
 Sets the level of message that will be reported by DebugMessage.

int DebugGetMessageLevel (void)
 Returns the current message level.

void DebugMessage (int condition, int level, char *str,...)
 Formats and prints a message if conditions are met.

void DebugSetTarget (FILE *target)
 Sets the target for debugging output.

FILE * DebugGetTarget (void)
 Gets the current target for debugging output.


Function Documentation

void DebugError int  condidion,
char *  str
 

If condition is non-zero outputs string to the current target and halts the program.

int DebugGetMessageLevel void   ) 
 

Returns the current message level.

FILE* DebugGetTarget void   ) 
 

Gets the current target for debugging output.

void DebugMessage int  condition,
int  level,
char *  str,
... 
 

Formats and prints a message if conditions are met.

If the condition is non-zero and the current message level is greater than level this calls printf with str as the format string, and any additional arguments as arguments.

void DebugSetMessageLevel int  level  ) 
 

Sets the level of message that will be reported by DebugMessage.

Defaults to 0.

void DebugSetTarget FILE *  target  ) 
 

Sets the target for debugging output.

Defaults to stdout. All future calls to the Debug functions will sent output to the specified file.

void DebugWarn int  condition,
char *  str
 

Outputs string to the current target if condition is non-zero.


Generated for VFML by doxygen hosted by SourceForge.net Logo