The General Exception-Handling Facility (GEF)
---------------------------------------------
GEF is an exception-handling facility for C programmers. It provides features
like that which you will find in programming languages, such as Eiffel, Java,
and C++.  However, the behavior of GEF's exception-handling mechanism is
closer to Eiffel's than Java's and C++'s. However, the names of the keywords
of GEF are similar to exception-handling keywords of Java, and C++.

GEF supports the following keywords: gef_try, gef_catch, gef_finally, and
gef_end.  In addition, GEF has design-by-contract support, thereby providing
the following additional keywords: gef_invariants, gef_preconditions,
gef_postconditions, and gef_assert These contract-programming keywords must
appear with the scope of a corresponding gef_try/gef_end pair.

GEF comes with 3 libraries: libgef_ansi, libgef_posix, and libgef_posix. The
ansi version of GEF supports plain ANSI C programs. To use it,

#include <gef/ansi.h>

and link to the library. If you want GEF to handle Posix signals, you need to

#include <gef/posix.h>

and link to the libgef_posix library. Lastly, if you want GEF to work in a
multithreaded program, GEF supports Posix Threads so

#include <gef/pthreads.h>

and link to the libgef_pthreads library.

GEF also has other important keywords and control statements, such as the
following:

(1) gef_repeat_try(n)
(2) gef_try_except_finally
(3) gef_repeat_try_except_finally(n)
(4) gef_throw(void*)
(5) gef_retry
(6) gef_break
(7) gef_enable_assertions
(8) gef_disable_assertions
(9) gef_enable_async_support
(10) gef_disable_async_support
(11) gef_begin_critical_section
(12) gef_end_critical_section
(13) gef_depth
(14) gef_enable_assertions
(15) gef_disable_assertions
(16) gef_enable_preconditions
(17) gef_disable_preconditions
(18) gef_enable_postconditions
(19) gef_disable_postconditions
(20) gef_enable_invariants
(21) gef_disable_invariants
(22) gef_enable
(23) gef_disable
(24) gef_is_enabled
(25) gef_enable_debug
(26) gef_enable_debug
(27) gef_required_begin
(28) gef_required_end

See documentation for details and examples. In addition, see the November 1998
issue of Dr. Dobb's Journal for an article on GEF, entitled Library. Note: The
article reviews an version 1.0. I have made some interface changes, since then. 
However, the core of the GEF behavior has not changed. I made some speed
enhancements.

This is the root directory for the GEF (General Exception Facility) package.
To build GEF, you must invoke make with the following macros:

(1) PLATFORM={linux, solaris} ; Default is linux
(2) ARCH={i386, i486, i586, ultra} ; Default is i586

and specify the target, 

make PLATFORM=linux ARCH=i586 distribution

This will build all versions of the GEF library - debug and opt - and place
them, along with the corresponding include files, in the 
directory that appears under the GEF root directory.

You may also  specify the following. However, these are only necessary when
you want to build only a subset of the GEF libraries:

(1) SUPPORT={ansi, posix, pthreads} - Default is 
    implies basic support for any ANSI C compiler; 
    posix signals; 
(2) VARIANT={debug, opt} - Default is "opt" for optimized
(3) ACTION={build, clean, distribution} - Required, if you do not explicitly
    specify a target.

If you examine the contents of the GEF/dist subtree, you will notice
library, include, and documentation files. These files have a structure which
is consistent with how GEF files will appear on your system.

To build the GEF test programs,

(1) cd GEF/test
(2) make PLATFORM=<platform> ARCH=<arch> all

For example, to build an i586 executable for the linux distribution, type

make PLATFORM=linux ARCH=i586 all

This will produce the debug and opt variants of GEF that support ansi, posix,
and pthreads.

Now, make sure that you update your LD_LIBRARY_PATH variable to include the
relative path,

../../../../../dist/usr/lib

You could also add a fully-qualified path, which looks like the following:

/home/user/.../GEF/dist/usr/lib

I hope you find GEF useful!
bbigby@alum.MIT.edu
