Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package growlight for openSUSE:Factory 
checked in at 2021-11-18 10:34:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/growlight (Old)
 and      /work/SRC/openSUSE:Factory/.growlight.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "growlight"

Thu Nov 18 10:34:47 2021 rev:15 rq:932043 version:1.2.37

Changes:
--------
--- /work/SRC/openSUSE:Factory/growlight/growlight.changes      2021-08-27 
21:45:03.694051555 +0200
+++ /work/SRC/openSUSE:Factory/.growlight.new.1895/growlight.changes    
2021-11-18 10:34:48.331961670 +0100
@@ -1,0 +2,15 @@
+Mon Oct 25 20:20:58 UTC 2021 - Martin Hauke <[email protected]>
+
+- Update to version 1.2.37
+  * [readline] always create an ncdirect #151
+  * growlight-readline: version: display image on left
+  * growlight-readline: recognize exit as synonym for quit
+- Update to version 1.2.36
+  * [notcursesui] clear out some reverse video #148
+  * [ifaces] set background default when not selected
+  * remove all readline, use notcurses 2.4.4 #149
+  * stop using NCSTYLE_REVERSE
+  * [CMake] require notcurses 2.4.0+
+  * zfs: fix for gcc7 fallthrough attribute syntax
+
+-------------------------------------------------------------------

Old:
----
  growlight-1.2.35.tar.gz

New:
----
  growlight-1.2.37.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ growlight.spec ++++++
--- /var/tmp/diff_new_pack.CIyLlu/_old  2021-11-18 10:34:48.747962057 +0100
+++ /var/tmp/diff_new_pack.CIyLlu/_new  2021-11-18 10:34:48.751962060 +0100
@@ -23,7 +23,7 @@
 %bcond_without  pandoc
 %endif
 Name:           growlight
-Version:        1.2.35
+Version:        1.2.37
 Release:        0
 Summary:        Disk manipulation and system setup tool
 License:        GPL-3.0-or-later
@@ -45,7 +45,7 @@
 BuildRequires:  pkgconfig(libpci) >= 3.1.9
 BuildRequires:  pkgconfig(libudev) >= 175
 BuildRequires:  pkgconfig(nettle) >= 3.5.1
-BuildRequires:  pkgconfig(notcurses) >= 2.2.9
+BuildRequires:  pkgconfig(notcurses) >= 2.4.4
 BuildRequires:  pkgconfig(pciaccess) >= 0.13.1
 BuildRequires:  pkgconfig(readline)
 BuildRequires:  pkgconfig(zlib) >= 1.2.11

++++++ growlight-1.2.35.tar.gz -> growlight-1.2.37.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/.drone.yml 
new/growlight-1.2.37/.drone.yml
--- old/growlight-1.2.35/.drone.yml     2021-07-21 06:18:07.000000000 +0200
+++ new/growlight-1.2.37/.drone.yml     2021-10-12 10:08:05.000000000 +0200
@@ -5,7 +5,7 @@
 
 steps:
 - name: debian-build
-  image: dankamongmen/unstable_builder:2021-02-12b
+  image: dankamongmen/unstable_builder:2021-10-08a
   commands:
     - export LANG=en_US.UTF-8
     - mkdir build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/CMakeLists.txt 
