Top |
Core library operationsCore library operations — Methods and types to initialize and teardown the library. |
This section defines the core types and methods exposed by the MCCR library.
Example 1. Initializing and tearing down the library
1 2 3 4 5 6 7 8 9 10 |
mccr_status_t st; if ((st = mccr_init ()) != MCCR_STATUS_OK) { fprintf (stderr, "error: couldn't initialize MCCR library: %s\n", mccr_status_to_string (st)); return EXIT_FAILURE; } // Use the library here mccr_exit (); |
const char *
mccr_status_to_string (mccr_status_t st
);
Gets a description for the given mccr_status_t.
mccr_status_t
mccr_init (void
);
Initialize the library.
This operation must be run once at program startup, or after mccr_exit()
has
been run and the library needs to be reinitialized.
If mccr_init()
fails, no further library operations may be executed, it is a
fatal error.
void
mccr_exit (void
);
Teardown the library.
If a clean output report is required, the user may teardown the library using
this method. It isn't strictly required to do this unless mccr_init()
is
going to be called again.
Status of an operation performed with the MCCR library.