Next: tf_enter, Previous: tf_assert, Up: Library Routines
Initialize the function trace stack.
#include <tracefct/tracefct.h>void tf_init( const char *name, int print_it, int num_fct_to_print );
const char *name
- the name of the program, preferrably argv[0]. path information (if present) is not stripped.
int print_it
- boolean flag. if true, a message will be output upon entry and exit of a function.
int num_fct_to_print
- if positive, only the requested number of function names will be printed. if non-positive, all of the function names will be printed.
This routine initializes the function stack as well as registering
the name of the executable. The calling routine can also set up
some output options which determine the depth of the function stack
to print and whether a diagnostic should be printed at every entry
and return of a function. tracefct
stores the passed pointer
to the program name, it does not make a copy of the string.
The calling function mustn't invalidate the pointer.