new/growlight-1.2.37/CMakeLists.txt
--- old/growlight-1.2.35/CMakeLists.txt 2021-07-21 06:18:07.000000000 +0200
+++ new/growlight-1.2.37/CMakeLists.txt 2021-10-12 10:08:05.000000000 +0200
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.14)
-project(growlight VERSION 1.2.35
+project(growlight VERSION 1.2.37
   DESCRIPTION "Block device and filesystem manager"
   HOMEPAGE_URL "https://nick-black.com/dankwiki/index.php/Growlight";
   LANGUAGES C CXX)
@@ -34,7 +34,7 @@
 find_package(PkgConfig REQUIRED)
 find_package(Threads)
 set_package_properties(Threads PROPERTIES TYPE REQUIRED)
-find_package(Notcurses 2.3.9 CONFIG)
+find_package(Notcurses 2.4.4 CONFIG)
 set_package_properties(Notcurses PROPERTIES TYPE REQUIRED)
 pkg_check_modules(LIBATASMART REQUIRED libatasmart>=0.19)
 pkg_check_modules(LIBBLKID REQUIRED blkid>=2.20.1)
@@ -44,7 +44,6 @@
 pkg_check_modules(LIBNETTLE REQUIRED nettle>=3.5.1)
 pkg_check_modules(LIBPCI REQUIRED libpci>=3.1.9)
 pkg_check_modules(LIBPCIACCESS REQUIRED pciaccess>=0.13.1)
-pkg_check_modules(LIBREADLINE REQUIRED readline)
 pkg_check_modules(LIBUDEV REQUIRED libudev>=175)
 pkg_check_modules(LIBZ REQUIRED zlib>=1.2.11)
 if(${USE_DOCTEST})
@@ -98,7 +97,6 @@
   "${LIBNETTLE_LIBRARIES}"
   "${LIBPCI_LIBRARIES}"
   "${LIBPCIACCESS_LIBRARIES}"
-  "${LIBREADLINE_LIBRARIES}"
   "${LIBUDEV_LIBRARIES}"
   "${LIBZ_LIBRARIES}"
   "${LIBZFS_LIBRARIES}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/README.md 
new/growlight-1.2.37/README.md
--- old/growlight-1.2.35/README.md      2021-07-21 06:18:07.000000000 +0200
+++ new/growlight-1.2.37/README.md      2021-10-12 10:08:05.000000000 +0200
@@ -22,10 +22,9 @@
  - libcryptsetup 2.1.5+
  - libdevmapper 1.02.74+
  - libnettle 3.5.1+
- - libnotcurses 2.3.9+
+ - libnotcurses 2.4.4+
  - libpci 3.1.9+
  - libpciaccess 0.13.1+
- - libreadline 8.0+
  - libudev 175+
  - libz 1.2.11+
  - mkswap(8) from util-linux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/growlight-1.2.35/doc/man/man8/growlight-readline.8.md 
new/growlight-1.2.37/doc/man/man8/growlight-readline.8.md
--- old/growlight-1.2.35/doc/man/man8/growlight-readline.8.md   2021-07-21 
06:18:07.000000000 +0200
+++ new/growlight-1.2.37/doc/man/man8/growlight-readline.8.md   2021-10-12 
10:08:05.000000000 +0200
@@ -1,6 +1,6 @@
 % growlight-readline(8)
 % nick black <[email protected]>
-% v1.2.35
+% v1.2.37
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/doc/man/man8/growlight.8.md 
new/growlight-1.2.37/doc/man/man8/growlight.8.md
--- old/growlight-1.2.35/doc/man/man8/growlight.8.md    2021-07-21 
06:18:07.000000000 +0200
+++ new/growlight-1.2.37/doc/man/man8/growlight.8.md    2021-10-12 
10:08:05.000000000 +0200
@@ -1,6 +1,6 @@
 % growlight(8)
 % nick black <[email protected]>
-% v1.2.35
+% v1.2.37
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/src/notcurses/notcurses.c 
new/growlight-1.2.37/src/notcurses/notcurses.c
--- old/growlight-1.2.35/src/notcurses/notcurses.c      2021-07-21 
06:18:07.000000000 +0200
+++ new/growlight-1.2.37/src/notcurses/notcurses.c      2021-10-12 
10:08:05.000000000 +0200
@@ -247,105 +247,115 @@
 };
 
 static void
