summaryrefslogtreecommitdiff
path: root/include/regexp.h
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2009-10-17 03:45:53 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-11-19 23:05:45 +0100
commit9a9fe3ad32b7f42650d6acdab484782320ae8e6d (patch)
tree4b5427a21b7fa4121a3a699f82c08a4cea564871 /include/regexp.h
parenta193e5a08463ea97f55cb66ccd001f156ec7aa87 (diff)
sync some headers and disable unused prototypes
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'include/regexp.h')
-rw-r--r--include/regexp.h20
1 files changed, 15 insertions, 5 deletions
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 <drepper@cygnus.com>, 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