Previous: tf_close, Up: Library Routines


3.11 tf_open

redirect the tracefct output stream

Synopsis

     #include <tracefct/tracefct.h>
     
     
     
int tf_open(const char *file);

Parameters

const char *file
the file to which messages are to be written

Description

tf_open serves to change the tracefct output stream to the specified file. Normally tracefct writes to stderr. tf_exit always writes to stderr (see tf_exit). To reset the output stream, see tf_close. If the current output stream is not stderr, it is automatically closed.

If the passed filename is the string `stderr', tf_open will use stderr.

Returns

It returns zero upon success, non-zero upon failure.