Merge branch 'upstream-kwsys' into update-kwsys
This commit is contained in:
commit
c314da004a
|
@ -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,9 +344,9 @@ 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;
|
||||
const char* scan;
|
||||
const char* longest;
|
||||
size_t len;
|
||||
int flags;
|
||||
|
||||
if (exp == 0) {
|
||||
|
@ -444,10 +444,10 @@ 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;
|
||||
char* ret;
|
||||
char* br;
|
||||
char* ender;
|
||||
int parno =0;
|
||||
int flags;
|
||||
|
||||
*flagp = HASWIDTH; // Tentatively.
|
||||
|
@ -525,9 +525,9 @@ 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;
|
||||
char* ret;
|
||||
char* chain;
|
||||
char* latest;
|
||||
int flags;
|
||||
|
||||
*flagp = WORST; // Tentatively.
|
||||
|
@ -562,9 +562,9 @@ static char* regbranch (int *flagp) {
|
|||
* endmarker role is not redundant.
|
||||
*/
|
||||
static char* regpiece (int *flagp) {
|
||||
register char* ret;
|
||||
register char op;
|
||||
register char* next;
|
||||
char* ret;
|
||||
char op;
|
||||
char* next;
|
||||
int flags;
|
||||
|
||||
ret = regatom(&flags);
|
||||
|
@ -631,7 +631,7 @@ 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;
|
||||
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 == ®dummy) {
|
||||
|
@ -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 == ®dummy) {
|
||||
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 == ®dummy)
|
||||
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,7 +992,7 @@ 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* 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 == ®dummy)
|
||||
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 == ®dummy)
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue