diff options
author | clive <clive@FreeBSD.org> | 2001-06-26 02:33:34 +0800 |
---|---|---|
committer | clive <clive@FreeBSD.org> | 2001-06-26 02:33:34 +0800 |
commit | b13a759873d00bc6daba1178122854418c1ace73 (patch) | |
tree | 07a4f3de685216811a98aad10a49d4d369d45792 /chinese/tin | |
parent | f48fbb0a00b907340a505fcb6c8aaaddc4e9783e (diff) | |
download | freebsd-ports-gnome-b13a759873d00bc6daba1178122854418c1ace73.tar.gz freebsd-ports-gnome-b13a759873d00bc6daba1178122854418c1ace73.tar.zst freebsd-ports-gnome-b13a759873d00bc6daba1178122854418c1ace73.zip |
Disable wrap_lines in put_cooked().
Enlarge buffer size for extra-long line.
This fixes core dump which is rarely happened.
PR: ports/26961
Submitted by: Yen-Ming Lee <leeym@cae.ce.ntu.edu.tw>
Diffstat (limited to 'chinese/tin')
-rw-r--r-- | chinese/tin/files/patch-cook.c | 12 | ||||
-rw-r--r-- | chinese/tin/files/patch-page.c | 34 |
2 files changed, 36 insertions, 10 deletions
diff --git a/chinese/tin/files/patch-cook.c b/chinese/tin/files/patch-cook.c index 7584b8b4cd65..2a554fae80f5 100644 --- a/chinese/tin/files/patch-cook.c +++ b/chinese/tin/files/patch-cook.c @@ -1,5 +1,5 @@ ---- src/cook.c.orig Sat Sep 23 14:34:20 2000 -+++ src/cook.c Sat Sep 23 14:34:41 2000 +--- 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++ = ' '; @@ -9,3 +9,11 @@ *q++ = '^'; *q++ = ((*p) & 0xFF) + '@'; if (*p == '\f') /* ^L detected */ +@@ -147,6 +147,7 @@ + vsnprintf (buf, sizeof(buf) - 1, fmt, ap); + + bufp = buf; ++ wrap_lines = FALSE; + + for (p = bufp; *p; p++) { + if (*p == '\n' || ((overflow + p - bufp >= cCOLS) && wrap_lines)) { diff --git a/chinese/tin/files/patch-page.c b/chinese/tin/files/patch-page.c index 10a7573c152f..c2e969bf5a3f 100644 --- a/chinese/tin/files/patch-page.c +++ b/chinese/tin/files/patch-page.c @@ -1,20 +1,38 @@ --- src/page.c.orig Wed Feb 21 03:18:52 2001 -+++ src/page.c Thu Apr 19 09:35:25 2001 ++++ src/page.c Mon Apr 30 03:28:06 2001 +@@ -844,7 +844,7 @@ + + search_line = curr_line; /* Reset search to start from top of display */ + +- buff = my_malloc(cCOLS+1); /* Need to account for \n */ ++ buff = my_malloc(LEN+1); /* Need to account for \n */ + + if (part == 0) { + ClearScreen(); @@ -867,7 +867,7 @@ curr = &artline[curr_line+i]; fseek (note_fp, curr->offset, SEEK_SET); - fgets (buff, cCOLS+1, note_fp); -+ fgets (buff, MAXPATHLEN, note_fp); ++ fgets (buff, LEN+1, note_fp); /* * rotN encoding on body and sig data only -@@ -1186,7 +1186,7 @@ +@@ -886,7 +886,7 @@ + strip_line(buff); - make_group_path (CURR_GROUP.name, group_path); + #ifndef USE_CURSES +- snprintf (screen[i+PAGE_HEADER].col, cCOLS, "%s" cCRLF, buff); ++ snprintf (screen[i+PAGE_HEADER].col, LEN, "%s" cCRLF, buff); + #endif /* !USE_CURSES */ -- switch (art_open (TRUE, &arts[new_respnum], group_path, &pgart)) { -+ switch (art_open (FALSE, &arts[new_respnum], group_path, &pgart)) { + MoveCursor (i+PAGE_HEADER, 0); +@@ -1346,7 +1346,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); - case ART_UNAVAILABLE: - art_mark_read (&CURR_GROUP, &arts[new_respnum]); + j--; + pgart.rawl = my_realloc((char *)pgart.rawl, sizeof(t_lineinfo) * j); |