wip: readme

trunk
trainstopperd 2023-09-06 23:10:02 -04:00
parent 1220c1139d
commit a2f2903f77
3 changed files with 14 additions and 4 deletions

10
README Normal file
View File

@ -0,0 +1,10 @@
# liberror
Liberror is a runtime error checking library. It is used to make C programming
a bit safer than usual, providing toggable macros that will result in computer-readable
errors if the checks are failed.
The most important macro is *LIBERROR_ASSERT*, which serves as the building block for
other operations. If the expression evaluates to false, the error checks will be tripped
and a runtime error will be produced. Alongside this general purpose check, there is also
some checked math operations available.

View File

@ -28,9 +28,9 @@ example. Also provided is a basic API for adding additional runtime
.br .br
error checks such as whether or not a structure has been passed through error checks such as whether or not a structure has been passed through
.br .br
an operation that releases it from memory. All of this can be enabled an operation that releases it from memory. All of this can be disabled
.br .br
through the definition of the \fBCWARE_SAFETY_CHECKS\fR macro. The manuals for the through the definition of the \fBLIBERROR_NO_SAFETY_CHECKS\fR macro. The manuals for the
.br .br
operations can be found below: operations can be found below:
.br .br

View File

@ -1,7 +1,7 @@
#ifndef CWARE_LIBERROR_PUBLIC_H #ifndef CWARE_LIBERROR_PUBLIC_H
#define CWARE_LIBERROR_PUBLIC_H #define CWARE_LIBERROR_PUBLIC_H
#if defined(CWARE_SAFETY_CHECKS) #if !defined(LIBERROR_NO_SAFETY_CHECKS)
#define LIBERROR_ASSERT(expression, type, message, function) \ #define LIBERROR_ASSERT(expression, type, message, function) \
do { \ do { \
if((expression) != 0) { \ if((expression) != 0) { \