Module Name:    othersrc
Committed By:   agc
Date:           Thu Jun  9 06:24:34 UTC 2016

Added Files:
        othersrc/external/bsd/regextend: Makefile
        othersrc/external/bsd/regextend/bin: 1.in 2.in 3.in 4.in Makefile
            Testspec
        othersrc/external/bsd/regextend/dist: Makefile libregextend.3 main.c
            regextend.1 regextend.c regextend.h
        othersrc/external/bsd/regextend/lib: Makefile shlib_version

Log Message:
Add a small lib and utility program to convert a basic regular expression into
an extended one. For more information on regexp specifications, please see
re_format(7).

The library implements a single routine called regextend(3), which implements
a simple codec-style transformation from basic to extended regular expression.
This can be useful for regular expression implementations which do not
implement basic regular expressions.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/regextend/Makefile
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/regextend/bin/1.in \
    othersrc/external/bsd/regextend/bin/2.in \
    othersrc/external/bsd/regextend/bin/3.in \
    othersrc/external/bsd/regextend/bin/4.in \
    othersrc/external/bsd/regextend/bin/Makefile \
    othersrc/external/bsd/regextend/bin/Testspec
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/regextend/dist/Makefile \
    othersrc/external/bsd/regextend/dist/libregextend.3 \
    othersrc/external/bsd/regextend/dist/main.c \
    othersrc/external/bsd/regextend/dist/regextend.1 \
    othersrc/external/bsd/regextend/dist/regextend.c \
    othersrc/external/bsd/regextend/dist/regextend.h
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/regextend/lib/Makefile \
    othersrc/external/bsd/regextend/lib/shlib_version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: othersrc/external/bsd/regextend/Makefile
diff -u /dev/null othersrc/external/bsd/regextend/Makefile:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/Makefile	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,9 @@
+#	$NetBSD: Makefile,v 1.1 2016/06/09 06:24:33 agc Exp $
+
+SUBDIR=		lib .WAIT
+SUBDIR+=	bin
+
+.include <bsd.subdir.mk>
+
+t:
+	cd bin && ${MAKE} t

