Date: Thu, 9 Jan 2003 03:31:32 +0800 (CST) From: Yen-Ming Lee <leeym@utopia.leeym.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: yssu@CCCA.NCTU.edu.tw Subject: ports/46878: update port: chinese/tin Message-ID: <20030108193132.B14193EA7E1@utopia.leeym.com>
next in thread | raw e-mail | index | archive | help
>Number: 46878 >Category: ports >Synopsis: update port: chinese/tin >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Jan 08 11:40:01 PST 2003 >Closed-Date: >Last-Modified: >Originator: Yen-Ming Lee >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD utopia.leeym.com 4.7-STABLE FreeBSD 4.7-STABLE #8: Fri Jan 3 05:05:38 CST 2003 root@utopia.leeym.com:/mnt/obj/usr/src/sys/UTOPIA i386 >Description: upgrade and unbreak chinese/tin >How-To-Repeat: >Fix: chinese/tin/files/patch-lang.c is no longer needed. --- zh-tin.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/chinese/tin/Makefile,v retrieving revision 1.29 diff -u -r1.29 Makefile --- Makefile 9 May 2002 19:28:07 -0000 1.29 +++ Makefile 8 Jan 2003 19:29:05 -0000 @@ -15,12 +15,9 @@ EXTRA_PATCHES= ${.CURDIR}/files/patch-charset.c \ ${.CURDIR}/files/patch-cook.c \ ${.CURDIR}/files/patch-init.c \ - ${.CURDIR}/files/patch-lang.c \ ${.CURDIR}/files/patch-misc.c \ ${.CURDIR}/files/patch-page.c .include "${MASTERDIR}/Makefile" -CONFIGURE_ARGS+= --disable-curses \ - --without-ncurses \ - --with-mime-default-charset=big5 +CONFIGURE_ARGS+= --disable-locale --with-screen=termcap Index: files/patch-charset.c =================================================================== RCS file: /home/ncvs/ports/chinese/tin/files/patch-charset.c,v retrieving revision 1.4 diff -u -r1.4 patch-charset.c --- files/patch-charset.c 26 May 2002 05:41:45 -0000 1.4 +++ files/patch-charset.c 8 Jan 2003 19:29:05 -0000 @@ -1,20 +1,11 @@ ---- src/charset.c.orig Wed Apr 24 18:41:18 2002 -+++ src/charset.c Sun May 26 13:33:00 2002 -@@ -333,7 +333,7 @@ +--- src/charset.c.orig Wed Jan 8 23:12:11 2003 ++++ src/charset.c Wed Jan 8 23:12:28 2003 +@@ -443,7 +443,7 @@ + unsigned char *c; for (c = (unsigned char *) buf; *c; c++) { - #ifdef ENABLE_MBLEN -- if (!my_isprint(*c) && (t_len = mblen((const char *) c, MAX(2,MB_CUR_MAX))) <= 1) -+ if (!my_isprint(*c) && (t_len = mblen((const char *) c, MAX(2,MB_CUR_MAX))) <= 1 && *c != 27) +- if (!(my_isprint(*c) || *c == 8 || *c == 9 || *c == 10 || *c == 12 || *c == 13)) ++ if (!(my_isprint(*c) || *c == 8 || *c == 9 || *c == 10 || *c == 12 || *c == 13 || *c == 27)) *c = '?'; - while (--t_len > 0) - c++; -@@ -361,7 +361,7 @@ - - for (c = (unsigned char *)buf; *c; c++) { - #ifdef ENABLE_MBLEN -- if (!(my_isprint(*c) || *c == 8 || *c == 9 || *c == 10 || *c == 12 || *c == 13) && (t_len = mblen((const char *) c, MAX(2,MB_CUR_MAX))) <= 1) -+ if (!(my_isprint(*c) || *c == 8 || *c == 9 || *c == 10 || *c == 12 || *c == 13 || *c == 27 ) && (t_len = mblen((const char *) c, MAX(2,MB_CUR_MAX))) <= 1) - *c = '?'; - while (--t_len > 0) - c++; + } + #endif /* MULTIBYTE_ABLE && !NO_LOCALE */ Index: files/patch-cook.c =================================================================== RCS file: /home/ncvs/ports/chinese/tin/files/patch-cook.c,v retrieving revision 1.2 diff -u -r1.2 patch-cook.c --- files/patch-cook.c 25 Jun 2001 18:33:34 -0000 1.2 +++ files/patch-cook.c 8 Jan 2003 19:29:05 -0000 @@ -1,19 +1,20 @@ ---- src/cook.c.orig Mon Feb 19 22:59:13 2001 -+++ src/cook.c Mon Apr 30 02:57:21 2001 -@@ -109,7 +109,7 @@ - while (i++ < j) - *q++ = ' '; +--- src/cook.c.orig Sat Dec 14 22:31:23 2002 ++++ src/cook.c Tue Jan 7 23:53:11 2003 +@@ -106,7 +106,7 @@ + space--; + } - } else if (((*p) & 0xFF) < ' ' && *p != '\n') { /* Literal ctrl chars */ + } else if (((*p) & 0xFF) < ' ' && *p != '\n' && *p != 27) { /* Literal ctrl chars */ *q++ = '^'; - *q++ = ((*p) & 0xFF) + '@'; - if (*p == '\f') /* ^L detected */ -@@ -147,6 +147,7 @@ - vsnprintf (buf, sizeof(buf) - 1, fmt, ap); + if (--space) { + *q++ = ((*p) & 0xFF) + '@'; +@@ -793,7 +793,7 @@ + if (expand_ctrl_chars(to, line, sizeof(to) - 1, cook_width)) + flags |= C_CTRLL; /* Line contains form-feed */ - bufp = buf; -+ wrap_lines = FALSE; +- put_cooked(wrap_lines, flags, "%s", to); ++ put_cooked(wrap_lines && strncasecmp(tinrc.mm_local_charset, "Big5", 4), flags, "%s", to); + } /* while */ - for (p = bufp; *p; p++) { - if (*p == '\n' || ((overflow + p - bufp >= cCOLS) && wrap_lines)) { + /* Index: files/patch-init.c =================================================================== RCS file: /home/ncvs/ports/chinese/tin/files/patch-init.c,v retrieving revision 1.1 diff -u -r1.1 patch-init.c --- files/patch-init.c 24 Sep 2000 04:37:05 -0000 1.1 +++ files/patch-init.c 8 Jan 2003 19:29:05 -0000 @@ -1,6 +1,6 @@ ---- src/init.c.orig Sat Sep 23 15:52:42 2000 -+++ src/init.c Sat Sep 23 15:55:26 2000 -@@ -270,8 +270,8 @@ +--- src/init.c.orig Wed Jan 8 23:43:57 2003 ++++ src/init.c Wed Jan 8 23:45:36 2003 +@@ -289,8 +289,8 @@ 2, /* recent_time */ 32, /* groupname_max_length */ KILL_READ, /* kill_level */ @@ -10,17 +10,17 @@ + MIME_ENCODING_8BIT, /* post_mime_encoding */ POST_PROC_NONE, /* post_process */ REREAD_ACTIVE_FILE_SECS, /* reread_active_file_secs */ - SHOW_FROM_NAME, /* show_author */ -@@ -302,7 +302,7 @@ - 0, /* col_title (initialised later) */ - 2, /* word_h_display_marks */ + 1, /* scroll_lines */ +@@ -333,7 +333,7 @@ TRUE, /* word_highlight */ + 0, /* wrap_column */ + #ifdef HAVE_COLOR - FALSE, /* use_color */ + TRUE, /* use_color */ #endif /* HAVE_COLOR */ TRUE, /* add_posted_to_filter */ TRUE, /* advertising */ -@@ -335,11 +335,11 @@ +@@ -364,11 +364,11 @@ TRUE, /* keep_dead_articles */ TRUE, /* keep_posted_articles */ POSTED_FILE, /* keep_posted_articles_file */ Index: files/patch-misc.c =================================================================== RCS file: /home/ncvs/ports/chinese/tin/files/patch-misc.c,v retrieving revision 1.2 diff -u -r1.2 patch-misc.c --- files/patch-misc.c 8 Apr 2001 17:00:54 -0000 1.2 +++ files/patch-misc.c 8 Jan 2003 19:29:05 -0000 @@ -1,10 +1,13 @@ ---- src/misc.c.orig Thu Aug 3 21:49:22 2000 -+++ src/misc.c Mon Apr 9 00:47:20 2001 -@@ -1169,6 +1169,7 @@ - my_isprint ( - int c) - { -+ return (isprint(c) || (c>=0x40 && c<=0xfe)); - #ifndef NO_LOCALE - /* use locale */ - return isprint(c); +--- src/misc.c.orig Wed Jan 8 22:09:21 2003 ++++ src/misc.c Wed Jan 8 22:13:29 2003 +@@ -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)); ++ else if (!strncasecmp(txt_mime_charsets[tinrc.mm_network_charset], "EUC-", 4)) + return 1; + else /* KOI8-* and UTF-8 */ + return (isprint(c) || (c >= 0x80 && c <= 0xff)); Index: files/patch-page.c =================================================================== RCS file: /home/ncvs/ports/chinese/tin/files/patch-page.c,v retrieving revision 1.5 diff -u -r1.5 patch-page.c --- files/patch-page.c 26 May 2002 05:41:45 -0000 1.5 +++ files/patch-page.c 8 Jan 2003 19:29:05 -0000 @@ -1,31 +1,11 @@ ---- src/page.c.orig Sat Apr 27 23:04:47 2002 -+++ src/page.c Sun May 26 13:35:27 2002 -@@ -952,8 +952,8 @@ - if ((line = tin_fgets (file, FALSE)) == NULL) - break; /* ran out of message */ +--- src/page.c.orig Wed Jan 8 00:19:22 2003 ++++ src/page.c Wed Jan 8 00:19:47 2003 +@@ -980,7 +980,7 @@ + } + } else + # endif /* MULTIBYTE_ABLE && !NO_LOCALE */ +- if ((int) strlen(line) >= cCOLS) ++ if ((int) strlen(line) >= cCOLS && strncasecmp(tinrc.mm_local_charset, "Big5", 4)) + bytes = cCOLS; + line[bytes] = '\0'; -- if ((int) strlen(line) >= cCOLS) -- line[cCOLS] = '\0'; -+ if ((int) strlen(line) >= LEN) -+ line[LEN] = '\0'; - - /* - * rotN encoding on body and sig data only -@@ -971,7 +971,7 @@ - strip_line(line); - - #ifndef USE_CURSES -- snprintf (screen[i + scroll_region_top].col, cCOLS, "%s" cCRLF, line); -+ snprintf (screen[i + scroll_region_top].col, LEN, "%s" cCRLF, line); - #endif /* !USE_CURSES */ - - MoveCursor (i + scroll_region_top, 0); -@@ -1492,7 +1492,7 @@ - chunk += 50; - pgart.rawl = my_realloc((char *) pgart.rawl, sizeof(t_lineinfo) * chunk); - } -- } while ((fgets(buff, cCOLS + 1, pgart.raw)) != NULL); -+ } while ((fgets(buff, LEN + 1, pgart.raw)) != NULL); - - j--; - pgart.rawl = my_realloc((char *) pgart.rawl, sizeof(t_lineinfo) * j); --- zh-tin.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: 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?20030108193132.B14193EA7E1>