coco_runtime_c.c File Reference
Generic COCO runtime implementation for the C language. More...
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "coco.h"
#include "coco_utilities.c"
Functions | |
void | coco_error (const char *message,...) |
Signals a fatal error. More... | |
void | coco_warning (const char *message,...) |
Warns about error conditions. More... | |
void | coco_info (const char *message,...) |
Outputs some information. More... | |
void | coco_info_partial (const char *message,...) |
Prints only the given message without any prefix and new line. More... | |
void | coco_debug (const char *message,...) |
Outputs detailed information usually used for debugging. More... | |
void * | coco_allocate_memory (const size_t size) |
Safe memory allocation that either succeeds or triggers a coco_error. More... | |
void | coco_free_memory (void *data) |
Frees the allocated memory. More... | |
Detailed Description
Generic COCO runtime implementation for the C language.
Other language interfaces might want to replace this so that memory allocation and error handling go through the respective language runtime.
Function Documentation
void* coco_allocate_memory | ( | const size_t | size | ) |
Safe memory allocation that either succeeds or triggers a coco_error.
void coco_debug | ( | const char * | message, |
... | |||
) |
Outputs detailed information usually used for debugging.
void coco_error | ( | const char * | message, |
... | |||
) |
Signals a fatal error.
void coco_free_memory | ( | void * | data | ) |
Frees the allocated memory.
void coco_info | ( | const char * | message, |
... | |||
) |
Outputs some information.
void coco_info_partial | ( | const char * | message, |
... | |||
) |
Prints only the given message without any prefix and new line.
A function similar to coco_info that prints only the given message without any prefix and without adding a new line.
void coco_warning | ( | const char * | message, |
... | |||
) |
Warns about error conditions.