#include <stdio.h>#include <ctype.h>#include "regexp.h"Include dependency graph for regexp.c:

Go to the source code of this file.
Defines | |
| #define | regerror(a) error("regular expression error: %s", a) |
| #define | MAGIC 0234 |
| #define | END 0 |
| #define | BOL 1 |
| #define | EOL 2 |
| #define | ANY 3 |
| #define | ANYOF 4 |
| #define | ANYBUT 5 |
| #define | BRANCH 6 |
| #define | BACK 7 |
| #define | EXACTLY 8 |
| #define | NOTHING 9 |
| #define | STAR 10 |
| #define | PLUS 11 |
| #define | OPEN 20 |
| #define | CLOSE 30 |
| #define | OP(p) (*(p)) |
| #define | NEXT(p) (((*((p)+1)&0377)<<8) + *((p)+2)&0377) |
| #define | OPERAND(p) ((p) + 3) |
| #define | UCHARAT(p) ((int)*(p)&CHARBITS) |
| #define | FAIL(m) { regerror(m); return(NULL); } |
| #define | ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') |
| #define | META "^$.[()|?+*\\" |
| #define | HASWIDTH 01 |
| #define | SIMPLE 02 |
| #define | SPSTART 04 |
| #define | WORST 0 |
| #define | STATIC static |
Functions | |
| STATIC ushort * | reg () |
| STATIC ushort * | regbranch () |
| STATIC ushort * | regpiece () |
| STATIC ushort * | regatom () |
| STATIC ushort * | regnode () |
| STATIC ushort * | regnext () |
| STATIC void | regc () |
| STATIC void | reginsert () |
| STATIC void | regtail () |
| STATIC void | regoptail () |
| STATIC int | Strcspn () |
| regexp * | regcomp (ushort *exp) |
| static ushort * | reg (int paren, int *flagp) |
| static ushort * | regbranch (int *flagp) |
| static ushort * | regpiece (int *flagp) |
| static ushort * | regatom (int *flagp) |
| IsDigid (ushort c) | |
| static ushort * | regnode (ushort op) |
| static void | regc (ushort b) |
| static void | reginsert (ushort op, ushort *opnd) |
| static void | regtail (ushort *p, ushort *val) |
| static void | regoptail (ushort *p, ushort *val) |
| STATIC int | regtry () |
| STATIC int | regmatch () |
| STATIC int | regrepeat () |
| int | regexec (regexp *prog, ushort *string, int bolflag) |
| static int | regtry (regexp *prog, ushort *string) |
| static int | regmatch (ushort *prog) |
| static int | regrepeat (ushort *p) |
| static ushort * | regnext (ushort *p) |
| static int | Strcspn (ushort *s1, unsigned char *s2) |
| isthere (ushort *s, ushort c) | |
| ushort * | Strchr (ushort *s, ushort c) |
| Strncmp (ushort *s, ushort *t, n) | |
| Strlen (ushort *s) | |
| char * | mkpat (char *s) |
| match (regexp *p, char *s) | |
| sjtok (ushort *s, unsigned char *t) | |
| ktosj (unsigned char *s, ushort *t) | |
| regsub (ushort *dst, regexp *exp, ushort *src, ushort *pat, pos) | |
| Sub (char *u, char *exp, str, char *s, char *t, pos) | |
Variables | |
| int | r_start |
| int | r_length |
| static ushort * | regparse |
| static int | regnpar |
| static ushort | regdummy |
| static ushort * | regcode |
| static long | regsize |
| static ushort * | reginput |
| static ushort * | regbol |
| static ushort ** | regstartp |
| static ushort ** | regendp |
| ushort | kbuf [BUFSIZ] |
| static ushort | kbuf1 [BUFSIZ] |
| static ushort | kbuf2 [BUFSIZ] |
|
|
Definition at line 85 of file regexp.c. Referenced by clock_task(), deadlock(), do_init(), driver_task(), f_intr_wait(), f_reset(), get_work(), main(), makepat(), mini_notify(), mini_receive(), mini_send(), omatch(), osdep_eth_init(), proc_name(), prrecv(), regatom(), regmatch(), regrepeat(), seek(), sr_rec(), start_motor(), sys_call(), sys_task(), and w_intr_wait(). |
|
|
Definition at line 87 of file regexp.c. Referenced by regatom(), regmatch(), and regrepeat(). |
|
|
Definition at line 86 of file regexp.c. Referenced by regatom(), regmatch(), and regrepeat(). |
|
|
|
|
|
Definition at line 83 of file regexp.c. Referenced by fast(), makepat(), matchs(), omatch(), regatom(), regcomp(), regmatch(), slow(), and step(). |
|
|
Definition at line 88 of file regexp.c. Referenced by regbranch(), regmatch(), regoptail(), and regpiece(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 90 of file regexp.c. Referenced by regatom(), regcomp(), regmatch(), and regrepeat(). |
|
|
Definition at line 145 of file regexp.c. Referenced by access_standards(), comp_array(), gettoken(), open_alot(), read_standards(), reg(), regatom(), regcomp(), regpiece(), servxcheck(), system(), test03(), test04(), test05(), test06(), test07(), test08(), test09(), test10(), test11(), tmpstart(), try_open(), and write_standards(). |
|
|
Definition at line 152 of file regexp.c. Referenced by reg(), regatom(), regbranch(), and regpiece(). |
|
|
Definition at line 146 of file regexp.c. Referenced by regatom(), and regpiece(). |
|
|
Definition at line 43 of file regexp.c. Referenced by _catch(), _cls(), _cre(), _efl(), _ini(), _opn(), _rf(), _wdw(), _wf(), bcpio_id(), bcpio_wr(), buff(), cache2file(), cpio_wr(), diag(), file2cache(), free(), initfl(), malloc(), nobuff(), pcreat(), popen(), regcomp(), regexec(), regsub(), and swapon(). |
|
|
Definition at line 147 of file regexp.c. Referenced by regatom(). |
|
|
|
|
|
|
|
|
Definition at line 130 of file regexp.c. Referenced by backref(), dissect(), dofwd(), findmust(), p_simp_re(), pluscount(), regcomp(), regmatch(), regnext(), regoptail(), regrepeat(), and step(). |
|
|
|
|
|
Definition at line 132 of file regexp.c. Referenced by regcomp(), regmatch(), regoptail(), and regrepeat(). |
|
|
Definition at line 93 of file regexp.c. Referenced by _do_compare(), bc_divide(), bc_multiply(), bc_sub(), evaluate(), expr_operator(), get_list(), get_string(), modify(), new_num(), num2long(), prin1(), regmatch(), and regpiece(). |
|
|
Definition at line 35 of file regexp.c. Referenced by regexec(), regmatch(), regrepeat(), regsub(), and rep_add(). |
|
|
Definition at line 153 of file regexp.c. Referenced by lookup(), regatom(), and regpiece(). |
|
|
Definition at line 154 of file regexp.c. Referenced by reg(), regatom(), regbranch(), regcomp(), and regpiece(). |
|
|
Definition at line 92 of file regexp.c. Referenced by check_string(), evaluate(), get_list(), get_string(), prin1(), regmatch(), and regpiece(). |
|
|
|
|
|
|
|
|
Definition at line 155 of file regexp.c. Referenced by regatom(), regbranch(), and regpiece(). |
|
|
Definition at line 599 of file regexp.c. Referenced by regatom(). |
|
||||||||||||
|
Definition at line 1281 of file regexp.c. Referenced by regmatch(), and regrepeat(). |
|
||||||||||||
|
Definition at line 1357 of file regexp.c. Referenced by Sub(). |
|
||||||||||||
|
|
|
|
Definition at line 1325 of file regexp.c. |
|
||||||||||||
|
Definition at line 286 of file regexp.c. References CLOSE, END, FAIL, flags, HASWIDTH, NSUBEXP, NULL, OPEN, regbranch(), regnext(), regnode(), regnpar, regoptail(), regparse, regtail(), SPSTART, and ushort. |
|
|
|
|
|
Definition at line 461 of file regexp.c. References ANY, ANYBUT, ANYOF, BOL, c, d, EOL, EXACTLY, FAIL, flags, HASWIDTH, IsDigid(), ISMULT, META, NULL, reg, regc(), regnode(), regparse, SIMPLE, SPSTART, Strcspn(), UCHARAT, ushort, and WORST. |
|
|
Referenced by regpiece(). |
|
|
Definition at line 358 of file regexp.c. References BRANCH, flags, HASWIDTH, NOTHING, NULL, regnode(), regparse, regpiece(), regtail(), SPSTART, ushort, and WORST. |
|
|
Referenced by reg(). |
|
|
|
|
|
|
|
|
Definition at line 200 of file regexp.c. References BOL, emalloc(), END, EXACTLY, FAIL, flags, L, MAGIC, NULL, OP, OPERAND, r, reg, regc(), regcode, regdummy, regnext(), regnpar, regparse, regsize, SPSTART, Strlen(), and ushort. |
|
||||||||||||||||
|
Definition at line 748 of file regexp.c. References MAGIC, NULL, regerror, regtry(), s, Strchr(), Strncmp(), and ushort. |
|
||||||||||||
|
|
|
|
Referenced by regpiece(). |
|
|
Definition at line 852 of file regexp.c. References ANY, ANYBUT, ANYOF, BACK, BOL, BRANCH, CLOSE, END, EOL, EXACTLY, fprintf(), isthere(), min, next, nextch(), NOTHING, NULL, OP, OPEN, OPERAND, PLUS, regerror, regmatch(), regnext(), regrepeat(), STAR, stderr, Strchr(), Strlen(), Strncmp(), and ushort. |
|
|
Referenced by regmatch(). |
|
|
|
|
|
Referenced by reg(), regcomp(), regmatch(), and regtail(). |
|
|
|
|
|
Referenced by reg(), regatom(), regbranch(), and regpiece(). |
|
||||||||||||
|
Definition at line 709 of file regexp.c. References BRANCH, NULL, OP, OPERAND, regdummy, and regtail(). |
|
|
Referenced by reg(), and regpiece(). |
|
|
Definition at line 397 of file regexp.c. References BACK, BRANCH, FAIL, flags, HASWIDTH, ISMULT, next, NOTHING, NULL, PLUS, regatom(), reginsert(), regnode(), regoptail(), regparse, regtail(), SIMPLE, SPSTART, STAR, ushort, and WORST. |
|
|
Referenced by regbranch(). |
|
|
Definition at line 1040 of file regexp.c. References ANY, ANYBUT, ANYOF, count, EXACTLY, isthere(), OP, OPERAND, regerror, Strlen(), and ushort. |
|
|
Referenced by regmatch(). |
|
||||||||||||||||||||||||
|
Definition at line 1369 of file regexp.c. References exp, i, loc1, loc2, MAGIC, n, NULL, pos, regerror, regexec, t, and ushort. |
|
||||||||||||
|
|
|
|
Referenced by reg(), regbranch(), regoptail(), and regpiece(). |
|
||||||||||||
|
|
|
|
Referenced by regexec(). |
|
||||||||||||
|
Definition at line 1345 of file regexp.c. References isKanji(). |
|
||||||||||||
|
Definition at line 1298 of file regexp.c. References NULL. Referenced by regexec(), and regmatch(). |
|
||||||||||||
|
|
|
|
Referenced by regatom(). |
|
|
Definition at line 1313 of file regexp.c. References i. Referenced by regcomp(), regmatch(), and regrepeat(). |
|
||||||||||||||||
|
Definition at line 1306 of file regexp.c. References n. Referenced by regexec(), and regmatch(). |
|
||||||||||||||||||||||||||||
|
Definition at line 1421 of file regexp.c. References i, kbuf, ktosj(), pos, r, regcomp, regsub, sfree(), and sjtok(). Referenced by Subst(). |
|
|
Definition at line 1322 of file regexp.c. Referenced by exrefresh(), initscr(), resume_curses(), starttcap(), Sub(), wqrefresh(), and wrefresh(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 163 of file regexp.c. Referenced by regc(), regcomp(), reginsert(), and regnode(). |
|
|
Definition at line 162 of file regexp.c. Referenced by regc(), regcomp(), reginsert(), regnext(), regnode(), regoptail(), and regtail(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 160 of file regexp.c. Referenced by reg(), regatom(), regbranch(), regcomp(), and regpiece(). |
|
|
Definition at line 164 of file regexp.c. Referenced by regc(), regcomp(), reginsert(), and regnode(). |
|
|
|
1.4.6