Commit 752f8a16 authored by John Ellson's avatar John Ellson

remove rxpencer (unused, unneeded)

parent 770525ca
......@@ -3167,7 +3167,6 @@ AC_CONFIG_FILES(Makefile
......@@ -311,7 +311,6 @@ Graphviz core libs
#-- graphviz-plugins-core rpm --------------------------------------------------
%package plugins-core
......@@ -832,9 +831,6 @@ This package contains development files for graphviz-libs.
%exclude %{_libdir}/graphviz/libgvplugin*
%exclude %{_libdir}/graphviz/*.so
# $Id$ $Revision$
## Process this file with automake to produce
SUBDIRS = cdt cgraph pathplan sfio vmalloc ast rxspencer \
SUBDIRS = cdt cgraph pathplan sfio vmalloc ast \
vpsc rbtree ortho sparse patchwork expr common \
pack xdot label gvc ingraphs topfish glcomp mingle edgepaint \
circogen dotgen fdpgen neatogen twopigen sfdpgen osage gvpr
The rxspencer directory contains an unmodified snapshot copy
of Henry Spencer's BSD regex library, as maintained by Gary Houston.
The snapshot was grabbed by John Ellson ( on April 12, 1016
Copyright 1992, 1993, 1994, 1997 Henry Spencer. All rights reserved.
This software is not subject to any license of the American Telephone
and Telegraph Company or of the Regents of the University of California.
Permission is granted to anyone to use this software for any purpose on
any computer system, and to alter it and redistribute it, subject
to the following restrictions:
1. The author is not responsible for the consequences of use of this
software, no matter how awful, even if they arise from flaws in it.
2. The origin of this software must not be misrepresented, either by
explicit claim or by omission. Since few users ever read sources,
credits must appear in the documentation.
3. Altered versions must be plainly marked as such, and must not be
misrepresented as being the original software. Since few users
ever read sources, credits must appear in the documentation.
4. This notice may not be removed or altered.
AUTOMAKE_OPTIONS = foreign no-dependencies
librxspencer_la_LDFLAGS = -version-info 0:2:0 -no-undefined -module
librxspencer_la_SOURCES = regcomp.c regerror.c regexec.c regfree.c
noinst_HEADERS = cclass.h cname.h engine.c regex2.h utils.h
man_MANS = rxspencer.3 rxspencer.7
BUILT_SOURCES = main.ih debug.ih regerror.ih engine.ih regcomp.ih regex.h
test_sources = split.c debug.c main.c
re_oo_objs = split.oo debug.oo main.oo regcomp.oo regerror.oo regexec.oo regfree.oo
re: $(BUILT_SOURCES) $(re_oo_objs)
$(LINK) -o re $(re_oo_objs)
SUFFIXES = .oo .ih
$(COMPILE) -c -DREDEBUG $< -o $@
sh $(srcdir)/mkh $(MKHFLAGS) -p $< > $@
REGEXHSRC = $(srcdir)/regex2.h $(srcdir)/regcomp.c $(srcdir)/regerror.c\
$(srcdir)/regexec.c $(srcdir)/regfree.c
regex.h: $(REGEXHSRC) mkh
sh $(srcdir)/mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) > regex.h
$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)
$(INSTALL_DATA) regex.h $(DESTDIR)$(pkgincludedir)
CLEANFILES = re *.oo *.ih regex.h
TESTS = re
Makefile.orig $(TESTS) $(test_sources) $(man_MANS)
debug.lo: debug.c debug.ih regex.h utils.h regex2.h
main.lo: main.c main.ih regex.h
regcomp.lo: regcomp.c regcomp.ih cclass.h cname.h regex.h regex2.h utils.h
regerror.lo: regerror.c regerror.ih regex.h utils.h
regexec.lo: regexec.c engine.c engine.ih regex.h regex2.h utils.h
split.lo: split.c
# You probably want to take -DREDEBUG out of CFLAGS, and put something like
# -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of
# internal assertion checking and some debugging facilities).
# Put -Dconst= in for a pre-ANSI compiler.
# Do not take -DPOSIX_MISTAKE out.
# REGCFLAGS isn't important to you (it's for my use in some special contexts).
# If you have a pre-ANSI compiler, put -o into MKHFLAGS. If you want
# the Berkeley __P macro, put -b in.
# Flags for linking but not compiling, if any.
# Extra libraries for linking, if any.
# Internal stuff, should not need changing.
OBJPRODN=regcomp.o regexec.o regerror.o regfree.o
OBJS=$(OBJPRODN) split.o debug.o main.o
H=cclass.h cname.h regex2.h utils.h
REGSRC=regcomp.c regerror.c regexec.c regfree.c
ALLSRC=$(REGSRC) engine.c debug.c main.c split.c
# Stuff that matters only if you're trying to lint the package.
LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG
LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c
JUNKLINT=possible pointer alignment|null effect
# arrangements to build forward-reference header files
.SUFFIXES: .ih .h
sh ./mkh $(MKHFLAGS) -p $< >$@
default: r
lib: purge $(OBJPRODN)
rm -f libregex.a
ar crv libregex.a $(OBJPRODN)
rm -f *.o
# stuff to build regex.h
sh ./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) >regex.tmp
cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h
rm -f regex.tmp
# dependencies
$(OBJPRODN) debug.o: utils.h regex.h regex2.h
regcomp.o: cclass.h cname.h regcomp.ih
regexec.o: engine.c engine.ih
regerror.o: regerror.ih
debug.o: debug.ih
main.o: main.ih
# tester
re: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
# regression test
r: re tests
./re <tests
./re -el <tests
./re -er <tests
# 57 variants, and other stuff, for development use -- not useful to you
ra: ./re tests
-./re <tests
-./re -el <tests
-./re -er <tests
rx: ./re tests
./re -x <tests
./re -x -el <tests
./re -x -er <tests
t: ./re tests
-time ./re <tests
-time ./re -cs <tests
-time ./re -el <tests
-time ./re -cs -el <tests
l: $(LINTC)
lint $(LINTFLAGS) -h $(LINTC) 2>&1 | egrep -v '$(JUNKLINT)' | tee lint
ti README WHATSNEW notes todo | list
ti *.h | list
list *.c
list regex.3 regex.7
ti README WHATSNEW notes todo | list
ti *.h | list
list reg*.c engine.c
mf.tmp: Makefile
sed '/^REGEXH=/s/=.*/=regex.h/' Makefile | sed '/#DEL$$/d' >$@
DTRH=cclass.h cname.h regex2.h utils.h
POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch]
FILES=$(PRE) Makefile $(POST)
DTR=$(PRE) Makefile=mf.tmp $(POST)
dtr: $(FILES) mf.tmp
makedtr $(DTR) >$@
rm mf.tmp
cio: $(FILES)
cio $(FILES)
rdf: $(FILES)
rcsdiff -c $(FILES) 2>&1 | p
# various forms of cleanup
rm -f junk* core core.* *.core dtr *.tmp lint
clean: tidy
rm -f *.o *.s *.ih re libregex.a
# don't do this one unless you know what you're doing
spotless: clean
rm -f mkh regex.h
This is a copy of Henry Spencer's regular expression library, with
modifications to the build system:
autoconf/automake/libtool support has been added to allow building a
shared library on many platforms (in theory). In other cases, a
static library will be built.
The names of installed files have been changed to avoid conflict with
other regex libraries.
Related URLs: for the original regex.shar.
Ignore the notes in the original README below and try something like:
make check
make install
See the INSTALL file for more details.
Library: -lrxspencer
Header: #include <rxspencer/regex.h>
Man Pages: rxspencer(3), rxspencer(7)
Gary Houston,
---- original README follows --------
alpha3.8 release.
Tue Aug 10 15:51:48 EDT 1999 (formerly
See WHATSNEW for change listing.
installation notes:
Read the comments at the beginning of Makefile before running.
Utils.h contains some things that just might have to be modified on
some systems, as well as a nested include (ugh) of <assert.h>.
The "fake" directory contains quick-and-dirty fakes for some header
files and routines that old systems may not have. Note also that
-DUSEBCOPY will make utils.h substitute bcopy() for memmove().
After that, "make r" will build regcomp.o, regexec.o, regfree.o,
and regerror.o (the actual routines), bundle them together into a test
program, and run regression tests on them. No output is good output.
"make lib" builds just the .o files for the actual routines (when
you're happy with testing and have adjusted CFLAGS for production),
and puts them together into libregex.a. You can pick up either the
library or *.o ("make lib" makes sure there are no other .o files left
around to confuse things).
Main.c, debug.c, split.c are used for regression testing but are not part
of the RE routines themselves.
Regex.h goes in /usr/include. All other .h files are internal only.
New in alpha3.8.g7 (Gary Houston): Configuration scripts updated. Make sure
symlinks aren't created by libtool. 26 Nov 2015.
New in alpha3.8.g6 (Gary Houston): Bug fix for integer overflow in regcomp
for excessively long pattern strings. CERT Vulnerability Note VU#695940.
Found by Guido Vranken. Configuration scripts updated. 25 Feb 2015.
New in alpha3.8.g5 (Gary Houston): Configuration scripts updated. Fixed
"make check". Deleted unused "fake" C library headers.
New in alpha3.8.g4 (Gary Houston): account for $(DESTDIR)
in install-data-local, thanks to Aleksey Cheusov. Configuration scripts
New in alpha3.8.g3 (Gary Houston): configuration scripts updated.
New in alpha3.8.g2 (Gary Houston):, updated
for newer versions of autoconf/automake/libtool, with miscellaneous
changes. mkh: don't set PATH, in case utilities are in non-standard
locations (i.e., cygwin).
New in alpha3.8.g1 (Gary Houston): Use autoconf/automake/libtool to
build, test and install the library. Renamed the installed files to
avoid conflicts with other regex libraries.
New in alpha3.8: Bug fix for signed/unsigned mixup, found and fixed
by the FreeBSD folks.
New in alpha3.7: A bit of cleanup aimed at maximizing portability,
possibly at slight cost in efficiency. "ul" suffixes and "unsigned long"
no longer appear, in particular.
New in alpha3.6: A couple more portability glitches fixed.
New in alpha3.5: Active development of this code has been stopped --
I'm working on a complete reimplementation -- but folks have found some
minor portability glitches and the like, hence this release to fix them.
One penalty: slightly reduced compatibility with old compilers, because
the ANSI C `unsigned long' type and `ul' constant suffix are used in a
few places (I could avoid this but it would be considerably more work).
New in alpha3.4: The complex bug alluded to below has been fixed (in a
slightly kludgey temporary way that may hurt efficiency a bit; this is
another "get it out the door for 4.4" release). The tests at the end of
the tests file have accordingly been uncommented. The primary sign of
the bug was that something like a?b matching ab matched b rather than ab.
(The bug was essentially specific to this exact situation, else it would
have shown up earlier.)
New in alpha3.3: The definition of word boundaries has been altered
slightly, to more closely match the usual programming notion that "_"
is an alphabetic. Stuff used for pre-ANSI systems is now in a subdir,
and the makefile no longer alludes to it in mysterious ways. The
makefile has generally been cleaned up some. Fixes have been made
(again!) so that the regression test will run without -DREDEBUG, at
the cost of weaker checking. A workaround for a bug in some folks'
<assert.h> has been added. And some more things have been added to
tests, including a couple right at the end which are commented out
because the code currently flunks them (complex bug; fix coming).
Plus the usual minor cleanup.
New in alpha3.2: Assorted bits of cleanup and portability improvement
(the development base is now a BSDI system using GCC instead of an ancient
Sun system, and the newer compiler exposed some glitches). Fix for a
serious bug that affected REs using many [] (including REG_ICASE REs
because of the way they are implemented), *sometimes*, depending on
memory-allocation patterns. The header-file prototypes no longer name
the parameters, avoiding possible name conflicts. The possibility that
some clot has defined CHAR_MIN as (say) `-128' instead of `(-128)' is
now handled gracefully. "uchar" is no longer used as an internal type
name (too many people have the same idea). Still the same old lousy
performance, alas.
New in alpha3.1: Basically nothing, this release is just a bookkeeping
convenience. Stay tuned.
New in alpha3.0: Performance is no better, alas, but some fixes have been
made and some functionality has been added. (This is basically the "get
it out the door in time for 4.4" release.) One bug fix: regfree() didn't
free the main internal structure (how embarrassing). It is now possible
to put NULs in either the RE or the target string, using (resp.) a new
REG_PEND flag and the old REG_STARTEND flag. The REG_NOSPEC flag to
regcomp() makes all characters ordinary, so you can match a literal
string easily (this will become more useful when performance improves!).
There are now primitives to match beginnings and ends of words, although
the syntax is disgusting and so is the implementation. The REG_ATOI
debugging interface has changed a bit. And there has been considerable
internal cleanup of various kinds.
New in alpha2.3: Split change list out of README, and moved flags notes
into Makefile. Macro-ized the name of regex(7) in regex(3), since it has
to change for 4.4BSD. Cleanup work in engine.c, and some new regression
tests to catch tricky cases thereof.
New in alpha2.2: Out-of-date manpages updated. Regerror() acquires two
small extensions -- REG_ITOA and REG_ATOI -- which avoid debugging kludges
in my own test program and might be useful to others for similar purposes.
The regression test will now compile (and run) without REDEBUG. The
BRE \$ bug is fixed. Most uses of "uchar" are gone; it's all chars now.
Char/uchar parameters are now written int/unsigned, to avoid possible
portability problems with unpromoted parameters. Some unsigned casts have
been introduced to minimize portability problems with shifting into sign
New in alpha2.1: Lots of little stuff, cleanup and fixes. The one big
thing is that regex.h is now generated, using mkh, rather than being
supplied in the distribution; due to circularities in dependencies,
you have to build regex.h explicitly by "make h". The two known bugs
have been fixed (and the regression test now checks for them), as has a
problem with assertions not being suppressed in the absence of REDEBUG.
No performance work yet.
New in alpha2: Backslash-anything is an ordinary character, not an
error (except, of course, for the handful of backslashed metacharacters
in BREs), which should reduce script breakage. The regression test
checks *where* null strings are supposed to match, and has generally
been tightened up somewhat. Small bug fixes in parameter passing (not
harmful, but technically errors) and some other areas. Debugging
invoked by defining REDEBUG rather than not defining NDEBUG.
New in alpha+3: full prototyping for internal routines, using a little
helper program, mkh, which extracts prototypes given in stylized comments.
More minor cleanup. Buglet fix: it's CHAR_BIT, not CHAR_BITS. Simple
pre-screening of input when a literal string is known to be part of the
RE; this does wonders for performance.
New in alpha+2: minor bits of cleanup. Notably, the number "32" for the
word width isn't hardwired into regexec.c any more, the public header
file prototypes the functions if __STDC__ is defined, and some small typos
in the manpages have been fixed.
New in alpha+1: improvements to the manual pages, and an important
extension, the REG_STARTEND option to regexec().
libtoolize -c --automake --force
autoconf -Wall --force
automake -Wall --add-missing --force-missing --copy
/* character-class table */
static struct cclass {
char *name;
char *chars;
char *multis;
} cclasses[] = {
"alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789", "",
"alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
"blank", " \t", "",
"cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
\25\26\27\30\31\32\33\34\35\36\37\177", "",
"digit", "0123456789", "",
"graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
"lower", "abcdefghijklmnopqrstuvwxyz",
"print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
"punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
"space", "\t\n\v\f\r ", "",
"xdigit", "0123456789ABCDEFabcdef",
NULL, 0, ""
/* character-name table */
static struct cname {
char *name;
char code;
} cnames[] = {
"NUL", '\0',
"SOH", '\001',
"STX", '\002',
"ETX", '\003',
"EOT", '\004',
"ENQ", '\005',
"ACK", '\006',
"BEL", '\007',
"alert", '\007',
"BS", '\010',
"backspace", '\b',
"HT", '\011',
"tab", '\t',
"LF", '\012',
"newline", '\n',
"VT", '\013',
"vertical-tab", '\v',
"FF", '\014',
"form-feed", '\f',
"CR", '\015',
"carriage-return", '\r',
"SO", '\016',
"SI", '\017',
"DLE", '\020',
"DC1", '\021',
"DC2", '\022',
"DC3", '\023',
"DC4", '\024',
"NAK", '\025',
"SYN", '\026',
"ETB", '\027',
"CAN", '\030',
"EM", '\031',
"SUB", '\032',
"ESC", '\033',
"IS4", '\034',
"FS", '\034',
"IS3", '\035',
"GS", '\035',
"IS2", '\036',
"RS", '\036',
"IS1", '\037',
"US", '\037',
"space", ' ',
"exclamation-mark", '!',
"quotation-mark", '"',
"number-sign", '#',
"dollar-sign", '$',
"percent-sign", '%',
"ampersand", '&',
"apostrophe", '\'',
"left-parenthesis", '(',
"right-parenthesis", ')',
"asterisk", '*',
"plus-sign", '+',
"comma", ',',
"hyphen", '-',
"hyphen-minus", '-',
"period", '.',
"full-stop", '.',
"slash", '/',
"solidus", '/',
"zero", '0',
"one", '1',
"two", '2',
"three", '3',
"four", '4',
"five", '5',
"six", '6',
"seven", '7',
"eight", '8',
"nine", '9',
"colon", ':',
"semicolon", ';',
"less-than-sign", '<',
"equals-sign", '=',
"greater-than-sign", '>',
"question-mark", '?',
"commercial-at", '@',
"left-square-bracket", '[',
"backslash", '\\',
"reverse-solidus", '\\',
"right-square-bracket", ']',
"circumflex", '^',
"circumflex-accent", '^',
"underscore", '_',
"low-line", '_',
"grave-accent", '`',
"left-brace", '{',
"left-curly-bracket", '{',
"vertical-line", '|',
"right-brace", '}',
"right-curly-bracket", '}',
"tilde", '~',
"DEL", '\177',
NULL, 0,
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <>.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <> or send patches to
# <>.
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
case $file_conv/,$2, in
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
file=`cygpath -m "$file" || echo "$file"`
file=`winepath -w "$file" || echo "$file"`
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
func_file_conv "$1"
if test -z "$lib_path"; then
linker_opts="$linker_opts -LIBPATH:$file"
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
for dir in $lib_path $LIB
if $shared && test -f "$dir/$lib.dll.lib"; then
if test -f "$dir/$lib.lib"; then
if test -f "$dir/lib$lib.a"; then
if test "$found" != yes; then
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
# Assume a capable shell
for arg
if test -n "$eat"; then
case $1 in
# configure might choose to run compile as 'compile cc -o foo foo.c'.
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
func_file_conv "$2"
set x "$@" -Fe"$file"
func_file_conv "$2" mingw
set x "$@" -I"$file"
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"