|
libc8
CHIP-8 utility library
|
#include <stdio.h>Go to the source code of this file.
Macros | |
| #define | C8_EXCEPTION_MESSAGE_SIZE BUFSIZ |
| Maximum size of exception message. | |
| #define | C8_EXCEPTION(code, ...) |
| Exception handling macro. | |
Enumerations | |
| enum | C8_ExceptionCode { C8_INVALID_INSTRUCTION_EXCEPTION = -3 , C8_TOO_MANY_LABELS_EXCEPTION = -4 , C8_STACK_OVERFLOW_EXCEPTION = -5 , C8_INVALID_ARGUMENT_EXCEPTION = -6 , C8_DUPLICATE_LABEL_EXCEPTION = -7 , C8_INVALID_SYMBOL_EXCEPTION = -8 , C8_MEMORY_ALLOCATION_EXCEPTION = -9 , C8_UNKNOWN_EXCEPTION = -10 , C8_TOO_MANY_SYMBOLS_EXCEPTION = -11 , C8_LOAD_FILE_FAILURE_EXCEPTION = -12 , C8_FILE_TOO_BIG_EXCEPTION = -13 , C8_INVALID_COLOR_PALETTE_EXCEPTION = -14 , C8_INVALID_QUIRK_EXCEPTION = -15 , C8_FAILED_GRAPHICS_INITIALIZATION_EXCEPTION = -16 , C8_INVALID_FONT_EXCEPTION = -17 , C8_INVALID_CLOCK_SPEED_EXCEPTION = -18 , C8_STACK_UNDERFLOW_EXCEPTION = -19 } |
| Exception code enum. More... | |
Functions | |
| void | c8_handle_exception (C8_ExceptionCode) |
| Handles an exception by printing the corresponding error message to stderr. | |
Variables | |
| char | c8_exception [BUFSIZ] |
Message to print when calling c8_handle_exception with a non-zero code. | |
Stuff for handling exceptions.
| #define C8_EXCEPTION | ( | code, | |
| ... | |||
| ) |
Exception handling macro.
| #define C8_EXCEPTION_MESSAGE_SIZE BUFSIZ |
Maximum size of exception message.
| enum C8_ExceptionCode |
Exception code enum.
| void c8_handle_exception | ( | C8_ExceptionCode | code | ) |
Handles an exception by printing the corresponding error message to stderr.
| code | The exception code. |
|
extern |
Message to print when calling c8_handle_exception with a non-zero code.