summaryrefslogtreecommitdiff
path: root/graphics/gd/files/patch-gdkanji.c
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2003-08-18 16:15:10 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2003-08-18 16:15:10 +0000
commitefb928619b234d49b326a13f59a6e2ee354bf902 (patch)
treec62bd82140831e81442480b9cefc699e0c08f08d /graphics/gd/files/patch-gdkanji.c
parentUpdate to 5.0.8. As reported by Paul Szabo in (diff)
o Main modification
graphics/gd(based on 1.8.4) -> graphics/gd1 graphics/gd2(based on 2.0.15) -> graphics/gd graphics/p5-GD(based on 1.41) -> graphics/p5-GD1 graphics/p5-GD2(based on 2.07) -> graphics/p5-GD japanese/gd -> japanese/gd1 japanese/gd2 -> japanese/gd o Include some feature WITH_XPM(w/, w/o WITHOUT_X11) o Chase this modification o Fix build error [1] PR: ports/54540 Submitted by: Ports Fury Approved by: maintainer (blanket) Reported by: bento via kris [1]
Diffstat (limited to 'graphics/gd/files/patch-gdkanji.c')
-rw-r--r--graphics/gd/files/patch-gdkanji.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/graphics/gd/files/patch-gdkanji.c b/graphics/gd/files/patch-gdkanji.c
deleted file mode 100644
index 2162a7e95c38..000000000000
--- a/graphics/gd/files/patch-gdkanji.c
+++ /dev/null
@@ -1,87 +0,0 @@
---- 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