libexplain  1.4.D001
Functions | Variables
libexplain/output/register.c File Reference
#include <libexplain/ac/stdlib.h>
#include <libexplain/output.h>
#include <libexplain/output/stderr.h>

Go to the source code of this file.

Functions

void explain_output_message (const char *text)
void explain_output_exit (int status)
void explain_output_exit_failure (void)
void explain_output_register (explain_output_t *op)

Variables

static explain_output_twhere

Function Documentation

void explain_output_exit ( int  status)

The explain_output_exit function is used to terminate execution. It is executed via the registered output class, explain_output_register for how.

Parameters:
statusThe exist status requested.

Definition at line 38 of file register.c.

void explain_output_exit_failure ( void  )

The explain_output_exit_failure function is used to terminate execution, with exit status EXIT_FAILURE. It is executed via the registered output class, explain_output_register for how.

Definition at line 47 of file register.c.

void explain_output_message ( const char *  text)

The explain_output_message function is used to print text. It is printed via the registered output class, see explain_output_register for how.

Parameters:
textThe text of the message to be printed. It has not been wrapped.

Definition at line 29 of file register.c.

The explain_output_register function is used to change libexplain's default output handling facilities with something else. The NULL pointer restores libexplain's default processing.

If no output class is registered, the default is to wrap and print to stderr, and to exit via the exit(2) system call.

Parameters:
opPointer to the explain_output_t instance to be operated on. The NULL pointer will reset to the default style (stderr).
Note:
The output subsystem will "own" the pointer after this call. You may not make any reference to this pointer ever again. The output subsystem will destroy the object and free the memory when it feels like it.

Definition at line 54 of file register.c.


Variable Documentation

Definition at line 25 of file register.c.