From 60e0c3ad181e14b4ecc37a0d1deb9d893d37619a Mon Sep 17 00:00:00 2001 From: verhaegs Date: Sat, 7 Apr 2012 12:44:58 +0000 Subject: [PATCH] compiler/clib/include/regex.h: Bring include in sync with code that switched to NetBSD version git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@44551 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- compiler/clib/include/regex.h | 53 ++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/compiler/clib/include/regex.h b/compiler/clib/include/regex.h index 67dbd10aaa..51473acbf4 100644 --- a/compiler/clib/include/regex.h +++ b/compiler/clib/include/regex.h @@ -1,5 +1,6 @@ +/* $NetBSD: regex.h,v 1.13 2005/09/13 01:44:32 christos Exp $ */ + /*- - * Copyright (c) 1992 Henry Spencer. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * @@ -14,6 +15,39 @@ * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)regex.h 8.2 (Berkeley) 1/3/94 + */ + +/*- + * Copyright (c) 1992 Henry Spencer. + * + * This code is derived from software contributed to Berkeley by + * Henry Spencer of the University of Toronto. + * + * 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of @@ -35,7 +69,6 @@ * SUCH DAMAGE. * * @(#)regex.h 8.2 (Berkeley) 1/3/94 - * $FreeBSD: src/include/regex.h,v 1.11 2004/07/12 06:07:26 tjr Exp $ */ #ifndef _REGEX_H_ @@ -69,7 +102,6 @@ typedef struct { #define REG_DUMP 0200 /* regerror() flags */ -#define REG_ENOSYS (-1) #define REG_NOMATCH 1 #define REG_BADPAT 2 #define REG_ECOLLATE 3 @@ -86,7 +118,7 @@ typedef struct { #define REG_EMPTY 14 #define REG_ASSERT 15 #define REG_INVARG 16 -#define REG_ILLSEQ 17 +#define REG_ENOSYS 17 #define REG_ATOI 255 /* convert name to number (!) */ #define REG_ITOA 0400 /* convert number to name (!) */ @@ -99,15 +131,10 @@ typedef struct { #define REG_BACKR 02000 /* force use of backref code */ __BEGIN_DECLS -int regcomp(regex_t * __restrict, const char * __restrict, int); -size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t); -/* - * XXX forth parameter should be `regmatch_t [__restrict]', but isn't because - * of a bug in GCC 3.2 (when -std=c99 is specified) which perceives this as a - * syntax error. - */ -int regexec(const regex_t * __restrict, const char * __restrict, size_t, - regmatch_t * __restrict, int); +int regcomp(regex_t * restrict, const char * restrict, int); +size_t regerror(int, const regex_t * restrict, char * restrict, size_t); +int regexec(const regex_t * restrict, + const char * restrict, size_t, regmatch_t [], int); void regfree(regex_t *); __END_DECLS -- 2.11.4.GIT