From 9a9fe3ad32b7f42650d6acdab484782320ae8e6d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 17 Oct 2009 03:45:53 +0200 Subject: sync some headers and disable unused prototypes Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- include/regexp.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'include/regexp.h') diff --git a/include/regexp.h b/include/regexp.h index b7b50b710..57b7f93ea 100644 --- a/include/regexp.h +++ b/include/regexp.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999, 2004, 2008 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -81,6 +82,7 @@ __BEGIN_DECLS +#if 0 /* Interface variables. They contain the results of the successful calls to `setp' and `advance'. */ extern char *loc1; @@ -89,6 +91,7 @@ extern char *loc2; /* The use of this variable in the `advance' function is not supported. */ extern char *locs; +#endif #ifndef __DO_NOT_DEFINE_COMPILE @@ -129,8 +132,9 @@ compile (char *__restrict instring, char *__restrict expbuf, __expr_ptr = (regex_t *) expbuf; /* The remaining space in the buffer can be used for the compiled pattern. */ - __expr_ptr->buffer = expbuf + sizeof (regex_t); - __expr_ptr->allocated = endbuf - (char *) __expr_ptr->buffer; + __expr_ptr->__REPB_PREFIX (buffer) = expbuf + sizeof (regex_t); + __expr_ptr->__REPB_PREFIX (allocated) + = endbuf - (char *) __expr_ptr->__REPB_PREFIX (buffer); while ((__ch = (GETC ())) != eof) { @@ -162,7 +166,10 @@ compile (char *__restrict instring, char *__restrict expbuf, } __input_buffer[__current_size++] = __ch; } - __input_buffer[__current_size++] = '\0'; + if (__current_size) + __input_buffer[__current_size++] = '\0'; + else + __input_buffer = ""; /* Now compile the pattern. */ __error = regcomp (__expr_ptr, __input_buffer, REG_NEWLINE); @@ -198,11 +205,13 @@ compile (char *__restrict instring, char *__restrict expbuf, } /* Everything is ok. */ - RETURN ((char *) (__expr_ptr->buffer + __expr_ptr->used)); + RETURN ((char *) (__expr_ptr->__REPB_PREFIX (buffer) + + __expr_ptr->__REPB_PREFIX (used))); } #endif +#if 0 /* Find the next match in STRING. The compiled regular expression is found in the buffer starting at EXPBUF. `loc1' will return the first character matched and `loc2' points to the next unmatched @@ -215,6 +224,7 @@ extern int step (__const char *__restrict __string, position of the first unmatched character. */ extern int advance (__const char *__restrict __string, __const char *__restrict __expbuf) __THROW; +#endif __END_DECLS -- cgit v1.2.3