aboutsummaryrefslogtreecommitdiff
path: root/chinese/tin
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2003-01-12 00:54:48 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2003-01-12 00:54:48 +0000
commitc86021a7f3c4371439e9e557fe90038007597703 (patch)
tree4b1736a4971730900e5dd5744ea61bf65221ed7b /chinese/tin
parent09793a1ea137f6ee1c0b1d6c2489412b4acaa10f (diff)
downloadports-c86021a7f3c4371439e9e557fe90038007597703.tar.gz
ports-c86021a7f3c4371439e9e557fe90038007597703.zip
Notes
Diffstat (limited to 'chinese/tin')
-rw-r--r--chinese/tin/Makefile8
-rw-r--r--chinese/tin/files/patch-attrib.c14
-rw-r--r--chinese/tin/files/patch-charset.c25
-rw-r--r--chinese/tin/files/patch-cook.c27
-rw-r--r--chinese/tin/files/patch-init.c16
-rw-r--r--chinese/tin/files/patch-lang.c11
-rw-r--r--chinese/tin/files/patch-misc.c23
-rw-r--r--chinese/tin/files/patch-page.c40
8 files changed, 70 insertions, 94 deletions
diff --git a/chinese/tin/Makefile b/chinese/tin/Makefile
index 8c31c6eac737..b8e03d577ef5 100644
--- a/chinese/tin/Makefile
+++ b/chinese/tin/Makefile
@@ -12,15 +12,13 @@ MASTERDIR= ${.CURDIR}/../../news/tin
MAINTAINER= yssu@CCCA.NCTU.edu.tw
-EXTRA_PATCHES= ${.CURDIR}/files/patch-charset.c \
+EXTRA_PATCHES= ${.CURDIR}/files/patch-attrib.c \
+ ${.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
diff --git a/chinese/tin/files/patch-attrib.c b/chinese/tin/files/patch-attrib.c
new file mode 100644
index 000000000000..c533ac661a4a
--- /dev/null
+++ b/chinese/tin/files/patch-attrib.c
@@ -0,0 +1,14 @@
+--- src/attrib.c.orig Thu Jan 9 10:55:14 2003
++++ src/attrib.c Thu Jan 9 10:56:45 2003
+@@ -626,6 +626,11 @@
+ fprintf(fp, "delete_tmp_files=ON\n");
+ fprintf(fp, "followup_to=poster\n\n");
+
++ fprintf(fp, _("# in *sources* set post process type to shar\n"));
++ fprintf(fp, "scope=tw*\n");
++ fprintf(fp, "mm_network_charset=Big5\n");
++ fprintf(fp, "undeclared_charset=Big5\n");
++
+ #if 0 /* FIXME */
+ for_each_group(i) {
+ group = &active[i];
diff --git a/chinese/tin/files/patch-charset.c b/chinese/tin/files/patch-charset.c
index 26d37da3a4a9..eb7350b47aac 100644
--- a/chinese/tin/files/patch-charset.c
+++ b/chinese/tin/files/patch-charset.c
@@ -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 */
diff --git a/chinese/tin/files/patch-cook.c b/chinese/tin/files/patch-cook.c
index 2a554fae80f5..53dfe5a73045 100644
--- a/chinese/tin/files/patch-cook.c
+++ b/chinese/tin/files/patch-cook.c
@@ -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)) {
+ /*
diff --git a/chinese/tin/files/patch-init.c b/chinese/tin/files/patch-init.c
index 9c0e57b253a0..253aa5b772c3 100644
--- a/chinese/tin/files/patch-init.c
+++ b/chinese/tin/files/patch-init.c
@@ -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 */
diff --git a/chinese/tin/files/patch-lang.c b/chinese/tin/files/patch-lang.c
deleted file mode 100644
index 3e19cf7c75e9..000000000000
--- a/chinese/tin/files/patch-lang.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/lang.c.orig Fri May 10 03:18:34 2002
-+++ src/lang.c Fri May 10 03:18:45 2002
-@@ -849,7 +849,7 @@
- "ISO-8859-7", "ISO-8859-9", "ISO-8859-10", "ISO-8859-13", "ISO-8859-14",
- "ISO-8859-15", "ISO-8859-16",
- "KOI8-RU", "KOI8-R", "KOI8-U",
-- "EUC-CN", "EUC-JP", "EUC-KR", "EUC-TW",
-+ "EUC-CN", "EUC-JP", "EUC-KR", "EUC-TW", "BIG5",
- "ISO-2022-CN", "ISO-2022-CN-EXT", "ISO-2022-JP", "ISO-2022-JP-1",
- "ISO-2022-JP-2", "ISO-2022-KR",
- "UTF-8"
diff --git a/chinese/tin/files/patch-misc.c b/chinese/tin/files/patch-misc.c
index 9757ea96c584..34d259b5560f 100644
--- a/chinese/tin/files/patch-misc.c
+++ b/chinese/tin/files/patch-misc.c
@@ -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));
diff --git a/chinese/tin/files/patch-page.c b/chinese/tin/files/patch-page.c
index 827e4f7135e0..2e3635d8b60d 100644
--- a/chinese/tin/files/patch-page.c
+++ b/chinese/tin/files/patch-page.c
@@ -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);