Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 53797 Details for
Bug 85779
new grub 0.96 [-r3] ebuild with gfxboot support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new -> old sort for wildcards patch
grub-0.96-wildcard-sort.patch (text/plain), 1.23 KB, created by
Andrew Kirilenko
on 2005-03-18 09:19:57 UTC
(
hide
)
Description:
new -> old sort for wildcards patch
Filename:
MIME Type:
Creator:
Andrew Kirilenko
Created:
2005-03-18 09:19:57 UTC
Size:
1.23 KB
patch
obsolete
>diff -Nur grub-0.96.wildcard/stage2/stage2.c grub-0.96.wildcard2/stage2/stage2.c >--- grub-0.96.wildcard/stage2/stage2.c 2005-03-18 17:48:26.000000000 +0200 >+++ grub-0.96.wildcard2/stage2/stage2.c 2005-03-18 19:16:17.000000000 +0200 >@@ -1331,6 +1331,42 @@ > return wildcard_matches; > } > >+static int inplace_sort_nextint(char **p); >+ >+static int inplace_sort_nextint(char **p) >+{ >+ int i = 0; >+ >+ while (**p && **p < '0' && **p > '9') *p++; >+ if (!**p) return -1; >+ while (**p && **p >= '0' && **p <= '9') >+ { >+ i = i * 10 + **p - '0'; >+ *p++; >+ } >+ return i; >+} >+ >+static int inplace_sort_strcmp(char *l, char *r); >+ >+static int >+inplace_sort_strcmp(char *l, char *r) >+{ >+ char *lp = l; >+ char *rp = r; >+ int li, ri; >+ >+ do >+ { >+ li = inplace_sort_nextint(&lp); >+ ri = inplace_sort_nextint(&rp); >+ if (li > ri) return 1; >+ if (ri > li) return -1; >+ } >+ while (li != -1 || ri != -1); >+ return 0; >+} >+ > #define skip(str) ((str) + grub_strlen (str) + 1) > > static void inplace_sort (char *str, int len); >@@ -1354,7 +1390,7 @@ > > for (m = n; m >= 2; m--) > { >- if (grub_strcmp (s, t) > 0) >+ if (inplace_sort_strcmp (s, t) < 0) > { > int ls = skip (s) - s; > int lt = skip (t) - t;
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 85779
:
53787
|
53788
|
53789
|
53790
|
53791
|
53797
|
53798
|
58698
|
58699
|
58739