-compat_set_fg(struct ncplane* nc, int pair){
-  switch(pair){
+compat_set_co(struct ncplane* nc, int(*fxn)(struct ncplane*, unsigned, 
unsigned, unsigned), int co){
+  switch(co){
     case 0:
-      ncplane_set_fg_rgb8(nc, 128, 192, 128);
+      fxn(nc, 128, 192, 128);
       break;
     case HEADER_COLOR:
-      ncplane_set_fg_rgb8(nc, 95, 0, 175);
+      fxn(nc, 95, 0, 175);
       break;
     case STATUS_COLOR:
-      ncplane_set_fg_rgb8(nc, 0, 95, 175);
+      fxn(nc, 0, 95, 175);
       break;
     case UHEADING_COLOR:
-      ncplane_set_fg_rgb8(nc, 218, 218, 218);
+      fxn(nc, 218, 218, 218);
       break;
     case UNHEADING_COLOR:
-      ncplane_set_fg_rgb8(nc, 135, 175, 255);
+      fxn(nc, 135, 175, 255);
       break;
     case UBORDER_COLOR:
-      ncplane_set_fg_rgb8(nc, 0, 215, 175);
+      fxn(nc, 0, 215, 175);
       break;
     case SELBORDER_COLOR:
-      ncplane_set_fg_rgb8(nc, 0, 255, 215);
+      fxn(nc, 0, 255, 215);
       break;
     case DBORDER_COLOR:
-      ncplane_set_fg_rgb8(nc, 135, 175, 255); break;
+      fxn(nc, 135, 175, 255); break;
     case PBORDER_COLOR:
-      ncplane_set_fg_rgb8(nc, 215, 255, 0); break;
+      fxn(nc, 215, 255, 0); break;
     case PHEADING_COLOR:
-      ncplane_set_fg_rgb8(nc, 197, 15, 31); break;
+      fxn(nc, 197, 15, 31); break;
     case SELECTED_COLOR:
-      ncplane_set_fg_rgb8(nc, 135, 95, 255); break;
+      fxn(nc, 135, 95, 255); break;
     case VIRTUAL_COLOR:
-      ncplane_set_fg_rgb8(nc, 0xd7, 0xd7, 0xaf); break;
+      fxn(nc, 0xd7, 0xd7, 0xaf); break;
     case SSD_COLOR:
-      ncplane_set_fg_rgb8(nc, 0xd7, 0xd7, 0xd7); break;
+      fxn(nc, 0xd7, 0xd7, 0xd7); break;
     case FS_COLOR:
-      ncplane_set_fg_rgb8(nc, 0x5f, 0xff, 0x5f); break;
+      fxn(nc, 0x5f, 0xff, 0x5f); break;
     case EMPTY_COLOR: // Empty sectors
       ncplane_set_fg_rgb(nc, 0xffd700); break;
     case METADATA_COLOR: // Partition table metadata
-      ncplane_set_fg_rgb8(nc, 249, 241, 165); break;
+      fxn(nc, 249, 241, 165); break;
     case MDADM_COLOR:
-      ncplane_set_fg_rgb8(nc, 0xaf, 0xaf, 0xff); break;
+      fxn(nc, 0xaf, 0xaf, 0xff); break;
     case ORANGE_COLOR:
-      ncplane_set_fg_rgb8(nc, 0xd7, 0x5f, 0x00); break;
+      fxn(nc, 0xd7, 0x5f, 0x00); break;
     case ZPOOL_COLOR:
-      ncplane_set_fg_rgb8(nc, 128, 192, 226); break;
+      fxn(nc, 128, 192, 226); break;
     case SUBDISPLAY_COLOR:
-      ncplane_set_fg_rgb8(nc, 255, 255, 255); break;
+      fxn(nc, 255, 255, 255); break;
     case OPTICAL_COLOR:
-      ncplane_set_fg_rgb8(nc, 175, 215, 0); break;
+      fxn(nc, 175, 215, 0); break;
     case ROTATE_COLOR:
-      ncplane_set_fg_rgb8(nc, 175, 175, 135); break;
+      fxn(nc, 175, 175, 135); break;
     case PART_COLOR0:
-      ncplane_set_fg_rgb8(nc, 0x00, 0xd7, 0xaf); break;
+      fxn(nc, 0x00, 0xd7, 0xaf); break;
     case PART_COLOR1:
-      ncplane_set_fg_rgb8(nc, 0x00, 0xff, 0xd7); break;
+      fxn(nc, 0x00, 0xff, 0xd7); break;
     case PART_COLOR2:
-      ncplane_set_fg_rgb8(nc, 0x00, 0xff, 0xff); break;
+      fxn(nc, 0x00, 0xff, 0xff); break;
     case PART_COLOR3:
-      ncplane_set_fg_rgb8(nc, 0x00, 0xaf, 0x87); break;
+      fxn(nc, 0x00, 0xaf, 0x87); break;
     case FORMBORDER_COLOR:
-      ncplane_set_fg_rgb8(nc, 0xaf, 0xaf, 0x87); break;
+      fxn(nc, 0xaf, 0xaf, 0x87); break;
     case FORMTEXT_COLOR:
-      ncplane_set_fg_rgb8(nc, 0x00, 0xd7, 0xaf); break;
+      fxn(nc, 0x00, 0xd7, 0xaf); break;
     case INPUT_COLOR:
-      ncplane_set_fg_rgb8(nc, 0x00, 0xd7, 0x5f); break;
+      fxn(nc, 0x00, 0xd7, 0x5f); break;
     case MOUNT_COLOR0:
-      ncplane_set_fg_rgb8(nc, 0xd0, 0xd0, 0xd0); break;
+      fxn(nc, 0xd0, 0xd0, 0xd0); break;
     case MOUNT_COLOR1:
-      ncplane_set_fg_rgb8(nc, 0xbc, 0xbc, 0xbc); break;
+      fxn(nc, 0xbc, 0xbc, 0xbc); break;
     case MOUNT_COLOR2:
-      ncplane_set_fg_rgb8(nc, 0xa8, 0xa8, 0xa8); break;
+      fxn(nc, 0xa8, 0xa8, 0xa8); break;
     case MOUNT_COLOR3:
-      ncplane_set_fg_rgb8(nc, 0x94, 0x94, 0x94); break;
+      fxn(nc, 0x94, 0x94, 0x94); break;
     case TARGET_COLOR0:      // Targeted filesystems
-      ncplane_set_fg_rgb8(nc, 0xaf, 0xff, 0x87); break;
+      fxn(nc, 0xaf, 0xff, 0x87); break;
     case TARGET_COLOR1:
-      ncplane_set_fg_rgb8(nc, 0x5f, 0xd7, 0xf5); break;
+      fxn(nc, 0x5f, 0xd7, 0xf5); break;
     case TARGET_COLOR2:
-      ncplane_set_fg_rgb8(nc, 0x87, 0xd7, 0x87); break;
+      fxn(nc, 0x87, 0xd7, 0x87); break;
     case TARGET_COLOR3:
-      ncplane_set_fg_rgb8(nc, 0x87, 0xff, 0xaf); break;
+      fxn(nc, 0x87, 0xff, 0xaf); break;
     case FUCKED_COLOR:      // Things that warrant attention
-      ncplane_set_fg_rgb8(nc, 95, 0, 0); break;
+      fxn(nc, 95, 0, 0); break;
     case SPLASHBORDER_COLOR:
-      ncplane_set_fg_rgb8(nc, 95, 95, 215); break;
+      fxn(nc, 95, 95, 215); break;
     case SPLASHTEXT_COLOR:
-      ncplane_set_fg_rgb8(nc, 95, 95, 255); break;
+      fxn(nc, 95, 95, 255); break;
     case BLACK_COLOR:
-      ncplane_set_fg_rgb8(nc, 254, 0, 255); break;
+      fxn(nc, 254, 0, 255); break;
     case GREEN_COLOR:
-      ncplane_set_fg_rgb8(nc, 95, 255, 215); break;
+      fxn(nc, 95, 255, 215); break;
     default:
-      ncplane_set_fg_rgb8(nc, 255, 255, 255);
+      fxn(nc, 255, 255, 255);
       break;
   }
 }
 
+static void
+compat_set_bg(struct ncplane* nc, int co){
+  compat_set_co(nc, ncplane_set_bg_rgb8, co);
+}
+
+static void
+compat_set_fg(struct ncplane* nc, int co){
+  compat_set_co(nc, ncplane_set_fg_rgb8, co);
+}
+
 static inline int
 next_targco(int targco){
   if(++targco > TARGET_COLOR3){
@@ -834,6 +844,7 @@
   uintmax_t zs;
 
   ncplane_set_styles(n, NCSTYLE_NONE);
+  ncplane_set_bg_default(n);
   zs = d->mntsize ? d->mntsize :
     (last_usable_sector(d) - first_usable_sector(d) + 1) * bo->d->logsec;
   // Sometimes, a partitioned block device will be given a mnttype by
@@ -895,9 +906,7 @@
   }
   if((z = bo->zchain) == NULL){
     if(selected){
-      ncplane_on_styles(n, NCSTYLE_REVERSE);
       cmvwprintw(n, y - 1, sx + 1, "????????????%.*s", (int)(ex - (sx + 5)), 
selstr);
-      ncplane_off_styles(n, NCSTYLE_REVERSE);
     }
     return;
   }
@@ -1004,15 +1013,13 @@
         break;
       }
     }
-    ncplane_on_styles(n, NCSTYLE_REVERSE);
-    if(selstr){
+    if(selected && selstr){
       if(och < ex / 2u){
         cmvwprintw(n, y - 1, och, "????????????%.*s", (int)(ex - (off + 
strlen(selstr) + 4)), selstr);
       }else{
         cmvwprintw(n, y - 1, off - 4 - strlen(selstr), "%s????????????", 
selstr);
       }
     }
-    ncplane_off_styles(n, NCSTYLE_REVERSE);
     // Truncate it at whitespace until it's small enough to fit
     while(wcslen(wbuf) && wcslen(wbuf) + 2 > (off - och + 1)){
       wchar_t *wtrunc = wcsrchr(wbuf, L' ');
@@ -1050,6 +1057,7 @@
   }
 //fprintf(stderr, " HERE FOR %s: %s line %d rows %d cols %d lout %d\n", 
as->c->name, bo->d->name, line, rows, cols, bo->d->layout);
   ncplane_set_bg_default(n);
+  uint64_t origchannels = ncplane_channels(n);
   if(line >= rows){
     return 0;
   }
@@ -1098,7 +1106,8 @@
       }
       if(selected){
         compat_set_fg(n, DBORDER_COLOR);
-        ncplane_on_styles(n, NCSTYLE_REVERSE | NCSTYLE_BOLD);
+        ncplane_on_styles(n, NCSTYLE_BOLD);
+        ncplane_set_channels(n, ncchannels_reverse(origchannels));
       }
       qprefix(bo->d->size, 1, buf, 0);
       cmvwprintw(n, line, 1, "%11.11s  %-16.16s %4.4s %*s %4uB %-6.6s%-16.16s 
%4.4s %-*.*s",
@@ -1134,7 +1143,8 @@
         }
         if(selected){
           compat_set_fg(n, DBORDER_COLOR);
-          ncplane_on_styles(n, NCSTYLE_REVERSE | NCSTYLE_BOLD);
+          ncplane_on_styles(n, NCSTYLE_BOLD);
+          ncplane_set_channels(n, ncchannels_reverse(origchannels));
         }
         qprefix(bo->d->size, 1, buf, 0);
         cmvwprintw(n, line, 1, "%11.11s  %-16.16s %4.4s %*s %4uB 
%-6.6s%-16.16s %4.4s %-*.*s",
@@ -1164,7 +1174,8 @@
         }
         if(selected){
           compat_set_fg(n, DBORDER_COLOR);
-          ncplane_on_styles(n, NCSTYLE_REVERSE | NCSTYLE_BOLD);
+          ncplane_on_styles(n, NCSTYLE_BOLD);
+          ncplane_set_channels(n, ncchannels_reverse(origchannels));
         }
         qprefix(bo->d->size, 1, buf, 0);
         cmvwprintw(n, line, 1, "%11.11s  %-16.16s %4.4s %*s %4uB 
%-6.6s%-16.16s %4.4s %-*.*s",
@@ -1195,7 +1206,8 @@
         }
         if(selected){
           compat_set_fg(n, DBORDER_COLOR);
-          ncplane_on_styles(n, NCSTYLE_REVERSE | NCSTYLE_BOLD);
+          ncplane_on_styles(n, NCSTYLE_BOLD);
+          ncplane_set_channels(n, ncchannels_reverse(origchannels));
         }
         qprefix(bo->d->size, 1, buf, 0);
         cmvwprintw(n, line, 1, "%11.11s  %-16.16s %4ju %*s %4uB %-6.6s%-16.16s 
%4.4s %-*.*s",
@@ -1218,7 +1230,7 @@
   if(bo->d->size == 0){
     return 1;
   }
-  ncplane_off_styles(n, NCSTYLE_REVERSE);
+  ncplane_set_channels(n, origchannels);
   ncplane_set_styles(n, NCSTYLE_BOLD);
   compat_set_fg(n, SUBDISPLAY_COLOR);
 
@@ -1319,7 +1331,9 @@
   ncplane_set_styles(n, NCSTYLE_BOLD);
   compat_set_fg(n, DBORDER_COLOR);
   if(selected){
-    ncplane_on_styles(n, NCSTYLE_REVERSE);
+    ncplane_set_channels(n, ncchannels_reverse(origchannels));
+  }else{
+    ncplane_set_bg_default(n);
   }
   if(line >= drawfromtop){
     ncplane_putwstr_yx(n, line, START_COL + 10 + 1, L"???");
@@ -1335,10 +1349,11 @@
     print_blockbar(n, bo, line, START_COL + 10 + 2,
           cols - START_COL - 1, selected);
   }
+  ncplane_set_channels(n, origchannels);
   ncplane_set_styles(n, NCSTYLE_BOLD);
   compat_set_fg(n, DBORDER_COLOR);
   if(selected){
-    ncplane_on_styles(n, NCSTYLE_REVERSE);
+    ncplane_set_channels(n, ncchannels_reverse(origchannels));
   }
   if(line >= drawfromtop){
     ncplane_putwstr_yx(n, line, cols - START_COL * 2, L"???");
@@ -1357,7 +1372,7 @@
     ncplane_putwstr_yx(n, line, cols - START_COL * 2, L"???");
   }
   ++line;
-  ncplane_off_styles(n, NCSTYLE_REVERSE);
+  ncplane_set_channels(n, ncchannels_reverse(origchannels));
   return 3;
 }
 
