diff options
author | leeym <leeym@FreeBSD.org> | 2003-01-15 01:45:35 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2003-01-15 01:45:35 +0800 |
commit | 4cad54dc5a5dc66cdb3a66385eee25a31d306de8 (patch) | |
tree | 688c619ad38178079432be81a6261dbf4993431e /chinese | |
parent | c749914e4b04236369a645aef6760ae05728df00 (diff) | |
download | freebsd-ports-gnome-4cad54dc5a5dc66cdb3a66385eee25a31d306de8.tar.gz freebsd-ports-gnome-4cad54dc5a5dc66cdb3a66385eee25a31d306de8.tar.zst freebsd-ports-gnome-4cad54dc5a5dc66cdb3a66385eee25a31d306de8.zip |
1. take wrong sig dashes as correct ones when quoting (especially in tw.*)
2. fix a charset error (0x7f isn't valid char in Big5)
Noticed by: 1. zick@db.csie.ncu.edu.tw
2. daemon.bbs@kulu.twbbs.org
Approved by: maintainer
Diffstat (limited to 'chinese')
-rw-r--r-- | chinese/tin/files/patch-misc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chinese/tin/files/patch-misc.c b/chinese/tin/files/patch-misc.c index 34d259b5560f..f188c2301cba 100644 --- a/chinese/tin/files/patch-misc.c +++ b/chinese/tin/files/patch-misc.c @@ -1,12 +1,21 @@ --- src/misc.c.orig Wed Jan 8 22:09:21 2003 +++ src/misc.c Wed Jan 8 22:13:29 2003 +@@ -308,7 +308,7 @@ + */ + + while (fgets(buf, (int) sizeof(buf), fp_ip) != NULL) { +- if (!(tinrc.quote_style & QUOTE_SIGS) && !strcmp(buf, SIGDASHES) && !raw_data) ++ if (!(tinrc.quote_style & QUOTE_SIGS) && (!strcmp(buf, SIGDASHES) || !strcmp(buf, "--\n")) && !raw_data) + break; + if (strstr(prefix, "%s")) { /* initials wanted */ + if (buf[0] != '\n') { /* line is not empty */ @@ -1064,7 +1064,9 @@ return (isprint(c) || (c >= 0xa0 && c <= 0xff)); else if (!strncasecmp(txt_mime_charsets[tinrc.mm_network_charset], "ISO-2022", 8)) return (isprint(c) || (c == 0x1b)); - else if (!strncasecmp(txt_mime_charsets[tinrc.mm_network_charset], "EUC-", 4) || !strncasecmp(txt_mime_charsets[tinrc.mm_network_charset], "Big5", 4)) + else if (!strncasecmp(txt_mime_charsets[tinrc.mm_network_charset], "Big5", 4)) -+ return (isprint(c) || (c >= 0x40 && c <= 0xfe)); ++ return (isprint(c) || (c >= 0x40 && c <= 0xfe && c != 0x7f)); + else if (!strncasecmp(txt_mime_charsets[tinrc.mm_network_charset], "EUC-", 4)) return 1; else /* KOI8-* and UTF-8 */ |