diff options
author | unknown <monty@tramp.mysql.fi> | 2000-10-03 14:18:03 +0300 |
---|---|---|
committer | unknown <monty@tramp.mysql.fi> | 2000-10-03 14:18:03 +0300 |
commit | 63b7b45ff7f79a08a673e8b759a69f5ee7e67902 (patch) | |
tree | c02cc6a9c6585038615c596332aae70354b44aac /regex/regcomp.c | |
parent | 27a17a6ef909533820b2137ab598fb7df220876d (diff) | |
download | mariadb-git-63b7b45ff7f79a08a673e8b759a69f5ee7e67902.tar.gz |
First part of automatic repair of MyISAM tables.
Error on full disk on repair.
SIGHUP signal handling.
Update with keys on timestamp
Portability fixes
Docs/manual.texi:
Added documentation about automatic repair of MyISAM tables
client/mysql.cc:
Remove usage of tempnam.
include/my_sys.h:
Added create_temp_file
include/myisam.h:
Fix for disk full on repair
myisam/mi_check.c:
Fix for disk full on repair
myisam/sort.c:
Fix for disk full on repair & removed usage of tempnam()
mysys/mf_cache.c:
Remove usage of tempnam()
mysys/mf_dirname.c:
Changed convert_dirname to return end 0
mysys/my_fopen.c:
Security fixes
mysys/my_tempnam.c:
remove blanks
readline/bind.c:
Portability fixes
readline/complete.c:
Portability fixes
readline/histexpand.c:
Portability fixes
readline/input.c:
Portability fixes
readline/search.c:
Portability fixes
readline/shell.c:
Portability fixes
readline/terminal.c:
Portability fixes
readline/tilde.c:
Portability fixes
readline/undo.c:
Portability fixes
regex/cname.h:
Portability fixes
regex/debug.c:
Portability fixes
regex/main.c:
Portability fixes
regex/regcomp.c:
Portability fixes
regex/regerror.c:
Portability fixes
sql/filesort.cc:
Remove dummy code
sql/ha_myisam.cc:
Automatic repair of MyISAM tables
sql/ha_myisam.h:
Automatic repair of MyISAM tables
sql/handler.cc:
Automatic repair of MyISAM tables
sql/handler.h:
Automatic repair of MyISAM tables
sql/key.cc:
Fix for UPDATE with key on timestamp column
sql/mysql_priv.h:
Automatic repair of MyISAM tables
sql/mysqld.cc:
Automatic repair of MyISAM tables & signal SIGHUP handling
sql/sql_base.cc:
Automatic repair of MyISAM tables
sql/sql_class.cc:
Automatic repair of MyISAM tables
sql/sql_class.h:
Fix for insert with reference to columns
sql/sql_insert.cc:
Fix for insert with reference to columns
sql/table.cc:
Automatic repair of MyISAM tables
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'regex/regcomp.c')
-rw-r--r-- | regex/regcomp.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/regex/regcomp.c b/regex/regcomp.c index 885c6a7cbc8..048f45ca71c 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -219,7 +219,7 @@ int stop; /* character this ERE should end at */ conc = HERE(); while (MORE() && (c = PEEK()) != '|' && c != stop) p_ere_exp(p); - REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */ + if(REQUIRE(HERE() != conc, REG_EMPTY)); /* require nonempty */ if (!EAT('|')) break; /* NOTE BREAK OUT */ @@ -266,7 +266,7 @@ register struct parse *p; pos = HERE(); switch (c) { case '(': - REQUIRE(MORE(), REG_EPAREN); + if(REQUIRE(MORE(), REG_EPAREN)); p->g->nsub++; subno = (sopno) p->g->nsub; if (subno < NPAREN) @@ -279,7 +279,7 @@ register struct parse *p; assert(p->pend[subno] != 0); } EMIT(ORPAREN, subno); - MUSTEAT(')', REG_EPAREN); + if(MUSTEAT(')', REG_EPAREN)); break; #ifndef POSIX_MISTAKE case ')': /* happens only if no current unmatched ( */ @@ -322,12 +322,12 @@ register struct parse *p; p_bracket(p); break; case '\\': - REQUIRE(MORE(), REG_EESCAPE); + if(REQUIRE(MORE(), REG_EESCAPE)); c = GETNEXT(); ordinary(p, c); break; case '{': /* okay as ordinary except if digit follows */ - REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT); + if(REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT)); /* FALLTHROUGH */ default: ordinary(p, c); @@ -343,7 +343,7 @@ register struct parse *p; return; /* no repetition, we're done */ NEXT(); - REQUIRE(!wascaret, REG_BADRPT); + if(REQUIRE(!wascaret, REG_BADRPT)); switch (c) { case '*': /* implemented as +? */ /* this case does not require the (y|) trick, noKLUDGE */ @@ -370,7 +370,7 @@ register struct parse *p; if (EAT(',')) { if (isdigit(PEEK())) { count2 = p_count(p); - REQUIRE(count <= count2, REG_BADBR); + if(REQUIRE(count <= count2, REG_BADBR)); } else /* single number with comma */ count2 = RE_INFINITY; } else /* just a single number */ @@ -379,7 +379,7 @@ register struct parse *p; if (!EAT('}')) { /* error heuristics */ while (MORE() && PEEK() != '}') NEXT(); - REQUIRE(MORE(), REG_EBRACE); + if(REQUIRE(MORE(), REG_EBRACE)); SETERROR(REG_BADBR); } break; @@ -402,7 +402,7 @@ static void p_str(p) register struct parse *p; { - REQUIRE(MORE(), REG_EMPTY); + if(REQUIRE(MORE(), REG_EMPTY)); while (MORE()) ordinary(p, GETNEXT()); } @@ -445,7 +445,7 @@ register int end2; /* second terminating character */ p->g->neol++; } - REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */ + if(REQUIRE(HERE() != start, REG_EMPTY)); /* require nonempty */ } /* @@ -470,7 +470,7 @@ int starordinary; /* is a leading * an ordinary character? */ assert(MORE()); /* caller should have ensured this */ c = GETNEXT(); if (c == '\\') { - REQUIRE(MORE(), REG_EESCAPE); + if(REQUIRE(MORE(), REG_EESCAPE)); c = BACKSL | (unsigned char)GETNEXT(); } switch (c) { @@ -500,7 +500,7 @@ int starordinary; /* is a leading * an ordinary character? */ assert(p->pend[subno] != 0); } EMIT(ORPAREN, subno); - REQUIRE(EATTWO('\\', ')'), REG_EPAREN); + if(REQUIRE(EATTWO('\\', ')'), REG_EPAREN)); break; case BACKSL|')': /* should not get here -- must be user */ case BACKSL|'}': @@ -530,7 +530,7 @@ int starordinary; /* is a leading * an ordinary character? */ p->g->backrefs = 1; break; case '*': - REQUIRE(starordinary, REG_BADRPT); + if(REQUIRE(starordinary, REG_BADRPT)); /* FALLTHROUGH */ default: ordinary(p, c &~ BACKSL); @@ -548,7 +548,7 @@ int starordinary; /* is a leading * an ordinary character? */ if (EAT(',')) { if (MORE() && isdigit(PEEK())) { count2 = p_count(p); - REQUIRE(count <= count2, REG_BADBR); + if(REQUIRE(count <= count2, REG_BADBR)); } else /* single number with comma */ count2 = RE_INFINITY; } else /* just a single number */ @@ -557,7 +557,7 @@ int starordinary; /* is a leading * an ordinary character? */ if (!EATTWO('\\', '}')) { /* error heuristics */ while (MORE() && !SEETWO('\\', '}')) NEXT(); - REQUIRE(MORE(), REG_EBRACE); + if(REQUIRE(MORE(), REG_EBRACE)); SETERROR(REG_BADBR); } } else if (c == (unsigned char)'$') /* $ (but not \$) ends it */ @@ -582,7 +582,7 @@ register struct parse *p; ndigits++; } - REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR); + if(REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR)); return(count); } @@ -622,7 +622,7 @@ register struct parse *p; p_b_term(p, cs); if (EAT('-')) CHadd(cs, '-'); - MUSTEAT(']', REG_EBRACK); + if(MUSTEAT(']', REG_EBRACK)); if (p->error != 0) /* don't mess things up further */ return; @@ -693,21 +693,21 @@ register cset *cs; switch (c) { case ':': /* character class */ NEXT2(); - REQUIRE(MORE(), REG_EBRACK); + if(REQUIRE(MORE(), REG_EBRACK)); c = PEEK(); - REQUIRE(c != '-' && c != ']', REG_ECTYPE); + if(REQUIRE(c != '-' && c != ']', REG_ECTYPE)); p_b_cclass(p, cs); - REQUIRE(MORE(), REG_EBRACK); - REQUIRE(EATTWO(':', ']'), REG_ECTYPE); + if(REQUIRE(MORE(), REG_EBRACK)); + if(REQUIRE(EATTWO(':', ']'), REG_ECTYPE)); break; case '=': /* equivalence class */ NEXT2(); - REQUIRE(MORE(), REG_EBRACK); + if(REQUIRE(MORE(), REG_EBRACK)); c = PEEK(); - REQUIRE(c != '-' && c != ']', REG_ECOLLATE); + if(REQUIRE(c != '-' && c != ']', REG_ECOLLATE)); p_b_eclass(p, cs); - REQUIRE(MORE(), REG_EBRACK); - REQUIRE(EATTWO('=', ']'), REG_ECOLLATE); + if(REQUIRE(MORE(), REG_EBRACK)); + if(REQUIRE(EATTWO('=', ']'), REG_ECOLLATE)); break; default: /* symbol, ordinary character, or range */ /* xxx revision needed for multichar stuff */ @@ -722,7 +722,7 @@ register cset *cs; } else finish = start; /* xxx what about signed chars here... */ - REQUIRE(start <= finish, REG_ERANGE); + if(REQUIRE(start <= finish, REG_ERANGE)); for (i = start; i <= finish; i++) CHadd(cs, i); break; @@ -790,13 +790,13 @@ register struct parse *p; { register char value; - REQUIRE(MORE(), REG_EBRACK); + if(REQUIRE(MORE(), REG_EBRACK)); if (!EATTWO('[', '.')) return(GETNEXT()); /* collating symbol */ value = p_b_coll_elem(p, '.'); - REQUIRE(EATTWO('.', ']'), REG_ECOLLATE); + if(REQUIRE(EATTWO('.', ']'), REG_ECOLLATE)); return(value); } |