wip: readme
parent
1220c1139d
commit
a2f2903f77
|
@ -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.
|
|
@ -28,9 +28,9 @@ example. Also provided is a basic API for adding additional runtime
|
|||
.br
|
||||
error checks such as whether or not a structure has been passed through
|
||||
.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
|
||||
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
|
||||
operations can be found below:
|
||||
.br
|
||||
|
@ -45,4 +45,4 @@ LIBERROR_ASSERT(cware) assert a condition with debugging information
|
|||
LIBERROR_TEST(cware) wrapper over LIBERROR_ASSERT for testcases
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
\fBcware\fR(cware)
|
||||
\fBcware\fR(cware)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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) \
|
||||
do { \
|
||||
if((expression) != 0) { \
|
||||
|
|
Loading…
Reference in New Issue