Bug 72312 - re_match doesn't use the start parameter
re_match doesn't use the start parameter
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
: 74359 (view as bug list)
Depends On:
Blocks: 67218 79579
  Show dependency treegraph
Reported: 2002-08-22 18:24 EDT by jeroen
Modified: 2016-11-24 09:59 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-10 10:17:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jeroen 2002-08-22 18:24:10 EDT
Anjuta2 has a default editor called "glimmer" (glimmer in gnomecvs). glimmer
uses regexps (/usr/include/regex.h) to highlight code in the GtkTextView.

This works fine in RedHat 7.x and limbo2.

Not anymore in null.


There seem to be some changes made since limbo2 that change the behavior of the
regex functions. What's the story here? Is this a bug?

I haven't yet had time to determine what the problem is exactly (plan to do that
if you guys have no idea why this happens).
Comment 1 jeroen 2002-08-26 08:21:33 EDT
OK, i understand from Owen that the regex implementation has been totally
rewritten for glibc 2.3 so it supports multibyte (unicode) characters. Excellent
stuff. This should allow for correct highlighting of UTF-8 stuff like .schemas

After looking through my code (gtksourceview) and adding some debug output, i've
located the bug.

re_match doesn't use the start parameter.

I call re_match on a string, with a start index of 3 and a length. Now, it will
return the number of characters it has matched, but starting from the beginning
of the string, _not_ the start index. So i'm highlighting an extra 3 characters
in this case (which is incorrect).
Comment 2 Jakub Jelinek 2002-08-26 09:18:11 EDT
Comment 3 Jakub Jelinek 2002-09-02 11:24:05 EDT
Should be fixed in glibc-2.2.90-27 and later.
Comment 4 Jakub Jelinek 2002-09-21 13:59:10 EDT
*** Bug 74359 has been marked as a duplicate of this bug. ***
Comment 5 Jay Turner 2003-01-10 10:17:36 EST
This appears to be fixed.  Someone reopen if they are still having problems.

Note You need to log in before you can comment on or make changes to this bug.