Next: , Previous: tf_die, Up: Library Routines


3.6 tf_exit

Exit a program, dumping the function stack.

Synopsis

     #include <tracefct/tracefct.h>
     
     
     
void tf_exit( int exit_code, const char *format, ... );

Parameters

int exit_code
the exit code to be returned to the system
const char *format
a printf style format string. passed to vsprintf
...
additional arguments to be passed to vfprintf

Description

This function prints an error message to stderr as well as the tracefct output stream (if different from stderr) and then exits the program with the supplied error code. Interesting error codes are predefined in exiterrvals.h. The error message is passed in the same fashion as the arguments to vprintf or sprintf. The message may contain multiple output lines (i.e., multiple newline characters). If a trailing newline character is not specified, it will be appended.