cups/vcnet/regex
jiangdingyuan bf1bfcdd63 Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
..
COPYRIGHT Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
Makefile Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
README Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
WHATSNEW Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
debug.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
debug.ih Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
engine.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
engine.ih Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
librxspencer.def Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
main.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
main.ih Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
mkh Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regcomp.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regcomp.ih Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regerror.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regerror.ih Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regex.h Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regex2.h Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regexec.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
regfree.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
rxspencer.3 Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
rxspencer.7 Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
split.c Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
tests Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00
utils.h Import Upstream version 2.4.6 2023-10-26 10:30:40 +08:00

README

This is a modified version of Henry Spencer's "BSD" regular expression
library. The original library can be found at
https://github.com/garyhouston/regex.  A description of Spencer's
various libraries can be found at https://garyhouston.github.io/regex/

The changes in this version are:

* The library name has been changed to rxspencer, the header installs
  into a directory rxspencer, and the man pages named accordingly, to
  allow easy installation as a system library on Linux without
  conflicting with other regex libraries.
* A CMake build system, which can build either static or shared
  libraries, maybe even on non-Unix systems.
* A few code modernizations and changes to improve portabilty, avoid
  compiler warnings, and improve robustness.

I (Gary Houston) originally made this version with a build system
based on GNU Automake and Libtool, to allow building a shared library
for a project where the library needed to be dynamically loaded. The
CMake scripts were contributed by Stephen Just, modified from LuaDist
versions.

Spencer's original license can be found in the COPYRIGHT file. The CMake
scripts are licensed under the MIT license. I release all of my own
changes to the public domain under the Creative Commons Zero license.

Installation
============

CMake needs to be installed. To build from a Linux command line, or
something compatible, within the source directory:

to configure for a static library:
cmake .
or
cmake -Drxshared=0 .

to configure for a shared library:
cmake -Drxshared=1 .

to disable tests:
cmake -DBUILD_TESTING=OFF .

to disable manuals/ documentation:
cmake -DINSTALL_DOCS=OFF .

to build:
make
make install

also required on Linux, after installing the shared library:
ldconfig

to run the tests:
make test

to run the tests, with output displayed:
ctest -V

Usage
=====

Include the following header in a C program:

#include <rxspencer/regex.h>

Link with the library using the -lrxspencer flag, as in:
gcc test.c -o test -lrxspencer

The library is further described in the supplied man pages: rxspencer.3
and rxspencer.7, which are formatted at
https://garyhouston.github.io/regex/regex3.html and
https://garyhouston.github.io/regex/regex7.html.

--
Gary Houston,  ghouston@arglist.com