public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/522] New: [regex] charset-based optimizations inhibited outside glibc
@ 2004-11-08 10:07 bonzini at gnu dot org
  2004-11-08 10:11 ` [Bug regex/522] " bonzini at gnu dot org
  2004-11-09  7:55 ` bonzini at gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: bonzini at gnu dot org @ 2004-11-08 10:07 UTC (permalink / raw)
  To: glibc-bugs-regex

The attached patch enables optimizations based on the active charset being
UTF-8, or a superset of ASCII, even when regex is being compiled outside glibc.

While a more complete solution would use gnulib and gettext's locale_charset
function, this would make central tools such as /bin/sed and /bin/awk require
external files.  Since regex does not need the charset name, but only to know if
it is UTF-8, we can use simple string matching.

The patch also discovers if the active charset is a superset of ASCII, checking
if btowc(c)==(wchar_t)c for 0<=c<=127.  This assumes that wchar_t encoding is
ISO10646, which always seems to be case.

-- 
           Summary: [regex] charset-based optimizations inhibited outside
                    glibc
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: bonzini at gnu dot org
        ReportedBy: bonzini at gnu dot org
                CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
                    bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug regex/522] [regex] charset-based optimizations inhibited outside glibc
  2004-11-08 10:07 [Bug regex/522] New: [regex] charset-based optimizations inhibited outside glibc bonzini at gnu dot org
@ 2004-11-08 10:11 ` bonzini at gnu dot org
  2004-11-09  7:55 ` bonzini at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: bonzini at gnu dot org @ 2004-11-08 10:11 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From bonzini at gnu dot org  2004-11-08 10:11 -------
Created an attachment (id=265)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=265&action=view)
patch to fix the problem


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug regex/522] [regex] charset-based optimizations inhibited outside glibc
  2004-11-08 10:07 [Bug regex/522] New: [regex] charset-based optimizations inhibited outside glibc bonzini at gnu dot org
  2004-11-08 10:11 ` [Bug regex/522] " bonzini at gnu dot org
@ 2004-11-09  7:55 ` bonzini at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: bonzini at gnu dot org @ 2004-11-09  7:55 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From bonzini at gnu dot org  2004-11-09 07:54 -------
Patch applied.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-09  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08 10:07 [Bug regex/522] New: [regex] charset-based optimizations inhibited outside glibc bonzini at gnu dot org
2004-11-08 10:11 ` [Bug regex/522] " bonzini at gnu dot org
2004-11-09  7:55 ` bonzini at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).