From 1c84681cf9abb09d1610b99c8af08f83f752f143 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 2 Oct 2002 07:48:13 +0000 Subject: o Add typedef for size_t. o Fix regoff_t typedef to not require as a prerequisite (specifically use `__off_t' instead of `off_t'). o Add restrict type-qualifier to function prototypes. --- include/regex.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/regex.h b/include/regex.h index 0c52bd7..658ce8e 100644 --- a/include/regex.h +++ b/include/regex.h @@ -42,9 +42,15 @@ #define _REGEX_H_ #include +#include /* types */ -typedef off_t regoff_t; +typedef __off_t regoff_t; + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif typedef struct { int re_magic; @@ -97,9 +103,10 @@ typedef struct { #define REG_BACKR 02000 /* force use of backref code */ __BEGIN_DECLS -int regcomp(regex_t *, const char *, int); -size_t regerror(int, const regex_t *, char *, size_t); -int regexec(const regex_t *, const char *, size_t, regmatch_t [], 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 [__restrict], int); void regfree(regex_t *); __END_DECLS -- cgit v1.1