From 2e3c9352848459c8822f9a1e858a613863e9ebc3 Mon Sep 17 00:00:00 2001
From: KWSys Robot <kwrobot@kitware.com>
Date: Mon, 1 Jul 2013 08:47:14 -0400
Subject: KWSys 2013-07-01 (f6c4c247)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ f6c4c247 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 3d1d4e7c..f6c4c247
Sean McBride (1):
      f6c4c247 RegularExpression: Remove 'register' storage specifier

Change-Id: I755712879ab86fa163f5fce684fff2f0ecd8ab99
---
 RegularExpression.cxx | 114 +++++++++++++++++++++++++-------------------------
 1 file changed, 57 insertions(+), 57 deletions(-)

diff --git a/RegularExpression.cxx b/RegularExpression.cxx
index f6eeeba..c829787 100644
--- a/RegularExpression.cxx
+++ b/RegularExpression.cxx
@@ -312,8 +312,8 @@ static       char* regbranch (int*);
 static       char* regpiece (int*);
 static       char* regatom (int*);
 static       char* regnode (char);
-static const char* regnext (register const char*);
-static       char* regnext (register char*);
+static const char* regnext (const char*);
+static       char* regnext (char*);
 static void        regc (char);
 static void        reginsert (char, char*);
 static void        regtail (char*, const char*);
