]> sourceware.org Git - newlib-cygwin.git/commitdiff
2013-11-20 Chirayu Desai <chirayudesai1@gmail.com>
authorJoel Sherrill <joel.sherrill@oarcorp.com>
Wed, 20 Nov 2013 16:25:50 +0000 (16:25 +0000)
committerJoel Sherrill <joel.sherrill@oarcorp.com>
Wed, 20 Nov 2013 16:25:50 +0000 (16:25 +0000)
* libc/include/regex.h, libc/posix/regcomp.c,
libc/posix/regerror.c, libc/posix/regex.3
libc/posix/regexec.c: Add restrict keyword.

newlib/ChangeLog
newlib/libc/include/regex.h
newlib/libc/posix/regcomp.c
newlib/libc/posix/regerror.c
newlib/libc/posix/regex.3
newlib/libc/posix/regexec.c

index 92c156caa980b5e978fdd09fd7151bdce88fef83..418493e6cd5160c70cd5e844fc88686c67563886 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-20  Chirayu Desai  <chirayudesai1@gmail.com>
+
+       * libc/include/regex.h, libc/posix/regcomp.c,
+       libc/posix/regerror.c, libc/posix/regex.3
+       libc/posix/regexec.c: Add restrict keyword.
+
 2013-11-20  Daniel Ramirez <javamonn@gmail.com>
 
        * libc/iconv/lib/iconv.c, libc/include/iconv.h, 
index 2ac78f4cadc2fa8d016fffc547d7e0849f3975ad..fa3e26879aefa371e154b4a9d72b4f525d4f0af4 100644 (file)
@@ -93,9 +93,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
 
index bd90d2cdffd15f1bb27f4967578e34cbeeecb8bd..002f978cd07c6381377071577583e178dad1242d 100644 (file)
@@ -174,7 +174,7 @@ static int never = 0;               /* for use in asserts; shuts lint up */
 
 /*
  - regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
+ = extern int regcomp(regex_t *__restrict, const char *__restrict, int);
  = #define     REG_BASIC       0000
  = #define     REG_EXTENDED    0001
  = #define     REG_ICASE       0002
@@ -186,8 +186,8 @@ static int never = 0;               /* for use in asserts; shuts lint up */
  */
 int                            /* 0 success, otherwise REG_something */
 regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
+regex_t *__restrict preg;
+const char *__restrict pattern;
 int cflags;
 {
        struct parse pa;
index 3ae1c25862f573542ad909e252277903c1729bc2..a48d37c7296b6b5a5adcccac85773b02b274a66b 100644 (file)
@@ -107,14 +107,15 @@ static struct rerr {
 
 /*
  - regerror - the interface to error numbers
- = extern size_t regerror(int, const regex_t *, char *, size_t);
+ = extern size_t regerror(int, const regex_t *__restrict,
+ =                     char *__restrict, size_t);
  */
 /* ARGSUSED */
 size_t
 regerror(errcode, preg, errbuf, errbuf_size)
 int errcode;
-const regex_t *preg;
-char *errbuf;
+const regex_t *__restrict preg;
+char *__restrict errbuf;
 size_t errbuf_size;
 {
        struct rerr *r;
index d87164177b8a34be359a978c0118eb6c2ba86950..d0b45a8e7a149a695cdde43cd248f9b701b2c783 100644 (file)
 .In sys/types.h
 .In regex.h
 .Ft int
-.Fn regcomp "regex_t *preg" "const char *pattern" "int cflags"
+.Fn regcomp "regex_t *restrict preg" "const char *_restrictpattern" "int cflags"
 .Ft int
 .Fo regexec
-.Fa "const regex_t *preg" "const char *string"
-.Fa "size_t nmatch" "regmatch_t pmatch[]" "int eflags"
+.Fa "const regex_t *_restrict preg" "const char *_restrict string"
+.Fa "size_t nmatch" "regmatch_t pmatch[_restrict]" "int eflags"
 .Fc
 .Ft size_t
 .Fo regerror
-.Fa "int errcode" "const regex_t *preg"
-.Fa "char *errbuf" "size_t errbuf_size"
+.Fa "int errcode" "const regex_t *_restrict preg"
+.Fa "char *_restrict errbuf" "size_t errbuf_size"
 .Fc
 .Ft void
 .Fn regfree "regex_t *preg"
index 98f5ef6118714d1a84ffc949b2fc45685fa075ea..6e39e9eadf2fc2afad69bede50d65e2bc91ca922 100644 (file)
@@ -140,8 +140,8 @@ static int nope = 0;                /* for use in asserts; shuts lint up */
 
 /*
  - regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- =                                     regmatch_t [], int);
+ = extern int regexec(const regex_t *__restrict, const char *__restrict,
+ =                                     size_t, regmatch_t [__restrict], int);
  = #define     REG_NOTBOL      00001
  = #define     REG_NOTEOL      00002
  = #define     REG_STARTEND    00004
@@ -155,10 +155,10 @@ static int nope = 0;              /* for use in asserts; shuts lint up */
  */
 int                            /* 0 success, REG_NOMATCH failure */
 regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
+const regex_t *__restrict preg;
+const char *__restrict string;
 size_t nmatch;
-regmatch_t pmatch[];
+regmatch_t pmatch[__restrict];
 int eflags;
 {
        struct re_guts *g = preg->re_g;
This page took 0.059303 seconds and 5 git commands to generate.