Date: Sat, 10 Feb 2001 09:20:03 -0800 (PST) From: "Akinori MUSHA" <knu@iDaemons.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/24930: Update port: graphics/gd to 1.8.4 Message-ID: <200102101720.f1AHK3t53276@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/24930; it has been noted by GNATS. From: "Akinori MUSHA" <knu@iDaemons.org> To: billf@FreeBSD.org Cc: freebsd-gnats-submit@FreeBSD.ORG, ichiro@ichiro.org, tkato@prontomail.ne.jp Subject: Re: ports/24930: Update port: graphics/gd to 1.8.4 Date: Sun, 11 Feb 2001 02:13:27 +0900 This looks fine to me, and I'd suggest we add MASTER_SITE_RINGSERVER to MASTER_SITES with MASTER_SITE_SUBDIR=graphics/gd. Also, it would be nice if we add two more patches to complete GD's Japanese charset support supplied by the maintainer of GD's Japanese support code. With it, we can make japanese/gd a slave port of graphics/gd that just defines "CFLAGS+=-DJISX0208". :) As those patches only affect the Japanese support portion we can safely add them, and judging from the past, they will be merged into GD in the future anyway. Bill, may I commit the update? -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "We're only at home when we're on the run, on the wing, on the fly" --- gdkanji.c.orig Fri Feb 2 05:23:56 2001 +++ gdkanji.c Wed Feb 7 20:59:08 2001 @@ -103,14 +103,18 @@ unsigned char *str; #endif { - static int whatcode; + static int whatcode = ASCII; + int oldcode = ASCII; int c, i; char *lang = NULL; c = '\1'; i = 0; - if (whatcode == 0) whatcode = ASCII; + if (whatcode != EUCORSJIS && whatcode != ASCII) { + oldcode = whatcode; + whatcode = ASCII; + } while ((whatcode == EUCORSJIS || whatcode == ASCII) && c != '\0') { if ((c = str[i++]) != '\0') { @@ -167,7 +171,7 @@ if ((c >= 64 && c <= 126) || (c >= 128 && c <= 160)) whatcode = SJIS; else - if (c >= 253 && c >= 254) whatcode = EUC; + if (c >= 253 && c <= 254) whatcode = EUC; else if (c >= 161 && c <= 252) whatcode = EUCORSJIS; } @@ -184,6 +188,8 @@ debug("Kanji code detected at %d byte.", i); #endif + if (whatcode == EUCORSJIS && oldcode != ASCII) whatcode = oldcode; + if (whatcode == EUCORSJIS) { if (getenv ("LC_ALL")) lang = getenv ("LC_ALL"); else @@ -310,7 +316,7 @@ error("invalid code specification: \"%s\" or \"%s\"", EUCSTR, code); #endif - strcpy(to, from); + ustrcpy(to, from); return; } @@ -328,7 +334,7 @@ else #endif error("something happen"); - strcpy(to, from); + ustrcpy(to, from); return; } @@ -526,11 +532,10 @@ t = (unsigned char *)gdMalloc(BUFSIZ); any2eucjp(t, s, BUFSIZ); - i = strlen(t); + i = strlen((const char *)t); gdFree(t); return i; } -#endif #ifdef DEBUG int main() @@ -543,7 +548,7 @@ while ( (c = fgetc(stdin)) != '\n' && i < BUFSIZ ) input[i++] = c; input[i] = '\0'; - printf("input : %d bytes\n", strlen(input)); + printf("input : %d bytes\n", strlen((const char *)input)); printf("output: %d bytes\n", strwidth(input)); output = (unsigned char *)gdMalloc(BUFSIZ); @@ -555,4 +560,5 @@ return 0; } +#endif #endif --- gdttf.c.orig Fri Feb 2 05:23:56 2001 +++ gdttf.c Wed Feb 7 20:57:34 2001 @@ -221,11 +221,10 @@ byte = *((unsigned char *) str); #ifdef JISX0208 if (0xA1 <= byte && byte <= 0xFE) { - int jiscode, ku, ten; + int ku, ten; - jiscode = 0x100 * (byte & 0x7F) + (str[1] & 0x7F); - ku = (jiscode >> 8) - 0x20; - ten = (jiscode % 256) - 0x20; + ku = (byte & 0x7F) - 0x20; + ten = (str[1] & 0x7F) - 0x20; if ( (ku < 1 || ku > 92) || (ten < 1 || ten > 94) ) { *chPtr = (Tcl_UniChar) byte; return 1; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102101720.f1AHK3t53276>