Merge branch 'upstream-kwsys' into update-kwsys

This commit is contained in:
Brad King 2013-07-01 09:36:48 -04:00
commit c314da004a
1 changed files with 57 additions and 57 deletions

View File

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