@@ -1373,10 +1388,12 @@
     hcolor = UHEADING_COLOR; // plus NCSTYLE_BOLD
     bcolor = SELBORDER_COLOR;
     attrs = NCSTYLE_BOLD;
+    compat_set_bg(nc, bcolor);
   }else{
     hcolor = UNHEADING_COLOR;
     bcolor = UBORDER_COLOR;
     attrs = 0;
+    ncplane_set_bg_default(nc);
   }
   ncplane_set_styles(nc, attrs);
   compat_set_fg(nc, hcolor);
@@ -1682,8 +1699,9 @@
       compat_set_fg(fsw, FORMTEXT_COLOR);
       cmvwprintw(fsw, z + 1, START_COL * 2 + fs->longop + 4, "%-*.*s ",
                  fs->longop, fs->longop, opstrs[op].option);
+      uint64_t origchannels = ncplane_channels(fsw);
       if(op == fs->idx){
-        ncplane_on_styles(fsw, NCSTYLE_REVERSE);
+        ncplane_set_channels(fsw, ncchannels_reverse(origchannels));
       }
       compat_set_fg(fsw, INPUT_COLOR);
       for(selidx = 0 ; selidx < fs->selections ; ++selidx){
@@ -1694,7 +1712,7 @@
       }
       cwprintw(fsw, "%-*.*s", cols - fs->longop * 2 - 9,
         cols - fs->longop * 2 - 9, opstrs[op].desc);
