Add file, structure, global, and function documentation across all libakgl-owned headers and sources, including parameter contracts and likely AKERR/AKGL_ERR exceptions. Add a strict Doxyfile and build the generated API documentation in Gitea CI with warnings treated as failures. Co-authored-by: Codex (GPT-5) <noreply@openai.com>
27 lines
971 B
C
27 lines
971 B
C
/**
|
|
* @file error.h
|
|
* @brief Declares the public error API.
|
|
*/
|
|
|
|
#ifndef _ERROR_H_
|
|
#define _ERROR_H_
|
|
|
|
// This macro is used to silence warnings on string concatenation operations that may fail.
|
|
// e.g., combining two element of PATH_MAX into a string buffer of AKGL_STRING_MAX_LENGTH.
|
|
// We have to draw a line in the sand somewhere or we will just let our buffers grow forever
|
|
// to keep the compiler happy.
|
|
#define DISABLE_GCC_WARNING_FORMAT_TRUNCATION \
|
|
_Pragma("GCC diagnostic push") \
|
|
_Pragma("GCC diagnostic ignored \"-Wformat-truncation\"")
|
|
|
|
#define RESTORE_GCC_WARNINGS \
|
|
_Pragma("GCC diagnostic pop")
|
|
|
|
#define AKGL_ERR_SDL (AKERR_LAST_ERRNO_VALUE + 18)
|
|
#define AKGL_ERR_REGISTRY (AKERR_LAST_ERRNO_VALUE + 19)
|
|
#define AKGL_ERR_HEAP (AKERR_LAST_ERRNO_VALUE + 20)
|
|
#define AKGL_ERR_BEHAVIOR (AKERR_LAST_ERRNO_VALUE + 21)
|
|
#define AKGL_ERR_LOGICINTERRUPT (AKERR_LAST_ERRNO_VALUE + 22)
|
|
|
|
#endif // _ERROR_H_
|