EGC - (MACRO) Goto to "cleanup" label if argument is ERROR
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
This macro jumps to a label names "cleanup" if its argument is ERROR. It is
convenient when ERE would cause memory leaks by not freeing memory allocated
earlier in the function. Below is a usage example.
| int my_func()
Error err = NO_ERROR;
Matrix* m = NULL
Matrix* m2 = NULL
ERE(get_target_matrix(&m, 5, 5));
EGC(err = get_target_matrix(&m2, 3, 3));
Notice that the first call uses ERE, since there's nothing to free. The
second call needs to use EGC, since m needs to be freed before
returning. Also notice that you need to set err inside EGC, so the error
is returned at the end of the function.
Further, if the debug level is greater than 0, then a message is added to the
list of messages using add_errror(); That line is:
(EGC on line [line] of [file].
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.