libexplain  1.4.D001
Data Structures | Typedefs | Functions | Variables
libexplain/output/file.c File Reference
#include <libexplain/ac/stdio.h>
#include <libexplain/output.h>

Go to the source code of this file.

Data Structures

struct  explain_output_file_t

Typedefs

typedef struct
explain_output_file_t 
explain_output_file_t

Functions

static void destructor (explain_output_t *op)
static void message (explain_output_t *op, const char *text)
explain_output_texplain_output_file_new (const char *filename, int append)

Variables

static const
explain_output_vtable_t 
vtable

Typedef Documentation

Definition at line 25 of file file.c.


Function Documentation

static void destructor ( explain_output_t op) [static]

Definition at line 34 of file file.c.

explain_output_t* explain_output_file_new ( const char *  filename,
int  append 
)

The explain_output_file_new function may be used to create a new dynamically allocated instance of an explain_output_t class that writes to a file, and exits via exit(2).

Parameters:
filenameThe file to be oopened and written to.
appendtrue (non-zero) if messages are to be appended to the file, false (zero) if the file is to be preplaced with new contents.
Returns:
NULL on error (i.e. malloc failed), or a pointer to a new dynamically allocated instance of the syslog class.

Definition at line 63 of file file.c.

static void message ( explain_output_t op,
const char *  text 
) [static]

Definition at line 44 of file file.c.


Variable Documentation

Initial value:

Definition at line 53 of file file.c.