summaryrefslogtreecommitdiffstats
path: root/http/lynx/ncurses.patch
diff options
context:
space:
mode:
Diffstat (limited to 'http/lynx/ncurses.patch')
-rw-r--r--http/lynx/ncurses.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/http/lynx/ncurses.patch b/http/lynx/ncurses.patch
deleted file mode 100644
index 89ba214399..0000000000
--- a/http/lynx/ncurses.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-# Based on upstream https://github.com/ThomasDickey/lynx-snapshots/commit/f0b064b47bfa046da941f5029cdc1b4c851553ce
-diff -Naur lynx2-8-8.orig/src/LYCurses.c lynx2-8-8/src/LYCurses.c
---- lynx2-8-8.orig/src/LYCurses.c 2018-03-08 19:48:25.407769464 -0800
-+++ lynx2-8-8/src/LYCurses.c 2018-03-08 19:51:20.086585678 -0800
-@@ -1695,7 +1695,7 @@
- void lynx_nl2crlf(int normal GCC_UNUSED)
- {
- #if defined(NCURSES_VERSION_PATCH) && defined(SET_TTY) && defined(TERMIOS) && defined(ONLCR)
-- static TTY saved_tty;
-+ static struct termios saved_tty;
- static int did_save = FALSE;
- static int waiting = FALSE;
- static int can_fix = TRUE;
-@@ -1704,8 +1704,10 @@
- if (cur_term == 0) {
- can_fix = FALSE;
- } else {
-- saved_tty = cur_term->Nttyb;
-+ tcgetattr(fileno(stdout), &saved_tty);
- did_save = TRUE;
-+ if ((saved_tty.c_oflag & ONLCR))
-+ can_fix = FALSE;
- #if NCURSES_VERSION_PATCH < 20010529
- /* workaround for optimizer bug with nonl() */
- if ((tigetstr("cud1") != 0 && *tigetstr("cud1") == '\n')
-@@ -1717,14 +1719,17 @@
- if (can_fix) {
- if (normal) {
- if (!waiting) {
-- cur_term->Nttyb.c_oflag |= ONLCR;
-+ struct termios alter_tty = saved_tty;
-+ alter_tty.c_oflag |= ONLCR;
-+ tcsetattr(fileno(stdout), TCSAFLUSH, &alter_tty);
-+ def_prog_mode();
- waiting = TRUE;
- nonl();
- }
- } else {
- if (waiting) {
-- cur_term->Nttyb = saved_tty;
-- SET_TTY(fileno(stdout), &saved_tty);
-+ tcsetattr(fileno(stdout), TCSAFLUSH, &saved_tty);
-+ def_prog_mode();
- waiting = FALSE;
- nl();
- LYrefresh();
-diff -Naur lynx2-8-8.orig/src/LYStrings.c lynx2-8-8/src/LYStrings.c
---- lynx2-8-8.orig/src/LYStrings.c 2018-03-08 19:48:25.403769514 -0800
-+++ lynx2-8-8/src/LYStrings.c 2018-03-08 19:52:23.681790628 -0800
-@@ -1004,12 +1004,13 @@
- {
- char name[BUFSIZ];
- int code;
-+ TERMTYPE *tp = (TERMTYPE *) (cur_term);
-
- LYStrNCpy(name, first, len);
- if ((code = lookup_tiname(name, strnames)) >= 0
- || (code = lookup_tiname(name, strfnames)) >= 0) {
-- if (cur_term->type.Strings[code] != 0) {
-- LYStrNCpy(*result, cur_term->type.Strings[code], (final - *result));
-+ if (tp->Strings[code] != 0) {
-+ LYStrNCpy(*result, tp->Strings[code], (final - *result));
- (*result) += strlen(*result);
- }
- }