about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-01-14 10:25:40 +0000
committerUlrich Drepper <drepper@redhat.com>1999-01-14 10:25:40 +0000
commit9963a779f5030c2b52a2eca63fb5ee8a868d2cdb (patch)
tree9a9432f7f3b2f8d5e855033094a64a23b10e2418 /misc
parent695b9a02766015cbeaa78585cff5117c4c200d18 (diff)
downloadglibc-9963a779f5030c2b52a2eca63fb5ee8a868d2cdb.tar.gz
glibc-9963a779f5030c2b52a2eca63fb5ee8a868d2cdb.tar.xz
glibc-9963a779f5030c2b52a2eca63fb5ee8a868d2cdb.zip
Update.
	* misc/regexp.h: Add restrict to function declarations.

1999-01-14  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* misc/regexp.h (compile): Correct end-of-line check, fix typo in
	docu.  Reported by Kalle Olavi Niemitalo <kalle@Niemitalo.fi>.

1999-01-14  Ulrich Drepper  <drepper@cygnus.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/regexp.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/misc/regexp.h b/misc/regexp.h
index 54052b7b0f..4e3571043c 100644
--- a/misc/regexp.h
+++ b/misc/regexp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -93,12 +93,13 @@ extern char *locs;
 #ifndef __DO_NOT_DEFINE_COMPILE
 /* Get and compile the user supplied pattern up to end of line or
    string or until EOF is seen, whatever happens first.  The result is
-   placed in the buffer starting at EXPBUG and delimited by ENDBUF.
+   placed in the buffer starting at EXPBUF and delimited by ENDBUF.
 
    This function cannot be defined in the libc itself since it depends
    on the macros.  */
 char *
-compile (char *instring, char *expbuf, __const char *endbuf, int eof)
+compile (char *__restrict instring, char *__restrict expbuf,
+	 __const char *__restrict endbuf, int eof)
 {
   char *__input_buffer = NULL;
   size_t __input_size = 0;
@@ -132,7 +133,7 @@ compile (char *instring, char *expbuf, __const char *endbuf, int eof)
 
   while ((__ch = (GETC ())) != eof)
     {
-      if (__ch == '\0' || __ch == 'n')
+      if (__ch == '\0' || __ch == '\n')
 	{
 	  UNGETC (__ch);
 	  break;
@@ -205,12 +206,14 @@ compile (char *instring, char *expbuf, __const char *endbuf, int eof)
    found in the buffer starting at EXPBUF.  `loc1' will return the
    first character matched and `loc2' points to the next unmatched
    character.  */
-extern int step __P ((__const char *__string, __const char *__expbuf));
+extern int step __P ((__const char *__restrict __string,
+		      __const char *__restrict __expbuf));
 
 /* Match the beginning of STRING with the compiled regular expression
    in EXPBUF.  If the match is successful `loc2' will contain the
    position of the first unmatched character.  */
-extern int advance __P ((__const char *__string, __const char *__expbuf));
+extern int advance __P ((__const char *__restrict __string,
+			 __const char *__restrict __expbuf));
 
 
 __END_DECLS