Deleted Added
full compact
b.c (125601) b.c (146299)
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 451 unchanged lines hidden (view full) ---

460{
461 int s, ns;
462 uschar *p = (uschar *) p0;
463
464 s = f->reset ? makeinit(f,0) : f->initstat;
465 if (f->out[s])
466 return(1);
467 do {
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 451 unchanged lines hidden (view full) ---

460{
461 int s, ns;
462 uschar *p = (uschar *) p0;
463
464 s = f->reset ? makeinit(f,0) : f->initstat;
465 if (f->out[s])
466 return(1);
467 do {
468 assert(*p < NCHARS);
468 if ((ns = f->gototab[s][*p]) != 0)
469 s = ns;
470 else
471 s = cgoto(f, s, *p);
472 if (f->out[s])
473 return(1);
474 } while (*p++ != 0);
475 return(0);

--- 14 unchanged lines hidden (view full) ---

490 }
491 patbeg = (char *) p;
492 patlen = -1;
493 do {
494 q = p;
495 do {
496 if (f->out[s]) /* final state */
497 patlen = q-p;
469 if ((ns = f->gototab[s][*p]) != 0)
470 s = ns;
471 else
472 s = cgoto(f, s, *p);
473 if (f->out[s])
474 return(1);
475 } while (*p++ != 0);
476 return(0);

--- 14 unchanged lines hidden (view full) ---

491 }
492 patbeg = (char *) p;
493 patlen = -1;
494 do {
495 q = p;
496 do {
497 if (f->out[s]) /* final state */
498 patlen = q-p;
499 assert(*q < NCHARS);
498 if ((ns = f->gototab[s][*q]) != 0)
499 s = ns;
500 else
501 s = cgoto(f, s, *q);
502 if (s == 1) { /* no transition */
503 if (patlen >= 0) {
504 patbeg = (char *) p;
505 return(1);

--- 41 unchanged lines hidden (view full) ---

547 s = f->initstat;
548 }
549 patlen = -1;
550 while (*p) {
551 q = p;
552 do {
553 if (f->out[s]) /* final state */
554 patlen = q-p;
500 if ((ns = f->gototab[s][*q]) != 0)
501 s = ns;
502 else
503 s = cgoto(f, s, *q);
504 if (s == 1) { /* no transition */
505 if (patlen >= 0) {
506 patbeg = (char *) p;
507 return(1);

--- 41 unchanged lines hidden (view full) ---

549 s = f->initstat;
550 }
551 patlen = -1;
552 while (*p) {
553 q = p;
554 do {
555 if (f->out[s]) /* final state */
556 patlen = q-p;
557 assert(*q < NCHARS);
555 if ((ns = f->gototab[s][*q]) != 0)
556 s = ns;
557 else
558 s = cgoto(f, s, *q);
559 if (s == 1) { /* no transition */
560 if (patlen > 0) {
561 patbeg = (char *) p;
562 return(1);

--- 266 unchanged lines hidden (view full) ---

829 }
830}
831
832int cgoto(fa *f, int s, int c)
833{
834 int i, j, k;
835 int *p, *q;
836
558 if ((ns = f->gototab[s][*q]) != 0)
559 s = ns;
560 else
561 s = cgoto(f, s, *q);
562 if (s == 1) { /* no transition */
563 if (patlen > 0) {
564 patbeg = (char *) p;
565 return(1);

--- 266 unchanged lines hidden (view full) ---

832 }
833}
834
835int cgoto(fa *f, int s, int c)
836{
837 int i, j, k;
838 int *p, *q;
839
840 assert(c == HAT || c < NCHARS);
837 while (f->accept >= maxsetvec) { /* guessing here! */
838 maxsetvec *= 4;
839 setvec = (int *) realloc(setvec, maxsetvec * sizeof(int));
840 tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int));
841 if (setvec == 0 || tmpset == 0)
842 overflo("out of space in cgoto()");
843 }
844 for (i = 0; i <= f->accept; i++)

--- 91 unchanged lines hidden ---
841 while (f->accept >= maxsetvec) { /* guessing here! */
842 maxsetvec *= 4;
843 setvec = (int *) realloc(setvec, maxsetvec * sizeof(int));
844 tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int));
845 if (setvec == 0 || tmpset == 0)
846 overflo("out of space in cgoto()");
847 }
848 for (i = 0; i <= f->accept; i++)

--- 91 unchanged lines hidden ---