diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-31 22:56:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-31 22:56:24 +0000 |
commit | 5929563ff20245bbaa1b3ca2f4bfcee623ac6fb5 (patch) | |
tree | 15b1ff0a40462018402078788148c0c99d188429 /posix | |
parent | 3075e0e37c0e7cc2e6eb518c409e0769d058ed4b (diff) | |
download | glibc-5929563ff20245bbaa1b3ca2f4bfcee623ac6fb5.tar.gz |
Update.cvs/libc-ud-970331
1997-04-01 00:37 Ulrich Drepper <drepper@cygnus.com>
* math/Makefile: Prevent inlining for test-{float,double,longdouble}.
* math/libm-test.c (initialize): Make strings unique and force
values to memory.
* posix/regex.c: Debug debugging code.
* sysdeps/i386/asm-syntax.h: Define `L' macro to emit correct
syntax for local label.
* sysdeps/i386/add_n.S: Use correct local label syntax for the
binary format.
* sysdeps/i386/addmul_1.S: Likewise.
* sysdeps/i386/lshift.S: Likewise.
* sysdeps/i386/memchr.S: Likewise.
* sysdeps/i386/memset.S: Likewise.
* sysdeps/i386/mul_1.S: Likewise.
* sysdeps/i386/rshift.S: Likewise.
* sysdeps/i386/stpcpy.S: Likewise.
* sysdeps/i386/stpncpy.S: Likewise.
* sysdeps/i386/strchr.S: Likewise.
* sysdeps/i386/strcspn.S: Likewise.
* sysdeps/i386/strlen.S: Likewise.
* sysdeps/i386/strpbrk.S: Likewise.
* sysdeps/i386/strrchr.S: Likewise.
* sysdeps/i386/strspn.S: Likewise.
* sysdeps/i386/strtok.S: Likewise.
* sysdeps/i386/sub_n.S: Likewise.
* sysdeps/i386/submul_1.S: Likewise.
* sysdeps/i386/i486/strcat.S: Likewise.
* sysdeps/i386/i486/strlen.S: Likewise.
* sysdeps/i386/i586/add_n.S: Likewise.
* sysdeps/i386/i586/addmul_1.S: Likewise.
* sysdeps/i386/i586/lshift.S: Likewise.
* sysdeps/i386/i586/memset.S: Likewise.
* sysdeps/i386/i586/mul_1.S: Likewise.
* sysdeps/i386/i586/rshift.S: Likewise.
* sysdeps/i386/i586/strchr.S: Likewise.
* sysdeps/i386/i586/strlen.S: Likewise.
* sysdeps/i386/i586/sub_n.S: Likewise.
* sysdeps/i386/i586/submul_1.S: Likewise.
* sysdeps/stub/s_log2l.c: Correct function name.
* time/africa: Updated from ADO tzdata1997e.
* time/aantarctica: Likewise.
* time/asia: Likewise.
* time/australia: Likewise.
* time/europe: Likewise.
* time/northamerica: Likewise.
* time/southamerica: Likewise.
* time/private.h: Updated from ADO tzcode1997d.
* time/scheck.c: Likewise.
1997-03-31 12:42 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/powerpc/Dist: Add kernel_*.h files.
1997-03-23 01:41 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/strlen.s: Rewrote for more speed.
* string/tst-strlen.c: Also test various string alignments.
1997-03-19 06:11 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/unix/sysv/linux/powerpc/statbuf.h: Removed.
* sysdeps/unix/sysv/linux/powerpc/kernel_stat.h: Added.
* sysdeps/powerpc/dl-machine.h (ELF_PREFERRED_ADDRESS): Assume
program base address is 0x01800000 if we can't otherwise tell what
it is.
(elf_machine_rela): Replace `assertion failed' with real error
messages.
* sysdeps/powerpc/dl-machine.h: More comments, more GNU indenting.
Put in extra parentheses to make explicit the relative precedence
of + and >>.
* sysdeps/powerpc/bsd-setjmp.S: Add `__setjmp' symbol so the tests
pass.
* sysdeps/powerpc/clone.S: Rewrite. Probably still doesn't work.
* sysdeps/unix/sysv/linux/powerpc/sys/sysdep.h: Use .section "text"
instead of .text.
1997-03-31 02:28 Ulrich Drepper <drepper@cygnus.com>
* misc/tst-tsearch.c: Don't write to stderr, write to stdout
instead.
* inet/inet_ntoa.c (inet_ntoa): Complete rewrite. Now uses
thread-specific memory in multi-threaded programs.
* sysdeps/stub/s_exp2.c: New file. Stub version for exp2 function.
* sysdeps/stub/s_exp2f.c: New file.
* sysdeps/stub/s_exp2l.c: New file.
Reported by a sun <asun@zoology.washington.edu>.
* sysdeps/unix/sysv/linux/netatalk/atalk.h: Rename to...
* sysdeps/unix/sysv/linux/netatalk/at.h: ...this.
Suggested by a sun <asun@zoology.washington.edu>.
1997-03-30 14:53 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/netinet/ip_icmp.h: Add former contents
of <netinet/icmp.h>.
Patch by a sun <asun@zoology.washington.edu>.
* sysdeps/powerpc/strlen.S: Added.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/regex.c | 67 |
1 files changed, 55 insertions, 12 deletions
diff --git a/posix/regex.c b/posix/regex.c index 202ee19c86..b7c82f633e 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -618,6 +618,7 @@ print_partial_compiled_pattern (start, end) unsigned char *end; { int mcnt, mcnt2; + unsigned char *p1; unsigned char *p = start; unsigned char *pend = end; @@ -759,20 +760,23 @@ print_partial_compiled_pattern (start, end) case succeed_n: extract_number_and_incr (&mcnt, &p); + p1 = p + mcnt; extract_number_and_incr (&mcnt2, &p); - printf ("/succeed_n to %d, %d times", p + mcnt - start, mcnt2); + printf ("/succeed_n to %d, %d times", p1 - start, mcnt2); break; case jump_n: extract_number_and_incr (&mcnt, &p); + p1 = p + mcnt; extract_number_and_incr (&mcnt2, &p); - printf ("/jump_n to %d, %d times", p + mcnt - start, mcnt2); + printf ("/jump_n to %d, %d times", p1 - start, mcnt2); break; case set_number_at: extract_number_and_incr (&mcnt, &p); + p1 = p + mcnt; extract_number_and_incr (&mcnt2, &p); - printf ("/set_number_at location %d to %d", p + mcnt - start, mcnt2); + printf ("/set_number_at location %d to %d", p1 - start, mcnt2); break; case wordbound: @@ -850,7 +854,8 @@ print_compiled_pattern (bufp) unsigned char *buffer = bufp->buffer; print_partial_compiled_pattern (buffer, buffer + bufp->used); - printf ("%d bytes used/%d bytes allocated.\n", bufp->used, bufp->allocated); + printf ("%ld bytes used/%ld bytes allocated.\n", + bufp->used, bufp->allocated); if (bufp->fastmap_accurate && bufp->fastmap) { @@ -865,7 +870,7 @@ print_compiled_pattern (bufp) printf ("no_sub: %d\t", bufp->no_sub); printf ("not_bol: %d\t", bufp->not_bol); printf ("not_eol: %d\t", bufp->not_eol); - printf ("syntax: %d\n", bufp->syntax); + printf ("syntax: %lx\n", bufp->syntax); /* Perhaps we should print the translate table? */ } @@ -878,7 +883,7 @@ print_double_string (where, string1, size1, string2, size2) int size1; int size2; { - unsigned this_char; + int this_char; if (where == NULL) printf ("(null)"); @@ -1245,7 +1250,7 @@ typedef struct DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ PUSH_FAILURE_INT (highest_active_reg); \ \ - DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \ + DEBUG_PRINT2 (" Pushing pattern 0x%x:\n", pattern_place); \ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ PUSH_FAILURE_POINTER (pattern_place); \ \ @@ -1329,7 +1334,7 @@ typedef struct DEBUG_PRINT1 ("'\n"); \ \ pat = (unsigned char *) POP_FAILURE_POINTER (); \ - DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \ + DEBUG_PRINT2 (" Popping pattern 0x%x:\n", pat); \ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ \ /* Restore register info. */ \ @@ -3882,7 +3887,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) dend = end_match_2; } - DEBUG_PRINT1 ("The compiled pattern is: "); + DEBUG_PRINT1 ("The compiled pattern is:\n"); DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend); DEBUG_PRINT1 ("The string to match is: `"); DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); @@ -3893,7 +3898,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) fails at this starting point in the input data. */ for (;;) { +#ifdef _LIBC + DEBUG_PRINT2 ("\n%p: ", p); +#else DEBUG_PRINT2 ("\n0x%x: ", p); +#endif if (p == pend) { /* End of pattern means we might have succeeded. */ @@ -4472,7 +4481,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); EXTRACT_NUMBER_AND_INCR (mcnt, p); +#ifdef _LIBC + DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt); +#else DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt); +#endif PUSH_FAILURE_POINT (p + mcnt, NULL, -2); break; @@ -4495,7 +4508,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT1 ("EXECUTING on_failure_jump"); EXTRACT_NUMBER_AND_INCR (mcnt, p); +#ifdef _LIBC + DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt); +#else DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt); +#endif /* If this on_failure_jump comes right before a group (i.e., the original * applied to a group), save the information @@ -4708,16 +4725,25 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) dummy_low_reg, dummy_high_reg, reg_dummy, reg_dummy, reg_info_dummy); } - /* Note fall through. */ + unconditional_jump: +#ifdef _LIBC + DEBUG_PRINT2 ("\n%p: ", p); +#else + DEBUG_PRINT2 ("\n0x%x: ", p); +#endif + /* Note fall through. */ /* Unconditionally jump (without popping any failure points). */ case jump: - unconditional_jump: EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt); p += mcnt; /* Do the jump. */ +#ifdef _LIBC + DEBUG_PRINT2 ("(to %p).\n", p); +#else DEBUG_PRINT2 ("(to 0x%x).\n", p); +#endif break; @@ -4766,11 +4792,19 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) mcnt--; p += 2; STORE_NUMBER_AND_INCR (p, mcnt); - DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p, mcnt); +#ifdef _LIBC + DEBUG_PRINT3 (" Setting %p to %d.\n", p - 2, mcnt); +#else + DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - 2, mcnt); +#endif } else if (mcnt == 0) { +#ifdef _LIBC + DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n", p+2); +#else DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2); +#endif p[2] = (unsigned char) no_op; p[3] = (unsigned char) no_op; goto on_failure; @@ -4786,6 +4820,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) { mcnt--; STORE_NUMBER (p + 2, mcnt); +#ifdef _LIBC + DEBUG_PRINT3 (" Setting %p to %d.\n", p + 2, mcnt); +#else + DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + 2, mcnt); +#endif goto unconditional_jump; } /* If don't have to jump any more, skip over the rest of command. */ @@ -4800,7 +4839,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) EXTRACT_NUMBER_AND_INCR (mcnt, p); p1 = p + mcnt; EXTRACT_NUMBER_AND_INCR (mcnt, p); +#ifdef _LIBC + DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt); +#else DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt); +#endif STORE_NUMBER (p1, mcnt); break; } |