Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 718177 Details for
Bug 821264
Sort multi-byte patch incompatibilities
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to fix sort mb issues
sort-mb-fix.patch (text/plain), 4.44 KB, created by
Ondrej Oprala
on 2013-03-29 21:52:52 UTC
(
hide
)
Description:
Patch to fix sort mb issues
Filename:
MIME Type:
Creator:
Ondrej Oprala
Created:
2013-03-29 21:52:52 UTC
Size:
4.44 KB
patch
obsolete
>1997c1997 >< if (key->skipsblanks) >--- >> if (key->skipeblanks) >3119c3119 >< int diff; >--- >> int diff = 0; >3122a3123,3125 >> /* Ignore keys with start after end. */ >> if (a->keybeg - a->keylim > 0) >> return 0; >3124,3157d3126 >< for (;;) >< { >< char const *translate = key->translate; >< bool const *ignore = key->ignore; >< >< /* Find the lengths. */ >< size_t lena = lima <= texta ? 0 : lima - texta; >< size_t lenb = limb <= textb ? 0 : limb - textb; >< >< /* Actually compare the fields. */ >< if (key->random) >< diff = compare_random (texta, lena, textb, lenb); >< else if (key->numeric | key->general_numeric | key->human_numeric) >< { >< char savea = *lima, saveb = *limb; >< >< *lima = *limb = '\0'; >< diff = (key->numeric ? numcompare (texta, textb) >< : key->general_numeric ? general_numcompare (texta, textb) >< : human_numcompare (texta, textb)); >< *lima = savea, *limb = saveb; >< } >< else if (key->version) >< diff = filevercmp (texta, textb); >< else if (key->month) >< diff = getmonth (texta, lena, NULL) - getmonth (textb, lenb, NULL); >< else >< { >< if (ignore || translate) >< { >< char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1); >< char *copy_b = copy_a + lena + 1; >< size_t new_len_a, new_len_b; >< size_t i, j; >3225,3237c3194,3218 >< IGNORE_CHARS (new_len_a, lena, texta, copy_a, >< wc_a, mblength_a, state_a); >< IGNORE_CHARS (new_len_b, lenb, textb, copy_b, >< wc_b, mblength_b, state_b); >< diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b); >< free(copy_a); >< } >< else if (lena == 0) >< diff = - NONZERO (lenb); >< else if (lenb == 0) >< goto greater; >< else >< diff = xmemcoll (texta, lena, textb, lenb); >--- >> >> /* Actually compare the fields. */ >> >> for (;;) >> { >> /* Find the lengths. */ >> size_t lena = lima <= texta ? 0 : lima - texta; >> size_t lenb = limb <= textb ? 0 : limb - textb; >> >> char const *translate = key->translate; >> bool const *ignore = key->ignore; >> >> if (ignore || translate) >> { >> char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1); >> char *copy_b = copy_a + lena + 1; >> size_t new_len_a, new_len_b; >> size_t i, j; >> >> IGNORE_CHARS (new_len_a, lena, texta, copy_a, >> wc_a, mblength_a, state_a); >> IGNORE_CHARS (new_len_b, lenb, textb, copy_b, >> wc_b, mblength_b, state_b); >> texta = copy_a; textb = copy_b; >> lena = new_len_a; lenb = new_len_b; >3239a3221,3250 >> if (key->random) >> diff = compare_random (texta, lena, textb, lenb); >> else if (key->numeric | key->general_numeric | key->human_numeric) >> { >> char savea = *lima, saveb = *limb; >> >> *lima = *limb = '\0'; >> diff = (key->numeric ? numcompare (texta, textb) >> : key->general_numeric ? general_numcompare (texta, textb) >> : human_numcompare (texta, textb)); >> *lima = savea, *limb = saveb; >> } >> else if (key->version) >> diff = filevercmp (texta, textb); >> else if (key->month) >> diff = getmonth (texta, lena, NULL) - getmonth (textb, lenb, NULL); >> else if (lena == 0) >> diff = - NONZERO (lenb); >> else if (lenb == 0) >> diff = 1; >> else >> { >> diff = memcmp (texta, textb, MIN (lena,lenb)); >> if (!diff) >> diff = xmemcoll (texta, lena, textb, lenb); >> } >> >> if (ignore || translate) >> free (texta); >> >3268,3271d3278 >< return 0; >< >< greater: >< diff = 1; >3273c3280,3283 >< return key->reverse ? -diff : diff; >--- >> if (key && key->reverse) >> return -diff; >> else >> return diff; >3304,3311d3313 >< else if (hard_LC_COLLATE) >< { >< /* Note xmemcoll0 is a performance enhancement as >< it will not unconditionally write '\0' after the >< passed in buffers, which was seen to give around >< a 3% increase in performance for short lines. */ >< diff = xmemcoll0 (a->text, alen + 1, b->text, blen + 1); >< }
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 821264
:
584157
| 718177