Regular expression search and replace library
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vv. 1.01                   M.I.Barlow 3-10-97


RXPLIB is freely distributable public domain software and as such is
provided "as is", with no guarantees or formal support. It exports a
set of five functions in ANSI/ISO C or TurboC:

rxp_create_pattern()
rxp_destroy_pattern()
rxp_find_match()
rxp_create_replacement()
rxp_configure()

And three types:

RxpPatn     -- an opaque pointer to a pattern
RxpError    -- enumerated type that the functions return
RxpMatch    -- results of a "find" / input for "replace"

It performs regular expression search and replace duties, with
syntax drawn from egrep and sed, with some enhancements. These,
and a lot of the other standard features are selectable at run-
time using the configure method. "First error" diagnosics are
returned for invalid expressions, and exceptions such as malloc
failure or data-structure corruption are reported in the same
manner, via the return type RxpError. Simple test and example
executables are included; the Turbo C forms check for memory
leakage using compiler-specific functions inside #ifdef's, and
haven't see any to date. AFAIK the code is word-length and
endian-ness independent.

Files in this release are:
~~~~~~~~~~~~~~~~~~~~~~~~~

rxplib.h -- ISO C        -- interface & documentation (extensive comments)
rxplib.c -- ISO C|TurboC -- implementation; use your own compiler+librarian

test.c   -- ISO C|TurboC -- does tests on library using data from <stdin>
test.exe -- DOS exe

gsub.c   -- ISO C|TurboC -- simple example filter program using library
gsub.exe -- DOS exe

Notes:
~~~~~
 (0) TurboC foolishly calls <malloc.h> <alloc.h>, but exports
     a macro called __TURBOC__, which is used as a port variable.

 (1) RXPLIB was written with a folding editor, hence the reserved
     comments that pepper the code. You should get one too, it may
     make reading it easier... It certainly helped me write it. :-)
     A windows shareware version of my favourite is at:

     http://www.hensa.ac.uk/parallel/tools/editors/folding-editors/winf.zip

                                                   mark@nlcc.demon.co.uk