Index: othersrc/external/bsd/regextend/bin/1.in
diff -u /dev/null othersrc/external/bsd/regextend/bin/1.in:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/bin/1.in	Thu Jun  9 06:24:33 2016
@@ -0,0 +1 @@
+PR.*G+|{}()
Index: othersrc/external/bsd/regextend/bin/2.in
diff -u /dev/null othersrc/external/bsd/regextend/bin/2.in:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/bin/2.in	Thu Jun  9 06:24:33 2016
@@ -0,0 +1 @@
+PR.*G+|{}()\{\}\(\)
Index: othersrc/external/bsd/regextend/bin/3.in
diff -u /dev/null othersrc/external/bsd/regextend/bin/3.in:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/bin/3.in	Thu Jun  9 06:24:33 2016
@@ -0,0 +1 @@
+^PR.*G+|{}()\{\}\(\)^$.*end$
Index: othersrc/external/bsd/regextend/bin/4.in
diff -u /dev/null othersrc/external/bsd/regextend/bin/4.in:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/bin/4.in	Thu Jun  9 06:24:33 2016
@@ -0,0 +1 @@
+*^PR.*G+|{}()\{\}\(\)^$.*end$
Index: othersrc/external/bsd/regextend/bin/Makefile
diff -u /dev/null othersrc/external/bsd/regextend/bin/Makefile:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/bin/Makefile	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1 2016/06/09 06:24:33 agc Exp $
+
+.include <bsd.own.mk>
+
+PROG=		regextend
+SRCS=		main.c
+BINDIR=		/usr/bin
+
+CPPFLAGS+=	-I${.CURDIR}/../dist/
+
+LIB_REGEXTEND_DIR!=	cd ${.CURDIR}/../lib && ${PRINTOBJDIR}
+LDADD+=		-L${LIB_REGEXTEND_DIR} -lregextend
+DPADD+=		${LIB_REGEXTEND_DIR}/libregextend.a
+
+.ifndef PRODUCTION
+CPPFLAGS+=-g -O0
+LDFLAGS+=-g -O0
+.endif
+
+MAN=		regextend.1
+
+WARNS=		5
+
+.PATH: ${.CURDIR}/../dist
+
+.include <bsd.prog.mk>
+
+t: ${PROG}
+	@echo "1. basics"
+	env LD_LIBRARY_PATH=${LIB_REGEXTEND_DIR} ./${PROG} 'PR.*G+|{}()' > 1.out
+	diff 1.expected 1.out
+	rm -f 1.out
+	@echo "2. delimiters"
+	env LD_LIBRARY_PATH=${LIB_REGEXTEND_DIR} ./${PROG} 'PR.*G+|{}()\{\}\(\)' > 2.out
+	diff 2.expected 2.out
+	rm -f 2.out
+	@echo "3. delimiters"
+	env LD_LIBRARY_PATH=${LIB_REGEXTEND_DIR} ./${PROG} '^PR.*G+|{}()\{\}\(\)^$$.*end$$' > 3.out
+	diff 3.expected 3.out
+	rm -f 3.out
+	@echo "4. * at start"
+	env LD_LIBRARY_PATH=${LIB_REGEXTEND_DIR} ./${PROG} '*^PR.*G+|{}()\{\}\(\)^$$.*end$$' > 4.out
+	diff 4.expected 4.out
+	rm -f 4.out
Index: othersrc/external/bsd/regextend/bin/Testspec
diff -u /dev/null othersrc/external/bsd/regextend/bin/Testspec:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/bin/Testspec	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,24 @@
+TESTNAME=b2e
+
+TESTSET_1_NAME=basics
+TESTSET_1_FILES='
+1.in
+1.expected
+2.in
+2.expected
+'
+TESTSET_1_CASE_1="-s eq:0 -o file:1.expected -e empty b2e < 1.in"
+TESTSET_1_CASE_2="-s eq:0 -o file:2.expected -e empty b2e < 2.in"
+
+TESTSET_2_NAME=extended
+TESTSET_2_FILES='
+3.in
+3.expected
+4.in
+4.expected
+5.in
+5.expected
+'
+TESTSET_2_CASE_1="-s eq:0 -o file:3.expected -e empty b2e < 3.in"
+TESTSET_2_CASE_2="-s eq:0 -o file:4.expected -e empty b2e < 4.in"
+DISABLE_TESTSET_2_CASE_3="-s eq:0 -o file:5.expected -e empty b2e < 5.in"