@@ -344,10 +344,10 @@ static int strcspn ();
 // for later pattern matching.
 
 bool RegularExpression::compile (const char* exp) {
-    register const char* scan;
-    register const char* longest;
-    register size_t len;
-             int         flags;
+    const char* scan;
+    const char* longest;
+    size_t      len;
+    int         flags;
 
     if (exp == 0) {
       //RAISE Error, SYM(RegularExpression), SYM(No_Expr),
@@ -444,11 +444,11 @@ bool RegularExpression::compile (const char* exp) {
  * follows makes it hard to avoid.
  */
 static char* reg (int paren, int *flagp) {
-    register char* ret;
-    register char* br;
-    register char* ender;
-    register int   parno =0;
-             int   flags;
+    char* ret;
+    char* br;
+    char* ender;
+    int   parno =0;
+    int   flags;
 
     *flagp = HASWIDTH;          // Tentatively.
 
@@ -525,10 +525,10 @@ static char* reg (int paren, int *flagp) {
  * Implements the concatenation operator.
  */
 static char* regbranch (int *flagp) {
-    register char* ret;
-    register char* chain;
-    register char* latest;
-    int                  flags;
+    char* ret;
+    char* chain;
+    char* latest;
+    int   flags;
 
     *flagp = WORST;             // Tentatively.
 
@@ -562,10 +562,10 @@ static char* regbranch (int *flagp) {
  * endmarker role is not redundant.
  */
 static char* regpiece (int *flagp) {
-    register char* ret;
-    register char  op;
-    register char* next;
-    int            flags;
+    char* ret;
+    char  op;
+    char* next;
+    int   flags;
 
     ret = regatom(&flags);
     if (ret == 0)
@@ -631,8 +631,8 @@ static char* regpiece (int *flagp) {
  * separate node; the code is simpler that way and it's not worth fixing.
  */
 static char* regatom (int *flagp) {
-    register char* ret;
-             int   flags;
+    char* ret;
+    int   flags;
 
     *flagp = WORST;             // Tentatively.
 
@@ -648,8 +648,8 @@ static char* regatom (int *flagp) {
             *flagp |= HASWIDTH | SIMPLE;
             break;
         case '[':{
-                register int    rxpclass;
-                register int    rxpclassend;
+                int    rxpclass;
+                int    rxpclassend;
 
                 if (*regparse == '^') { // Complement of range.
                     ret = regnode(ANYBUT);
@@ -720,8 +720,8 @@ static char* regatom (int *flagp) {
             *flagp |= HASWIDTH | SIMPLE;
             break;
         default:{
-                register int    len;
-                register char   ender;
+                int    len;
+                char   ender;
 
                 regparse--;
                 len = int(strcspn(regparse, META));
@@ -754,8 +754,8 @@ static char* regatom (int *flagp) {
    Location.
  */
 static char* regnode (char op) {
-    register char* ret;
-    register char* ptr;
+    char* ret;
+    char* ptr;
 
     ret = regcode;
     if (ret == &regdummy) {
@@ -790,9 +790,9 @@ static void regc (char b) {
  * Means relocating the operand.
  */
 static void reginsert (char op, char* opnd) {
-    register char* src;
-    register char* dst;
-    register char* place;
+    char* src;
+    char* dst;
+    char* place;
 
     if (regcode == &regdummy) {
         regsize += 3;
@@ -816,9 +816,9 @@ static void reginsert (char op, char* opnd) {
  - regtail - set the next-pointer at the end of a node chain
  */
 static void regtail (char* p, const char* val) {
-    register char* scan;
-    register char* temp;
-    register int   offset;
+    char* scan;
+    char* temp;
+    int   offset;
 
     if (p == &regdummy)
         return;
@@ -893,7 +893,7 @@ bool RegularExpression::find (kwsys_stl::string const& s)
 // Returns true if found, and sets start and end indexes accordingly.
 
 bool RegularExpression::find (const char* string) {
-    register const char* s;
+    const char* s;
 
     this->searchstring = string;
 
@@ -956,9 +956,9 @@ bool RegularExpression::find (const char* string) {
  */
 static int regtry (const char* string, const char* *start,
                    const char* *end, const char* prog) {
-    register       int    i;
-    register const char* *sp1;
-    register const char* *ep;
+                   int    i;
+                   const char* *sp1;
+                   const char* *ep;
 
     reginput = string;
     regstartp = start;
@@ -992,8 +992,8 @@ static int regtry (const char* string, const char* *start,
  * 0 failure, 1 success
  */
 static int regmatch (const char* prog) {
-    register const char* scan;  // Current node.
-             const char* next;  // Next node.
+    const char* scan;  // Current node.
+    const char* next;  // Next node.
 
     scan = prog;
 
@@ -1016,8 +1016,8 @@ static int regmatch (const char* prog) {
                 reginput++;
                 break;
             case EXACTLY:{
-                    register size_t len;
-                    register const char* opnd;
+                    size_t len;
+                    const char* opnd;
 
                     opnd = OPERAND(scan);
                     // Inline the first character, for speed.
@@ -1052,8 +1052,8 @@ static int regmatch (const char* prog) {
             case OPEN + 7:
             case OPEN + 8:
             case OPEN + 9:{
-                    register       int    no;
-                    register const char* save;
+                    int    no;
+                    const char* save;
 
                     no = OP(scan) - OPEN;
                     save = reginput;
@@ -1081,8 +1081,8 @@ static int regmatch (const char* prog) {
             case CLOSE + 7:
             case CLOSE + 8:
             case CLOSE + 9:{
-                    register       int    no;
-                    register const char* save;
+                    int    no;
+                    const char* save;
 
                     no = OP(scan) - CLOSE;
                     save = reginput;
@@ -1103,7 +1103,7 @@ static int regmatch (const char* prog) {
 //              break;
             case BRANCH:{
 
-              register const char* save;
+              const char* save;
 
                     if (OP(next) != BRANCH)     // No choice.
                         next = OPERAND(scan);   // Avoid recursion.
@@ -1122,10 +1122,10 @@ static int regmatch (const char* prog) {
                 break;
             case STAR:
             case PLUS:{
-              register char   nextch;
-                    register int        no;
-                    register const char* save;
-                    register int        min_no;
+                    char   nextch;
+                    int        no;
+                    const char* save;
+                    int        min_no;
 
                     //
                     // Lookahead to avoid useless match attempts when we know
@@ -1174,9 +1174,9 @@ static int regmatch (const char* prog) {
  - regrepeat - repeatedly match something simple, report how many
  */
 static int regrepeat (const char* p) {
-    register       int   count = 0;
-    register const char* scan;
-    register const char* opnd;
+    int         count = 0;
+    const char* scan;
+    const char* opnd;
 
     scan = reginput;
     opnd = OPERAND(p);
@@ -1216,8 +1216,8 @@ static int regrepeat (const char* p) {
 /*
  - regnext - dig the "next" pointer out of a node
  */
-static const char* regnext (register const char* p) {
-    register int offset;
+static const char* regnext (const char* p) {
+    int offset;
 
     if (p == &regdummy)
         return (0);
@@ -1232,8 +1232,8 @@ static const char* regnext (register const char* p) {
         return (p + offset);
 }
 
-static char* regnext (register char* p) {
-    register int offset;
+static char* regnext (char* p) {
+    int offset;
 
     if (p == &regdummy)
         return (0);
-- 
cgit v0.12