FreeBSD Bugzilla – Attachment 78845 Details for
Bug 113343
[patch] grep(1) outputs NOT-matched lines (with multi-bytes characters)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
search.c.diff
search.c.diff (text/plain), 1.41 KB, created by
Kazuaki ODA
on 2007-06-04 19:30:05 UTC
(
hide
)
Description:
search.c.diff
Filename:
MIME Type:
Creator:
Kazuaki ODA
Created:
2007-06-04 19:30:05 UTC
Size:
1.41 KB
patch
obsolete
>--- gnu/usr.bin/grep/search.c.orig Wed Mar 22 05:51:35 2006 >+++ gnu/usr.bin/grep/search.c Tue Jun 5 01:09:24 2007 >@@ -400,9 +400,12 @@ > } > > if (mlen == (size_t) -2) >- /* Offset points inside multibyte character: >- * no good. */ >- break; >+ { >+ /* Offset points inside multibyte character: >+ * no good. */ >+ memset (&mbs, '\0', sizeof (mbstate_t)); >+ break; >+ } > > beg += mlen; > bytes_left -= mlen; >@@ -462,9 +465,12 @@ > } > > if (mlen == (size_t) -2) >- /* Offset points inside multibyte character: >- * no good. */ >- break; >+ { >+ /* Offset points inside multibyte character: >+ * no good. */ >+ memset (&mbs, '\0', sizeof (mbstate_t)); >+ break; >+ } > > beg += mlen; > bytes_left -= mlen; >@@ -925,15 +931,21 @@ > } > > if (mlen == (size_t) -2) >- /* Offset points inside multibyte character: no good. */ >- break; >+ { >+ /* Offset points inside multibyte character: no good. */ >+ memset (&mbs, '\0', sizeof (mbstate_t)); >+ break; >+ } > > beg += mlen; > bytes_left -= mlen; > } > > if (bytes_left) >- continue; >+ { >+ beg += bytes_left; >+ continue; >+ } > } > else > #endif /* MBS_SUPPORT */ >@@ -1051,6 +1063,7 @@ > { > /* Offset points inside multibyte character: > * no good. */ >+ memset (&mbs, '\0', sizeof (mbstate_t)); > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 113343
: 78845