Index: othersrc/external/bsd/regextend/dist/Makefile
diff -u /dev/null othersrc/external/bsd/regextend/dist/Makefile:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/dist/Makefile	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,29 @@
+PROG=	b2e
+SRCS+=	basic.c
+MKMAN=	no
+WARNS=	5
+
+.ifndef PRODUCTION
+CPPFLAGS+=	-g -O0
+LDFLAGS+=	-g -O0
+.endif
+
+.include <bsd.prog.mk>
+
+t: ${PROG}
+	@echo "1. basics"
+	./${PROG} 'PR.*G+|{}()' > 1.out
+	diff 1.expected 1.out
+	rm -f 1.out
+	@echo "2. delimiters"
+	./${PROG} 'PR.*G+|{}()\{\}\(\)' > 2.out
+	diff 2.expected 2.out
+	rm -f 2.out
+	@echo "3. delimiters"
+	./${PROG} '^PR.*G+|{}()\{\}\(\)^$$.*end$$' > 3.out
+	diff 3.expected 3.out
+	rm -f 3.out
+	@echo "4. * at start"
+	./${PROG} '*^PR.*G+|{}()\{\}\(\)^$$.*end$$' > 4.out
+	diff 4.expected 4.out
+	rm -f 4.out
Index: othersrc/external/bsd/regextend/dist/libregextend.3
diff -u /dev/null othersrc/external/bsd/regextend/dist/libregextend.3:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/dist/libregextend.3	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,67 @@
+.\" $NetBSD: libregextend.3,v 1.1 2016/06/09 06:24:33 agc Exp $
+.\"
+.\" Copyright (c) 2016 Alistair Crooks <[email protected]>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd May 28, 2016
+.Dt LIBREGEXTEND 3
+.Os
+.Sh NAME
+.Nm libregextend
+.Nd convert a basic regular expression to an extended one
+.Sh LIBRARY
+.Lb libregextend
+.Sh SYNOPSIS
+.In regextend.h
+.Ft ssize_t
+.Fo regextend
+.Fa "const char *in" "size_t insize"
+.Fa "char *out" "size_t outsize"
+.Fc
+.Sh DESCRIPTION
+The
+.Nm
+library contains a single function to convert a
+basic regular expression into an extended regular expression.
+For further information on regular expression specifications, please see
+.Xr re_format 7 .
+Conversion of basic regular expressions into extended ones automatically
+is useful for some regular expression implementations which do not provide
+basic regular expression functionality.
+.Pp
+The
+.Fn regextend
+takes an input buffer, which is the basic regular expression
+to be converted, and its length.
+The output buffer and its length are also passed.
+The
+converted regular expression is written to that buffer.
+Its maximum length is also given as an input parameter.
+The number of characters which comprise the extended expression is returned.
+.Sh HISTORY
+The
+.Nm
+library first appeared in
+.Nx 8.0 .
+.Sh AUTHORS
+.An Alistair Crooks Aq Mt [email protected]
Index: othersrc/external/bsd/regextend/dist/main.c
diff -u /dev/null othersrc/external/bsd/regextend/dist/main.c:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/dist/main.c	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,61 @@
+/*-
+ * Copyright (c) 2016 Alistair Crooks <[email protected]>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "regextend.c"
+
+static int
+doit(const char *s, size_t size)
+{
+	ssize_t	len;
+	char	out[BUFSIZ];
+
+	len = regextend(s, size, out, sizeof(out));
+	printf("%.*s\n", (int)len, out);
+	return 1;
+}
+
+int
+main(int argc, char **argv)
+{
+	char	buf[BUFSIZ];
+	int	i;
+
+	while ((i = getopt(argc, argv, "")) != -1) {
+	}
+	if (argc == optind) {
+		while (fgets(buf, sizeof(buf), stdin) != NULL) {
+			doit(buf, strlen(buf) - 1);
+		}
+	} else {
+		for (i = optind ; i < argc ; i++) {
+			doit(argv[i], strlen(argv[i]));
+		}
+	}
+	exit(EXIT_SUCCESS);
+}
Index: othersrc/external/bsd/regextend/dist/regextend.1
diff -u /dev/null othersrc/external/bsd/regextend/dist/regextend.1:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/dist/regextend.1	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,64 @@
+.\" $NetBSD: regextend.1,v 1.1 2016/06/09 06:24:33 agc Exp $
+.\"
+.\" Copyright (c) 2016 Alistair Crooks <[email protected]>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd May 28, 2016
+.Dt REGEXTEND 1
+.Os
+.Sh NAME
+.Nm regextend
+.Nd small program to convert a basic regexp to an extended one
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
+The
+.Nm
+program takes a number of basic regular expressions and converts them
+to extended regular expressions.
+.Pp
+For more information on regular expression specification, please
+see
+.Xr re_format 7 .
+.Pp
+The
+.Nm
+program will convert all of its arguments to extended regular expressions
+and write them to standard output.
+If no arguments are given,
+.Nm
+will read the basic regular expressions from
+.Dv stdin .
+.Sh SEE ALSO
+.Xr libregextend 3 ,
+.Xr re_format 7
+.Sh HISTORY
+The
+.Nm
+program was first seen in
+.Nx 8 .
+.Sh AUTHORS
+The
+.Nm
+program was written by
+.An Alistair Crooks Aq Mt [email protected] .
Index: othersrc/external/bsd/regextend/dist/regextend.c
diff -u /dev/null othersrc/external/bsd/regextend/dist/regextend.c:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/dist/regextend.c	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,95 @@
+/*-
+ * Copyright (c) 2016 Alistair Crooks <[email protected]>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "regextend.h"
+
+/* either start of line, or start of nested subexpression */
+#define BASIC_IS_START(i, in)	\
+	((i) == (in) || ((size_t)(i - in) >= 2 && (i)[-2] == '\\' && (i)[-1] == '('))
+
+#define BASIC_IS_END(i, in, sz) \
+	(((size_t)((i) - (in)) == (sz) - 1) || ((i)[1] == '\\' && (i)[2] == ')'))
+
+/* convert a basic regexp into an extended one */
+ssize_t
+regextend(const char *in, size_t insize, char *out, size_t outsize)
+{
+	const char	*i;
+	char		*o;
+
+	for (i = in, o = out ; (size_t)(i - in) < insize && (size_t)(o - out) < outsize ; i++) {
+		switch(*i) {
+		case '+':
+		case '|':
+		case '?':
+		case '{':
+		case '}':
+		case '(':
+		case ')':
+			/* +, |, ?, {, }, (, ) are ordinary characters */
+			*o++ = '\\';
+			*o++ = *i;
+			break;
+		case '\\':
+			switch(i[1]) {
+			case '(':
+			case ')':
+			case '{':
+			case '}':
+				/* basic bounds delimiters are \{ and \} */
+				/* basic nested subexpressions are \( and \) */
+				*o++ = *++i;
+				break;
+			default:
+				/* pass through other backslash-escaped chars */
+				*o++ = *i;
+				break;
+			}
+			break;
+		case '^':
+		case '*':
+		case '$':
+			/* ^ is an ordinary char, except at start */
+			/* * is an ordinary char only at start */
+			/* $ is an ordinary char, except at end */
+			if ((*i == '^' && !BASIC_IS_START(i, in)) ||
+			    (*i == '$' && !BASIC_IS_END(i, in, insize)) ||
+			    (*i == '*' && BASIC_IS_START(i, in))) {
+				*o++ = '\\';
+			}
+			*o++ = *i;
+			break;
+		default:
+			*o++ = *i;
+			break;
+		}
+	}
+	*o = 0x0;
+	return (ssize_t)(o - out);
+}
Index: othersrc/external/bsd/regextend/dist/regextend.h
diff -u /dev/null othersrc/external/bsd/regextend/dist/regextend.h:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/dist/regextend.h	Thu Jun  9 06:24:33 2016
@@ -0,0 +1,32 @@
+/*-
+ * Copyright (c) 2016 Alistair Crooks <[email protected]>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef REGEXTEND_H_
+#define REGEXTEND_H_	20160528
+
+#include <sys/types.h>
+
+ssize_t regextend(const char */*in*/, size_t /*insize*/, char */*out*/, size_t /*outsize*/);
+
+#endif

