summaryrefslogtreecommitdiff
path: root/libc/misc/regex/regex_old.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-18 23:07:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-18 23:07:26 +0200
commit93f8a2e834eed69aff7ef3be8c2baba14bab0658 (patch)
tree347b5239f26d3b5f526fffcf7afe151e83124a61 /libc/misc/regex/regex_old.c
parent21730caa6647f645974e132ca8afec79b4eeab2b (diff)
convert // comments to /**/; remove empty #if/#endif pairs. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libc/misc/regex/regex_old.c')
-rw-r--r--libc/misc/regex/regex_old.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index fc51610c8..3550698d3 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -6035,17 +6035,18 @@ byte_re_match_2_internal (
{ /* No. So allocate them with malloc. We need one
extra element beyond `num_regs' for the `-1' marker
GNU code uses. */
-// regex specs say:
-// "If REGS_UNALLOCATED, allocate space in the regs structure
-// for max(RE_NREGS, re_nsub + 1) groups"
-// but real-world testsuites fail with contrived examples
-// with lots of groups.
-// I don't see why we can't just allocate exact needed number.
-// Incidentally, it makes RE_NREGS unused.
-//
-// regs->num_regs = MAX (RE_NREGS, num_regs + 1); - VERY WRONG
-// regs->num_regs = MIN (RE_NREGS, num_regs + 1); - slightly less wrong
-// good one which passes uclibc test/regex/tst-regex2.c:
+/* regex specs say:
+ * "If REGS_UNALLOCATED, allocate space in the regs structure
+ * for max(RE_NREGS, re_nsub + 1) groups"
+ * but real-world testsuites fail with contrived examples
+ * with lots of groups.
+ * I don't see why we can't just allocate exact needed number.
+ * Incidentally, it makes RE_NREGS unused.
+ *
+ * regs->num_regs = MAX (RE_NREGS, num_regs + 1); - VERY WRONG
+ * regs->num_regs = MIN (RE_NREGS, num_regs + 1); - slightly less wrong
+ * good one which passes uclibc test/regex/tst-regex2.c:
+ */
regs->num_regs = num_regs + 1;
regs->start = TALLOC (regs->num_regs, regoff_t);
regs->end = TALLOC (regs->num_regs, regoff_t);