summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkleink <kleink@NetBSD.org>2003-02-05 23:13:07 +0000
committerkleink <kleink@NetBSD.org>2003-02-05 23:13:07 +0000
commitd58cfc7d35e13bc293ea26acdb2d018264d366a4 (patch)
treec16ce50ce9f7ca4ab4973081c5d84faef43c81a0
parent889cc758e5160a0bb54da16c11478165a35a7cb5 (diff)
Sprinkle some restrict.
-rw-r--r--include/regex.h11
-rw-r--r--lib/libc/regex/regex.38
2 files changed, 10 insertions, 9 deletions
diff --git a/include/regex.h b/include/regex.h
index a51fbb502aa..8fe5e431e2d 100644
--- a/include/regex.h
+++ b/include/regex.h
@@ -1,4 +1,4 @@
-/* $NetBSD: regex.h,v 1.9 1998/12/09 20:58:55 drochner Exp $ */
+/* $NetBSD: regex.h,v 1.10 2003/02/05 23:13:07 kleink Exp $ */
/*-
* Copyright (c) 1992 Henry Spencer.
@@ -104,10 +104,11 @@ typedef struct {
#define REG_BACKR 02000 /* force use of backref code */
__BEGIN_DECLS
-int regcomp __P((regex_t *, const char *, int));
-size_t regerror __P((int, const regex_t *, char *, size_t));
-int regexec __P((const regex_t *,
- const char *, size_t, regmatch_t [], int));
+int regcomp __P((regex_t * __restrict, const char * __restrict, int));
+size_t regerror __P((int, const regex_t * __restrict, char * __restrict,
+ size_t));
+int regexec __P((const regex_t * __restrict,
+ const char * __restrict, size_t, regmatch_t [], int));
void regfree __P((regex_t *));
__END_DECLS
diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3
index ce3a17f0c24..286a5a603e9 100644
--- a/lib/libc/regex/regex.3
+++ b/lib/libc/regex/regex.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: regex.3,v 1.14 2002/10/01 17:06:53 wiz Exp $
+.\" $NetBSD: regex.3,v 1.15 2003/02/05 23:13:07 kleink Exp $
.\"
.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
.\" Copyright (c) 1992, 1993, 1994
@@ -52,11 +52,11 @@
.Sh SYNOPSIS
.Fd #include \*[Lt]regex.h\*[Gt]
.Ft int
-.Fn regcomp "regex_t *preg" "const char *pattern" "int cflags"
+.Fn regcomp "regex_t * restrict preg" "const char * restrict pattern" "int cflags"
.Ft int
-.Fn regexec "const regex_t *preg" "const char *string" "size_t nmatch" "regmatch_t pmatch[]" "int eflags"
+.Fn regexec "const regex_t * restrict preg" "const char * restrict string" "size_t nmatch" "regmatch_t pmatch[]" "int eflags"
.Ft size_t
-.Fn regerror "int errcode" "const regex_t *preg" "char *errbuf" "size_t errbuf_size"
+.Fn regerror "int errcode" "const regex_t * restrict preg" "char * restrict errbuf" "size_t errbuf_size"
.Ft void
.Fn regfree "regex_t *preg"
.Sh DESCRIPTION