logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0003-Revert-Fix-for-PR-lib-56224.patch (2451B)


  1. From 6e3a7ba743db0e7e22ef50d038690b3f1e46bba3 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Tue, 8 Jun 2021 20:00:53 -0700
  4. Subject: [PATCH] Revert "Fix for PR lib/56224"
  5. This reverts commit deeb100e95f3d981cbe4ece4744fe6c34a5a2f05.
  6. ---
  7. lib/libcurses/addbytes.c | 38 +-------------------------------------
  8. 1 file changed, 1 insertion(+), 37 deletions(-)
  9. diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c
  10. index a678939f..9fd917ca 100644
  11. --- a/lib/libcurses/addbytes.c
  12. +++ b/lib/libcurses/addbytes.c
  13. @@ -1,4 +1,4 @@
  14. -/* $NetBSD: addbytes.c,v 1.55 2021/06/06 05:06:44 blymn Exp $ */
  15. +/* $NetBSD: addbytes.c,v 1.54 2021/02/13 14:30:37 rillig Exp $ */
  16. /*
  17. * Copyright (c) 1987, 1993, 1994
  18. @@ -161,15 +161,6 @@ _cursesi_waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr,
  19. } else if (wc == 0) {
  20. break;
  21. }
  22. -
  23. - /* if scrollok is false and we are at the bottom of
  24. - * screen and this character would take us past the
  25. - * end of the line then we are done.
  26. - */
  27. - if ((win->curx + n >= win->maxx) &&
  28. - (!(win->flags & __SCROLLOK)) &&
  29. - (win->cury == win->scr_b))
  30. - break;
  31. #ifdef DEBUG
  32. __CTRACE(__CTRACE_INPUT,
  33. "ADDBYTES WIDE(0x%x [%s], %x) at (%d, %d), ate %d bytes\n",
  34. @@ -214,19 +205,6 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c,
  35. case '\t':
  36. tabsize = win->screen->TABSIZE;
  37. newx = tabsize - (*x % tabsize);
  38. - /* if at the bottom of the window and
  39. - not allowed to scroll then just do
  40. - what we can */
  41. - if ((*y == win->scr_b) &&
  42. - !(win->flags & __SCROLLOK)) {
  43. - if ((*lp)->flags & __ISPASTEOL) {
  44. - return OK;
  45. - }
  46. -
  47. - if (*x + newx > win->maxx - 1)
  48. - newx = win->maxx - *x - 1;
  49. - }
  50. -
  51. for (i = 0; i < newx; i++) {
  52. if (waddbytes(win, blank, 1) == ERR)
  53. return ERR;
  54. @@ -379,20 +357,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
  55. cc.attributes = win->wattr;
  56. tabsize = win->screen->TABSIZE;
  57. newx = tabsize - (*x % tabsize);
  58. -
  59. - /* if at the bottom of the window and
  60. - not allowed to scroll then just do
  61. - what we can */
  62. - if ((*y == win->scr_b) &&
  63. - !(win->flags & __SCROLLOK)) {
  64. - if ((*lnp)->flags & __ISPASTEOL) {
  65. - return OK;
  66. - }
  67. -
  68. - if (*x + newx > win->maxx - 1)
  69. - newx = win->maxx - *x - 1;
  70. - }
  71. -
  72. for (i = 0; i < newx; i++) {
  73. if (wadd_wch(win, &cc) == ERR)
  74. return ERR;
  75. --
  76. 2.31.1