-      ncplane_off_styles(fsw, NCSTYLE_REVERSE);
+      ncplane_set_channels(fsw, origchannels);
     }
   }
   compat_set_fg(fsw, FORMBORDER_COLOR);
@@ -1734,8 +1752,9 @@
           break;
         }
       }
+      uint64_t origchannels = ncplane_channels(fs->p);
       if(op == fs->idx){
-        ncplane_on_styles(fs->p, NCSTYLE_REVERSE);
+        ncplane_set_channels(fs->p, ncchannels_reverse(origchannels));
       }else{
         compat_set_fg(fs->p, INPUT_COLOR);
       }
@@ -1743,7 +1762,7 @@
         ballot, fs->longop, fs->longop, opstrs[op].option);
       cwprintw(fs->p, "%-*.*s", cols - fs->longop - 7,
         cols - fs->longop - 7, opstrs[op].desc);
-      ncplane_off_styles(fs->p, NCSTYLE_REVERSE);
+      ncplane_set_channels(fs->p, origchannels);
     }
   }
   compat_set_fg(fs->p, FORMBORDER_COLOR);
@@ -1767,13 +1786,14 @@
     compat_set_fg(fs->p, FORMTEXT_COLOR);
     cmvwprintw(fs->p, z + 1, START_COL * 2, "%-*.*s ",
       fs->longop, fs->longop, opstrs[op].option);
