mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-21 01:00:31 +02:00
Recover the exact error-buffer publication shape, preserve Berth declaration formatting, admit the 10/10 translation unit, and retire only the stale _error compiler-tie park.
73 lines
1.1 KiB
C
73 lines
1.1 KiB
C
/*
|
|
ERRORS.H
|
|
*/
|
|
|
|
#ifndef __ERRORS_H
|
|
#define __ERRORS_H
|
|
#pragma once
|
|
|
|
/* ---------- constants */
|
|
|
|
enum
|
|
{
|
|
_error_immediate = 0,
|
|
_error_delayed,
|
|
_error_silent,
|
|
_error_log,
|
|
NUMBER_OF_ERROR_MESSAGE_PRIORITIES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
ERROR_MESSAGE_BUFFER_MAXIMUM_SIZE = 2048,
|
|
};
|
|
|
|
/* ---------- structures */
|
|
|
|
struct error_global_data
|
|
{
|
|
boolean delayed;
|
|
boolean output_to_debug_file;
|
|
boolean display_state;
|
|
boolean recursion_lock;
|
|
boolean overflow_suppression;
|
|
boolean suppress_all;
|
|
short message_buffer_size;
|
|
char message_buffer[ERROR_MESSAGE_BUFFER_MAXIMUM_SIZE];
|
|
};
|
|
|
|
/* ---------- prototypes/ERRORS.C */
|
|
|
|
void errors_initialize(
|
|
void);
|
|
void errors_dispose(
|
|
void);
|
|
void errors_output_to_debug_file(
|
|
boolean output_to_debug_file);
|
|
void errors_overflow_suppression_enable(
|
|
boolean overflow_suppression);
|
|
char *error_get(
|
|
void);
|
|
boolean errors_handle(
|
|
void);
|
|
void errors_clear(
|
|
void);
|
|
void error(
|
|
short priority,
|
|
const char *format,
|
|
...);
|
|
|
|
void write_to_error_file(
|
|
char *string,
|
|
boolean date);
|
|
|
|
/* ---------- globals */
|
|
|
|
extern struct error_global_data error_globals;
|
|
|
|
/* ---------- public code */
|
|
|
|
|
|
|
|
#endif // __ERRORS_H
|