diff --git a/README b/README new file mode 100644 index 0000000..9e7e301 --- /dev/null +++ b/README @@ -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. diff --git a/doc/liberror.3 b/doc/liberror.3 index 4ee5d1e..e23ea19 100755 --- a/doc/liberror.3 +++ b/doc/liberror.3 @@ -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) \ No newline at end of file +\fBcware\fR(cware) diff --git a/src/liberror/public.h b/src/liberror/public.h index 7f5bcf2..e74a2b3 100755 --- a/src/liberror/public.h +++ b/src/liberror/public.h @@ -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) { \