diff options
| author | Michael Forney <mforney@mforney.org> | 2021-06-06 19:18:34 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2021-06-10 02:39:23 -0700 |
| commit | 780bd5f927ef20cada29665554d2d3968fd6f9dd (patch) | |
| tree | 21c16325810db1aa46e303e34201097788d8c408 /pkg/netbsd-curses/patch | |
| parent | 57dd586471765d2dcc81502dd7bfcc6aeab9a462 (diff) | |
netbsd-curses: Update to latest git
Diffstat (limited to 'pkg/netbsd-curses/patch')
| -rw-r--r-- | pkg/netbsd-curses/patch/0003-Revert-Fix-for-PR-lib-56224.patch | 80 | ||||
| -rw-r--r-- | pkg/netbsd-curses/patch/0004-Don-t-wrap-when-adding-past-last-line-in-non-scrolli.patch (renamed from pkg/netbsd-curses/patch/0003-Don-t-wrap-when-adding-past-last-line-in-non-scrolli.patch) | 62 | ||||
| -rw-r--r-- | pkg/netbsd-curses/patch/0005-Return-early-from-_cursesi_waddbytes-if-_cursesi_add.patch (renamed from pkg/netbsd-curses/patch/0004-Return-early-from-_cursesi_waddbytes-if-_cursesi_add.patch) | 4 |
3 files changed, 140 insertions, 6 deletions
diff --git a/pkg/netbsd-curses/patch/0003-Revert-Fix-for-PR-lib-56224.patch b/pkg/netbsd-curses/patch/0003-Revert-Fix-for-PR-lib-56224.patch new file mode 100644 index 00000000..f1a747e2 --- /dev/null +++ b/pkg/netbsd-curses/patch/0003-Revert-Fix-for-PR-lib-56224.patch @@ -0,0 +1,80 @@ +From 6e3a7ba743db0e7e22ef50d038690b3f1e46bba3 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Tue, 8 Jun 2021 20:00:53 -0700 +Subject: [PATCH] Revert "Fix for PR lib/56224" + +This reverts commit deeb100e95f3d981cbe4ece4744fe6c34a5a2f05. +--- + lib/libcurses/addbytes.c | 38 +------------------------------------- + 1 file changed, 1 insertion(+), 37 deletions(-) + +diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c +index a678939f..9fd917ca 100644 +--- a/lib/libcurses/addbytes.c ++++ b/lib/libcurses/addbytes.c +@@ -1,4 +1,4 @@ +-/* $NetBSD: addbytes.c,v 1.55 2021/06/06 05:06:44 blymn Exp $ */ ++/* $NetBSD: addbytes.c,v 1.54 2021/02/13 14:30:37 rillig Exp $ */ + + /* + * Copyright (c) 1987, 1993, 1994 +@@ -161,15 +161,6 @@ _cursesi_waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr, + } else if (wc == 0) { + break; + } +- +- /* if scrollok is false and we are at the bottom of +- * screen and this character would take us past the +- * end of the line then we are done. +- */ +- if ((win->curx + n >= win->maxx) && +- (!(win->flags & __SCROLLOK)) && +- (win->cury == win->scr_b)) +- break; + #ifdef DEBUG + __CTRACE(__CTRACE_INPUT, + "ADDBYTES WIDE(0x%x [%s], %x) at (%d, %d), ate %d bytes\n", +@@ -214,19 +205,6 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c, + case '\t': + tabsize = win->screen->TABSIZE; + newx = tabsize - (*x % tabsize); +- /* if at the bottom of the window and +- not allowed to scroll then just do +- what we can */ +- if ((*y == win->scr_b) && +- !(win->flags & __SCROLLOK)) { +- if ((*lp)->flags & __ISPASTEOL) { +- return OK; +- } +- +- if (*x + newx > win->maxx - 1) +- newx = win->maxx - *x - 1; +- } +- + for (i = 0; i < newx; i++) { + if (waddbytes(win, blank, 1) == ERR) + return ERR; +@@ -379,20 +357,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x, + cc.attributes = win->wattr; + tabsize = win->screen->TABSIZE; + newx = tabsize - (*x % tabsize); +- +- /* if at the bottom of the window and +- not allowed to scroll then just do +- what we can */ +- if ((*y == win->scr_b) && +- !(win->flags & __SCROLLOK)) { +- if ((*lnp)->flags & __ISPASTEOL) { +- return OK; +- } +- +- if (*x + newx > win->maxx - 1) +- newx = win->maxx - *x - 1; +- } +- + for (i = 0; i < newx; i++) { + if (wadd_wch(win, &cc) == ERR) + return ERR; +-- +2.31.1 + diff --git a/pkg/netbsd-curses/patch/0003-Don-t-wrap-when-adding-past-last-line-in-non-scrolli.patch b/pkg/netbsd-curses/patch/0004-Don-t-wrap-when-adding-past-last-line-in-non-scrolli.patch index 4ea2e85e..d692e9ee 100644 --- a/pkg/netbsd-curses/patch/0003-Don-t-wrap-when-adding-past-last-line-in-non-scrolli.patch +++ b/pkg/netbsd-curses/patch/0004-Don-t-wrap-when-adding-past-last-line-in-non-scrolli.patch @@ -1,4 +1,4 @@ -From 5b5cbce58a6ff85174abbdf57ba56db501fe816d Mon Sep 17 00:00:00 2001 +From de7a1acf3168a35c19a569cc7f6f572c39e96c82 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Thu, 3 Jun 2021 00:32:57 -0700 Subject: [PATCH] Don't wrap when adding past last line in non-scrolling window @@ -18,13 +18,67 @@ the cursor to the last column (to match ncurses behavior). [0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/intov.html#tag_001_004_002_002 --- - lib/libcurses/addbytes.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) + lib/libcurses/addbytes.c | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c -index 9fd917c..7f88487 100644 +index 9fd917ca..e52dc310 100644 --- a/lib/libcurses/addbytes.c +++ b/lib/libcurses/addbytes.c +@@ -232,8 +232,6 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c, + #endif + + if (char_interp && ((*lp)->flags & __ISPASTEOL)) { +- *x = 0; +- (*lp)->flags &= ~__ISPASTEOL; + if (*y == win->scr_b) { + #ifdef DEBUG + __CTRACE(__CTRACE_INPUT, +@@ -246,6 +244,8 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c, + } else { + (*y)++; + } ++ *x = 0; ++ (*lp)->flags &= ~__ISPASTEOL; + *lp = win->alines[*y]; + if (c == '\n') + return OK; +@@ -341,8 +341,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x, + return OK; + case L'\n': + wclrtoeol(win); +- *x = 0; +- (*lnp)->flags &= ~__ISPASTEOL; + if (*y == win->scr_b) { + if (!(win->flags & __SCROLLOK)) + return ERR; +@@ -350,6 +348,8 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x, + } else { + (*y)++; + } ++ *x = 0; ++ (*lnp)->flags &= ~__ISPASTEOL; + return OK; + case L'\t': + cc.vals[0] = L' '; +@@ -395,8 +395,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x, + } + /* check for new line first */ + if (char_interp && ((*lnp)->flags & __ISPASTEOL)) { +- *x = 0; +- (*lnp)->flags &= ~__ISPASTEOL; + if (*y == win->scr_b) { + if (!(win->flags & __SCROLLOK)) + return ERR; +@@ -404,6 +402,8 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x, + } else { + (*y)++; + } ++ *x = 0; ++ (*lnp)->flags &= ~__ISPASTEOL; + (*lnp) = win->alines[*y]; + lp = &win->alines[*y]->line[*x]; + } @@ -459,7 +459,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x, if (newx > *(*lnp)->lastchp) *(*lnp)->lastchp = newx; diff --git a/pkg/netbsd-curses/patch/0004-Return-early-from-_cursesi_waddbytes-if-_cursesi_add.patch b/pkg/netbsd-curses/patch/0005-Return-early-from-_cursesi_waddbytes-if-_cursesi_add.patch index 8d62f0fb..1b573cf4 100644 --- a/pkg/netbsd-curses/patch/0004-Return-early-from-_cursesi_waddbytes-if-_cursesi_add.patch +++ b/pkg/netbsd-curses/patch/0005-Return-early-from-_cursesi_waddbytes-if-_cursesi_add.patch @@ -1,4 +1,4 @@ -From afe19e9450015024e51f3e694c866fc1e1c20c8f Mon Sep 17 00:00:00 2001 +From c977aac84ce6c6e2737a8a072cb4116b8ee4278e Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Thu, 3 Jun 2021 00:42:45 -0700 Subject: [PATCH] Return early from _cursesi_waddbytes if _cursesi_addwchar @@ -11,7 +11,7 @@ window, in which case the rest of the string should be truncated. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c -index 7f88487..6d50bdf 100644 +index e52dc310..5d783df8 100644 --- a/lib/libcurses/addbytes.c +++ b/lib/libcurses/addbytes.c @@ -132,7 +132,7 @@ _cursesi_waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr, |
