diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2001-10-14 20:23:23 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2001-10-14 20:23:23 +0000 |
commit | d52a7a070add221e4ebbfa9d2241139427eda139 (patch) | |
tree | 6afe41fa2782b1c8f3c0d578ae364a34d21e24b6 /graphics/gd2/files/patch-gdkanji.c | |
parent | Add another check for duplicate installations of same port. Only (diff) |
Upgrade to 2.0.1 (gd2 was repocopied from gd). The name of the
installed library is still libgd, which is on purpose. It looks
like very little needs to be done after all to make current gd
users switch, so gd2 will, hopefully, quickly become gd again.
XPM will be used by default now, unless WITHOUT_XPM is declared.
When XPM can be built without installing X11, this is seems
sensible.
Notes
Notes:
svn path=/head/; revision=48767
Diffstat (limited to 'graphics/gd2/files/patch-gdkanji.c')
-rw-r--r-- | graphics/gd2/files/patch-gdkanji.c | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/graphics/gd2/files/patch-gdkanji.c b/graphics/gd2/files/patch-gdkanji.c deleted file mode 100644 index 2162a7e95c38..000000000000 --- a/graphics/gd2/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 |