CRUX PPC
A lightweight GNU/Linux distribution for PowerPC!
Subversion Repository
Parent Directory
|
Revision Log
Revision 2 -
(show annotations)
Sun Oct 4 13:24:59 2009 UTC (3 years, 7 months ago) by cjg
File size: 1207 byte(s)
Sun Oct 4 13:24:59 2009 UTC (3 years, 7 months ago) by cjg
File size: 1207 byte(s)
importing core
| 1 | gcc 4 fix; addresses "trailing garbage" output. |
| 2 | |
| 3 | Taken from gentoo's ebuild |
| 4 | |
| 5 | diff -u kbd-1.12/src/psffontop.c kbd-1.12/src/psffontop.c |
| 6 | --- kbd-1.12/src/psffontop.c 2005-03-12 00:48:30.075310872 +0100 |
| 7 | +++ kbd-1.12/src/psffontop.c 2005-05-14 10:49:59.000000000 +0900 |
| 8 | @@ -59,7 +59,6 @@ |
| 9 | |
| 10 | static unsigned int |
| 11 | assemble_ucs2(char **inptr, int cnt) { |
| 12 | - unsigned char **in = (unsigned char **) inptr; |
| 13 | unsigned int u1, u2; |
| 14 | |
| 15 | if (cnt < 2) { |
| 16 | @@ -68,8 +67,8 @@ |
| 17 | exit(EX_DATAERR); |
| 18 | } |
| 19 | |
| 20 | - u1 = *(*in)++; |
| 21 | - u2 = *(*in)++; |
| 22 | + u1 = (unsigned char)*(*inptr)++; |
| 23 | + u2 = (unsigned char)*(*inptr)++; |
| 24 | return (u1 | (u2 << 8)); |
| 25 | } |
| 26 | |
| 27 | @@ -110,7 +109,6 @@ |
| 28 | */ |
| 29 | static void |
| 30 | get_uni_entry(char **inptr, char **endptr, struct unicode_list *up, int utf8) { |
| 31 | - unsigned char **in = (unsigned char **) inptr; |
| 32 | unsigned char uc; |
| 33 | unicode unichar; |
| 34 | int inseq = 0; |
| 35 | @@ -126,14 +124,14 @@ |
| 36 | exit(EX_DATAERR); |
| 37 | } |
| 38 | if (utf8) { |
| 39 | - uc = *(*in)++; |
| 40 | + uc = *(*inptr)++; |
| 41 | if (uc == PSF2_SEPARATOR) |
| 42 | break; |
| 43 | if (uc == PSF2_STARTSEQ) { |
| 44 | inseq = 1; |
| 45 | continue; |
| 46 | } |
| 47 | - --(*in); |
| 48 | + --(*inptr); |
| 49 | unichar = assemble_utf8(inptr, *endptr - *inptr); |
| 50 | } else { |
| 51 | unichar = assemble_ucs2(inptr, *endptr - *inptr); |