+    compat_set_fg(fs->p, INPUT_COLOR);
+    uint64_t origchannels = ncplane_channels(fs->p);
     if(op == fs->idx){
-      ncplane_on_styles(fs->p, NCSTYLE_REVERSE);
+      ncplane_set_channels(fs->p, ncchannels_reverse(origchannels));
     }
-    compat_set_fg(fs->p, INPUT_COLOR);
     cwprintw(fs->p, "%-*.*s", cols - fs->longop - 1 - START_COL * 4,
       cols - fs->longop - 1 - START_COL * 4, opstrs[op].desc);
-    ncplane_off_styles(fs->p, NCSTYLE_REVERSE);
+    ncplane_set_channels(fs->p, origchannels);
   }
 }
 
@@ -5292,7 +5312,7 @@
         ch = ni.id;
       } // otherwise, continue through with selected item
     }
-    if(ch == NCKEY_RELEASE){
+    if(ch == NCKEY_BUTTON1 && (ni.evtype == NCTYPE_RELEASE || ni.evtype == 
NCTYPE_UNKNOWN)){
       if(ncmenu_mouse_selected(mainmenu, &ni, &ni) == NULL){
         continue;
       } // otherwise, continue through with selected item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/src/readline/readline.c 
new/growlight-1.2.37/src/readline/readline.c
--- old/growlight-1.2.35/src/readline/readline.c        2021-07-21 
06:18:07.000000000 +0200
+++ new/growlight-1.2.37/src/readline/readline.c        2021-10-12 
10:08:05.000000000 +0200
@@ -10,8 +10,6 @@
 #include <version.h>
 #include <atasmart.h>
 #include <notcurses/direct.h>
-#include <readline/history.h>
-#include <readline/readline.h>
 
 #include "fs.h"
 #include "mbr.h"
@@ -1777,7 +1775,7 @@
 do_logo(void){
   if(ncd){
     int v = ncdirect_render_image(ncd, GROWLIGHT_SHARE "/growlight.jpg",
-                                  NCALIGN_CENTER, NCBLIT_DEFAULT, 
NCSCALE_SCALE_HIRES);
+                                  NCALIGN_LEFT, NCBLIT_DEFAULT, 
NCSCALE_SCALE_HIRES);
     if(v >= 0){
       return;
     }
@@ -2019,6 +2017,7 @@
   FXN(version, ""),
   FXN(help, "[ command ]"),
   FXN(quit, ""),
+  { .cmd = L"exit", .fxn = quit, .arghelp = "", },
   { .cmd = NULL, .fxn = NULL, .arghelp = NULL, },
 #undef FXN
 };
@@ -2050,23 +2049,6 @@
   return 0;
 }
 
-// heap-allocated input line, using readline if available, fgets() otherwise.
-static char*
-getinline(const char* prompt){
-  if(ncd){
-    return ncdirect_readline(ncd, prompt);
-  }
-  size_t buflen = 8192;
-  char* buf = malloc(buflen); // sure FIXME
-  if(buf){
-    if(fgets(buf, buflen, stdin) == NULL){
-      free(buf);
-      buf = NULL;
-    }
-  }
-  return buf;
-}
-
 #define RL_START "\x01" // RL_PROMPT_START_IGNORE
 #define RL_END "\x02"  // RL_PROMPT_END_IGNORE
 static int
@@ -2078,13 +2060,12 @@
                            "(0)> " RL_START "\033[1;37m" RL_END;
   char *l;
 
-  while( (l = getinline(prompt)) ){
+  while( (l = ncdirect_readline(ncd, prompt)) ){
     const struct fxn *fxn;
     wchar_t **tokes;
     int z;
 
     fflush(stdout);
-    add_history(l);
     z = tokenize(l, &tokes);
     free(l);
     if(z <= 0){
@@ -2125,7 +2106,6 @@
           "(0)" RL_START "\033[1;32m" RL_END
           "> " RL_START "\033[1;37m" RL_END);
     }
-    rl_set_prompt(prompt);
     if(lights_off){
       return 0;
     }
@@ -2136,38 +2116,6 @@
 #undef RL_END
 #undef RL_START
 
-// FIXME it'd be nice to do secondary completion (ie command-sensitive) for
-// command arguments
-static char *
-completion_engine(const char *text, int state){
-  static const struct fxn *fxn;
-  static size_t len;
-
-  // 'state' tells us whether readline has tried to complete already
-  if(state == 0){
-    len = strlen(text);
-    fxn = fxns;
-  }else{
-    ++fxn;
-  }
-  while(fxn->cmd){
-    char fxnbuf[NAME_MAX];
-
-    snprintf(fxnbuf, sizeof(fxnbuf), "%ls", fxn->cmd);
-    if(strncmp(fxnbuf, text, len) == 0){
-
-      return strdup(fxnbuf);
-    }
-    ++fxn;
-  }
-  return NULL;
-}
-
-static char **
-growlight_completion(const char *text, int start __attribute__ ((unused)), int 
end __attribute__ ((unused))){
-  return rl_completion_matches(text, completion_engine);
-}
-
 static void
 vdiag(const char *fmt, va_list va){
   vfprintf(stderr, fmt, va);
@@ -2222,16 +2170,11 @@
   if(growlight_init(argc, argv, &ui, NULL)){
     return EXIT_FAILURE;
   }
-  rl_readline_name = PACKAGE;
-  if(isatty(STDOUT_FILENO)){
-    const uint64_t flags = NCDIRECT_OPTION_INHIBIT_SETLOCALE |
-                           NCDIRECT_OPTION_INHIBIT_CBREAK;
-    rl_attempted_completion_function = growlight_completion;
-    if((ncd = ncdirect_init(NULL, NULL, flags)) == NULL){
-      fprintf(stderr, "Couldn't set up notcurses\n");
-      growlight_stop();
-      return EXIT_FAILURE;
-    }
+  const uint64_t flags = NCDIRECT_OPTION_INHIBIT_SETLOCALE;
+  if((ncd = ncdirect_init(NULL, NULL, flags)) == NULL){
+    fprintf(stderr, "Couldn't set up notcurses\n");
+    growlight_stop();
+    return EXIT_FAILURE;
   }
   if(tty_ui()){
     growlight_stop();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.35/src/zfs.c 
new/growlight-1.2.37/src/zfs.c
--- old/growlight-1.2.35/src/zfs.c      2021-07-21 06:18:07.000000000 +0200
+++ new/growlight-1.2.37/src/zfs.c      2021-10-12 10:08:05.000000000 +0200
@@ -39,11 +39,11 @@
                dec = 0;
        }
        switch(*e){
-               case 'E': case 'e': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__ ((fallthrough));
-               case 'P': case 'p': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__ ((fallthrough));
-               case 'T': case 't': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__ ((fallthrough));
-               case 'G': case 'g': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__ ((fallthrough));
-               case 'M': case 'm': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__ ((fallthrough));
+               case 'E': case 'e': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__((__fallthrough__));
+               case 'P': case 'p': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__((__fallthrough__));
+               case 'T': case 't': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__((__fallthrough__));
+               case 'G': case 'g': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__((__fallthrough__));
+               case 'M': case 'm': ull = ull * 1000 + dec * 10; dec = 0; 
__attribute__((__fallthrough__));
                case 'K': case 'k': ull = ull * 1000 + dec * 10; dec = 0;
                        break;
                case '\0':

Reply via email to