Index: othersrc/external/bsd/regextend/lib/Makefile
diff -u /dev/null othersrc/external/bsd/regextend/lib/Makefile:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/lib/Makefile	Thu Jun  9 06:24:34 2016
@@ -0,0 +1,23 @@
+#	$NetBSD: Makefile,v 1.1 2016/06/09 06:24:34 agc Exp $
+
+.include <bsd.own.mk>
+
+DIST=	${.CURDIR}/../dist
+.PATH:	${DIST}
+
+LIB=	regextend
+SRCS+=	regextend.c
+CPPFLAGS+=	-I. -I${DIST}
+MAN=	libregextend.3
+
+.ifndef PRODUCTION
+CPPFLAGS+=-g -O0
+LDFLAGS+=-g -O0
+.endif
+
+WARNS=	5
+
+INCS=		regextend.h
+INCSDIR=	/usr/include
+
+.include <bsd.lib.mk>
Index: othersrc/external/bsd/regextend/lib/shlib_version
diff -u /dev/null othersrc/external/bsd/regextend/lib/shlib_version:1.1
--- /dev/null	Thu Jun  9 06:24:34 2016
+++ othersrc/external/bsd/regextend/lib/shlib_version	Thu Jun  9 06:24:34 2016
@@ -0,0 +1,2 @@
+major=0
+minor=0

Reply via email to