diff -pruN 8.2-1/Makefile 8.2.1-1/Makefile
--- 8.2-1/Makefile	2025-04-24 09:45:16.000000000 +0000
+++ 8.2.1-1/Makefile	2025-08-28 12:21:03.000000000 +0000
@@ -8,12 +8,10 @@ PKG_CONFIG ?= pkg-config
 
 CFLAGS = $(CXXFLAGS) $(CPPFLAGS) -c                \
    `$(PKG_CONFIG) --cflags gtk+-3.0`               \
-   -I/usr/include/clutter-1.0/                     \
    -I/usr/include/cogl/                            \
-   -I/usr/include/json-glib-1.0/                   \
-   -I/usr/include/clutter-gtk-1.0/
+   -I/usr/include/json-glib-1.0/
 
-LIBS = `pkg-config --libs gtk+-3.0` -lpthread -lclutter-1.0 -lclutter-gtk-1.0
+LIBS = `pkg-config --libs gtk+-3.0` -lpthread 
 
 dkopp: dkopp.o zfuncs.o
 	$(CXX) $(LDFLAGS) -o dkopp dkopp.o zfuncs.o $(LIBS)  \
diff -pruN 8.2-1/debian/changelog 8.2.1-1/debian/changelog
--- 8.2-1/debian/changelog	2025-04-24 13:16:07.000000000 +0000
+++ 8.2.1-1/debian/changelog	2025-08-29 02:35:21.000000000 +0000
@@ -1,3 +1,12 @@
+dkopp (8.2.1-1) unstable; urgency=medium
+
+  * d/watch: add opts and add -source string to match upstream source code file
+  * New upstream version 8.2.1, Closes: #1112201,
+    upstream repacked with the same version 8.2, manually add minor version
+  * d/p/03-blkid.patch: update for new upstream source code
+
+ -- xiao sheng wen <atzlinux@debian.org>  Fri, 29 Aug 2025 10:35:21 +0800
+
 dkopp (8.2-1) unstable; urgency=medium
 
   * New upstream version 8.2
diff -pruN 8.2-1/debian/patches/03-blkid.patch 8.2.1-1/debian/patches/03-blkid.patch
--- 8.2-1/debian/patches/03-blkid.patch	2025-04-24 13:13:58.000000000 +0000
+++ 8.2.1-1/debian/patches/03-blkid.patch	2025-08-29 02:19:50.000000000 +0000
@@ -3,18 +3,21 @@ Author: Chris Hofstaedtler <zeha@debian.
 Bug-Debian: https://bugs.debian.org/787425
 Forwarded: not-needed
 Reviewed-By: xiao sheng wen <atzlinux@debian.org>
-Last-Update: 2025-04-18
+Last-Update: 2025-08-29
 
 ---
 
---- dkopp-8.1.orig/dkopp.cc
-+++ dkopp-8.1/dkopp.cc
-@@ -2424,7 +2424,7 @@ showpoop:
+diff --git a/dkopp.cc b/dkopp.cc
+index 9656a1f..99e5395 100644
+--- a/dkopp.cc
++++ b/dkopp.cc
+@@ -2427,7 +2427,7 @@ showpoop:
  
-    dvdtime = dstat.st_ctime;                                                     //  set DVD/BRD ID = mod time
+    dvdtime = dstat.st_ctime;                                                           //  set DVD/BRD ID = mod time
  
--   snprintf(buff,99,"volname %s",BJdvd);                                         //  get DVD/BRD label
-+   snprintf(buff,99,"blkid -c /dev/null -s LABEL -o value %s",BJdvd);            //  get DVD/BRD label
+-   snprintf(buff,99,"volname %s",BJdvd);                                               //  get DVD/BRD label
++   snprintf(buff,99,"blkid -c /dev/null -s LABEL -o value %s",BJdvd);                  //  get DVD/BRD label
     fid = popen(buff,"r");
     if (fid) {
        pp = fgets_trim(mbuff,99,fid,1);
+
diff -pruN 8.2-1/debian/watch 8.2.1-1/debian/watch
--- 8.2-1/debian/watch	2025-04-24 13:13:58.000000000 +0000
+++ 8.2.1-1/debian/watch	2025-08-19 06:55:44.000000000 +0000
@@ -1,4 +1,5 @@
 version=4
 
+opts="uversionmangle=s/source$//" \
 https://kornelix.net/downloads/downloads.html \
-  (?:.*/)@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@
+  (?:.*/)@PACKAGE@@ANY_VERSION@-source@ARCHIVE_EXT@
diff -pruN 8.2-1/debian-control 8.2.1-1/debian-control
--- 8.2-1/debian-control	2025-04-24 09:45:16.000000000 +0000
+++ 8.2.1-1/debian-control	2025-08-28 12:21:03.000000000 +0000
@@ -2,7 +2,7 @@ Package: dkopp
 Version: 8.2
 Architecture: amd64
 Section: utils
-Installed-Size: 1436
+Installed-Size: 1232
 Maintainer: Mike Cornelison <mkornelix@gmail.com>
 Priority: optional
 Homepage: https://kornelix.net/
diff -pruN 8.2-1/dkopp.cc 8.2.1-1/dkopp.cc
--- 8.2-1/dkopp.cc	2025-04-24 09:45:16.000000000 +0000
+++ 8.2.1-1/dkopp.cc	2025-08-28 12:21:03.000000000 +0000
@@ -26,252 +26,252 @@
 #if defined __linux__
 #include <linux/cdrom.h>
 #endif
-#include "zfuncs.h"                                                              //  order important
+#include "zfuncs.h"                                                                    //  order important
 
 //  parameters and limits
 
-#define release "dkopp-8.2"                                                      //  release 8.2
+#define release "dkopp-8.2"                                                            //  release 8.2
 #define debug 0
-#define vrcc  512*1024                                                           //  verify read I/O size
-#define maxnx 1000                                                               //  max no. include/exclude recs.
-#define maxfs 200000                                                             //  max no. disk or DVD/BRD files
-#define maxhist 200                                                              //  max no. history files
-#define giga  1000000000.0                                                       //  gigabyte (not 1024**3)
-#define modtimetolr 1.0                                                          //  tolerance, equal mod times
-#define nano 0.000000001                                                         //  nanosecond
-#define gforce "-use-the-force-luke=tty -use-the-force-luke=notray"              //  growisofs hidden options
+#define vrcc  512*1024                                                                 //  verify read I/O size
+#define maxnx 1000                                                                     //  max no. include/exclude recs.
+#define maxfs 200000                                                                   //  max no. disk or DVD/BRD files
+#define maxhist 200                                                                    //  max no. history files
+#define giga  1000000000.0                                                             //  gigabyte (not 1024**3)
+#define modtimetolr 1.0                                                                //  tolerance, equal mod times
+#define nano 0.000000001                                                               //  nanosecond
+#define gforce "-use-the-force-luke=tty -use-the-force-luke=notray"                    //  growisofs hidden options
 
 //  special control files on DVD/BRD
 
-#define V_DKOPPDIRK  "/dkopp-data/"                                              //  dkopp special files on DVD/BRD
-#define V_FILEPOOP  V_DKOPPDIRK "filepoop"                                       //  directory data file
-#define V_JOBFILE   V_DKOPPDIRK "jobfile"                                        //  backup job data file
-#define V_DATETIME  V_DKOPPDIRK "datetime"                                       //  date-time file
+#define V_DKOPPDIRK  "/dkopp-data/"                                                    //  dkopp special files on DVD/BRD
+#define V_FILEPOOP  V_DKOPPDIRK "filepoop"                                             //  directory data file
+#define V_JOBFILE   V_DKOPPDIRK "jobfile"                                              //  backup job data file
+#define V_DATETIME  V_DKOPPDIRK "datetime"                                             //  date-time file
 
 //  GTK GUI widgets
 
-GtkWidget      *mWin, *mVbox, *mScroll, *mLog;                                   //  main window
+GtkWidget      *mWin, *mVbox, *mScroll, *mLog;                                         //  main window
 GtkTextBuffer  *logBuff;
-GtkWidget      *fc_dialogbox, *fc_widget;                                        //  file-chooser dialog
-GtkWidget      *editwidget;                                                      //  edit box in file selection dialogs
+GtkWidget      *fc_dialogbox, *fc_widget;                                              //  file-chooser dialog
+GtkWidget      *editwidget;                                                            //  edit box in file selection dialogs
 
-namespace zfuncs {                                                               //  externals from zfuncs module
-   extern GdkDisplay        *display;                                            //  X11 workstation (KB, mouse, screen)
-   extern GdkDeviceManager  *manager;                                            //  knows screen / mouse associations
-   extern GdkScreen         *screen;                                             //  monitor (screen)
-   extern GdkDevice         *mouse;                                              //  pointer device
-   extern GtkSettings       *settings;                                           //  screen settings
-   extern GtkWidget         *mainwin;                                            //  main window for zfuncs parent      7.5
+namespace zfuncs {                                                                     //  externals from zfuncs module
+   extern GdkDisplay        *display;                                                  //  X11 workstation (KB, mouse, screen)
+   extern GdkDeviceManager  *manager;                                                  //  knows screen / mouse associations
+   extern GdkScreen         *screen;                                                   //  monitor (screen)
+   extern GdkDevice         *mouse;                                                    //  pointer device
+   extern GtkSettings       *settings;                                                 //  screen settings
+   extern GtkWidget         *mainwin;                                                  //  main window for zfuncs parent      7.5
 }
 
 #define MWIN GTK_WINDOW(mWin)
 
 //  file scope variables
 
-int      killFlag;                                                               //  tell function to quit
-int      pauseFlag;                                                              //  tell function to pause/resume
-int      menuLock;                                                               //  menu lock flag
-int      commFail;                                                               //  command failure flag
-int      Fdialog;                                                                //  dialog in progress
-int      clrun;                                                                  //  flag, command line 'run' command
-int      Fgui;                                                                   //  flag, GUI or command line
-ch       subprocName[20];                                                        //  name of created subprocess
-ch       scriptParam[200];                                                       //  parameter from script file
-ch       mbmode[20], mvmode[20];                                                 //  actual backup, verify modes
-double   pctdone;                                                                //  % done from growisofs
-ch       scrFile[XFCC];                                                          //  command line script file
-ch       backupDT[16];                                                           //  nominal backup date: yyyymmdd-hhmm
+int      killFlag;                                                                     //  tell function to quit
+int      pauseFlag;                                                                    //  tell function to pause/resume
+int      menuLock;                                                                     //  menu lock flag
+int      commFail;                                                                     //  command failure flag
+int      Fdialog;                                                                      //  dialog in progress
+int      clrun;                                                                        //  flag, command line 'run' command
+int      Fgui;                                                                         //  flag, GUI or command line
+ch       subprocName[20];                                                              //  name of created subprocess
+ch       scriptParam[200];                                                             //  parameter from script file
+ch       mbmode[20], mvmode[20];                                                       //  actual backup, verify modes
+double   pctdone;                                                                      //  % done from growisofs
+ch       scrFile[XFCC];                                                                //  command line script file
+ch       backupDT[16];                                                                 //  nominal backup date: yyyymmdd-hhmm
 
-ch       homedir[200];                                                           //  /home/user/.dkopp
-ch       TFdiskfiles[200], TFdvdfiles[200];                                      //  scratch files in homedir
+ch       homedir[200];                                                                 //  /home/user/.dkopp
+ch       TFdiskfiles[200], TFdvdfiles[200];                                            //  scratch files in homedir
 ch       TFjobfile[200], TFfilepoop[200], TFdatetime[200];
 ch       TFrestorefiles[200], TFrestoredirks[200];
 
 //  available DVD/BRD devices
 
 int      ndvds, maxdvds = 8;
-ch       dvddevs[8][20];                                                         //  DVD/BRD devices, /dev/sr0 etc.
-ch       dvddesc[8][40];                                                         //  DVD/BRD device descriptions
-ch       dvddevdesc[8][60];                                                      //  combined device and description
+ch       dvddevs[8][20];                                                               //  DVD/BRD devices, /dev/sr0 etc.
+ch       dvddesc[8][40];                                                               //  DVD/BRD device descriptions
+ch       dvddevdesc[8][60];                                                            //  combined device and description
 
 //  backup job data
 
-ch       BJfile[XFCC];                                                           //  backup job file
-ch       BJdvd[20];                                                              //  DVD/BRD device: /dev/hdb
-ch       BJbmode[20];                                                            //  backup: full/incremental/accumulate
-ch       BJvmode[20];                                                            //  verify: full/incremental/thorough
-ch       BJdatefrom[12];                                                         //  mod date selection, yyyy.mm.dd
-time_t   BJtdate;                                                                //  binary mod date selection
-int      BJval;                                                                  //  backup job data validated
-int      BJmod;                                                                  //  backup job data modified
-ch      *BJinex[maxnx];                                                          //  backup include/exclude records
-int      BJfiles[maxnx];                                                         //  corresp. file count per rec
-double   BJbytes[maxnx];                                                         //  corresp. byte count per rec
-int      BJdvdno[maxnx];                                                         //  corresp. DVD/BRD seqnc. no. (1,2...)
-int      BJnx;                                                                   //  actual record count < maxnx
+ch       BJfile[XFCC];                                                                 //  backup job file
+ch       BJdvd[20];                                                                    //  DVD/BRD device: /dev/hdb
+ch       BJbmode[20];                                                                  //  backup: full/incremental/accumulate
+ch       BJvmode[20];                                                                  //  verify: full/incremental/thorough
+ch       BJdatefrom[12];                                                               //  mod date selection, yyyy.mm.dd
+time_t   BJtdate;                                                                      //  binary mod date selection
+int      BJval;                                                                        //  backup job data validated
+int      BJmod;                                                                        //  backup job data modified
+ch      *BJinex[maxnx];                                                                //  backup include/exclude records
+int      BJfiles[maxnx];                                                               //  corresp. file count per rec
+double   BJbytes[maxnx];                                                               //  corresp. byte count per rec
+int      BJdvdno[maxnx];                                                               //  corresp. DVD/BRD seqnc. no. (1,2...)
+int      BJnx;                                                                         //  actual record count < maxnx
 
 //  DVD/BRD medium data
 
-ch       dvdmp[100];                                                             //  mount point, /media/xxxxx
-int      dvdmpcc;                                                                //  mount point cc
-int      dvdmtd;                                                                 //  DVD/BRD mounted
-ch       mediumDT[16];                                                           //  DVD/BRD medium last use date-time
-time_t   dvdtime;                                                                //  DVD/BRD device mod time
-ch       dvdlabel[32];                                                           //  DVD/BRD label
+ch       dvdmp[100];                                                                   //  mount point, /media/xxxxx
+int      dvdmpcc;                                                                      //  mount point cc
+int      dvdmtd;                                                                       //  DVD/BRD mounted
+ch       mediumDT[16];                                                                 //  DVD/BRD medium last use date-time
+time_t   dvdtime;                                                                      //  DVD/BRD device mod time
+ch       dvdlabel[32];                                                                 //  DVD/BRD label
 
 //  current files for backup
 
-struct dfrec {                                                                   //  disk file record
-   ch       *file;                                                               //    directory/filename
-   double   size;                                                                //    byte count
-   double   mtime;                                                               //    mod time
-   int      stat;                                                                //    fstat() status
-   int      inclx;                                                               //    include rec for this file
-   ch       disp;                                                                //    status: new modified unchanged
-   ch       ivf;                                                                 //    flag for incr. verify
+struct dfrec {                                                                         //  disk file record
+   ch       *file;                                                                     //    directory/filename
+   double   size;                                                                      //    byte count
+   double   mtime;                                                                     //    mod time
+   int      stat;                                                                      //    fstat() status
+   int      inclx;                                                                     //    include rec for this file
+   ch       disp;                                                                      //    status: new modified unchanged
+   ch       ivf;                                                                       //    flag for incr. verify
 };
 
-dfrec    Drec[maxfs];                                                            //  disk file data records
-int      Dnf;                                                                    //  actual file count < maxfs
-double   Dbytes;                                                                 //  disk files, total bytes
-double   Dbytes2;                                                                //  bytes for DVD/BRD medium
+dfrec    Drec[maxfs];                                                                  //  disk file data records
+int      Dnf;                                                                          //  actual file count < maxfs
+double   Dbytes;                                                                       //  disk files, total bytes
+double   Dbytes2;                                                                      //  bytes for DVD/BRD medium
 
 //  DVD/BRD file data
 
-struct vfrec {                                                                   //  DVD/BRD file record
-   ch       *file;                                                               //    directory/file (- /media/xxx)
-   double   size;                                                                //    byte count
-   double   mtime;                                                               //    mod time
-   int      stat;                                                                //    fstat() status
-   ch       disp;                                                                //    status: deleted modified unchanged
+struct vfrec {                                                                         //  DVD/BRD file record
+   ch       *file;                                                                     //    directory/file (- /media/xxx)
+   double   size;                                                                      //    byte count
+   double   mtime;                                                                     //    mod time
+   int      stat;                                                                      //    fstat() status
+   ch       disp;                                                                      //    status: deleted modified unchanged
 };
 
-vfrec    Vrec[maxfs];                                                            //  DVD/BRD file data records
-int      Vnf;                                                                    //  actual file count < maxfs
-double   Vbytes;                                                                 //  DVD/BRD files, total bytes
+vfrec    Vrec[maxfs];                                                                  //  DVD/BRD file data records
+int      Vnf;                                                                          //  actual file count < maxfs
+double   Vbytes;                                                                       //  DVD/BRD files, total bytes
 
 //  disk:DVD/BRD comparison data
 
-int      nnew, ndel, nmod, nunc;                                                 //  counts: new del mod unch
-int      Mfiles;                                                                 //  new + mod + del file count
-double   Mbytes;                                                                 //  new + mod files, total bytes
+int      nnew, ndel, nmod, nunc;                                                       //  counts: new del mod unch
+int      Mfiles;                                                                       //  new + mod + del file count
+double   Mbytes;                                                                       //  new + mod files, total bytes
 
 //  restore job data
 
-ch      *RJinex[maxnx];                                                          //  file restore include/exclude recs.
-int      RJnx;                                                                   //  actual RJinex count < maxnx
-int      RJval;                                                                  //  restore job data validated
-ch       RJfrom[XFCC];                                                           //  restore copy-from: /home/.../
-ch       RJto[XFCC];                                                             //  restore copy-to: /home/.../
-
-struct   rfrec {                                                                 //  restore file record
-   ch       *file;                                                               //  restore filespec: /home/.../file.ext
-   double   size;                                                                //  byte count
+ch      *RJinex[maxnx];                                                                //  file restore include/exclude recs.
+int      RJnx;                                                                         //  actual RJinex count < maxnx
+int      RJval;                                                                        //  restore job data validated
+ch       RJfrom[XFCC];                                                                 //  restore copy-from: /home/.../
+ch       RJto[XFCC];                                                                   //  restore copy-to: /home/.../
+
+struct   rfrec {                                                                       //  restore file record
+   ch       *file;                                                                     //  restore filespec: /home/.../file.ext
+   double   size;                                                                      //  byte count
 };
 
-rfrec    Rrec[maxfs];                                                            //  restore file data records
-int      Rnf;                                                                    //  actual file count < maxfs
-double   Rbytes;                                                                 //  total bytes
+rfrec    Rrec[maxfs];                                                                  //  restore file data records
+int      Rnf;                                                                          //  actual file count < maxfs
+double   Rbytes;                                                                       //  total bytes
 
 
 //  dkopp local functions
 
-int initfunc(void *data);                                                        //  GTK init function
-void buttonfunc(GtkWidget *item, ch *menu);                                      //  process toolbar button event
-void menufunc(GtkWidget *item, ch *menu);                                        //  process menu select event
-void script_func(void *);                                                        //  execute script file
-
-int quit_dkopp(ch *);                                                            //  exit application
-int clearScreen(ch *);                                                           //  clear logging window
-int signalFunc(ch *);                                                            //  kill/pause/resume curr. function
-int checkKillPause();                                                            //  test flags: killFlag and pauseFlag
-
-int fileOpen(ch *);                                                              //  file open dialog
-int fileSave(ch *);                                                              //  file save dialog
-int BJload(ch *fspec);                                                           //  backup job data <<< file
-int BJstore(ch *fspec);                                                          //  backup job data >>> file
-int BJvload(ch *);                                                               //  load job file from DVD/BRD
-
-int BJedit(ch *);                                                                //  backup job edit dialog
-int BJedit_event(zdialog *zd, ch *event);                                        //  dialog event function
-int BJedit_stuff(zdialog * zd);                                                  //  stuff dialog widgets with job data
-int BJedit_fetch(zdialog * zd);                                                  //  set job data from dialog widgets
-
-int Backup(ch *);                                                                //  backup menu function
-int FullBackup(ch *vmode);                                                       //  full backup + verify
-int IncrBackup(ch *bmode, ch *vmode);                                            //  incremental / accumulate + verify
-int Verify(ch *);                                                                //  verify functions
-
-int Report(ch *);                                                                //  report functions
-int get_current_files(ch *);                                                     //  file stats. per include/exclude
-int report_summary_diffs(ch *);                                                  //  disk:DVD/BRD differences summary
-int report_directory_diffs(ch *);                                                //  disk:DVD/BRD differences by directory
-int report_file_diffs(ch *);                                                     //  disk:DVD/BRD differences by file
-int list_current_files(ch *);                                                    //  list all disk files for backup
-int list_DVD_files(ch *);                                                        //  list all files on DVD/BRD
-int find_files(ch *);                                                            //  find files on disk, DVD/BRD, hist
-int view_backup_hist(ch *);                                                      //  view backup history files
-
-int RJedit(ch *);                                                                //  restore job edit dialog
-int RJedit_event(zdialog*, ch *event);                                           //  RJedit response
-int RJlist(ch *);                                                                //  list DVD/BRD files to be restored
-int Restore(ch *);                                                               //  file restore function
-
-int getDVDs(void *);                                                             //  get avail. DVD/BRD's, mount points
-int setDVDdevice(ch *);                                                          //  set DVD/BRD device and mount point
-int setDVDlabel(ch *);                                                           //  set new DVD/BRD label
-int mountDVD(ch *);                                                              //  mount DVD/BRD, echo outputs, status
-int unmountDVD(ch *);                                                            //  unmount DVD/BRD + echo outputs
-int ejectDVD(ch *);                                                              //  eject DVD/BRD + echo outputs
-int resetDVD(ch *);                                                              //  hardware reset
-int eraseDVD(ch *);                                                              //  fill DVD/BRD with zeros (long time)
-int formatDVD(ch *);                                                             //  quick format DVD/BRD
-
-int helpFunc(ch *);                                                              //  help function
-
-int fc_dialog(ch *dirk);                                                         //  file chooser dialog
-int fc_response(GtkDialog *, int, void *);                                       //  fc_dialog response
-
-int writeDT();                                                                   //  write date-time to temp file
-int save_filepoop();                                                             //  save file owner & permissions data
-int restore_filepoop();                                                          //  restore file owner & perm. data
-int createBackupHist();                                                          //  create backup history file
-
-int inexParse(ch   *rec, ch   *&rtype, ch   *&fspec);                            //  parse include/exclude record
-int BJvalidate(ch *);                                                            //  validate backup job data
-int RJvalidate();                                                                //  validate restore job data
-int nxValidate(ch   **recs, int nr);                                             //  validate include/exclude recs
-
-int dGetFiles();                                                                 //  generate file list from job
-int vGetFiles();                                                                 //  find all DVD/BRD files
-int rGetFiles();                                                                 //  generate restore job file list
-int setFileDisps();                                                              //  set file disps: new del mod unch
-int SortFileList(ch   *recs, int RL, int NR, ch   sort);                         //  sort file list in memory
-int filecomp(ch *file1, ch *file2);                                              //  compare directories before files
-
-int BJreset();                                                                   //  reset backup job file data
-int RJreset();                                                                   //  reset restore job data
-int dFilesReset();                                                               //  reset disk file data and free memory
-int vFilesReset();                                                               //  reset DVD/BRD file data, free memory
-int rFilesReset();                                                               //  reset restore file data, free memory
-
-ch *checkFile(ch *dfile, int compf, double &tcc);                                //  validate file on BRD/DVD medium
-ch *copyfile(ch *vfile, ch *dfile);                                              //  copy file from DVD/BRD to disk
-
-int track_filespec(ch *filespec);                                                //  track filespec on screen, no scroll
-int track_filespec_err(ch *filespec, ch *errmess);                               //  error logger for track_filespec()
-ch *kleenex(ch *name);                                                           //  clean exotic file names for output
+int initfunc(void *data);                                                              //  GTK init function
+void buttonfunc(GtkWidget *item, ch *menu);                                            //  process toolbar button event
+void menufunc(GtkWidget *item, ch *menu);                                              //  process menu select event
+void script_func(void *);                                                              //  execute script file
+
+int quit_dkopp(ch *);                                                                  //  exit application
+int clearScreen(ch *);                                                                 //  clear logging window
+int signalFunc(ch *);                                                                  //  kill/pause/resume curr. function
+int checkKillPause();                                                                  //  test flags: killFlag and pauseFlag
+
+int fileOpen(ch *);                                                                    //  file open dialog
+int fileSave(ch *);                                                                    //  file save dialog
+int BJload(ch *fspec);                                                                 //  backup job data <<< file
+int BJstore(ch *fspec);                                                                //  backup job data >>> file
+int BJvload(ch *);                                                                     //  load job file from DVD/BRD
+
+int BJedit(ch *);                                                                      //  backup job edit dialog
+int BJedit_event(zdialog *zd, ch *event);                                              //  dialog event function
+int BJedit_stuff(zdialog * zd);                                                        //  stuff dialog widgets with job data
+int BJedit_fetch(zdialog * zd);                                                        //  set job data from dialog widgets
+
+int Backup(ch *);                                                                      //  backup menu function
+int FullBackup(ch *vmode);                                                             //  full backup + verify
+int IncrBackup(ch *bmode, ch *vmode);                                                  //  incremental / accumulate + verify
+int Verify(ch *);                                                                      //  verify functions
+
+int Report(ch *);                                                                      //  report functions
+int get_current_files(ch *);                                                           //  file stats. per include/exclude
+int report_summary_diffs(ch *);                                                        //  disk:DVD/BRD differences summary
+int report_directory_diffs(ch *);                                                      //  disk:DVD/BRD differences by directory
+int report_file_diffs(ch *);                                                           //  disk:DVD/BRD differences by file
+int list_current_files(ch *);                                                          //  list all disk files for backup
+int list_DVD_files(ch *);                                                              //  list all files on DVD/BRD
+int find_files(ch *);                                                                  //  find files on disk, DVD/BRD, hist
+int view_backup_hist(ch *);                                                            //  view backup history files
+
+int RJedit(ch *);                                                                      //  restore job edit dialog
+int RJedit_event(zdialog*, ch *event);                                                 //  RJedit response
+int RJlist(ch *);                                                                      //  list DVD/BRD files to be restored
+int Restore(ch *);                                                                     //  file restore function
+
+int getDVDs(void *);                                                                   //  get avail. DVD/BRD's, mount points
+int setDVDdevice(ch *);                                                                //  set DVD/BRD device and mount point
+int setDVDlabel(ch *);                                                                 //  set new DVD/BRD label
+int mountDVD(ch *);                                                                    //  mount DVD/BRD, echo outputs, status
+int unmountDVD(ch *);                                                                  //  unmount DVD/BRD + echo outputs
+int ejectDVD(ch *);                                                                    //  eject DVD/BRD + echo outputs
+int resetDVD(ch *);                                                                    //  hardware reset
+int eraseDVD(ch *);                                                                    //  fill DVD/BRD with zeros (long time)
+int formatDVD(ch *);                                                                   //  quick format DVD/BRD
+
+int helpFunc(ch *);                                                                    //  help function
+
+int fc_dialog(ch *dirk);                                                               //  file chooser dialog
+int fc_response(GtkDialog *, int, void *);                                             //  fc_dialog response
+
+int writeDT();                                                                         //  write date-time to temp file
+int save_filepoop();                                                                   //  save file owner & permissions data
+int restore_filepoop();                                                                //  restore file owner & perm. data
+int createBackupHist();                                                                //  create backup history file
+
+int inexParse(ch   *rec, ch   *&rtype, ch   *&fspec);                                  //  parse include/exclude record
+int BJvalidate(ch *);                                                                  //  validate backup job data
+int RJvalidate();                                                                      //  validate restore job data
+int nxValidate(ch   **recs, int nr);                                                   //  validate include/exclude recs
+
+int dGetFiles();                                                                       //  generate file list from job
+int vGetFiles();                                                                       //  find all DVD/BRD files
+int rGetFiles();                                                                       //  generate restore job file list
+int setFileDisps();                                                                    //  set file disps: new del mod unch
+int SortFileList(ch   *recs, int RL, int NR, ch   sort);                               //  sort file list in memory
+int filecomp(ch *file1, ch *file2);                                                    //  compare directories before files
+
+int BJreset();                                                                         //  reset backup job file data
+int RJreset();                                                                         //  reset restore job data
+int dFilesReset();                                                                     //  reset disk file data and free memory
+int vFilesReset();                                                                     //  reset DVD/BRD file data, free memory
+int rFilesReset();                                                                     //  reset restore file data, free memory
+
+ch *checkFile(ch *dfile, int compf, double &tcc);                                      //  validate file on BRD/DVD medium
+ch *copyfile(ch *vfile, ch *dfile);                                                    //  copy file from DVD/BRD to disk
+
+int track_filespec(ch *filespec);                                                      //  track filespec on screen, no scroll
+int track_filespec_err(ch *filespec, ch *errmess);                                     //  error logger for track_filespec()
+ch *kleenex(ch *name);                                                                 //  clean exotic file names for output
 
-int do_shell(ch *pname, ch *command);                                            //  shell command + output to window
-int track_growisofs_files(ch   *buff);                                           //  convert %done to filespec, output
+int do_shell(ch *pname, ch *command);                                                  //  shell command + output to window
+int track_growisofs_files(ch   *buff);                                                 //  convert %done to filespec, output
 
 
 //  dkopp menu table
 
 struct menuent {
-   ch       menu1[20], menu2[40];                                                //  top-menu, sub-menu
-   int      lock;                                                                //  lock funcs: no run parallel
-   int      (*mfunc)(ch *);                                                      //  processing function
+   ch       menu1[20], menu2[40];                                                      //  top-menu, sub-menu
+   int      lock;                                                                      //  lock funcs: no run parallel
+   int      (*mfunc)(ch *);                                                            //  processing function
 };
 
 #define nmenu  43
@@ -326,60 +326,60 @@ struct menuent menus[nmenu] = {
 
 int main(int argc, ch   *argv[])
 {
-   GtkWidget   *mbar;                                                            //  menubar
+   GtkWidget   *mbar;                                                                  //  menubar
    GtkWidget   *mFile, *mBackup, *mVerify, *mReport, *mRestore;
    GtkWidget   *mDVD, *mHelp;
    int         ii;
    
-   zinitapp(release,argc,argv);                                                  //  get install directories
+   zinitapp(release,argc,argv);                                                        //  get install directories
    
-   Fgui = 1;                                                                     //  assume GUI
-   clrun = 0;                                                                    //  no command line run command
-   *scrFile = 0;                                                                 //  no script file
-   *BJfile = 0;                                                                  //  no backup job file
+   Fgui = 1;                                                                           //  assume GUI
+   clrun = 0;                                                                          //  no command line run command
+   *scrFile = 0;                                                                       //  no script file
+   *BJfile = 0;                                                                        //  no backup job file
 
-   for (ii = 1; ii < argc; ii++)                                                 //  get command line options
+   for (ii = 1; ii < argc; ii++)                                                       //  get command line options
    {
-      if (strmatch(argv[ii],"-nogui")) Fgui = 0;                                 //  command line operation
-      else if (strmatch(argv[ii],"-job") && argc > ii+1)                         //  -job jobfile  (load job)
+      if (strmatch(argv[ii],"-nogui")) Fgui = 0;                                       //  command line operation
+      else if (strmatch(argv[ii],"-job") && argc > ii+1)                               //  -job jobfile  (load job)
             strcpy(BJfile,argv[++ii]);
-      else if (strmatch(argv[ii],"-run") && argc > ii+1)                         //  -run jobfile  (load and run job)
+      else if (strmatch(argv[ii],"-run") && argc > ii+1)                               //  -run jobfile  (load and run job)
           { strcpy(BJfile,argv[++ii]); clrun++; }
-      else if (strmatch(argv[ii],"-script") && argc > ii+1)                      //  -script scriptfile  (execute script)
+      else if (strmatch(argv[ii],"-script") && argc > ii+1)                            //  -script scriptfile  (execute script)
             strcpy(scrFile,argv[++ii]);
-      else  strcpy(BJfile,argv[ii]);                                             //  assume a job file and load it
+      else  strcpy(BJfile,argv[ii]);                                                   //  assume a job file and load it
    }
 
-   if (! Fgui)                                                                   //  no GUI
+   if (! Fgui)                                                                         //  no GUI
    {
-      mLog = mWin = 0;                                                           //  output goes to STDOUT
-      initfunc(0);                                                               //  start job or script
-      unmountDVD(0);                                                             //  unmount DVD/BRD
-      ejectDVD(0);                                                               //  eject DVD/BRD (may not work)
-      return 0;                                                                  //  exit
+      mLog = mWin = 0;                                                                 //  output goes to STDOUT
+      initfunc(0);                                                                     //  start job or script
+      unmountDVD(0);                                                                   //  unmount DVD/BRD
+      ejectDVD(0);                                                                     //  eject DVD/BRD (may not work)
+      return 0;                                                                        //  exit
    }
 
-   mWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);                                   //  create main window
+   mWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);                                         //  create main window
    zfuncs::mainwin = mWin;
 
    gtk_window_set_title(GTK_WINDOW(mWin),release);
    gtk_window_set_position(GTK_WINDOW(mWin),GTK_WIN_POS_CENTER);
    gtk_window_set_default_size(GTK_WINDOW(mWin),800,500);
 
-   mVbox = gtk_box_new(VERTICAL,0);                                              //  vertical packing box
-   gtk_container_add(GTK_CONTAINER(mWin),mVbox);                                 //  add to main window
+   mVbox = gtk_box_new(VERTICAL,0);                                                    //  vertical packing box
+   gtk_container_add(GTK_CONTAINER(mWin),mVbox);                                       //  add to main window
 
-   mScroll = gtk_scrolled_window_new(0,0);                                       //  scrolled window
-   gtk_box_pack_end(GTK_BOX(mVbox),mScroll,1,1,0);                               //  add to main window mVbox
+   mScroll = gtk_scrolled_window_new(0,0);                                             //  scrolled window
+   gtk_box_pack_end(GTK_BOX(mVbox),mScroll,1,1,0);                                     //  add to main window mVbox
 
-   mLog = gtk_text_view_new();                                                   //  text edit window
+   mLog = gtk_text_view_new();                                                         //  text edit window
    gtk_text_view_set_left_margin(GTK_TEXT_VIEW(mLog),2);
-   gtk_container_add(GTK_CONTAINER(mScroll),mLog);                               //  add to scrolled window
+   gtk_container_add(GTK_CONTAINER(mScroll),mLog);                                     //  add to scrolled window
 
-   logBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mLog));                      //  get related text buffer
+   logBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mLog));                            //  get related text buffer
    gtk_text_buffer_set_text(logBuff,"", -1);
 
-   mbar = create_menubar(mVbox);                                                 //  create menu bar and menus
+   mbar = create_menubar(mVbox);                                                       //  create menu bar and menus
       mFile = add_menubar_item(mbar,"File",menufunc);
          add_submenu_item(mFile,"open job",menufunc);
          add_submenu_item(mFile,"open DVD/BRD",menufunc);
@@ -426,7 +426,7 @@ int main(int argc, ch   *argv[])
 
 /***  buttons removed   8.2
 
-   GtkWidget *tbar = create_toolbar(mVbox,32);                                   //  create toolbar and buttons
+   GtkWidget *tbar = create_toolbar(mVbox,32);                                         //  create toolbar and buttons
    add_toolbar_button(tbar,"edit job","edit backup job","editjob.png",buttonfunc);
    add_toolbar_button(tbar,"run job","run backup job","run.png",buttonfunc);
    add_toolbar_button(tbar,"run DVD/BRD","run job on DVD/BRD","run.png",buttonfunc);
@@ -438,10 +438,10 @@ int main(int argc, ch   *argv[])
 
 ***/
 
-   gtk_widget_show_all(mWin);                                                    //  show all widgets
-   G_SIGNAL(mWin,"destroy",quit_dkopp,0);                                        //  connect window destroy event
-   g_timeout_add(0,initfunc,0);                                                  //  setup initial call from gtk_main()
-   gtk_main();                                                                   //  process window events
+   gtk_widget_show_all(mWin);                                                          //  show all widgets
+   G_SIGNAL(mWin,"destroy",quit_dkopp,0);                                              //  connect window destroy event
+   g_timeout_add(0,initfunc,0);                                                        //  setup initial call from gtk_main()
+   gtk_main();                                                                         //  process window events
    return 0;
 }
 
@@ -454,7 +454,7 @@ int initfunc(void *)
    ch       *home;
    time_t   datetime;
 
-   strcpy(homedir,get_zhomedir());                                               //  get temp file names
+   strcpy(homedir,get_zhomedir());                                                     //  get temp file names
    snprintf(TFdiskfiles,200,"%s/diskfiles",homedir);
    snprintf(TFdvdfiles,200,"%s/dvdfiles",homedir);
    snprintf(TFfilepoop,200,"%s/filepoop",homedir);
@@ -466,59 +466,59 @@ int initfunc(void *)
    datetime = time(0);
    printf("dkopp errlog %s \n",ctime(&datetime));
 
-   menuLock = Fdialog = 0;                                                       //  initialize controls
+   menuLock = Fdialog = 0;                                                             //  initialize controls
    killFlag = pauseFlag = commFail = 0;
    strcpy(subprocName,"");
    strcpy(scriptParam,"");
 
-   strcpy(BJdvd,"/dev/sr0");                                                     //  default DVD/BRD device
-   strcpy(dvdmp,"/media/dkopp");                                                 //  default mount point
-   dvdmpcc = strlen(dvdmp);                                                      //  mount point cc
-   strcpy(dvdlabel,"dkopp");                                                     //  default DVD/BRD label
-   strcpy(BJbmode,"full");                                                       //  backup mode
-   strcpy(BJvmode,"full");                                                       //  verify mode
-   BJval = 0;                                                                    //  not validated
-   BJmod = 0;                                                                    //  not modified
-   strcpy(BJdatefrom,"1970.01.01");                                              //  file age exclusion default
+   strcpy(BJdvd,"/dev/sr0");                                                           //  default DVD/BRD device
+   strcpy(dvdmp,"/media/dkopp");                                                       //  default mount point
+   dvdmpcc = strlen(dvdmp);                                                            //  mount point cc
+   strcpy(dvdlabel,"dkopp");                                                           //  default DVD/BRD label
+   strcpy(BJbmode,"full");                                                             //  backup mode
+   strcpy(BJvmode,"full");                                                             //  verify mode
+   BJval = 0;                                                                          //  not validated
+   BJmod = 0;                                                                          //  not modified
+   strcpy(BJdatefrom,"1970.01.01");                                                    //  file age exclusion default
    BJtdate = 0;
 
-   BJnx = 4;                                                                     //  backup job include/exclude recs
+   BJnx = 4;                                                                           //  backup job include/exclude recs
    for (ii = 0; ii < BJnx; ii++)
       BJinex[ii] = (ch   *) zmalloc(50,"BJinex");
 
-   home = getenv("HOME");                                                        //  get "/home/username"
+   home = getenv("HOME");                                                              //  get "/home/username"
    if (! home) home = (ch   *) "/home/xxx";
-   strcpy(BJinex[0],"# dkopp default backup job");                               //  initz. default backup specs           8.1
-   sprintf(BJinex[1],"include %s/*",home);                                       //  include /home/username/*
-   sprintf(BJinex[2],"exclude *thumbnails*");                                    //  exclude thumbnails
-   sprintf(BJinex[2],"exclude *.cache*");                                        //  exclude cache
-
-   Dnf = Vnf = Rnf = Mfiles = 0;                                                 //  file counts = 0
-   Dbytes = Dbytes2 = Vbytes = Mbytes = 0.0;                                     //  byte counts = 0
-
-   strcpy(RJfrom,"/home/");                                                      //  file restore copy-from location
-   strcpy(RJto,"/home/");                                                        //  file restore copy-to location
-   RJnx = 0;                                                                     //  no. restore include/exclude recs
-   RJval = 0;                                                                    //  restore job not validated
-
-   strcpy(mediumDT,"unknown");                                                   //  DVD/BRD medium last backup date-time
-   dvdtime = -1;                                                                 //  DVD/BRD device mod time
-   dvdmtd = 0;                                                                   //  DVD/BRD not mounted
+   strcpy(BJinex[0],"# dkopp default backup job");                                     //  initz. default backup specs           8.1
+   sprintf(BJinex[1],"include %s/*",home);                                             //  include /home/username/*
+   sprintf(BJinex[2],"exclude *thumbnails*");                                          //  exclude thumbnails
+   sprintf(BJinex[2],"exclude *.cache*");                                              //  exclude cache
+
+   Dnf = Vnf = Rnf = Mfiles = 0;                                                       //  file counts = 0
+   Dbytes = Dbytes2 = Vbytes = Mbytes = 0.0;                                           //  byte counts = 0
+
+   strcpy(RJfrom,"/home/");                                                            //  file restore copy-from location
+   strcpy(RJto,"/home/");                                                              //  file restore copy-to location
+   RJnx = 0;                                                                           //  no. restore include/exclude recs
+   RJval = 0;                                                                          //  restore job not validated
+
+   strcpy(mediumDT,"unknown");                                                         //  DVD/BRD medium last backup date-time
+   dvdtime = -1;                                                                       //  DVD/BRD device mod time
+   dvdmtd = 0;                                                                         //  DVD/BRD not mounted
 
-   if (*BJfile) {                                                                //  command line job file
+   if (*BJfile) {                                                                      //  command line job file
       BJload(BJfile);
       if (commFail) return 0;
    }
 
-   if (clrun) {                                                                  //  command line run command
+   if (clrun) {                                                                        //  command line run command
       menufunc(null,"File");
       menufunc(null,"run job");
    }
 
-   if (*scrFile) script_func(0);                                                 //  command line script file
+   if (*scrFile) script_func(0);                                                       //  command line script file
 
    txwidget_append2(mLog,0,"\n Searching for DVD/BRD devices ... \n");
-   g_timeout_add(1000,getDVDs,0);                                                //  blocks GTK until done
+   g_timeout_add(1000,getDVDs,0);                                                      //  blocks GTK until done
 
    return 0;
 }
@@ -531,10 +531,10 @@ void buttonfunc(GtkWidget *item, ch *but
    ch   button2[20], *pp;
 
    strncpy0(button2,button,19);
-   pp = strchr(button2,'\n');                                                    //  replace \n with blank
+   pp = strchr(button2,'\n');                                                          //  replace \n with blank
    if (pp) *pp = ' ';
 
-   menufunc(item,"button");                                                      //  use menu function for button
+   menufunc(item,"button");                                                            //  use menu function for button
    menufunc(item,button2);
    return;
 }
@@ -549,38 +549,38 @@ void menufunc(GtkWidget *, ch *menu)
    int            kk;
 
    for (ii = 0; ii < nmenu; ii++)
-         if (strmatch(menu,menus[ii].menu1)) break;                              //  mark top-menu selection
+         if (strmatch(menu,menus[ii].menu1)) break;                                    //  mark top-menu selection
    if (ii < nmenu) { strcpy(menu1,menu); return;  }
 
    for (ii = 0; ii < nmenu; ii++)
          if (strmatch(menu1,menus[ii].menu1) &&
-             strmatch(menu,menus[ii].menu2)) break;                              //  mark sub-menu selection
+             strmatch(menu,menus[ii].menu2)) break;                                    //  mark sub-menu selection
    if (ii < nmenu) strcpy(menu2,menu);
 
-   else {                                                                        //  no match to menus
+   else {                                                                              //  no match to menus
       txwidget_append2(mLog,0," *** bad command: %s \n",menu);
       commFail++;
       return;
    }
 
-   if (menuLock && menus[ii].lock) {                                             //  no lock funcs can run parallel
+   if (menuLock && menus[ii].lock) {                                                   //  no lock funcs can run parallel
       if (Fgui)
          zmessageACK(mWin,"wait for current function to complete");
       return;
    }
 
    if (! menuLock) {
-      killFlag = pauseFlag = 0;                                                  //  reset controls
+      killFlag = pauseFlag = 0;                                                        //  reset controls
       *subprocName = 0;
-      commFail = 0;                                                              //  start with no errors
+      commFail = 0;                                                                    //  start with no errors
    }
 
-   if (! *scrFile)                                                               //  if not a script file,
-      txwidget_append2(mLog,1,"\n""command: %s > %s \n",menu1,menu2);            //    echo command to window
+   if (! *scrFile)                                                                     //  if not a script file,
+      txwidget_append2(mLog,1,"\n""command: %s > %s \n",menu1,menu2);                  //    echo command to window
 
-   kk = ii;                                                                      //  move to non-static memory
+   kk = ii;                                                                            //  move to non-static memory
 
-   if (menus[kk].lock) ++menuLock;                                               //  call menu function
+   if (menus[kk].lock) ++menuLock;                                                     //  call menu function
    menus[kk].mfunc(menu2);
    if (menus[kk].lock) --menuLock;
 
@@ -598,7 +598,7 @@ void script_func(void *)
    ch       *pp;
    ch       *bb;
 
-   fid = fopen(scrFile,"r");                                                     //  open file
+   fid = fopen(scrFile,"r");                                                           //  open file
    if (! fid) {
       txwidget_append2(mLog,0," *** can't open script file: %s \n",scrFile);
       commFail++;
@@ -608,23 +608,23 @@ void script_func(void *)
 
    while (true)
    {
-      if (checkKillPause()) break;                                               //  exit script
+      if (checkKillPause()) break;                                                     //  exit script
       if (commFail) break;
 
-      pp = fgets_trim(buff,199,fid,1);                                           //  read next record
-      if (! pp) break;                                                           //  EOF
+      pp = fgets_trim(buff,199,fid,1);                                                 //  read next record
+      if (! pp) break;                                                                 //  EOF
 
-      txwidget_append2(mLog,0,"\n""Script: %s \n",buff);                         //  write to log
+      txwidget_append2(mLog,0,"\n""Script: %s \n",buff);                               //  write to log
 
-      bb = strchr(buff,'#');                                                     //  get rid of comments
+      bb = strchr(buff,'#');                                                           //  get rid of comments
       if (bb) *bb = 0;
-      cc = strTrim(buff);                                                        //  and trailing blanks
+      cc = strTrim(buff);                                                              //  and trailing blanks
       if (cc < 2) continue;
 
       *menu1 = *menu2 = 0;
       *scriptParam = 0;
 
-      Nth = 1;                                                                   //  parse menu1 > menu2 > parameter
+      Nth = 1;                                                                         //  parse menu1 > menu2 > parameter
       pp = substring(buff,'>',Nth++);
       if (pp) strncpy0(menu1,pp,20);
       pp = substring(buff,'>',Nth++);
@@ -632,15 +632,15 @@ void script_func(void *)
       pp = substring(buff,'>',Nth++);
       if (pp) strncpy0(scriptParam,pp,200);
 
-      strTrim(menu1);                                                            //  get rid of trailing blanks
+      strTrim(menu1);                                                                  //  get rid of trailing blanks
       strTrim(menu2);
 
       if (strmatch(menu1,"exit")) break;
 
-      menufunc(null,menu1);                                                      //  simulate menu entries
+      menufunc(null,menu1);                                                            //  simulate menu entries
       menufunc(null,menu2);
 
-      while (Fdialog) sleep(1);                                                  //  if dialog, wait for compl.
+      while (Fdialog) sleep(1);                                                        //  if dialog, wait for compl.
    }
 
    txwidget_append2(mLog,0,"script exiting \n");
@@ -660,17 +660,17 @@ int quit_dkopp(ch *menu)
 
    signalFunc("kill job");
 
-   if (BJmod) {                                                                  //  job data was modified
-      yn = zmessageYN(mWin,"SAVE changes to dkopp job?");                        //  give user a chance to save mods
+   if (BJmod) {                                                                        //  job data was modified
+      yn = zmessageYN(mWin,"SAVE changes to dkopp job?");                              //  give user a chance to save mods
       if (yn) fileSave(null);
    }
 
    if (dvdmtd) {
-      unmountDVD(0);                                                             //  unmount DVD/BRD
-      ejectDVD(0);                                                               //  eject DVD/BRD (may not work)
+      unmountDVD(0);                                                                   //  unmount DVD/BRD
+      ejectDVD(0);                                                                     //  eject DVD/BRD (may not work)
    }
 
-   gtk_main_quit();                                                              //  tell gtk_main() to quit
+   gtk_main_quit();                                                                    //  tell gtk_main() to quit
    return 0;
 }
 
@@ -691,20 +691,20 @@ int signalFunc(ch *menu)
    if (strmatch(menu,"kill job"))
    {
       if (! menuLock) {
-         txwidget_append2(mLog,0,"\n""ready \n");                                //  already dead
+         txwidget_append2(mLog,0,"\n""ready \n");                                      //  already dead
          return 0;
       }
 
-      if (killFlag) {                                                            //  redundant kill
+      if (killFlag) {                                                                  //  redundant kill
          if (*subprocName) {
             txwidget_append2(mLog,0," *** kill again: %s \n",subprocName);
-            signalProc(subprocName,"kill");                                      //  kill subprocess
+            signalProc(subprocName,"kill");                                            //  kill subprocess
          }
-         else txwidget_append2(mLog,0," *** waiting for function exit \n");      //  or wait for function to die
+         else txwidget_append2(mLog,0," *** waiting for function exit \n");            //  or wait for function to die
          return 0;
       }
 
-      txwidget_append2(mLog,0," *** KILL current function \n");                  //  initial kill
+      txwidget_append2(mLog,0," *** KILL current function \n");                        //  initial kill
       pauseFlag = 0;
       killFlag = 1;
 
@@ -738,13 +738,13 @@ int signalFunc(ch *menu)
 
 int checkKillPause()
 {
-   while (pauseFlag) {                                                           //  idle loop while paused
+   while (pauseFlag) {                                                                 //  idle loop while paused
       zsleep(0.1);
-      zmainloop();                                                               //  process menus
+      zmainloop();                                                                     //  process menus
    }
 
-   if (killFlag) return 1;                                                       //  return true = stop now
-   return 0;                                                                     //  return false = continue
+   if (killFlag) return 1;                                                             //  return true = stop now
+   return 0;                                                                           //  return false = continue
 }
 
 
@@ -755,7 +755,7 @@ int fileOpen(ch *menu)
    ch       *file;
    int      err = 0;
 
-   if (*scriptParam) {                                                           //  get file from script
+   if (*scriptParam) {                                                                 //  get file from script
       strcpy(BJfile,scriptParam);
       *scriptParam = 0;
       err = BJload(BJfile);
@@ -764,12 +764,12 @@ int fileOpen(ch *menu)
 
    ++Fdialog;
 
-   file = zgetfile("open backup job",MWIN,"file",homedir,1);                     //  get file from user
+   file = zgetfile("open backup job",MWIN,"file",homedir,1);                           //  get file from user
    if (file) {
       if (strlen(file) > XFCC-2) zappcrash("pathname too big");
       strcpy(BJfile,file);
       zfree(file);
-      err = BJload(BJfile);                                                      //  get job data from file
+      err = BJload(BJfile);                                                            //  get job data from file
    }
    else err = 1;
 
@@ -785,7 +785,7 @@ int fileSave(ch *menu)
    ch       *file;
    int      nstat, err = 0;
 
-   if (*scriptParam) {                                                           //  get file from script
+   if (*scriptParam) {                                                                 //  get file from script
       strcpy(BJfile,scriptParam);
       *scriptParam = 0;
       BJstore(BJfile);
@@ -799,14 +799,14 @@ int fileSave(ch *menu)
 
    ++Fdialog;
 
-   if (! *BJfile) strcpy(BJfile,"dkopp.job");                                    //  if no job file, use default
+   if (! *BJfile) strcpy(BJfile,"dkopp.job");                                          //  if no job file, use default
    file = zgetfile("save backup job",MWIN,"save",BJfile,1);
    if (file) {
       if (strlen(file) > XFCC-2) zappcrash("pathname too big");
       strcpy(BJfile,file);
       zfree(file);
       err = BJstore(BJfile);
-      if (! err) BJmod = 0;                                                      //  job not modified
+      if (! err) BJmod = 0;                                                            //  job not modified
    }
 
    --Fdialog;
@@ -825,22 +825,22 @@ int BJload(ch *fspec)
    ch       rtype2[20];
    int      cc, Nth, nerrs;
 
-   BJreset();                                                                    //  clear old job from memory
+   BJreset();                                                                          //  clear old job from memory
    nerrs = 0;
 
    txwidget_append2(mLog,1,"\n""loading job file: %s \n",fspec);
 
-   fid = fopen(fspec,"r");                                                       //  open file
+   fid = fopen(fspec,"r");                                                             //  open file
    if (! fid) {
       txwidget_append2(mLog,0," *** cannot open job file: %s \n",fspec);
       commFail++;
       return 1;
    }
 
-   while (true)                                                                  //  read file
+   while (true)                                                                        //  read file
    {
       fgs = fgets_trim(buff,998,fid,1);
-      if (! fgs) break;                                                          //  EOF
+      if (! fgs) break;                                                                //  EOF
       cc = strlen(buff);
       if (cc > 996) {
          txwidget_append2(mLog,0," *** input record too big \n");
@@ -849,19 +849,19 @@ int BJload(ch *fspec)
       }
 
       Nth = 1;
-      rtype = substring(buff,' ',Nth++);                                         //  parse 1st field, record type
-      if (! rtype) rtype = "#";                                                  //  blank record is comment
+      rtype = substring(buff,' ',Nth++);                                               //  parse 1st field, record type
+      if (! rtype) rtype = "#";                                                        //  blank record is comment
       strncpy0(rtype2,rtype,19);
       strToLower(rtype2);
 
       if (strmatch(rtype2,"device")) {
-         rdata = substring(buff,' ',Nth++);                                      //  DVD/BRD device: /dev/dvd
+         rdata = substring(buff,' ',Nth++);                                            //  DVD/BRD device: /dev/dvd
          if (rdata) strncpy0(BJdvd,rdata,19);
          continue;
       }
 
       if (strmatch(rtype2,"backup")) {
-         rdata = substring(buff,' ',Nth++);                                      //  backup mode
+         rdata = substring(buff,' ',Nth++);                                            //  backup mode
          if (rdata) {
             strncpy0(BJbmode,rdata,19);
             strToLower(BJbmode);
@@ -870,7 +870,7 @@ int BJload(ch *fspec)
       }
 
       if (strmatch(rtype2,"verify")) {
-         rdata = substring(buff,' ',Nth++);                                      //  verify mode
+         rdata = substring(buff,' ',Nth++);                                            //  verify mode
          if (rdata) {
             strncpy0(BJvmode,rdata,19);
             strToLower(BJvmode);
@@ -879,13 +879,13 @@ int BJload(ch *fspec)
       }
 
       if (strmatch(rtype2,"datefrom")) {
-         rdata = substring(buff,' ',Nth++);                                      //  file mod date selection
+         rdata = substring(buff,' ',Nth++);                                            //  file mod date selection
          if (rdata) strncpy0(BJdatefrom,rdata,11);
          continue;
       }
 
       if (strmatchV(rtype2,"include","exclude","#",null)) {
-         BJinex[BJnx] = zstrdup(buff,"BJinex");                                  //  include/exclude or comment rec.
+         BJinex[BJnx] = zstrdup(buff,"BJinex");                                        //  include/exclude or comment rec.
          if (++BJnx >= maxnx) {
             txwidget_append2(mLog,0," *** exceed %d include/exclude recs \n",maxnx);
             nerrs++;
@@ -898,10 +898,10 @@ int BJload(ch *fspec)
       continue;
    }
 
-   fclose(fid);                                                                  //  close file
-   BJmod = 0;                                                                    //  new job, not modified
+   fclose(fid);                                                                        //  close file
+   BJmod = 0;                                                                          //  new job, not modified
 
-   BJvalidate(0);                                                                //  validation checks, set BJval
+   BJvalidate(0);                                                                      //  validation checks, set BJval
    if (! nerrs && BJval) return 0;
    BJval = 0;
    commFail++;
@@ -916,19 +916,19 @@ int BJstore(ch *fspec)
    FILE     *fid;
    int      ii;
 
-   fid = fopen(fspec,"w");                                                       //  open file
+   fid = fopen(fspec,"w");                                                             //  open file
    if (! fid) {
       txwidget_append2(mLog,0," *** cannot open file: %s \n",fspec);
       commFail++;
       return 1;
    }
 
-   fprintf(fid,"device %s \n",BJdvd);                                            //  device /dev/dvd
-   fprintf(fid,"backup %s \n",BJbmode);                                          //  backup full/incremental/accumulate
-   fprintf(fid,"verify %s \n",BJvmode);                                          //  verify full/incremental/thorough
-   fprintf(fid,"datefrom %s \n",BJdatefrom);                                     //  file mod date selection
+   fprintf(fid,"device %s \n",BJdvd);                                                  //  device /dev/dvd
+   fprintf(fid,"backup %s \n",BJbmode);                                                //  backup full/incremental/accumulate
+   fprintf(fid,"verify %s \n",BJvmode);                                                //  verify full/incremental/thorough
+   fprintf(fid,"datefrom %s \n",BJdatefrom);                                           //  file mod date selection
 
-   for (ii = 0; ii < BJnx; ii++)                                                 //  output all include/exclude recs
+   for (ii = 0; ii < BJnx; ii++)                                                       //  output all include/exclude recs
       fprintf(fid,"%s \n",BJinex[ii]);
 
    fclose(fid);
@@ -943,17 +943,17 @@ int BJvload(ch *menu)
 {
    ch       vjfile[100];
 
-   BJreset();                                                                    //  reset job data
+   BJreset();                                                                          //  reset job data
 
-   mountDVD(0);                                                                  //  (re) mount DVD/BRD
+   mountDVD(0);                                                                        //  (re) mount DVD/BRD
    if (! dvdmtd) {
       commFail++;
       return 1;
    }
 
-   strcpy(vjfile,dvdmp);                                                         //  dvd mount point
-   strcat(vjfile,V_JOBFILE);                                                     //  + dvd job file
-   BJload(vjfile);                                                               //  load job file (BJval set)
+   strcpy(vjfile,dvdmp);                                                               //  dvd mount point
+   strcat(vjfile,V_JOBFILE);                                                           //  + dvd job file
+   BJload(vjfile);                                                                     //  load job file (BJval set)
    if (BJval) return 0;
    commFail++;
    return 1;
@@ -971,11 +971,11 @@ int BJedit(ch *menu)
    zd = zdialog_new("edit backup job",mWin,"browse","done","clear","cancel",null);
 
    zdialog_add_widget(zd,"hbox","hb1","dialog",0,"space=5");
-   zdialog_add_widget(zd,"label","labdev","hb1","DVD/BRD device","space=3");     //  DVD/BRD device  [______________][v]
+   zdialog_add_widget(zd,"label","labdev","hb1","DVD/BRD device","space=3");           //  DVD/BRD device  [______________][v]
    zdialog_add_widget(zd,"combo","entdvd","hb1",BJdvd);
 
    zdialog_add_widget(zd,"hbox","hb2","dialog",0,"space=8");
-   zdialog_add_widget(zd,"button","bopen","hb2","open job file");                //  [open job] [DVD/BRD job] [save as]
+   zdialog_add_widget(zd,"button","bopen","hb2","open job file");                      //  [open job] [DVD/BRD job] [save as]
    zdialog_add_widget(zd,"button","bdvd","hb2","open DVD/BRD job");
    zdialog_add_widget(zd,"button","bsave","hb2"," save as ");
 
@@ -986,25 +986,25 @@ int BJedit(ch *menu)
 
    zdialog_add_widget(zd,"label","labbmode","vb3","Backup Mode");
    zdialog_add_widget(zd,"label","labvmode","vb4","Verify Mode");
-   zdialog_add_widget(zd,"radio","bmrb1","vb3","full");                          //  Backup Mode         Verify Mode
-   zdialog_add_widget(zd,"radio","bmrb2","vb3","incremental");                   //  (o) full            (o) full
-   zdialog_add_widget(zd,"radio","bmrb3","vb3","accumulate");                    //  (o) incremental     (o) incremental
-   zdialog_add_widget(zd,"radio","vmrb1","vb4","full");                          //  (o) accumulate      (o) thorough
-   zdialog_add_widget(zd,"radio","vmrb2","vb4","incremental");                   //  file date from:     [ yyyy.mm.dd ]
+   zdialog_add_widget(zd,"radio","bmrb1","vb3","full");                                //  Backup Mode         Verify Mode
+   zdialog_add_widget(zd,"radio","bmrb2","vb3","incremental");                         //  (o) full            (o) full
+   zdialog_add_widget(zd,"radio","bmrb3","vb3","accumulate");                          //  (o) incremental     (o) incremental
+   zdialog_add_widget(zd,"radio","vmrb1","vb4","full");                                //  (o) accumulate      (o) thorough
+   zdialog_add_widget(zd,"radio","vmrb2","vb4","incremental");                         //  file date from:     [ yyyy.mm.dd ]
    zdialog_add_widget(zd,"radio","vmrb3","vb4","thorough");
    zdialog_add_widget(zd,"label","labdate","vb3","file date from:");
    zdialog_add_widget(zd,"zentry","entdate","vb4","yyyy.mm.dd","size=10");
 
-   zdialog_add_widget(zd,"hsep","sep2","dialog",0,"space=8");                    //  edit box for include/exclude recs
+   zdialog_add_widget(zd,"hsep","sep2","dialog",0,"space=8");                          //  edit box for include/exclude recs
    zdialog_add_widget(zd,"label","labinex","dialog","Include / Exclude Files");
    zdialog_add_widget(zd,"frame","frminex","dialog",0,"expand");
    zdialog_add_widget(zd,"scrwin","scrwinex","frminex");
    zdialog_add_widget(zd,"zedit","edinex","scrwinex");
 
-   BJedit_stuff(zd);                                                             //  stuff dialog widgets with job data
+   BJedit_stuff(zd);                                                                   //  stuff dialog widgets with job data
 
    zdialog_resize(zd,0,600);
-   zdialog_run(zd,BJedit_event,"parent");                                        //  run dialog
+   zdialog_run(zd,BJedit_event,"parent");                                              //  run dialog
    return 0;
 }
 
@@ -1016,46 +1016,46 @@ int BJedit_event(zdialog *zd, ch *event)
    int      zstat, err = 0;
 
    zstat = zd->zstat;
-   zd->zstat = 0;                                                                //  dialog may continue
+   zd->zstat = 0;                                                                      //  dialog may continue
 
    if (zstat)
    {
-      if (zstat == 1) {                                                          //  browse, do file-chooser dialog
+      if (zstat == 1) {                                                                //  browse, do file-chooser dialog
          fc_dialog("/home");
          return 0;
       }
 
-      if (zstat == 2) {                                                          //  done
-         BJedit_fetch(zd);                                                       //  get all job data from dialog widgets
+      if (zstat == 2) {                                                                //  done
+         BJedit_fetch(zd);                                                             //  get all job data from dialog widgets
          if (! BJval) commFail++;
-         zdialog_free(zd);                                                       //  destroy dialog
+         zdialog_free(zd);                                                             //  destroy dialog
          --Fdialog;
          return 0;
       }
 
       if (zstat == 3) {
-         txwidget_clear(editwidget);                                             //  clear include/exclude recs
+         txwidget_clear(editwidget);                                                   //  clear include/exclude recs
          return 0;
       }
 
-      zdialog_free(zd);                                                          //  cancel
+      zdialog_free(zd);                                                                //  cancel
       --Fdialog;
       return 0;
    }
 
    if (strmatch(event,"bopen")) {
-      err = fileOpen("");                                                        //  get job file from user
-      if (! err) BJedit_stuff(zd);                                               //  stuff dialog widgets
+      err = fileOpen("");                                                              //  get job file from user
+      if (! err) BJedit_stuff(zd);                                                     //  stuff dialog widgets
    }
 
    if (strmatch(event,"bdvd")) {
-      err = BJvload("");                                                         //  get job file on DVD/BRD
-      if (! err) BJedit_stuff(zd);                                               //  stuff dialog widgets
+      err = BJvload("");                                                               //  get job file on DVD/BRD
+      if (! err) BJedit_stuff(zd);                                                     //  stuff dialog widgets
    }
 
    if (strmatch(event,"bsave")) {
-      BJedit_fetch(zd);                                                          //  get job data from dialog widgets
-      fileSave("");                                                              //  save to file
+      BJedit_fetch(zd);                                                                //  get job data from dialog widgets
+      fileSave("");                                                                    //  save to file
    }
 
    return 0;
@@ -1068,16 +1068,16 @@ int BJedit_stuff(zdialog * zd)
 {
    int      ii;
 
-   for (ii = 0; ii < ndvds; ii++)                                                //  DVD/BRD drives available
+   for (ii = 0; ii < ndvds; ii++)                                                      //  DVD/BRD drives available
       zdialog_stuff(zd,"entdvd",dvddevdesc[ii]);
-                                                                                 //  remove mount point get/stuff
+                                                                                       //  remove mount point get/stuff
    if (strmatch(BJbmode,"full")) zdialog_stuff(zd,"bmrb1",1);
    if (strmatch(BJbmode,"incremental")) zdialog_stuff(zd,"bmrb2",1);
    if (strmatch(BJbmode,"accumulate")) zdialog_stuff(zd,"bmrb3",1);
    if (strmatch(BJvmode,"full")) zdialog_stuff(zd,"vmrb1",1);
    if (strmatch(BJvmode,"incremental")) zdialog_stuff(zd,"vmrb2",1);
    if (strmatch(BJvmode,"thorough")) zdialog_stuff(zd,"vmrb3",1);
-   zdialog_stuff(zd,"entdate",BJdatefrom);                                       //  file mod date selection
+   zdialog_stuff(zd,"entdate",BJdatefrom);                                             //  file mod date selection
 
    editwidget = zdialog_gtkwidget(zd,"edinex");
    txwidget_clear(editwidget);
@@ -1095,37 +1095,37 @@ int BJedit_fetch(zdialog * zd)
    int       ii, line;
    ch        text[40], *pp;
 
-   BJreset();                                                                    //  reset job data
+   BJreset();                                                                          //  reset job data
 
-   zdialog_fetch(zd,"entdvd",text,19);                                           //  get DVD/BRD device
+   zdialog_fetch(zd,"entdvd",text,19);                                                 //  get DVD/BRD device
    strncpy0(BJdvd,text,19);
    pp = strchr(BJdvd,' ');
    if (pp) *pp = 0;
-                                                                                 //  remove mount point fetch/save
-   zdialog_fetch(zd,"bmrb1",ii); if (ii) strcpy(BJbmode,"full");                 //  backup mode
+                                                                                       //  remove mount point fetch/save
+   zdialog_fetch(zd,"bmrb1",ii); if (ii) strcpy(BJbmode,"full");                       //  backup mode
    zdialog_fetch(zd,"bmrb2",ii); if (ii) strcpy(BJbmode,"incremental");
    zdialog_fetch(zd,"bmrb3",ii); if (ii) strcpy(BJbmode,"accumulate");
 
-   zdialog_fetch(zd,"vmrb1",ii); if (ii) strcpy(BJvmode,"full");                 //  verify mode
+   zdialog_fetch(zd,"vmrb1",ii); if (ii) strcpy(BJvmode,"full");                       //  verify mode
    zdialog_fetch(zd,"vmrb2",ii); if (ii) strcpy(BJvmode,"incremental");
    zdialog_fetch(zd,"vmrb3",ii); if (ii) strcpy(BJvmode,"thorough");
 
-   zdialog_fetch(zd,"entdate",BJdatefrom,11);                                    //  file mod date selection
+   zdialog_fetch(zd,"entdate",BJdatefrom,11);                                          //  file mod date selection
 
    for (line = 0; ; line++)
    {
-      pp = txwidget_line(editwidget,line,1);                                     //  include/exclude recs.
+      pp = txwidget_line(editwidget,line,1);                                           //  include/exclude recs.
       if (! pp || ! *pp) break;
-      strTrim(pp);                                                               //  remove trailing blanks
-      BJinex[BJnx] = zstrdup(pp,"BJinex");                                       //  copy new record
+      strTrim(pp);                                                                     //  remove trailing blanks
+      BJinex[BJnx] = zstrdup(pp,"BJinex");                                             //  copy new record
       if (++BJnx >= maxnx) {
          txwidget_append2(mLog,0," *** exceed %d include/exclude recs \n",maxnx);
          break;
       }
    }
 
-   BJmod++;                                                                      //  job modified
-   BJvalidate(0);                                                                //  check for errors, set BJval
+   BJmod++;                                                                            //  job modified
+   BJvalidate(0);                                                                      //  check for errors, set BJval
    return 0;
 }
 
@@ -1137,25 +1137,25 @@ int Backup(ch *menu)
    strcpy(mbmode,"");
    strcpy(mvmode,"");
 
-   if (strmatchV(menu,"full","incremental","accumulate",null))                   //  backup only
+   if (strmatchV(menu,"full","incremental","accumulate",null))                         //  backup only
       strcpy(mbmode,menu);
 
-   if (strmatch(menu,"run DVD/BRD")) BJvload(null);                              //  load job file from DVD/BRD if req.
+   if (strmatch(menu,"run DVD/BRD")) BJvload(null);                                    //  load job file from DVD/BRD if req.
 
-   if (strmatchV(menu,"run job","run DVD/BRD",null)) {                           //  if run job or job on DVD/BRD,
-      if (BJval) {                                                               //   and valid job file,
-         strcpy(mbmode,BJbmode);                                                 //    use job file backup & verify modes
+   if (strmatchV(menu,"run job","run DVD/BRD",null)) {                                 //  if run job or job on DVD/BRD,
+      if (BJval) {                                                                     //   and valid job file,
+         strcpy(mbmode,BJbmode);                                                       //    use job file backup & verify modes
          strcpy(mvmode,BJvmode);
       }
    }
 
-   if (! BJval) {                                                                //  check for errors
+   if (! BJval) {                                                                      //  check for errors
       txwidget_append2(mLog,0," *** no valid backup job \n");
       goto backup_done;
    }
 
-   if (strmatch(mbmode,"full")) FullBackup(mvmode);                              //  full backup (+ verify)
-   else  IncrBackup(mbmode,mvmode);                                              //  incremental / accumulate (+ verify)
+   if (strmatch(mbmode,"full")) FullBackup(mvmode);                                    //  full backup (+ verify)
+   else  IncrBackup(mbmode,mvmode);                                                    //  incremental / accumulate (+ verify)
 
 backup_done:
    if (Fgui) txwidget_append2(mLog,0,"ready \n");
@@ -1173,78 +1173,78 @@ int FullBackup(ch *BJvmode)
    ch       *dfile, vfile[XFCC];
    double   secs, bspeed, time0;
 
-   dGetFiles();                                                                  //  get files for backup
+   dGetFiles();                                                                        //  get files for backup
    if (Dnf == 0) {
       txwidget_append2(mLog,0," *** nothing to back-up \n");
       goto backup_fail;
    }
 
-   vFilesReset();                                                                //  reset DVD/BRD files data
+   vFilesReset();                                                                      //  reset DVD/BRD files data
 
    txwidget_append2(mLog,1,"\n""begin full backup \n");
-   txwidget_append2(mLog,0," files: %d  bytes: %.0f \n",Dnf,                     //  files and bytes to copy
+   txwidget_append2(mLog,0," files: %d  bytes: %.0f \n",Dnf,                           //  files and bytes to copy
                                              formatKBMB(Dbytes,3));
 
-   if (! *dvdlabel) strcpy(dvdlabel,"dkopp");                                    //  if no label, default "dkopp"
+   if (! *dvdlabel) strcpy(dvdlabel,"dkopp");                                          //  if no label, default "dkopp"
 
-   BJstore(TFjobfile);                                                           //  copy job file (DVD/BRD) to temp file
-   save_filepoop();                                                              //  + owner and permissions to temp file
-   writeDT();                                                                    //  create date-time & usage temp file
+   BJstore(TFjobfile);                                                                 //  copy job file (DVD/BRD) to temp file
+   save_filepoop();                                                                    //  + owner and permissions to temp file
+   writeDT();                                                                          //  create date-time & usage temp file
 
-   fid = fopen(TFdiskfiles,"w");                                                 //  temp file for growisofs path-list
+   fid = fopen(TFdiskfiles,"w");                                                       //  temp file for growisofs path-list
    if (! fid) {
       txwidget_append2(mLog,0," *** cannot open /tmp scratch file \n");
       goto backup_fail;
    }
 
-   fprintf(fid,"%s=%s\n",V_JOBFILE +1,TFjobfile);                                //  add job file to growisofs list
-   fprintf(fid,"%s=%s\n",V_FILEPOOP +1,TFfilepoop);                              //  add directory poop file
-   fprintf(fid,"%s=%s\n",V_DATETIME +1,TFdatetime);                              //  add date-time file
+   fprintf(fid,"%s=%s\n",V_JOBFILE +1,TFjobfile);                                      //  add job file to growisofs list
+   fprintf(fid,"%s=%s\n",V_FILEPOOP +1,TFfilepoop);                                    //  add directory poop file
+   fprintf(fid,"%s=%s\n",V_DATETIME +1,TFdatetime);                                    //  add date-time file
 
    Dbytes2 = 0.0;
-   for (ii = 0; ii < Dnf; ii++)                                                  //  process all files for backup
+   for (ii = 0; ii < Dnf; ii++)                                                        //  process all files for backup
    {
-      dfile = Drec[ii].file;                                                     //  add to growisofs path-list
-      repl_1str(dfile,vfile,XFCC,"=","\\\\=");                                   //  replace "=" with "\\=" in file name
-      fprintf(fid,"%s=%s\n",vfile+1,dfile);                                      //  directories/file=/directories/file
+      dfile = Drec[ii].file;                                                           //  add to growisofs path-list
+      repl_1str(dfile,vfile,XFCC,"=","\\\\=");                                         //  replace "=" with "\\=" in file name
+      fprintf(fid,"%s=%s\n",vfile+1,dfile);                                            //  directories/file=/directories/file
       Dbytes2 += Drec[ii].size;
    }
 
    fclose(fid);
 
    txwidget_append2(mLog,0," writing DVD/BRD, %s \n",formatKBMB(Dbytes,3));
-   start_timer(time0);                                                           //  start timer for growisofs
+   start_timer(time0);                                                                 //  start timer for growisofs
 
-   snprintf(command,200,                                                         //  build growisofs command line
+   snprintf(command,200,                                                               //  build growisofs command line
       "growisofs -Z %s %s -r -graft-points "
-      "-iso-level 4 -gui -V \"%s\" %s -path-list %s 2>&1",                       //  label in quotes
+      "-iso-level 4 -gui -V \"%s\" %s -path-list %s 2>&1",                             //  label in quotes
        BJdvd,Nspeed,dvdlabel,gforce,TFdiskfiles);
 
 backup_retry:
 
-   gerr = do_shell("growisofs", command);                                        //  do growisofs, echo outputs
-   if (checkKillPause()) goto backup_fail;                                       //  killed by user
+   gerr = do_shell("growisofs", command);                                              //  do growisofs, echo outputs
+   if (checkKillPause()) goto backup_fail;                                             //  killed by user
    if (gerr) {
       if (! Fgui) goto backup_fail;
-      zstat = zdialog_choose(mWin,"parent","growisofs error",                    //  manual compensation for growisofs
-                        "abort","retry","ignore (continue)",null);               //    and/or gnome bugs
+      zstat = zdialog_choose(mWin,"parent","growisofs error",                          //  manual compensation for growisofs
+                        "abort","retry","ignore (continue)",null);                     //    and/or gnome bugs
       if (zstat == 1) goto backup_fail;
       if (zstat == 2) goto backup_retry;
    }
 
-   secs = get_timer(time0);                                                      //  output statistics
+   secs = get_timer(time0);                                                            //  output statistics
    txwidget_append2(mLog,0," backup time: %.0f secs \n",secs);
    bspeed = Dbytes2/1000000.0/secs;
    txwidget_append2(mLog,0," backup speed: %.2f MB/sec \n",bspeed);
    txwidget_append2(mLog,0," backup complete \n");
 
-   ejectDVD(0);                                                                  //  DVD may be hung after growisofs
+   ejectDVD(0);                                                                        //  DVD may be hung after growisofs
 
 verify_retry:
 
-   if (*BJvmode)                                                                 //  do verify if requested
+   if (*BJvmode)                                                                       //  do verify if requested
    {
-      mountDVD(0);                                                               //  test if DVD hung
+      mountDVD(0);                                                                     //  test if DVD hung
       if (! dvdmtd) {
          zstat = zdialog_choose(mWin,"parent","DVD mount failure",
                         "abort","retry","ignore (continue)",null);
@@ -1252,7 +1252,7 @@ verify_retry:
          if (zstat == 2) goto verify_retry;
       }
 
-      Verify(BJvmode);                                                           //  verify this DVD
+      Verify(BJvmode);                                                                 //  verify this DVD
       if (commFail) {
          zstat = zdialog_choose(mWin,"parent","verify error",
                         "abort","retry","ignore (continue)",null);
@@ -1264,7 +1264,7 @@ verify_retry:
       }
    }
 
-   createBackupHist();                                                           //  create backup history file
+   createBackupHist();                                                                 //  create backup history file
 
    txwidget_append2(mLog,0," backup job complete \n");
    ejectDVD(0);
@@ -1273,7 +1273,7 @@ verify_retry:
 backup_fail:
 
    commFail++;
-   secs = get_timer(time0);                                                      //  output stats even if failed
+   secs = get_timer(time0);                                                            //  output stats even if failed
    txwidget_append2(mLog,0," backup time: %.0f secs \n",secs);
    bspeed = Dbytes2/1000000.0/secs;
    txwidget_append2(mLog,0," backup speed: %.2f MB/sec \n",bspeed);
@@ -1295,12 +1295,12 @@ int IncrBackup(ch *BJbmode, ch *BJvmode)
    double   secs, bspeed;
    double   time0;
 
-   mountDVD(0);                                                                  //  requires successful mount
+   mountDVD(0);                                                                        //  requires successful mount
    if (! dvdmtd) goto backup_fail;
 
-   dGetFiles();                                                                  //  get files for backup
-   vGetFiles();                                                                  //  get DVD/BRD files
-   setFileDisps();                                                               //  file disps: new mod del unch
+   dGetFiles();                                                                        //  get files for backup
+   vGetFiles();                                                                        //  get DVD/BRD files
+   setFileDisps();                                                                     //  file disps: new mod del unch
 
    if (! Dnf) {
       txwidget_append2(mLog,0," *** no files for backup \n");
@@ -1313,85 +1313,85 @@ int IncrBackup(ch *BJbmode, ch *BJvmode)
    }
 
    txwidget_append2(mLog,1,"\n""begin %s backup \n",BJbmode);
-   txwidget_append2(mLog,0," files: %d  bytes: %s \n",Mfiles,                    //  files and bytes to copy
+   txwidget_append2(mLog,0," files: %d  bytes: %s \n",Mfiles,                          //  files and bytes to copy
                                              formatKBMB(Mbytes,3));
 
-   if (Mfiles == 0) {                                                            //  nothing to back up
+   if (Mfiles == 0) {                                                                  //  nothing to back up
       txwidget_append2(mLog,0," nothing to back-up \n");
       return 0;
    }
 
-   if (! *dvdlabel) strcpy(dvdlabel,"dkopp");                                    //  if no label, default "dkopp"
+   if (! *dvdlabel) strcpy(dvdlabel,"dkopp");                                          //  if no label, default "dkopp"
 
-   fid = fopen(TFdiskfiles,"w");                                                 //  temp file for growisofs path-list
+   fid = fopen(TFdiskfiles,"w");                                                       //  temp file for growisofs path-list
    if (! fid) {
       txwidget_append2(mLog,0," *** cannot open /tmp scratch file \n");
       goto backup_fail;
    }
 
-   BJstore(TFjobfile);                                                           //  copy job file to temp file
-   save_filepoop();                                                              //  + file owner & permissions
-   writeDT();                                                                    //  create date-time & usage temp file
-
-   fprintf(fid,"%s=%s\n",V_JOBFILE +1,TFjobfile);                                //  add job file to growisofs list
-   fprintf(fid,"%s=%s\n",V_FILEPOOP +1,TFfilepoop);                              //  add directory poop file
-   fprintf(fid,"%s=%s\n",V_DATETIME +1,TFdatetime);                              //  add date-time file
+   BJstore(TFjobfile);                                                                 //  copy job file to temp file
+   save_filepoop();                                                                    //  + file owner & permissions
+   writeDT();                                                                          //  create date-time & usage temp file
+
+   fprintf(fid,"%s=%s\n",V_JOBFILE +1,TFjobfile);                                      //  add job file to growisofs list
+   fprintf(fid,"%s=%s\n",V_FILEPOOP +1,TFfilepoop);                                    //  add directory poop file
+   fprintf(fid,"%s=%s\n",V_DATETIME +1,TFdatetime);                                    //  add date-time file
 
-   for (ii = 0; ii < Dnf; ii++) {                                                //  process new and modified disk files
+   for (ii = 0; ii < Dnf; ii++) {                                                      //  process new and modified disk files
       disp = Drec[ii].disp;
-      if ((disp == 'n') || (disp == 'm')) {                                      //  new or modified file
-         dfile = Drec[ii].file;                                                  //  add to growisofs path-list
-         repl_1str(dfile,vfile,XFCC,"=","\\\\=");                                //  replace "=" with "\\=" in file name
-         fprintf(fid,"%s=%s\n",vfile+1,dfile);                                   //  directories/file=/directories/file
-         Drec[ii].ivf = 1;                                                       //  set flag for incr. verify
+      if ((disp == 'n') || (disp == 'm')) {                                            //  new or modified file
+         dfile = Drec[ii].file;                                                        //  add to growisofs path-list
+         repl_1str(dfile,vfile,XFCC,"=","\\\\=");                                      //  replace "=" with "\\=" in file name
+         fprintf(fid,"%s=%s\n",vfile+1,dfile);                                         //  directories/file=/directories/file
+         Drec[ii].ivf = 1;                                                             //  set flag for incr. verify
       }
    }
 
-   if (strmatch(BJbmode,"incremental")) {                                        //  incremental backup (not accumulate)
-      for (ii = 0; ii < Vnf; ii++) {                                             //  process deleted files still on DVD/BRD
+   if (strmatch(BJbmode,"incremental")) {                                              //  incremental backup (not accumulate)
+      for (ii = 0; ii < Vnf; ii++) {                                                   //  process deleted files still on DVD/BRD
          if (Vrec[ii].disp == 'd') {
-            dfile = Vrec[ii].file;                                               //  add to growisofs path-list
-            repl_1str(dfile,vfile,XFCC,"=","\\\\=");                             //  replace "=" with "\\=" in file name
-            fprintf(fid,"%s=%s\n",vfile+1,"/dev/null");                          //  directories/file=/dev/null
+            dfile = Vrec[ii].file;                                                     //  add to growisofs path-list
+            repl_1str(dfile,vfile,XFCC,"=","\\\\=");                                   //  replace "=" with "\\=" in file name
+            fprintf(fid,"%s=%s\n",vfile+1,"/dev/null");                                //  directories/file=/dev/null
          }
       }
    }
 
    fclose(fid);
 
-   start_timer(time0);                                                           //  start timer for growisofs
+   start_timer(time0);                                                                 //  start timer for growisofs
 
-   snprintf(command,200,"growisofs -M %s %s -r -graft-points "                   //  build growisofs command line
+   snprintf(command,200,"growisofs -M %s %s -r -graft-points "                         //  build growisofs command line
                      "-iso-level 4 -gui -V %s %s -path-list %s 2>&1",
                      BJdvd,Nspeed,dvdlabel,gforce,TFdiskfiles);
 
 backup_retry:
 
-   gerr = do_shell("growisofs", command);                                        //  do growisofs, echo outputs
-   if (checkKillPause()) goto backup_fail;                                       //  killed by user
+   gerr = do_shell("growisofs", command);                                              //  do growisofs, echo outputs
+   if (checkKillPause()) goto backup_fail;                                             //  killed by user
    if (gerr) {
-      zstat = zdialog_choose(mWin,"parent","growisofs error",                    //  manual compensation for growisofs
-                        "abort","retry","ignore (continue)",null);               //    and/or gnome bugs
+      zstat = zdialog_choose(mWin,"parent","growisofs error",                          //  manual compensation for growisofs
+                        "abort","retry","ignore (continue)",null);                     //    and/or gnome bugs
       if (zstat == 1) goto backup_fail;
       if (zstat == 2) goto backup_retry;
    }
 
-   secs = get_timer(time0);                                                      //  output statistics
+   secs = get_timer(time0);                                                            //  output statistics
    txwidget_append2(mLog,0," backup time: %.0f secs \n",secs);
    bspeed = Mbytes/1000000.0/secs;
    txwidget_append2(mLog,0," backup speed: %.2f MB/sec \n",bspeed);
    txwidget_append2(mLog,0," backup complete \n");
 
-   vFilesReset();                                                                //  reset DVD/BRD files
+   vFilesReset();                                                                      //  reset DVD/BRD files
 
-   ejectDVD(0);                                                                  //  DVD may be hung after growisofs
+   ejectDVD(0);                                                                        //  DVD may be hung after growisofs
    sleep(5);
 
 verify_retry:
 
-   if (*BJvmode)                                                                 //  do verify if requested
+   if (*BJvmode)                                                                       //  do verify if requested
    {
-      mountDVD(0);                                                               //  test if DVD/BRD hung
+      mountDVD(0);                                                                     //  test if DVD/BRD hung
       if (! dvdmtd) {
          zstat = zdialog_choose(mWin,"parent","DVD mount failure",
                         "abort","retry","ignore (continue)",null);
@@ -1399,7 +1399,7 @@ verify_retry:
          if (zstat == 2) goto verify_retry;
       }
 
-      Verify(BJvmode);                                                           //  verify new files on DVD/BRD
+      Verify(BJvmode);                                                                 //  verify new files on DVD/BRD
       if (commFail) {
          zstat = zdialog_choose(mWin,"parent","verify error",
                         "abort","retry","ignore (continue)",null);
@@ -1408,7 +1408,7 @@ verify_retry:
       }
    }
 
-   createBackupHist();                                                           //  create backup history file
+   createBackupHist();                                                                 //  create backup history file
 
    ejectDVD(0);
    return 0;
@@ -1436,7 +1436,7 @@ int Verify(ch *menu)
    double   time0;
    STATB    filestat;
 
-   vGetFiles();                                                                  //  get DVD/BRD files
+   vGetFiles();                                                                        //  get DVD/BRD files
    txwidget_append2(mLog,0," %d files on DVD/BRD \n",Vnf);
    if (! Vnf) goto verify_exit;
 
@@ -1445,7 +1445,7 @@ int Verify(ch *menu)
 
    start_timer(time0);
 
-   if (strmatch(menu,"full"))                                                    //  verify all files are readable
+   if (strmatch(menu,"full"))                                                          //  verify all files are readable
    {
       txwidget_append2(mLog,1,"\n""verify ALL files on DVD/BRD \n");
       if (Fgui) txwidget_append2(mLog,0,"\n\n");
@@ -1454,10 +1454,10 @@ int Verify(ch *menu)
       {
          if (checkKillPause()) goto verify_exit;
 
-         filespec = Vrec[ii].file;                                               //  /home/.../file.ext
-         track_filespec(filespec);                                               //  track progress on screen
-         errmess = checkFile(filespec,0,dcc1);                                   //  check file, get length
-         if (errmess) track_filespec_err(filespec,errmess);                      //  log errors
+         filespec = Vrec[ii].file;                                                     //  /home/.../file.ext
+         track_filespec(filespec);                                                     //  track progress on screen
+         errmess = checkFile(filespec,0,dcc1);                                         //  check file, get length
+         if (errmess) track_filespec_err(filespec,errmess);                            //  log errors
          if (errmess) verrs++;
          vfiles++;
          vbytes += dcc1;
@@ -1469,18 +1469,18 @@ int Verify(ch *menu)
       }
    }
 
-   if (strmatch(menu,"incremental"))                                             //  verify files in prior incr. backup
+   if (strmatch(menu,"incremental"))                                                   //  verify files in prior incr. backup
    {
       txwidget_append2(mLog,1,"\n""verify files in prior incremental backup \n");
 
       for (ii = 0; ii < Dnf; ii++)
       {
          if (checkKillPause()) goto verify_exit;
-         if (! Drec[ii].ivf) continue;                                           //  skip if not in prior incr. backup
+         if (! Drec[ii].ivf) continue;                                                 //  skip if not in prior incr. backup
 
          filespec = Drec[ii].file;
-         txwidget_append2(mLog,0,"  %s \n",kleenex(filespec));                   //  output filespec
-         errmess = checkFile(filespec,0,dcc1);                                   //  check file on DVD/BRD, get length
+         txwidget_append2(mLog,0,"  %s \n",kleenex(filespec));                         //  output filespec
+         errmess = checkFile(filespec,0,dcc1);                                         //  check file on DVD/BRD, get length
          if (errmess) txwidget_append2(mLog,0,"  *** %s \n",errmess);
          if (errmess) verrs++;
          vfiles++;
@@ -1493,33 +1493,33 @@ int Verify(ch *menu)
       }
    }
 
-   if (strmatch(menu,"thorough"))                                                //  compare DVD/BRD to disk files
+   if (strmatch(menu,"thorough"))                                                      //  compare DVD/BRD to disk files
    {
       txwidget_append2(mLog,1,"\n Read and verify ALL files on DVD/BRD. \n");
       txwidget_append2(mLog,0," Compare to disk files with matching names and mod times.\n");
       if (Fgui) txwidget_append2(mLog,0,"\n\n");
 
-      for (ii = 0; ii < Vnf; ii++)                                               //  process DVD/BRD files
+      for (ii = 0; ii < Vnf; ii++)                                                     //  process DVD/BRD files
       {
          if (checkKillPause()) goto verify_exit;
 
-         filespec = Vrec[ii].file;                                               //  corresp. file name on disk
-         track_filespec(filespec);                                               //  track progress on screen
+         filespec = Vrec[ii].file;                                                     //  corresp. file name on disk
+         track_filespec(filespec);                                                     //  track progress on screen
 
          comp = 0;
-         if (stat(filespec,&filestat) == 0) {                                    //  disk file exists?
-            mtime = filestat.st_mtime + filestat.st_mtim.tv_nsec * nano;         //  yes, get file mod time
-            diff = fabs(mtime - Vrec[ii].mtime);                                 //  compare to DVD/BRD file mod time
-            if (diff < modtimetolr) comp = 1;                                    //  equal
-            dfiles1++;                                                           //  count matching disk names
-            dfiles2 += comp;                                                     //  count matching names and mod times
+         if (stat(filespec,&filestat) == 0) {                                          //  disk file exists?
+            mtime = filestat.st_mtime + filestat.st_mtim.tv_nsec * nano;               //  yes, get file mod time
+            diff = fabs(mtime - Vrec[ii].mtime);                                       //  compare to DVD/BRD file mod time
+            if (diff < modtimetolr) comp = 1;                                          //  equal
+            dfiles1++;                                                                 //  count matching disk names
+            dfiles2 += comp;                                                           //  count matching names and mod times
          }
 
-         errmess = checkFile(filespec,comp,dcc1);                                //  check DVD/BRD file, compare to disk
-         if (errmess) track_filespec_err(filespec,errmess);                      //  log errors
+         errmess = checkFile(filespec,comp,dcc1);                                      //  check DVD/BRD file, compare to disk
+         if (errmess) track_filespec_err(filespec,errmess);                            //  log errors
 
          if (errmess) {
-            if (strstr(errmess,"compare")) cerrs++;                              //  file compare error
+            if (strstr(errmess,"compare")) cerrs++;                                    //  file compare error
             else  verrs++;
          }
 
@@ -1581,8 +1581,8 @@ int get_current_files(ch *menu)
    ch       *bytes;
    int      ii;
 
-   dFilesReset();                                                                //  force refresh
-   dGetFiles();                                                                  //  get disk files
+   dFilesReset();                                                                      //  force refresh
+   dGetFiles();                                                                        //  get disk files
 
    if (! BJval) {
       txwidget_append2(mLog,0," *** backup job is invalid \n");
@@ -1658,7 +1658,7 @@ int report_directory_diffs(ch *menu)
    vGetFiles();
    setFileDisps();
 
-   SortFileList((ch   *) Drec, sizeof(dfrec), Dnf, 'D');                         //  re-sort, directories first
+   SortFileList((ch   *) Drec, sizeof(dfrec), Dnf, 'D');                               //  re-sort, directories first
    SortFileList((ch   *) Vrec, sizeof(vfrec), Vnf, 'D');
 
    txwidget_append2(mLog,0,"\n Disk:DVD/BRD differences by directory \n");
@@ -1667,57 +1667,57 @@ int report_directory_diffs(ch *menu)
    nbytes = kfiles = knew = kmod = kdel = 0;
    dii = vii = 0;
 
-   while ((dii < Dnf) || (vii < Vnf))                                            //  scan disk and DVD/BRD files parallel
+   while ((dii < Dnf) || (vii < Vnf))                                                  //  scan disk and DVD/BRD files parallel
    {
       if ((dii < Dnf) && (vii == Vnf)) comp = -1;
       else if ((dii == Dnf) && (vii < Vnf)) comp = +1;
       else comp = filecomp(Drec[dii].file, Vrec[vii].file);
 
-      if (comp > 0) pdirk = Vrec[vii].file;                                      //  get file on DVD/BRD or disk
+      if (comp > 0) pdirk = Vrec[vii].file;                                            //  get file on DVD/BRD or disk
       else pdirk = Drec[dii].file;
 
-      pp = (ch   *) strrchr(pdirk,'/');                                          //  isolate directory
+      pp = (ch   *) strrchr(pdirk,'/');                                                //  isolate directory
       if (pp) *pp = 0;
-      if (! strmatch(pdirk,ppdirk)) {                                            //  if directory changed, output
-         bytes = formatKBMB(nbytes,3);                                           //    totals from prior directory
+      if (! strmatch(pdirk,ppdirk)) {                                                  //  if directory changed, output
+         bytes = formatKBMB(nbytes,3);                                                 //    totals from prior directory
          if (kfiles > 0) txwidget_append2(mLog,0," %5d %5d %5d %8s  %s \n",
                                  knew,kmod,kdel,bytes,ppdirk);
-         nbytes = kfiles = knew = kmod = kdel = 0;                               //  reset totals
-         strcpy(ppdirk,pdirk);                                                   //  start new directory
+         nbytes = kfiles = knew = kmod = kdel = 0;                                     //  reset totals
+         strcpy(ppdirk,pdirk);                                                         //  start new directory
       }
       if (pp) *pp = '/';
 
-      if (comp < 0) {                                                            //  unmatched disk file
-         knew++;                                                                 //  count new file
+      if (comp < 0) {                                                                  //  unmatched disk file
+         knew++;                                                                       //  count new file
          nbytes += Drec[dii].size;
          kfiles++;
          dii++;
       }
 
-      else if (comp > 0) {                                                       //  unmatched DVD/BRD file: deleted
-         kdel++;                                                                 //  count deleted file
+      else if (comp > 0) {                                                             //  unmatched DVD/BRD file: deleted
+         kdel++;                                                                       //  count deleted file
          kfiles++;
          vii++;
       }
 
-      else if (comp == 0) {                                                      //  file present on disk and DVD/BRD
+      else if (comp == 0) {                                                            //  file present on disk and DVD/BRD
          if (Drec[dii].disp == 'm') {
-            kmod++;                                                              //  count modified file
+            kmod++;                                                                    //  count modified file
             nbytes += Drec[dii].size;
             kfiles++;
          }
-         dii++;                                                                  //  other: u = unchanged
+         dii++;                                                                        //  other: u = unchanged
          vii++;
       }
    }
 
    if (kfiles > 0) {
-      bytes = formatKBMB(nbytes,3);                                              //  totals from last directory
+      bytes = formatKBMB(nbytes,3);                                                    //  totals from last directory
       txwidget_append2(mLog,0," %5d %5d %5d %8s  %s \n",knew,kmod,kdel,
                                                             bytes,ppdirk);
    }
 
-   SortFileList((ch   *) Drec, sizeof(dfrec), Dnf, 'A');                         //  restore ascii sort
+   SortFileList((ch   *) Drec, sizeof(dfrec), Dnf, 'A');                               //  restore ascii sort
    SortFileList((ch   *) Vrec, sizeof(vfrec), Vnf, 'A');
 
 report_exit:
@@ -1737,7 +1737,7 @@ int report_file_diffs(ch *menu)
       goto report_exit;
    }
 
-   report_summary_diffs(0);                                                      //  report summary first
+   report_summary_diffs(0);                                                            //  report summary first
 
    txwidget_append2(mLog,0,"\n Detailed list of disk:DVD/BRD differences: \n");
    txwidget_append2(mLog,0,"\n %d new files (on disk, not on DVD/BRD) \n",nnew);
@@ -1834,11 +1834,11 @@ int find_files(ch *menu)
    FILE        *fid;
    zlist_t     *zlist = 0;
 
-   dGetFiles();                                                                  //  get disk and DVD/BRD files
+   dGetFiles();                                                                        //  get disk and DVD/BRD files
    if (dvdmtd) vGetFiles();
    else txwidget_append2(mLog,0," DVD/BRD not mounted \n");
 
-   txwidget_append2(mLog,0,"\n find files matching wildcard pattern \n");        //  get search pattern
+   txwidget_append2(mLog,0,"\n find files matching wildcard pattern \n");              //  get search pattern
 
    fspec1 = zdialog_text(mWin,"enter (wildcard) filespec:",fspec2);
    if (blank_null(fspec1)) goto report_exit;
@@ -1848,7 +1848,7 @@ int find_files(ch *menu)
 
    txwidget_append2(mLog,1,"\n matching files on disk: \n");
 
-   for (dii = 0; dii < Dnf; dii++)                                               //  search disk files
+   for (dii = 0; dii < Dnf; dii++)                                                     //  search disk files
    {
       if (checkKillPause()) goto report_exit;
       if (MatchWild(fspec2,Drec[dii].file) == 0)
@@ -1857,7 +1857,7 @@ int find_files(ch *menu)
 
    txwidget_append2(mLog,1,"\n matching files on DVD/BRD: \n");
 
-   for (vii = 0; vii < Vnf; vii++)                                               //  search DVD/BRD files
+   for (vii = 0; vii < Vnf; vii++)                                                     //  search DVD/BRD files
    {
       if (checkKillPause()) goto report_exit;
       if (MatchWild(fspec2,Vrec[vii].file) == 0)
@@ -1867,8 +1867,8 @@ int find_files(ch *menu)
    txwidget_append2(mLog,1,"\n matching files in backup history: \n");
 
    zlist = zlist_new(maxhist);
-   snprintf(hfile,199,"%s/dkopp-hist-*",homedir);                                //  find all backup history files
-   ftf = 1;                                                                      //    /home/user/.dkopp/dkopp-hist-*
+   snprintf(hfile,199,"%s/dkopp-hist-*",homedir);                                      //  find all backup history files
+   ftf = 1;                                                                            //    /home/user/.dkopp/dkopp-hist-*
    nn = 0;
 
    while (true)
@@ -1876,7 +1876,7 @@ int find_files(ch *menu)
       hfile1 = SearchWild(hfile,ftf);
       if (! hfile1) break;
       if (nn == maxhist) break;
-      zlist_append(zlist,hfile1,0);                                              //  add to list
+      zlist_append(zlist,hfile1,0);                                                    //  add to list
       nn++;
    }
 
@@ -1884,21 +1884,21 @@ int find_files(ch *menu)
    if (nn == maxhist) txwidget_append2(mLog,0," *** too many history files, please purge");
    if (nn == 0 || nn == maxhist) goto report_exit;
 
-   zlist_purge(zlist);                                                           //  purge null entries                 7.4
-   zlist_sort(zlist);                                                            //  sort list ascending
+   zlist_purge(zlist);                                                                 //  purge null entries                 7.4
+   zlist_sort(zlist);                                                                  //  sort list ascending
 
-   for (hii = 0; hii < nn; hii++)                                                //  loop all history files
+   for (hii = 0; hii < nn; hii++)                                                      //  loop all history files
    {
       hfile1 = zlist_get(zlist,hii);
       txwidget_append2(mLog,0,"  %s \n",hfile1);
 
-      fid = fopen(hfile1,"r");                                                   //  next history file
+      fid = fopen(hfile1,"r");                                                         //  next history file
       if (! fid) {
          txwidget_append2(mLog,0,"   *** file open error \n");
          continue;
       }
 
-      while (true)                                                               //  read and search for match
+      while (true)                                                                     //  read and search for match
       {
          if (checkKillPause()) break;
          pp = fgets_trim(buff,999,fid,1);
@@ -1938,11 +1938,11 @@ int view_backup_hist(ch *menu)
 
    while (true)
    {
-      fspec1 = SearchWild(fspec2,ftf);                                           //  file: dkopp-hist-yyyymmdd-hhmm-label
+      fspec1 = SearchWild(fspec2,ftf);                                                 //  file: dkopp-hist-yyyymmdd-hhmm-label
       if (! fspec1) break;
-      pp = (ch   *) strrchr(fspec1,'/') + 12;                                    //  get yyyymmdd-hhmm-label
+      pp = (ch   *) strrchr(fspec1,'/') + 12;                                          //  get yyyymmdd-hhmm-label
       if (nn == maxhist) break;
-      zlist_append(zlist,pp,0);                                                  //  add to list
+      zlist_append(zlist,pp,0);                                                        //  add to list
       nn++;
    }
 
@@ -1950,10 +1950,10 @@ int view_backup_hist(ch *menu)
    if (nn == maxhist) txwidget_append2(mLog,0," *** too many history files, please purge");
    if (nn == 0 || nn == maxhist) goto report_exit;
 
-   zlist_purge(zlist);                                                           //  purge null entries                 7.4
-   zlist_sort(zlist);                                                            //  sort list ascending
+   zlist_purge(zlist);                                                                 //  purge null entries                 7.4
+   zlist_sort(zlist);                                                                  //  sort list ascending
 
-   for (ii = 0; ii < nn; ii++)                                                   //  report sorted list
+   for (ii = 0; ii < nn; ii++)                                                         //  report sorted list
       txwidget_append2(mLog,0," dkopp-hist-%s \n",zlist_get(zlist,ii));
 
    zd = zdialog_new("choose history file",mWin,"OK","cancel",null);
@@ -1962,18 +1962,18 @@ int view_backup_hist(ch *menu)
 
    jj = nn - 20;
    if (jj < 0) jj = 0;
-   for (ii = jj; ii < nn; ii++)                                                  //  stuff combo box list with
-      zdialog_stuff(zd,"hfile",zlist_get(zlist,ii));                             //    20 newest hist file IDs
-   zdialog_stuff(zd,"hfile",zlist_get(zlist,nn-1));                              //  default entry is newest file
+   for (ii = jj; ii < nn; ii++)                                                        //  stuff combo box list with
+      zdialog_stuff(zd,"hfile",zlist_get(zlist,ii));                                   //    20 newest hist file IDs
+   zdialog_stuff(zd,"hfile",zlist_get(zlist,nn-1));                                    //  default entry is newest file
 
-   zdialog_run(zd,0,"parent");                                                   //  run dialog
+   zdialog_run(zd,0,"parent");                                                         //  run dialog
    zstat = zdialog_wait(zd);
 
-   zdialog_fetch(zd,"hfile",histfile,199);                                       //  get user choice
+   zdialog_fetch(zd,"hfile",histfile,199);                                             //  get user choice
    zdialog_free(zd);
-   if (zstat != 1) goto report_exit;                                             //  cancelled
+   if (zstat != 1) goto report_exit;                                                   //  cancelled
 
-   zshell("log ack","xdg-open %s/%s-%s",homedir,"dkopp-hist",histfile);          //  view the file
+   zshell("log ack","xdg-open %s/%s-%s",homedir,"dkopp-hist",histfile);                //  view the file
 
 report_exit:
    if (zlist) zlist_free(zlist);
@@ -1990,7 +1990,7 @@ int RJedit(ch *menu)
 
    txwidget_append2(mLog,0,"\n Restore files from DVD/BRD \n");
 
-   vGetFiles();                                                                  //  get files on DVD/BRD
+   vGetFiles();                                                                        //  get files on DVD/BRD
    txwidget_append2(mLog,0,"   %d files on DVD/BRD \n",Vnf);
    if (! Vnf) return 0;
 
@@ -2000,11 +2000,11 @@ int RJedit(ch *menu)
    zdialog_add_widget(zd,"hbox","hb1","dialog",0,"space=10");
    zdialog_add_widget(zd,"vbox","vb1","hb1",0,"homog|space=5");
    zdialog_add_widget(zd,"vbox","vb2","hb1",0,"homog|space=5");
-   zdialog_add_widget(zd,"label","labdev","vb1","DVD/BRD device");               //  DVD/BRD device       [___________][v]
+   zdialog_add_widget(zd,"label","labdev","vb1","DVD/BRD device");                     //  DVD/BRD device       [___________][v]
    zdialog_add_widget(zd,"combo","entdvd","vb2",BJdvd);
 
-   zdialog_add_widget(zd,"label","labfrom","vb1","copy-from DVD/BRD");           //  copy-from DVD/BRD   [______________]
-   zdialog_add_widget(zd,"label","labto","vb1","copy-to disk");                  //  copy-to disk        [______________]
+   zdialog_add_widget(zd,"label","labfrom","vb1","copy-from DVD/BRD");                 //  copy-from DVD/BRD   [______________]
+   zdialog_add_widget(zd,"label","labto","vb1","copy-to disk");                        //  copy-to disk        [______________]
    zdialog_add_widget(zd,"zentry","entfrom","vb2",RJfrom);
    zdialog_add_widget(zd,"zentry","entto","vb2",RJto);
 
@@ -2014,16 +2014,16 @@ int RJedit(ch *menu)
    zdialog_add_widget(zd,"scrwin","scrfiles","framefiles");
    zdialog_add_widget(zd,"zedit","editfiles","scrfiles");
 
-   for (int ii = 0; ii < ndvds; ii++)                                            //  load curr. data into widgets
+   for (int ii = 0; ii < ndvds; ii++)                                                  //  load curr. data into widgets
       zdialog_stuff(zd,"entdvd",dvddevdesc[ii]);
-                                                                                 //  remove get/stuff mount point
+                                                                                       //  remove get/stuff mount point
    editwidget = zdialog_gtkwidget(zd,"editfiles");
 
-   for (int ii = 0; ii < RJnx; ii++)                                             //  get restore include/exclude recs,
-      txwidget_append2(editwidget,0,"%s""\n",RJinex[ii]);                        //   pack into file selection edit box
+   for (int ii = 0; ii < RJnx; ii++)                                                   //  get restore include/exclude recs,
+      txwidget_append2(editwidget,0,"%s""\n",RJinex[ii]);                              //   pack into file selection edit box
 
    zdialog_resize(zd,400,400);
-   zdialog_run(zd,RJedit_event,"parent");                                        //  run dialog with response function
+   zdialog_run(zd,RJedit_event,"parent");                                              //  run dialog with response function
    return 0;
 }
 
@@ -2037,49 +2037,49 @@ int  RJedit_event(zdialog *zd, ch *event
 
    zstat = zd->zstat;
    if (! zstat) return 0;
-   if (zstat != 1 && zstat != 2) goto end_dialog;                                //  cancel or destroy
+   if (zstat != 1 && zstat != 2) goto end_dialog;                                      //  cancel or destroy
 
-   RJreset();                                                                    //  reset restore job data
+   RJreset();                                                                          //  reset restore job data
 
-   zdialog_fetch(zd,"entdvd",text,19);                                           //  get DVD/BRD device
+   zdialog_fetch(zd,"entdvd",text,19);                                                 //  get DVD/BRD device
    strncpy0(BJdvd,text,19);
    pp = strchr(BJdvd,' ');
    if (pp) *pp = 0;
-                                                                                 //  remove fetch/save mount point
-   zdialog_fetch(zd,"entfrom",RJfrom,XFCC);                                      //  copy-from location /home/xxx/.../
+                                                                                       //  remove fetch/save mount point
+   zdialog_fetch(zd,"entfrom",RJfrom,XFCC);                                            //  copy-from location /home/xxx/.../
    strTrim(RJfrom);
 
-   zdialog_fetch(zd,"entto",RJto,XFCC);                                          //  copy-to location  /home/yyy/.../
+   zdialog_fetch(zd,"entto",RJto,XFCC);                                                //  copy-to location  /home/yyy/.../
    strTrim(RJto);
 
    for (line = 0; ; line++)
    {
       pp = txwidget_line(editwidget,line,1);
       if (! pp || ! *pp) break;
-      cc = strTrim(pp);                                                          //  remove trailing blanks
-      if (cc < 3) continue;                                                      //  ignore absurdities
+      cc = strTrim(pp);                                                                //  remove trailing blanks
+      if (cc < 3) continue;                                                            //  ignore absurdities
       if (cc > XFCC-100) continue;
-      RJinex[RJnx] = zstrdup(pp,"RJinex");                                       //  copy new record
+      RJinex[RJnx] = zstrdup(pp,"RJinex");                                             //  copy new record
       if (++RJnx == maxnx) {
          txwidget_append2(mLog,0," *** exceed %d include/exclude recs \n",maxnx);
          break;
       }
    }
 
-   if (zstat == 1) {                                                             //  do file-chooser dialog
-      strcpy(fcfrom,dvdmp);                                                      //  start at /media/xxxx/home/xxxx/
+   if (zstat == 1) {                                                                   //  do file-chooser dialog
+      strcpy(fcfrom,dvdmp);                                                            //  start at /media/xxxx/home/xxxx/
       strcat(fcfrom,RJfrom);
       fc_dialog(fcfrom);
-      zd->zstat = 0;                                                             //  dialog continues
+      zd->zstat = 0;                                                                   //  dialog continues
       return 0;
    }
 
-   RJvalidate();                                                                 //  validate restore job data
-   if (RJval) rGetFiles();                                                       //  get files to restore
+   RJvalidate();                                                                       //  validate restore job data
+   if (RJval) rGetFiles();                                                             //  get files to restore
    else txwidget_append2(mLog,0," *** correct errors in restore job \n");
 
 end_dialog:
-   zdialog_free(zd);                                                             //  destroy dialog
+   zdialog_free(zd);                                                                   //  destroy dialog
    --Fdialog;
    return 0;
 }
@@ -2103,8 +2103,8 @@ int RJlist(ch *menu)
 
    if (! Rnf) goto list_exit;
 
-   cc1 = strlen(RJfrom);                                                         //  from: /home/xxx/.../
-   cc2 = strlen(RJto);                                                           //    to: /home/yyy/.../
+   cc1 = strlen(RJfrom);                                                               //  from: /home/xxx/.../
+   cc2 = strlen(RJto);                                                                 //    to: /home/yyy/.../
 
    for (int ii = 0; ii < Rnf; ii++)
    {
@@ -2149,21 +2149,21 @@ int Restore(ch *menu)
 
    txwidget_append2(mLog,1,"\n""begin restore of %d files to: %s \n",Rnf,RJto);
 
-   ccf = strlen(RJfrom);                                                         //  from: /media/xxx/filespec
+   ccf = strlen(RJfrom);                                                               //  from: /media/xxx/filespec
 
    for (ii = 0; ii < Rnf; ii++)
    {
       if (checkKillPause()) goto restore_exit;
-      strcpy(dfile,RJto);                                                        //  to: /destination/filespec
+      strcpy(dfile,RJto);                                                              //  to: /destination/filespec
       strcat(dfile,Rrec[ii].file+ccf);
       txwidget_append2(mLog,0," %s \n",kleenex(dfile));
       errmess = copyfile(Rrec[ii].file,dfile);
       if (errmess) txwidget_append2(mLog,0," *** %s \n",errmess);
    }
 
-   restore_filepoop();                                                           //  restore owner/permissions
+   restore_filepoop();                                                                 //  restore owner/permissions
 
-   dFilesReset();                                                                //  reset disk file data
+   dFilesReset();                                                                      //  reset disk file data
 
 restore_exit:
    if (Fgui) txwidget_append2(mLog,0," ready \n");
@@ -2174,11 +2174,11 @@ restore_exit:
 //  get available DVD/BRD devices
 //  the lshw command blocks everything for several seconds
 
-int getDVDs(void *)                                                              //  overhauled
+int getDVDs(void *)                                                                    //  overhauled
 {
    int      ii, dvdrw;
    ch       buff[200], *pp;
-   ch       command[50] = "lshw -class disk 2>/dev/null";                        //  better than udevadm
+   ch       command[50] = "lshw -class disk 2>/dev/null";                              //  better than udevadm
    FILE     *fid;
 
    dvdrw = ndvds = 0;
@@ -2191,30 +2191,30 @@ int getDVDs(void *)
    
    while (true)
    {
-      pp = fgets_trim(buff,200,fid);                                             //  read lshw command output
+      pp = fgets_trim(buff,200,fid);                                                   //  read lshw command output
       if (! pp) break;
 
-      if (strstr(buff,"*-")) {                                                   //  start some device
-         if (strstr(buff,"*-cdrom")) dvdrw = 1;                                  //  start DVD/BRD device
+      if (strstr(buff,"*-")) {                                                         //  start some device
+         if (strstr(buff,"*-cdrom")) dvdrw = 1;                                        //  start DVD/BRD device
          else dvdrw = 0;
          continue;
       }
 
-      if (! dvdrw) continue;                                                     //  ignore recs for other devices
+      if (! dvdrw) continue;                                                           //  ignore recs for other devices
 
       if (strstr(buff,"description:")) {
-         pp = strstr(buff,"description:");                                       //  save DVD/BRD description
+         pp = strstr(buff,"description:");                                             //  save DVD/BRD description
          pp += 12;
-         if (*pp == ' ') pp++;                                                   //  (assume description comes first)
+         if (*pp == ' ') pp++;                                                         //  (assume description comes first)
          strncpy0(dvddesc[ndvds],pp,40);
          continue;
       }
 
       if (strstr(buff,"/dev/")) {
-         pp = strstr(buff,"/dev/");                                              //  have /dev/sr0 or similar format
+         pp = strstr(buff,"/dev/");                                                    //  have /dev/sr0 or similar format
          if (pp[7] < '0' || pp[7] > '9') continue;
          pp[8] = 0;
-         strcpy(dvddevs[ndvds],pp);                                              //  save DVD/BRD device
+         strcpy(dvddevs[ndvds],pp);                                                    //  save DVD/BRD device
          ndvds++;
          continue;
       }
@@ -2222,14 +2222,14 @@ int getDVDs(void *)
    
    pclose(fid);
 
-   for (ii = 0; ii < ndvds; ii++)                                                //  combine devices and descriptions
-   {                                                                             //    for use in GUI chooser list
+   for (ii = 0; ii < ndvds; ii++)                                                      //  combine devices and descriptions
+   {                                                                                   //    for use in GUI chooser list
       strcpy(dvddevdesc[ii],dvddevs[ii]);
       strcat(dvddevdesc[ii],"  ");
       strcat(dvddevdesc[ii],dvddesc[ii]);
    }
 
-   txwidget_append2(mLog,0," DVD/BRD devices found: %d \n",ndvds);               //  output list of DVDs
+   txwidget_append2(mLog,0," DVD/BRD devices found: %d \n",ndvds);                     //  output list of DVDs
    for (ii = 0; ii < ndvds; ii++)
       txwidget_append2(mLog,0," %s %s \n",dvddevs[ii],dvddesc[ii]);
 
@@ -2246,8 +2246,8 @@ int setDVDdevice(ch *menu)
    int      ii, Nth, zstat;
    zdialog  *zd;
 
-   if (*scriptParam) {                                                           //  script
-      Nth = 1;                                                                   //  parse: /dev/dvd /media/xxxx
+   if (*scriptParam) {                                                                 //  script
+      Nth = 1;                                                                         //  parse: /dev/dvd /media/xxxx
       pp1 = substring(scriptParam,' ',Nth++);
       if (pp1) strncpy0(BJdvd,pp1,19);
       pp1 = substring(scriptParam,' ',Nth++);
@@ -2255,13 +2255,13 @@ int setDVDdevice(ch *menu)
          strncpy0(dvdmp,pp1,99);
          dvdmpcc = strlen(dvdmp);
          if (dvdmp[dvdmpcc-1] == '/')
-            dvdmp[dvdmpcc--] = 0;                                                //  remove trailing /
+            dvdmp[dvdmpcc--] = 0;                                                      //  remove trailing /
       }
       *scriptParam = 0;
       return 0;
    }
 
-   zd = zdialog_new("select DVD/BRD drive",mWin,"OK","cancel",null);             //  dialog to select DVD/BRD & mount point
+   zd = zdialog_new("select DVD/BRD drive",mWin,"OK","cancel",null);                   //  dialog to select DVD/BRD & mount point
    zdialog_add_widget(zd,"hbox","hb1","dialog",0,"space=5");
    zdialog_add_widget(zd,"vbox","vb1","hb1",0,"homog|space=5");
    zdialog_add_widget(zd,"vbox","vb2","hb1",0,"homog|space=5");
@@ -2270,7 +2270,7 @@ int setDVDdevice(ch *menu)
    zdialog_add_widget(zd,"combo","entdvd","vb2",BJdvd);
    zdialog_add_widget(zd,"zentry","entmp","vb2",dvdmp);
 
-   for (ii = 0; ii < ndvds; ii++)                                                //  stuff avail. DVDs, mount points
+   for (ii = 0; ii < ndvds; ii++)                                                      //  stuff avail. DVDs, mount points
       zdialog_stuff(zd,"entdvd",dvddevdesc[ii]);
    zdialog_stuff(zd,"entmp",dvdmp);
 
@@ -2282,16 +2282,16 @@ int setDVDdevice(ch *menu)
       return 0;
    }
 
-   zstat = zdialog_fetch(zd,"entdvd",text,60);                                   //  get selected DVD/BRD
+   zstat = zdialog_fetch(zd,"entdvd",text,60);                                         //  get selected DVD/BRD
    strncpy0(BJdvd,text,19);
    pp2 = strchr(BJdvd,' ');
    if (pp2) *pp2 = 0;
 
-   zdialog_fetch(zd,"entmp",text,39);                                            //  DVD/BRD mount point
+   zdialog_fetch(zd,"entmp",text,39);                                                  //  DVD/BRD mount point
    strncpy0(dvdmp,text,99);
    strTrim(dvdmp);
    dvdmpcc = strlen(dvdmp);
-   if (dvdmpcc && (dvdmp[dvdmpcc-1] == '/'))                                     //  remove trailing /
+   if (dvdmpcc && (dvdmp[dvdmpcc-1] == '/'))                                           //  remove trailing /
       dvdmp[dvdmpcc--] = 0;
 
    txwidget_append2(mLog,0," DVD/BRD and mount point: %s %s \n",BJdvd,dvdmp);
@@ -2319,7 +2319,7 @@ int setDVDlabel(ch *menu)
 
 //  Mount DVD/BRD with message feedback to window.
 
-int mountDVD(ch *menu)                                                           //  menu mount function
+int mountDVD(ch *menu)                                                                 //  menu mount function
 {
    int      err, reset;
    ch       buff[400], mbuff[200];
@@ -2329,17 +2329,17 @@ int mountDVD(ch *menu)
 
    if (dvdmtd) {
       err = stat(dvdmp,&dstat);
-      if ((! err) && (dvdtime == dstat.st_ctime)) return 0;                      //  medium unchanged, do nothing
+      if ((! err) && (dvdtime == dstat.st_ctime)) return 0;                            //  medium unchanged, do nothing
    }
 
-   dvdmtd = 0;                                                                   //  set DVD/BRD not mounted
+   dvdmtd = 0;                                                                         //  set DVD/BRD not mounted
    dvdtime = -1;
    strcpy(mediumDT,"unknown");
    *mediumDT = 0;
    err = reset = 0;
-   vFilesReset();                                                                //  reset DVD/BRD files
+   vFilesReset();                                                                      //  reset DVD/BRD files
 
-   fid = popen("cat /etc/mtab","r");                                             //  get mounted devices
+   fid = popen("cat /etc/mtab","r");                                                   //  get mounted devices
    if (! fid) goto trymount;
 
    while (true)
@@ -2347,13 +2347,13 @@ int mountDVD(ch *menu)
       pp = fgets_trim(buff,400,fid);
       if (! pp) break;
 
-      pp1 = substring(pp,' ',1);                                                 //  get /dev/xxx
-      if (! pp1 || ! strmatch(pp1,BJdvd)) continue;                              //  not my DVD/BRD
+      pp1 = substring(pp,' ',1);                                                       //  get /dev/xxx
+      if (! pp1 || ! strmatch(pp1,BJdvd)) continue;                                    //  not my DVD/BRD
 
-      pp1 = substring(pp,' ',2);                                                 //  get mount point
+      pp1 = substring(pp,' ',2);                                                       //  get mount point
       if (! pp1) continue;
 
-      repl_1str(pp1,dvdmp,100,"\\040"," ");                                      //  replace "\040" with " "
+      repl_1str(pp1,dvdmp,100,"\\040"," ");                                            //  replace "\040" with " "
       dvdmpcc = strlen(dvdmp);
       txwidget_append2(mLog,0," already mounted: %s %s \n",BJdvd,dvdmp);
       dvdmtd = 1;
@@ -2365,9 +2365,9 @@ int mountDVD(ch *menu)
 
 trymount:
 
-   mkdir(dvdmp,0755);                                                            //  create default mount point
+   mkdir(dvdmp,0755);                                                                  //  create default mount point
 
-   snprintf(mbuff,200,"mount -t iso9660 %s %s 2>&1",BJdvd,dvdmp);                //  mount the DVD/BRD
+   snprintf(mbuff,200,"mount -t iso9660 %s %s 2>&1",BJdvd,dvdmp);                      //  mount the DVD/BRD
    err = do_shell("mount",mbuff);
    if (! err) {
       dvdmtd = 1;
@@ -2378,7 +2378,7 @@ trymount:
    
    while (true)
    {
-      fid = popen("cat /etc/mtab","r");                                          //  get mounted disk info
+      fid = popen("cat /etc/mtab","r");                                                //  get mounted disk info
       if (! fid) goto mount;
       
       while (true)
@@ -2386,13 +2386,13 @@ trymount:
          pp = fgets_trim(buff,400,fid);
          if (! pp) break;
 
-         pp1 = substring(pp,' ',1);                                              //  get /dev/xxx
-         if (! pp1 || ! strmatch(pp1,BJdvd)) continue;                           //  not my DVD/BRD
+         pp1 = substring(pp,' ',1);                                                    //  get /dev/xxx
+         if (! pp1 || ! strmatch(pp1,BJdvd)) continue;                                 //  not my DVD/BRD
 
-         pp1 = substring(pp,' ',2);                                              //  get mount point
+         pp1 = substring(pp,' ',2);                                                    //  get mount point
          if (! pp1) continue;
 
-         repl_1str(pp1,dvdmp,100,"\\040"," ");                                   //  replace "\040" with " "
+         repl_1str(pp1,dvdmp,100,"\\040"," ");                                         //  replace "\040" with " "
          dvdmpcc = strlen(dvdmp);
          txwidget_append2(mLog,0," %d %d mounted \n",BJdvd,dvdmp);
          dvdmtd = 1;
@@ -2400,11 +2400,11 @@ trymount:
       
       pclose(fid);
 
-      if (dvdmtd) goto showpoop;                                                 //  mounted OK
+      if (dvdmtd) goto showpoop;                                                       //  mounted OK
 
 mount:
 
-      snprintf(mbuff,200,"mount -t iso9660 %s %s 2>&1",BJdvd,dvdmp);             //  mount the DVD/BRD
+      snprintf(mbuff,200,"mount -t iso9660 %s %s 2>&1",BJdvd,dvdmp);                   //  mount the DVD/BRD
       err = do_shell("mount",mbuff);
       if (! err) {
          dvdmtd = 1;
@@ -2413,9 +2413,9 @@ mount:
 
       txwidget_append2(mLog,0," waiting for mount ... \n");
 
-      for (int ii = 0; ii < 5; ii++)                                             //  5 secs between "wait" messages
+      for (int ii = 0; ii < 5; ii++)                                                   //  5 secs between "wait" messages
       {
-         if (checkKillPause()) {                                                 //  killed by user
+         if (checkKillPause()) {                                                       //  killed by user
             commFail++;
             return 1;
          }
@@ -2425,9 +2425,9 @@ mount:
 
 showpoop:
 
-   dvdtime = dstat.st_ctime;                                                     //  set DVD/BRD ID = mod time
+   dvdtime = dstat.st_ctime;                                                           //  set DVD/BRD ID = mod time
 
-   snprintf(buff,99,"volname %s",BJdvd);                                         //  get DVD/BRD label
+   snprintf(buff,99,"volname %s",BJdvd);                                               //  get DVD/BRD label
    fid = popen(buff,"r");
    if (fid) {
       pp = fgets_trim(mbuff,99,fid,1);
@@ -2436,7 +2436,7 @@ showpoop:
    }
 
    strcpy(mbuff,dvdmp);
-   strcat(mbuff,V_DATETIME);                                                     //  get last usage date/time if poss.
+   strcat(mbuff,V_DATETIME);                                                           //  get last usage date/time if poss.
    fid = fopen(mbuff,"r");
    if (fid) {
       pp = fgets_trim(mbuff,99,fid,1);
@@ -2460,10 +2460,10 @@ int unmountDVD(ch *menu)
    dvdmtd = 0;
    dvdtime = -1;
 
-   snprintf(command,100,"umount %s 2>&1",dvdmp);                                 //  use mount point
+   snprintf(command,100,"umount %s 2>&1",dvdmp);                                       //  use mount point
    do_shell("umount",command);
    if (Fgui) txwidget_append2(mLog,0," ready \n");
-   commFail = 0;                                                                 //  ignore unmount error
+   commFail = 0;                                                                       //  ignore unmount error
    return 0;
 }
 
@@ -2482,7 +2482,7 @@ int ejectDVD(ch *menu)
    sprintf(command,"eject %s 2>&1",BJdvd);
    do_shell("eject",command);
    if (Fgui) txwidget_append2(mLog,0," ready \n");
-   commFail = 0;                                                                 //  ignore eject error
+   commFail = 0;                                                                       //  ignore eject error
    return 0;
 }
 
@@ -2491,14 +2491,14 @@ int ejectDVD(ch *menu)
 
 int resetDVD(ch *menu)
 {
-   if (*subprocName) {                                                           //  try to kill running job
+   if (*subprocName) {                                                                 //  try to kill running job
       signalProc(subprocName,"resume");
       signalProc(subprocName,"kill");
       sleep(1);
    }
 
-   ejectDVD(0);                                                                  //  the only way I know to reset
-   sleep(1);                                                                     //    a hung-up DVD/BRD drive
+   ejectDVD(0);                                                                        //  the only way I know to reset
+   sleep(1);                                                                           //    a hung-up DVD/BRD drive
    if (Fgui) txwidget_append2(mLog,0," ready \n");
    return 0;
 }
@@ -2514,10 +2514,10 @@ int eraseDVD(ch *menu)
    nstat = zmessageYN(mWin,"Erase DVD/BRD. This will take some time. \n Continue?");
    if (! nstat) goto erase_exit;
 
-   vFilesReset();                                                                //  reset DVD/BRD file data
+   vFilesReset();                                                                      //  reset DVD/BRD file data
 
    sprintf(command,"growisofs -Z %s=/dev/zero %s 2>&1",BJdvd,gforce);
-   do_shell("growisofs", command);                                               //  do growisofs, echo outputs
+   do_shell("growisofs", command);                                                     //  do growisofs, echo outputs
 
 erase_exit:
    if (Fgui) txwidget_append2(mLog,0," ready \n");
@@ -2535,7 +2535,7 @@ int formatDVD(ch *menu)
    nstat = zmessageYN(mWin,"Format DVD/BRD. This will take 2-4 minutes. \n Continue?");
    if (! nstat) goto format_exit;
 
-   vFilesReset();                                                                //  reset DVD/BRD file data
+   vFilesReset();                                                                      //  reset DVD/BRD file data
 
    sprintf(command,"dvd+rw-format -force %s 2>&1",BJdvd);
    do_shell("dvd+rw-format", command);
@@ -2550,7 +2550,7 @@ format_exit:
 
 int helpFunc(ch *menu)
 {
-   if (strmatch(menu,"about")) zabout(mWin);                                     //  7.7
+   if (strmatch(menu,"about")) zabout(mWin);                                           //  7.7
    if (strmatch(menu,"user guide")) showz_docfile(mWin,"userguide",0);
    return 0;
 }
@@ -2592,39 +2592,39 @@ int fc_response(GtkDialog *dwin, int arg
    int      ii, err, hide;
    STATB    filestat;
 
-   if (arg == 103 || arg == -4)                                                  //  done, cancel
+   if (arg == 103 || arg == -4)                                                        //  done, cancel
    {
       gtk_widget_destroy(GTK_WIDGET(dwin));
       return 0;
    }
 
-   if (arg == 100)                                                               //  hidden
+   if (arg == 100)                                                                     //  hidden
    {
       hide = gtk_file_chooser_get_show_hidden(GTK_FILE_CHOOSER(fc_widget));
       hide = 1 - hide;
       gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(fc_widget),hide);
    }
 
-   if (arg == 101 || arg == 102)                                                 //  include, exclude
+   if (arg == 101 || arg == 102)                                                       //  include, exclude
    {
       flist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(fc_widget));
 
-      for (ii = 0; ; ii++)                                                       //  process selected files
+      for (ii = 0; ; ii++)                                                             //  process selected files
       {
          file1 = (ch   *) g_slist_nth_data(flist,ii);
          if (! file1) break;
 
-         file2 = zstrdup(file1,"file2",2);                                       //  extra space for wildcard
+         file2 = zstrdup(file1,"file2",2);                                             //  extra space for wildcard
          g_free(file1);
 
          err = stat(file2,&filestat);
          if (err) txwidget_append2(mLog,0," *** error: %s  file: %s \n",
                                              strerror(errno),kleenex(file2));
 
-         if (S_ISDIR(filestat.st_mode)) strcat(file2,"/*");                      //  if directory, append wildcard
+         if (S_ISDIR(filestat.st_mode)) strcat(file2,"/*");                            //  if directory, append wildcard
 
          ppf = file2;
-         if (strmatchN(ppf,dvdmp,dvdmpcc)) ppf += dvdmpcc;                       //  omit DVD/BRD mount point
+         if (strmatchN(ppf,dvdmp,dvdmpcc)) ppf += dvdmpcc;                             //  omit DVD/BRD mount point
 
          if (arg == 101) txwidget_append2(editwidget,0,"include %s""\n",ppf);
          if (arg == 102) txwidget_append2(editwidget,0,"exclude %s""\n",ppf);
@@ -2646,13 +2646,13 @@ int fc_response(GtkDialog *dwin, int arg
 int writeDT()
 {
    time_t      dt1;
-   struct tm   dt2;                                                              //  year/month/day/hour/min/sec
+   struct tm   dt2;                                                                    //  year/month/day/hour/min/sec
    FILE        *fid;
 
    dt1 = time(0);
    dt2 = *localtime(&dt1);
 
-   snprintf(backupDT,15,"%4d%02d%02d-%02d%02d",dt2.tm_year+1900,                 //  yyyymmdd-hhmm
+   snprintf(backupDT,15,"%4d%02d%02d-%02d%02d",dt2.tm_year+1900,                       //  yyyymmdd-hhmm
             dt2.tm_mon+1, dt2.tm_mday, dt2.tm_hour, dt2.tm_min);
 
    strcpy(mediumDT,backupDT);
@@ -2664,7 +2664,7 @@ int writeDT()
       return 0;
    }
 
-   fprintf(fid,"%s \n",mediumDT);                                                //  write date/time and medium count
+   fprintf(fid,"%s \n",mediumDT);                                                      //  write date/time and medium count
    fclose(fid);
    return 0;
 }
@@ -2673,7 +2673,7 @@ int writeDT()
 //  backup helper function
 //  save all file and directory owner and permission data to temp file
 
-int save_filepoop()                                                              //  all files, not just directories
+int save_filepoop()                                                                    //  all files, not just directories
 {
    int      ii, cc, err;
    FILE     *fid;
@@ -2687,23 +2687,23 @@ int save_filepoop()
       return 0;
    }
 
-   *pdirk = 0;                                                                   //  no prior
+   *pdirk = 0;                                                                         //  no prior
 
    for (ii = 0; ii < Dnf; ii++)
    {
-      strcpy(dirk,Drec[ii].file);                                                //  next file on disk
+      strcpy(dirk,Drec[ii].file);                                                      //  next file on disk
       pp = dirk;
 
       while (true)
       {
-         pp = strchr(pp+1,'/');                                                  //  next (last) directory level
+         pp = strchr(pp+1,'/');                                                        //  next (last) directory level
          if (! pp) break;
-         cc = pp - dirk + 1;                                                     //  cc incl. '/'
-         if (strncmp(dirk,pdirk,cc) == 0) continue;                              //  matches prior, skip
+         cc = pp - dirk + 1;                                                           //  cc incl. '/'
+         if (strncmp(dirk,pdirk,cc) == 0) continue;                                    //  matches prior, skip
 
-         *pp = 0;                                                                //  terminate this directory level
+         *pp = 0;                                                                      //  terminate this directory level
 
-         err = stat(dirk,&dstat);                                                //  get owner and permissions
+         err = stat(dirk,&dstat);                                                      //  get owner and permissions
          if (err) {
             txwidget_append2(mLog,0," *** error: %s  file: %s \n",
                                           strerror(errno),kleenex(dirk));
@@ -2712,17 +2712,17 @@ int save_filepoop()
 
          dstat.st_mode = dstat.st_mode & 0777;
 
-         fprintf(fid,"%4d:%4d %3o %s\n",                                         //  output uid:gid permissions directory
-              dstat.st_uid, dstat.st_gid, dstat.st_mode, dirk);                  //                  (octal)
+         fprintf(fid,"%4d:%4d %3o %s\n",                                               //  output uid:gid permissions directory
+              dstat.st_uid, dstat.st_gid, dstat.st_mode, dirk);                        //                  (octal)
 
-         *pp = '/';                                                              //  restore '/'
+         *pp = '/';                                                                    //  restore '/'
       }
 
-      strcpy(pdirk,dirk);                                                        //  prior = this directory
+      strcpy(pdirk,dirk);                                                              //  prior = this directory
 
-      strcpy(file,Drec[ii].file);                                                //  disk file, again
+      strcpy(file,Drec[ii].file);                                                      //  disk file, again
 
-      err = stat(file,&dstat);                                                   //  get owner and permissions
+      err = stat(file,&dstat);                                                         //  get owner and permissions
       if (err) {
          txwidget_append2(mLog,0," *** error: %s  file: %s \n",
                                              strerror(errno),kleenex(file));
@@ -2731,8 +2731,8 @@ int save_filepoop()
 
       dstat.st_mode = dstat.st_mode & 0777;
 
-      fprintf(fid,"%4d:%4d %3o %s\n",                                            //  output uid:gid permissions file
-            dstat.st_uid, dstat.st_gid, dstat.st_mode, file);                    //                  (octal)
+      fprintf(fid,"%4d:%4d %3o %s\n",                                                  //  output uid:gid permissions file
+            dstat.st_uid, dstat.st_gid, dstat.st_mode, file);                          //                  (octal)
    }
 
    fclose(fid);
@@ -2754,10 +2754,10 @@ int restore_filepoop()
    txwidget_append2(mLog,0,"\n restore directory owner and permissions \n");
    txwidget_append2(mLog,0,"  for directories anchored at: %s \n",RJto);
 
-   cc1 = strlen(RJfrom);                                                         //  from: /home/xxx/.../
-   cc2 = strlen(RJto);                                                           //    to: /home/yyy/.../
+   cc1 = strlen(RJfrom);                                                               //  from: /home/xxx/.../
+   cc2 = strlen(RJto);                                                                 //    to: /home/yyy/.../
 
-   strcpy(poopfile,dvdmp);                                                       //  DVD/BRD file with owner & permissions
+   strcpy(poopfile,dvdmp);                                                             //  DVD/BRD file with owner & permissions
    strcat(poopfile,V_FILEPOOP);
 
    fid = fopen(poopfile,"r");
@@ -2770,25 +2770,25 @@ int restore_filepoop()
 
    while (true)
    {
-      nn = fscanf(fid,"%d:%d %o %[^\n]",&uid,&gid,&perms,file1);                 //  uid, gid, permissions, file
-      if (nn == EOF) break;                                                      //  (nnn:nnn)   (octal)
+      nn = fscanf(fid,"%d:%d %o %[^\n]",&uid,&gid,&perms,file1);                       //  uid, gid, permissions, file
+      if (nn == EOF) break;                                                            //  (nnn:nnn)   (octal)
       if (nn != 4) continue;
 
-      ccf = strlen(file1);                                                       //  match directories too
+      ccf = strlen(file1);                                                             //  match directories too
       if (ccf < cc1) continue;
 
       while (ii < Rnf)
       {
-         nn = strncmp(Rrec[ii].file,file1,ccf);                                  //  file in restored file list?
-         if (nn >= 0) break;                                                     //  (logic depends on sorted lists)
+         nn = strncmp(Rrec[ii].file,file1,ccf);                                        //  file in restored file list?
+         if (nn >= 0) break;                                                           //  (logic depends on sorted lists)
          ii++;
       }
 
       if (ii == Rnf) break;
-      if (nn > 0) continue;                                                      //  no
+      if (nn > 0) continue;                                                            //  no
 
-      strcpy(file2,RJto);                                                        //  copy-to location
-      strcpy(file2 + cc2, file1 + cc1);                                          //  + org. file, less copy-from part
+      strcpy(file2,RJto);                                                              //  copy-to location
+      strcpy(file2 + cc2, file1 + cc1);                                                //  + org. file, less copy-from part
       txwidget_append2(mLog,0," owner: %4d:%4d  permissions: %3o  file: %s \n",
                                     uid, gid, perms, kleenex(file2));
       err = chown(file2,uid,gid);
@@ -2812,8 +2812,8 @@ int createBackupHist()
    ch       backupfile[200];
    ch       disp;
 
-   snprintf(backupfile,199,"%s/dkopp-hist-%s-%s",                                //  create history file name:
-                      homedir,backupDT,dvdlabel);                                //    dkopp-hist-yyyymmdd-hhmm-dvdlabel
+   snprintf(backupfile,199,"%s/dkopp-hist-%s-%s",                                      //  create history file name:
+                      homedir,backupDT,dvdlabel);                                      //    dkopp-hist-yyyymmdd-hhmm-dvdlabel
 
    txwidget_append2(mLog,1,"\n""create history file: %s \n",backupfile);
 
@@ -2825,16 +2825,16 @@ int createBackupHist()
 
    fprintf(fid,"%s (%s backup) \n\n",backupfile,mbmode);
 
-   for (ii = 0; ii < BJnx; ii++)                                                 //  output include/exclude recs
+   for (ii = 0; ii < BJnx; ii++)                                                       //  output include/exclude recs
       fprintf(fid," %s \n",BJinex[ii]);
    fprintf(fid,"\n");
 
    if (strmatch(mbmode,"full"))
-      for (ii = 0; ii < Dnf; ii++)                                               //  output all files for backup
+      for (ii = 0; ii < Dnf; ii++)                                                     //  output all files for backup
          fprintf(fid,"%s\n",Drec[ii].file);
 
    else {
-      for (ii = 0; ii < Dnf; ii++) {                                             //  output new and modified files
+      for (ii = 0; ii < Dnf; ii++) {                                                   //  output new and modified files
          disp = Drec[ii].disp;
          if ((disp == 'n') || (disp == 'm'))
                fprintf(fid,"%s\n",Drec[ii].file);
@@ -2857,42 +2857,42 @@ int inexParse(ch   * rec, ch   *& rtype,
 
    rtype = fspec = 0;
 
-   if (rec[0] == '#') return 0;                                                  //  comment recs.
+   if (rec[0] == '#') return 0;                                                        //  comment recs.
    if (strlen(rec) < 3) return 0;
    strTrim(rec);
 
    ii = 0;
-   while ((rec[ii] == ' ') && (ii < 30)) ii++;                                   //  find 1st non-blank
+   while ((rec[ii] == ' ') && (ii < 30)) ii++;                                         //  find 1st non-blank
    if (rec[ii] == 0) return 0;
-   if (ii == 30) return 0;                                                       //  blank record
+   if (ii == 30) return 0;                                                             //  blank record
 
-   rtype = rec + ii;                                                             //  include/exclude
+   rtype = rec + ii;                                                                   //  include/exclude
 
-   while ((rec[ii] > ' ') && (ii < 30)) ii++;                                    //  look for next blank or null
+   while ((rec[ii] > ' ') && (ii < 30)) ii++;                                          //  look for next blank or null
    if (ii == 30) return 2;
 
-   if (rec[ii] == ' ') { rec[ii] = 0; ii++; }                                    //  end of rtype
+   if (rec[ii] == ' ') { rec[ii] = 0; ii++; }                                          //  end of rtype
    if (strlen(rtype) > 7) return 2;
 
-   while ((rec[ii] == ' ') && (ii < 30)) ii++;                                   //  find next non-blank
+   while ((rec[ii] == ' ') && (ii < 30)) ii++;                                         //  find next non-blank
    if (ii == 30) return 2;
 
-   fspec = rec + ii;                                                             //  filespec (wildcards)
+   fspec = rec + ii;                                                                   //  filespec (wildcards)
    if (strlen(fspec) < 4) return 3;
    if (strlen(fspec) > XFCC-100) return 3;
 
-   if (strmatch(rtype,"exclude")) return 1;                                      //  exclude, done
-   if (! strmatch(rtype,"include")) return 2;                                    //  must be include
+   if (strmatch(rtype,"exclude")) return 1;                                            //  exclude, done
+   if (! strmatch(rtype,"include")) return 2;                                          //  must be include
 
-   if (fspec[0] != '/') return 3;                                                //  must have at least /topdirk/
+   if (fspec[0] != '/') return 3;                                                      //  must have at least /topdirk/
    pp1 = strchr(fspec+1,'/');
    if (!pp1) return 3;
    if (pp1-fspec < 2) return 3;
-   pp2 = strchr(fspec+1,'*');                                                    //  any wildcards must be later
+   pp2 = strchr(fspec+1,'*');                                                          //  any wildcards must be later
    if (pp2 && (pp2 < pp1)) return 3;
    pp2 = strchr(fspec+1,'%');
    if (pp2 && (pp2 < pp1)) return 3;
-   return 1;                                                                     //  include + legit. fspec
+   return 1;                                                                           //  include + legit. fspec
 }
 
 
@@ -2935,7 +2935,7 @@ int BJvalidate(ch *menu)
       nerr++;
    }
 
-   txwidget_append2(mLog,0," file date from: %s \n",BJdatefrom);                 //  file age limit
+   txwidget_append2(mLog,0," file date from: %s \n",BJdatefrom);                       //  file age limit
    err = 0;
    ii = sscanf(BJdatefrom,"%d.%d.%d",&year,&mon,&day);
    if (ii != 3) err = 1;
@@ -2947,7 +2947,7 @@ int BJvalidate(ch *menu)
    BJtdate = mktime(&tm_date);
    tm_date2 = localtime(&BJtdate);
    if (tm_date2->tm_year - year + 1900 != 0) err = 3;
-   if (tm_date2->tm_year + 1900 < 1970) err = 4;                                 //  < 1970 disallowed
+   if (tm_date2->tm_year + 1900 < 1970) err = 4;                                       //  < 1970 disallowed
    if (tm_date2->tm_mon - mon + 1 != 0) err = 5;
    if (tm_date2->tm_mday - day != 0) err = 6;
    if (err) {
@@ -2956,7 +2956,7 @@ int BJvalidate(ch *menu)
       BJtdate = 0;
    }
 
-   nerr += nxValidate(BJinex,BJnx);                                              //  validate include/exclude recs
+   nerr += nxValidate(BJinex,BJnx);                                                    //  validate include/exclude recs
 
    txwidget_append2(mLog,0," *** %d errors \n",nerr);
    if (nerr) commFail++;
@@ -2983,8 +2983,8 @@ int RJvalidate()
    }
 
    txwidget_append2(mLog,0," copy-from: %s \n",RJfrom);
-   strcpy(rdirk,dvdmp);                                                          //  validate copy-from location
-   strcat(rdirk,RJfrom);                                                         //  /media/dvd/home/...
+   strcpy(rdirk,dvdmp);                                                                //  validate copy-from location
+   strcat(rdirk,RJfrom);                                                               //  /media/dvd/home/...
    pdirk = opendir(rdirk);
    if (! pdirk) {
       txwidget_append2(mLog,0," *** invalid copy-from location \n");
@@ -2992,21 +2992,21 @@ int RJvalidate()
    }
    else closedir(pdirk);
 
-   cc = strlen(RJfrom);                                                          //  insure '/' at end
+   cc = strlen(RJfrom);                                                                //  insure '/' at end
    if (RJfrom[cc-1] != '/') strcat(RJfrom,"/");
 
    txwidget_append2(mLog,0,"   copy-to: %s \n",RJto);
-   pdirk = opendir(RJto);                                                        //  validate copy-to location
+   pdirk = opendir(RJto);                                                              //  validate copy-to location
    if (! pdirk) {
       txwidget_append2(mLog,0," *** invalid copy-to location \n");
       nerr++;
    }
    else closedir(pdirk);
 
-   cc = strlen(RJto);                                                            //  insure '/' at end
+   cc = strlen(RJto);                                                                  //  insure '/' at end
    if (RJto[cc-1] != '/') strcat(RJto,"/");
 
-   nerr += nxValidate(RJinex,RJnx);                                              //  validate include/exclude recs
+   nerr += nxValidate(RJinex,RJnx);                                                    //  validate include/exclude recs
 
    txwidget_append2(mLog,0," %d errors \n",nerr);
    if (! nerr) RJval = 1;
@@ -3022,22 +3022,22 @@ int nxValidate(ch **inexrecs, int nrecs)
    ch      *rtype, *fspec, nxrec[XFCC];
    int      ii, nstat, errs = 0;
 
-   for (ii = 0; ii < nrecs; ii++)                                                //  process include/exclude recs
+   for (ii = 0; ii < nrecs; ii++)                                                      //  process include/exclude recs
    {
       strcpy(nxrec,inexrecs[ii]);
-      txwidget_append2(mLog,0," %s \n",nxrec);                                   //  output
+      txwidget_append2(mLog,0," %s \n",nxrec);                                         //  output
 
-      nstat = inexParse(nxrec,rtype,fspec);                                      //  parse
-      if (nstat == 0) continue;                                                  //  comment
-      if (nstat == 1) continue;                                                  //  OK
+      nstat = inexParse(nxrec,rtype,fspec);                                            //  parse
+      if (nstat == 0) continue;                                                        //  comment
+      if (nstat == 1) continue;                                                        //  OK
 
       if (nstat == 2) {
-         txwidget_append2(mLog,0," *** cannot parse \n");                        //  cannot parse
+         txwidget_append2(mLog,0," *** cannot parse \n");                              //  cannot parse
          errs++;
          continue;
       }
 
-      if (nstat == 3) {                                                          //  bad filespec
+      if (nstat == 3) {                                                                //  bad filespec
          txwidget_append2(mLog,0," *** invalid filespec \n");
          errs++;
          continue;
@@ -3060,33 +3060,33 @@ int dGetFiles()
    double   nbytes;
    STATB    filestat;
 
-   if (! BJval) {                                                                //  validate job data if needed
+   if (! BJval) {                                                                      //  validate job data if needed
       dFilesReset();
       BJvalidate(0);
-      if (! BJval) return 0;                                                     //  job has errors
+      if (! BJval) return 0;                                                           //  job has errors
    }
 
-   if (Dnf > 0) return 0;                                                        //  avoid refresh
+   if (Dnf > 0) return 0;                                                              //  avoid refresh
 
    txwidget_append2(mLog,1,"\n""finding all files for backup \n");
 
-   for (ii = 0; ii < BJnx; ii++)                                                 //  process include/exclude recs
+   for (ii = 0; ii < BJnx; ii++)                                                       //  process include/exclude recs
    {
-      BJfiles[ii] = 0;                                                           //  initz. include/exclude rec stats
+      BJfiles[ii] = 0;                                                                 //  initz. include/exclude rec stats
       BJbytes[ii] = 0.0;
       BJdvdno[ii] = 0;
 
-      strcpy(bjrec,BJinex[ii]);                                                  //  next record
-      nstat = inexParse(bjrec,rtype,fspec);                                      //  parse
-      if (nstat == 0) continue;                                                  //  comment
+      strcpy(bjrec,BJinex[ii]);                                                        //  next record
+      nstat = inexParse(bjrec,rtype,fspec);                                            //  parse
+      if (nstat == 0) continue;                                                        //  comment
 
-      if (strmatch(rtype,"include"))                                             //  include filespec
+      if (strmatch(rtype,"include"))                                                   //  include filespec
       {
          ftf = 1;
 
          while (1)
          {
-            fsp = SearchWild(fspec,ftf);                                         //  find matching files
+            fsp = SearchWild(fspec,ftf);                                               //  find matching files
             if (! fsp) break;
 
             cc = strlen(fsp);
@@ -3094,21 +3094,21 @@ int dGetFiles()
 
             Drec[Dnf].file = zstrdup(fsp,"Drec");
 
-            err = lstat(fsp,&filestat);                                          //  check accessibility
+            err = lstat(fsp,&filestat);                                                //  check accessibility
             if (err == 0) {
-               if (! S_ISREG(filestat.st_mode) &&                                //  include files and symlinks
-                   ! S_ISLNK(filestat.st_mode)) continue;                        //  omit pipes, devices ...
+               if (! S_ISREG(filestat.st_mode) &&                                      //  include files and symlinks
+                   ! S_ISLNK(filestat.st_mode)) continue;                              //  omit pipes, devices ...
             }
 
-            Drec[Dnf].stat = err;                                                //  save file status
-            Drec[Dnf].inclx = ii;                                                //  save pointer to include rec
-            Drec[Dnf].size = filestat.st_size;                                   //  save file size
-            Drec[Dnf].mtime = filestat.st_mtime                                  //  save last mod time
-                            + filestat.st_mtim.tv_nsec * nano;                   //  (nanosec resolution)
+            Drec[Dnf].stat = err;                                                      //  save file status
+            Drec[Dnf].inclx = ii;                                                      //  save pointer to include rec
+            Drec[Dnf].size = filestat.st_size;                                         //  save file size
+            Drec[Dnf].mtime = filestat.st_mtime                                        //  save last mod time
+                            + filestat.st_mtim.tv_nsec * nano;                         //  (nanosec resolution)
             if (err) Drec[Dnf].size = Drec[Dnf].mtime = 0;
-            Drec[Dnf].disp = Drec[Dnf].ivf = 0;                                  //  initialize
+            Drec[Dnf].disp = Drec[Dnf].ivf = 0;                                        //  initialize
 
-            BJfiles[ii]++;                                                       //  count included files and bytes
+            BJfiles[ii]++;                                                             //  count included files and bytes
             BJbytes[ii] += Drec[Dnf].size;
 
             if (++Dnf == maxfs) {
@@ -3118,24 +3118,24 @@ int dGetFiles()
          }
       }
 
-      if (strmatch(rtype,"exclude"))                                             //  exclude filespec
+      if (strmatch(rtype,"exclude"))                                                   //  exclude filespec
       {
-         for (jj = 0; jj < Dnf; jj++)                                            //  check included files (SO FAR)
+         for (jj = 0; jj < Dnf; jj++)                                                  //  check included files (SO FAR)
          {
             if (! Drec[jj].file) continue;
             wstat = MatchWild(fspec,Drec[jj].file);
             if (wstat != 0) continue;
-            BJfiles[ii]--;                                                       //  un-count excluded file and bytes
+            BJfiles[ii]--;                                                             //  un-count excluded file and bytes
             BJbytes[ii] -= Drec[jj].size;
-            zfree(Drec[jj].file);                                                //  clear file data in array
+            zfree(Drec[jj].file);                                                      //  clear file data in array
             Drec[jj].file = 0;
-            Drec[jj].stat = 0;                                                   //  bugfix
+            Drec[jj].stat = 0;                                                         //  bugfix
          }
       }
-   }                                                                             //  end of include/exclude recs
+   }                                                                                   //  end of include/exclude recs
 
-   for (ii = 0; ii < Dnf; ii++)                                                  //  list and remove error files
-   {                                                                             //  (after excluded files removed)
+   for (ii = 0; ii < Dnf; ii++)                                                        //  list and remove error files
+   {                                                                                   //  (after excluded files removed)
       if (! Drec[ii].file) continue;
 
       if (Drec[ii].stat)
@@ -3143,7 +3143,7 @@ int dGetFiles()
          err = stat(Drec[ii].file,&filestat);
          txwidget_append2(mLog,0," *** %s  omit: %s \n",strerror(errno),kleenex(Drec[ii].file));
          jj = Drec[ii].inclx;
-         BJfiles[jj]--;                                                          //  un-count file and bytes
+         BJfiles[jj]--;                                                                //  un-count file and bytes
          BJbytes[jj] -= Drec[ii].size;
          zfree(Drec[ii].file);
          Drec[ii].file = 0;
@@ -3154,10 +3154,10 @@ int dGetFiles()
    {
       if (! Drec[ii].file) continue;
 
-      if (Drec[ii].mtime < BJtdate)                                              //  omit files excluded by date
-      {                                                                          //    or older than 1970
+      if (Drec[ii].mtime < BJtdate)                                                    //  omit files excluded by date
+      {                                                                                //    or older than 1970
          jj = Drec[ii].inclx;
-         BJfiles[jj]--;                                                          //  un-count file and bytes
+         BJfiles[jj]--;                                                                //  un-count file and bytes
          BJbytes[jj] -= Drec[ii].size;
          zfree(Drec[ii].file);
          Drec[ii].file = 0;
@@ -3167,7 +3167,7 @@ int dGetFiles()
 
    if (nexc) txwidget_append2(mLog,0," %d files excluded by selection date \n",nexc);
 
-   ii = jj = 0;                                                                  //  repack file arrays after deletions
+   ii = jj = 0;                                                                        //  repack file arrays after deletions
    while (ii < Dnf)
    {
       if (Drec[ii].file == 0) ii++;
@@ -3182,16 +3182,16 @@ int dGetFiles()
       }
    }
 
-   Dnf = jj;                                                                     //  final file count
+   Dnf = jj;                                                                           //  final file count
 
    Dbytes = 0.0;
-   for (ii = 0; ii < Dnf; ii++) Dbytes += Drec[ii].size;                         //  compute total bytes from files
+   for (ii = 0; ii < Dnf; ii++) Dbytes += Drec[ii].size;                               //  compute total bytes from files
 
    nfiles = 0;
    nbytes = 0.0;
 
-   for (ii = 0; ii < BJnx; ii++)                                                 //  compute total files and bytes
-   {                                                                             //    from include/exclude recs
+   for (ii = 0; ii < BJnx; ii++)                                                       //  compute total files and bytes
+   {                                                                                   //    from include/exclude recs
       nfiles += BJfiles[ii];
       nbytes += BJbytes[ii];
    }
@@ -3199,18 +3199,18 @@ int dGetFiles()
    mbytes = formatKBMB(nbytes,3);
    txwidget_append2(mLog,0," files for backup: %d  %s \n",nfiles,mbytes);
 
-   if ((nfiles != Dnf) || (Dbytes != nbytes)) {                                  //  must match
+   if ((nfiles != Dnf) || (Dbytes != nbytes)) {                                        //  must match
       txwidget_append2(mLog,0," *** bug: nfiles: %d  Dnf: %d \n",nfiles,Dnf);
       txwidget_append2(mLog,0," *** bug: nbytes: %.0f  Dbytes: %.0f \n",nbytes,Dbytes);
       goto errret;
    }
 
-   SortFileList((ch   *) Drec,sizeof(dfrec),Dnf,'A');                            //  sort Drec[Dnf] by Drec[].file
+   SortFileList((ch   *) Drec,sizeof(dfrec),Dnf,'A');                                  //  sort Drec[Dnf] by Drec[].file
 
-   for (ii = 1; ii < Dnf; ii++)                                                  //  look for duplicate files
+   for (ii = 1; ii < Dnf; ii++)                                                        //  look for duplicate files
       if (strmatch(Drec[ii].file,Drec[ii-1].file)) {
          txwidget_append2(mLog,0," *** duplicate file: %s \n",kleenex(Drec[ii].file));
-         BJval = 0;                                                              //  invalidate backup job
+         BJval = 0;                                                                    //  invalidate backup job
       }
 
    if (! BJval) goto errret;
@@ -3235,25 +3235,25 @@ int vGetFiles()
    FILE     *fid;
    STATB    filestat;
 
-   if (Vnf) return 0;                                                            //  avoid refresh
+   if (Vnf) return 0;                                                                  //  avoid refresh
 
-   mountDVD(0);                                                                  //  mount with retries
-   if (! dvdmtd) return 0;                                                       //  cannot mount
+   mountDVD(0);                                                                        //  mount with retries
+   if (! dvdmtd) return 0;                                                             //  cannot mount
 
    txwidget_append2(mLog,1,"\n""find all DVD/BRD files \n");
 
-   snprintf(command,200,"find \"%s\" -type f -or -type l >%s",                   //  get regular files and symlinks
-                                          dvdmp,TFdvdfiles);                     //  add quotes in case of blanks
+   snprintf(command,200,"find \"%s\" -type f -or -type l >%s",                         //  get regular files and symlinks
+                                          dvdmp,TFdvdfiles);                           //  add quotes in case of blanks
    txwidget_append2(mLog,0," %s \n",command);
 
-   err = zshell(0,command);                                                      //  list all DVD/BRD files to temp file
+   err = zshell(0,command);                                                            //  list all DVD/BRD files to temp file
    if (err) {
       txwidget_append2(mLog,0," *** find command failed: %s \n",strerror(err));
       commFail++;
       return 0;
    }
 
-   fid = fopen(TFdvdfiles,"r");                                                  //  read file list
+   fid = fopen(TFdvdfiles,"r");                                                        //  read file list
    if (! fid) {
       txwidget_append2(mLog,0," *** cannot open /tmp scratch file \n");
       commFail++;
@@ -3264,23 +3264,23 @@ int vGetFiles()
 
    while (1)
    {
-      pp = fgets_trim(fspec1,XFCC-2,fid);                                        //  get next file
-      if (! pp) break;                                                           //  eof
+      pp = fgets_trim(fspec1,XFCC-2,fid);                                              //  get next file
+      if (! pp) break;                                                                 //  eof
 
-      cc = strlen(pp);                                                           //  absurdly long file name
+      cc = strlen(pp);                                                                 //  absurdly long file name
       if (cc > XFCC-100) {
          txwidget_append2(mLog,0," *** absurd file skipped: %200s (etc.) \n",kleenex(pp));
          continue;
       }
 
-      if (strmatchN(fspec1+dvdmpcc,V_DKOPPDIRK,gcc)) continue;                   //  ignore special dkopp files
-      repl_1str(fspec1,fspec2,XFCC,"\\=","=");                                   //  replace "\=" with "=" in file name
-      Vrec[Vnf].file = zstrdup(fspec2 + dvdmpcc,"Vrec");                         //  save without DVD/BRD mount point
-
-      err = lstat(fspec1,&filestat);                                             //  check accessibility
-      Vrec[Vnf].stat = err;                                                      //  save file status
-      Vrec[Vnf].size = filestat.st_size;                                         //  save file size
-      Vrec[Vnf].mtime = filestat.st_mtime                                        //  save last mod time
+      if (strmatchN(fspec1+dvdmpcc,V_DKOPPDIRK,gcc)) continue;                         //  ignore special dkopp files
+      repl_1str(fspec1,fspec2,XFCC,"\\=","=");                                         //  replace "\=" with "=" in file name
+      Vrec[Vnf].file = zstrdup(fspec2 + dvdmpcc,"Vrec");                               //  save without DVD/BRD mount point
+
+      err = lstat(fspec1,&filestat);                                                   //  check accessibility
+      Vrec[Vnf].stat = err;                                                            //  save file status
+      Vrec[Vnf].size = filestat.st_size;                                               //  save file size
+      Vrec[Vnf].mtime = filestat.st_mtime                                              //  save last mod time
                       + filestat.st_mtim.tv_nsec * nano;
       if (err) Vrec[Vnf].size = Vrec[Vnf].mtime = 0;
       Vnf++;
@@ -3289,7 +3289,7 @@ int vGetFiles()
 
    fclose (fid);
 
-   SortFileList((ch   *) Vrec,sizeof(vfrec),Vnf,'A');                            //  sort Vrec[Vnf] by Vrec[].file
+   SortFileList((ch   *) Vrec,sizeof(vfrec),Vnf,'A');                                  //  sort Vrec[Vnf] by Vrec[].file
 
    txwidget_append2(mLog,0," DVD/BRD files: %d \n",Vnf);
    return 0;
@@ -3305,31 +3305,31 @@ int rGetFiles()
 
    if (! RJval) return 0;
 
-   rFilesReset();                                                                //  clear restore files
-   vGetFiles();                                                                  //  get DVD/BRD files
+   rFilesReset();                                                                      //  clear restore files
+   vGetFiles();                                                                        //  get DVD/BRD files
    if (! Vnf) return 0;
 
    txwidget_append2(mLog,0,"\n""find all DVD/BRD files to restore \n");
 
-   for (ii = 0; ii < RJnx; ii++)                                                 //  process include/exclude recs
+   for (ii = 0; ii < RJnx; ii++)                                                       //  process include/exclude recs
    {
-      strcpy(rjrec,RJinex[ii]);                                                  //  next record
-      txwidget_append2(mLog,0," %s \n",rjrec);                                   //  output
+      strcpy(rjrec,RJinex[ii]);                                                        //  next record
+      txwidget_append2(mLog,0," %s \n",rjrec);                                         //  output
 
-      nstat = inexParse(rjrec,rtype,fspec);                                      //  parse
-      if (nstat == 0) continue;                                                  //  comment
+      nstat = inexParse(rjrec,rtype,fspec);                                            //  parse
+      if (nstat == 0) continue;                                                        //  comment
 
-      repl_1str(fspec,fspecx,XFCC,"\\=","=");                                    //  replace "\=" with "=" in file name
+      repl_1str(fspec,fspecx,XFCC,"\\=","=");                                          //  replace "\=" with "=" in file name
 
-      if (strmatch(rtype,"include"))                                             //  include filespec
+      if (strmatch(rtype,"include"))                                                   //  include filespec
       {
-         ninc = 0;                                                               //  count of included files
+         ninc = 0;                                                                     //  count of included files
 
-         for (jj = 0; jj < Vnf; jj++)                                            //  screen all DVD/BRD files
+         for (jj = 0; jj < Vnf; jj++)                                                  //  screen all DVD/BRD files
          {
             wstat = MatchWild(fspecx,Vrec[jj].file);
             if (wstat != 0) continue;
-            Rrec[Rnf].file = zstrdup(Vrec[jj].file,"Rrec");                      //  add matching files
+            Rrec[Rnf].file = zstrdup(Vrec[jj].file,"Rrec");                            //  add matching files
             Rnf++; ninc++;
             if (Rnf == maxfs) zappcrash("exceed %d files",maxfs);
          }
@@ -3337,17 +3337,17 @@ int rGetFiles()
          txwidget_append2(mLog,0,"  %d files added \n",ninc);
       }
 
-      if (strmatch(rtype,"exclude"))                                             //  exclude filespec
+      if (strmatch(rtype,"exclude"))                                                   //  exclude filespec
       {
          nexc = 0;
 
-         for (jj = 0; jj < Rnf; jj++)                                            //  check included files (SO FAR)
+         for (jj = 0; jj < Rnf; jj++)                                                  //  check included files (SO FAR)
          {
             if (! Rrec[jj].file) continue;
 
             wstat = MatchWild(fspecx,Rrec[jj].file);
             if (wstat != 0) continue;
-            zfree(Rrec[jj].file);                                                //  remove matching files
+            zfree(Rrec[jj].file);                                                      //  remove matching files
             Rrec[jj].file = 0;
             nexc++;
          }
@@ -3356,7 +3356,7 @@ int rGetFiles()
       }
    }
 
-   ii = jj = 0;                                                                  //  repack after deletions
+   ii = jj = 0;                                                                        //  repack after deletions
    while (ii < Rnf)
    {
       if (Rrec[ii].file == 0) ii++;
@@ -3376,18 +3376,18 @@ int rGetFiles()
    Rnf = jj;
    txwidget_append2(mLog,0," total file count: %d \n",Rnf);
 
-   cc = strlen(RJfrom);                                                          //  copy from: /home/.../
+   cc = strlen(RJfrom);                                                                //  copy from: /home/.../
 
-   for (ii = 0; ii < Rnf; ii++)                                                  //  get selected DVD/BRD files to restore
+   for (ii = 0; ii < Rnf; ii++)                                                        //  get selected DVD/BRD files to restore
    {
       if (! strmatchN(Rrec[ii].file,RJfrom,cc)) {
          txwidget_append2(mLog,0," *** not under copy-from; %s \n",Rrec[ii].file);
-         RJval = 0;                                                              //  mark restore job invalid
+         RJval = 0;                                                                    //  mark restore job invalid
          continue;
       }
    }
 
-   SortFileList((ch   *) Rrec,sizeof(rfrec),Rnf,'A');                            //  sort Rrec[Rnf] by Rrec[].file
+   SortFileList((ch   *) Rrec,sizeof(rfrec),Rnf,'A');                                  //  sort Rrec[Rnf] by Rrec[].file
    return 0;
 }
 
@@ -3408,41 +3408,41 @@ int setFileDisps()
 
    dii = vii = 0;
    nnew = nmod = nunc = ndel = 0;
-   Mbytes = 0.0;                                                                 //  total bytes, new and modified files
+   Mbytes = 0.0;                                                                       //  total bytes, new and modified files
 
-   while ((dii < Dnf) || (vii < Vnf))                                            //  scan disk and DVD/BRD files parallel
+   while ((dii < Dnf) || (vii < Vnf))                                                  //  scan disk and DVD/BRD files parallel
    {
-      if ((dii < Dnf) && (vii == Vnf)) comp = -1;                                //  disk file after last DVD/BRD file
-      else if ((dii == Dnf) && (vii < Vnf)) comp = +1;                           //  DVD/BRD file after last disk file
-      else comp = strcmp(Drec[dii].file,Vrec[vii].file);                         //  compare disk and DVD/BRD file names
+      if ((dii < Dnf) && (vii == Vnf)) comp = -1;                                      //  disk file after last DVD/BRD file
+      else if ((dii == Dnf) && (vii < Vnf)) comp = +1;                                 //  DVD/BRD file after last disk file
+      else comp = strcmp(Drec[dii].file,Vrec[vii].file);                               //  compare disk and DVD/BRD file names
 
       if (comp < 0)
-      {                                                                          //  unmatched disk file: new on disk
+      {                                                                                //  unmatched disk file: new on disk
          Drec[dii].disp = 'n';
-         Mbytes += Drec[dii].size;                                               //  accumulate Mbytes
-         nnew++;                                                                 //  count new files
+         Mbytes += Drec[dii].size;                                                     //  accumulate Mbytes
+         nnew++;                                                                       //  count new files
          dii++;
       }
 
       else if (comp > 0)
-      {                                                                          //  unmatched DVD/BRD file: not on disk
+      {                                                                                //  unmatched DVD/BRD file: not on disk
          Vrec[vii].disp = 'd';
-         ndel++;                                                                 //  count deleted files
+         ndel++;                                                                       //  count deleted files
          vii++;
       }
 
-      else if (comp == 0)                                                        //  file present on disk and DVD/BRD
+      else if (comp == 0)                                                              //  file present on disk and DVD/BRD
       {
-         disp = 'u';                                                             //  set initially unchanged
-         if (Drec[dii].stat != Vrec[vii].stat) disp = 'm';                       //  fstat() statuses are different
+         disp = 'u';                                                                   //  set initially unchanged
+         if (Drec[dii].stat != Vrec[vii].stat) disp = 'm';                             //  fstat() statuses are different
          diff = fabs(Drec[dii].size - Vrec[vii].size);
-         if (diff > 0) disp = 'm';                                               //  sizes are different
+         if (diff > 0) disp = 'm';                                                     //  sizes are different
          diff = fabs(Drec[dii].mtime - Vrec[vii].mtime);
-         if (diff > modtimetolr) disp = 'm';                                     //  mod times are different
+         if (diff > modtimetolr) disp = 'm';                                           //  mod times are different
          Drec[dii].disp = Vrec[vii].disp = disp;
-         if (disp == 'u') nunc++;                                                //  count unchanged files
-         if (disp == 'm') nmod++;                                                //  count modified files
-         if (disp == 'm') Mbytes += Drec[dii].size;                              //    and accumulate Mbytes
+         if (disp == 'u') nunc++;                                                      //  count unchanged files
+         if (disp == 'm') nmod++;                                                      //  count modified files
+         if (disp == 'm') Mbytes += Drec[dii].size;                                    //    and accumulate Mbytes
 
          dii++;
          vii++;
@@ -3459,56 +3459,56 @@ int setFileDisps()
 
 int SortFileList(ch   * recs, int RL, int NR, ch   sort)
 {
-   HeapSortUcomp fcompA, fcompD;                                                 //  compare filespecs functions
-   if (sort == 'A') HeapSort(recs,RL,NR,fcompA);                                 //  normal ascii compare
-   if (sort == 'D') HeapSort(recs,RL,NR,fcompD);                                 //  compare directories first
+   HeapSortUcomp fcompA, fcompD;                                                       //  compare filespecs functions
+   if (sort == 'A') HeapSort(recs,RL,NR,fcompA);                                       //  normal ascii compare
+   if (sort == 'D') HeapSort(recs,RL,NR,fcompD);                                       //  compare directories first
    return 0;
 }
 
-int fcompA(ch *rec1, ch *rec2)                                                   //  ascii comparison
+int fcompA(ch *rec1, ch *rec2)                                                         //  ascii comparison
 {
    dfrec  *r1 = (dfrec *) rec1;
    dfrec  *r2 = (dfrec *) rec2;
    return strcmp(r1->file,r2->file);
 }
 
-int fcompD(ch *rec1, ch *rec2)                                                   //  special compare filenames
-{                                                                                //  subdirectories in a directory are
-   dfrec  *r1 = (dfrec *) rec1;                                                  //    less than files in the directory
+int fcompD(ch *rec1, ch *rec2)                                                         //  special compare filenames
+{                                                                                      //  subdirectories in a directory are
+   dfrec  *r1 = (dfrec *) rec1;                                                        //    less than files in the directory
    dfrec  *r2 = (dfrec *) rec2;
    return filecomp(r1->file,r2->file);
 }
 
-int filecomp(ch *file1, ch *file2)                                               //  special compare filenames
-{                                                                                //  subdirectories compare before files
+int filecomp(ch *file1, ch *file2)                                                     //  special compare filenames
+{                                                                                      //  subdirectories compare before files
    ch       *pp1, *pp10, *pp2, *pp20;
    ch       slash = '/';
    int      cc1, cc2, comp;
 
-   pp1 = file1;                                                                  //  first directory level or file
+   pp1 = file1;                                                                        //  first directory level or file
    pp2 = file2;
 
    while (true)
    {
-      pp10 = strchr(pp1,slash);                                                  //  find next slash
+      pp10 = strchr(pp1,slash);                                                        //  find next slash
       pp20 = strchr(pp2,slash);
 
-      if (pp10 && pp20) {                                                        //  both are directories
+      if (pp10 && pp20) {                                                              //  both are directories
          cc1 = pp10 - pp1;
          cc2 = pp20 - pp2;
-         if (cc1 < cc2) comp = strncmp(pp1,pp2,cc1);                             //  compare the directories
+         if (cc1 < cc2) comp = strncmp(pp1,pp2,cc1);                                   //  compare the directories
          else comp = strncmp(pp1,pp2,cc2);
          if (comp) return comp;
          else if (cc1 != cc2) return (cc1 - cc2);
-         pp1 = pp10 + 1;                                                         //  equal, check next level
+         pp1 = pp10 + 1;                                                               //  equal, check next level
          pp2 = pp20 + 1;
          continue;
       }
 
-      if (pp10 && ! pp20) return -1;                                             //  only one is a directory,
-      if (pp20 && ! pp10) return 1;                                              //    the directory is first
+      if (pp10 && ! pp20) return -1;                                                   //  only one is a directory,
+      if (pp20 && ! pp10) return 1;                                                    //    the directory is first
 
-      comp = strcmp(pp1,pp2);                                                    //  both are files, compare
+      comp = strcmp(pp1,pp2);                                                          //  both are files, compare
       return comp;
    }
 }
@@ -3522,7 +3522,7 @@ int BJreset()
    BJnx = 0;
    *BJbmode = *BJvmode = 0;
    BJval = BJmod = 0;
-   dFilesReset();                                                                //  reset dependent disk file data
+   dFilesReset();                                                                      //  reset dependent disk file data
    return 0;
 }
 
@@ -3534,7 +3534,7 @@ int RJreset()
    for (int ii = 0; ii < RJnx; ii++) zfree(RJinex[ii]);
    RJnx = 0;
    RJval = 0;
-   rFilesReset();                                                                //  reset dependent disk file data
+   rFilesReset();                                                                      //  reset dependent disk file data
    return 0;
 }
 
@@ -3542,7 +3542,7 @@ int RJreset()
 //  reset all file data and free allocated memory
 
 int dFilesReset()
-{                                                                                //  disk files data
+{                                                                                      //  disk files data
    for (int ii = 0; ii < Dnf; ii++)
    {
       zfree(Drec[ii].file);
@@ -3555,7 +3555,7 @@ int dFilesReset()
 }
 
 int vFilesReset()
-{                                                                                //  DVD/BRD files data
+{                                                                                      //  DVD/BRD files data
    for (int ii = 0; ii < Vnf; ii++)
    {
       zfree(Vrec[ii].file);
@@ -3568,7 +3568,7 @@ int vFilesReset()
 }
 
 int rFilesReset()
-{                                                                                //  DVD/BRD restore files data
+{                                                                                      //  DVD/BRD restore files data
    for (int ii = 0; ii < Rnf; ii++)
    {
       zfree(Rrec[ii].file);
@@ -3591,18 +3591,18 @@ ch *copyfile(ch *vfile, ch *dfile)
    STATB    fstat;
    struct timeval ftimes[2];
 
-   strcpy(vfile1,dvdmp);                                                         //  prepend DVD/BRD mount point
+   strcpy(vfile1,dvdmp);                                                               //  prepend DVD/BRD mount point
    strcat(vfile1,vfile);
-   repl_1str(vfile1,vfilex,XFCC,"=","\\=");                                      //  replace "=" with "\=" in DVD/BRD file
+   repl_1str(vfile1,vfilex,XFCC,"=","\\=");                                            //  replace "=" with "\=" in DVD/BRD file
 
-   fid1 = open(vfilex,O_RDONLY+O_NOATIME+O_LARGEFILE);                           //  open input file
+   fid1 = open(vfilex,O_RDONLY+O_NOATIME+O_LARGEFILE);                                 //  open input file
    if (fid1 == -1) return strerror(errno);
 
-   fid2 = open(dfile,O_WRONLY+O_CREAT+O_TRUNC+O_LARGEFILE,0700);                 //  open output file
+   fid2 = open(dfile,O_WRONLY+O_CREAT+O_TRUNC+O_LARGEFILE,0700);                       //  open output file
    if (fid2 == -1 && errno == ENOENT) {
       pp = dfile;
-      while (true) {                                                             //  create one or more directories,
-         pp = strchr(pp+1,'/');                                                  //    one level at a time
+      while (true) {                                                                   //  create one or more directories,
+         pp = strchr(pp+1,'/');                                                        //    one level at a time
          if (! pp) break;
          *pp = 0;
          err = mkdir(dfile,0700);
@@ -3615,7 +3615,7 @@ ch *copyfile(ch *vfile, ch *dfile)
             return errmess;
          }
       }
-      fid2 = open(dfile,O_WRONLY+O_CREAT+O_TRUNC+O_LARGEFILE,0700);              //  open output file again
+      fid2 = open(dfile,O_WRONLY+O_CREAT+O_TRUNC+O_LARGEFILE,0700);                    //  open output file again
    }
 
    if (fid2 == -1) {
@@ -3626,7 +3626,7 @@ ch *copyfile(ch *vfile, ch *dfile)
 
    while (true)
    {
-      rcc = read(fid1,buff,vrcc);                                                //  read huge blocks
+      rcc = read(fid1,buff,vrcc);                                                      //  read huge blocks
       if (rcc == 0) break;
       if (rcc == -1) {
          errmess = strerror(errno);
@@ -3635,7 +3635,7 @@ ch *copyfile(ch *vfile, ch *dfile)
          return errmess;
       }
 
-      rcc = write(fid2,buff,rcc);                                                //  write blocks
+      rcc = write(fid2,buff,rcc);                                                      //  write blocks
       if (rcc == -1) {
          errmess = strerror(errno);
          close(fid1);
@@ -3647,15 +3647,15 @@ ch *copyfile(ch *vfile, ch *dfile)
    close(fid1);
    close(fid2);
 
-   stat(vfilex,&fstat);                                                          //  get input file attributes
+   stat(vfilex,&fstat);                                                                //  get input file attributes
 
-   ftimes[0].tv_sec = fstat.st_atime;                                            //  conv. access times to microsecs
+   ftimes[0].tv_sec = fstat.st_atime;                                                  //  conv. access times to microsecs
    ftimes[0].tv_usec = fstat.st_atim.tv_nsec / 1000;
    ftimes[1].tv_sec = fstat.st_mtime;
    ftimes[1].tv_usec = fstat.st_mtim.tv_nsec / 1000;
 
-   chmod(dfile,fstat.st_mode);                                                   //  set output file attributes
-   err = chown(dfile,fstat.st_uid,fstat.st_gid);                                 //  (if supported by file system)
+   chmod(dfile,fstat.st_mode);                                                         //  set output file attributes
+   err = chown(dfile,fstat.st_uid,fstat.st_gid);                                       //  (if supported by file system)
    if (err) printf("error: %s \n",strerror(err));
    utimes(dfile,ftimes);
 
@@ -3672,7 +3672,7 @@ ch *checkFile(ch *dfile, int compf, doub
 {
    int      vfid = 0, dfid = 0;
    int      err, vcc, dcc, cmperr = 0;
-   int      open_flags = O_RDONLY+O_NOATIME+O_LARGEFILE;                         //  O_DIRECT not allowed for DVD/BRD
+   int      open_flags = O_RDONLY+O_NOATIME+O_LARGEFILE;                               //  O_DIRECT not allowed for DVD/BRD
    ch       vfile[XFCC], *vbuff = 0, *dbuff = 0;
    ch       *errmess = 0;
    double   dtime, vtime;
@@ -3680,78 +3680,78 @@ ch *checkFile(ch *dfile, int compf, doub
 
    tcc = 0.0;
 
-   strcpy(vfile,dvdmp);                                                          //  prepend mount point
+   strcpy(vfile,dvdmp);                                                                //  prepend mount point
    vcc = XFCC - dvdmpcc;
-   repl_1str(dfile,vfile+dvdmpcc,vcc,"=","\\=");                                 //  replace "=" with "\=" in DVD/BRD file
+   repl_1str(dfile,vfile+dvdmpcc,vcc,"=","\\=");                                       //  replace "=" with "\=" in DVD/BRD file
 
-   err = lstat(vfile,&filestat);                                                 //  check symlinks but do not follow
+   err = lstat(vfile,&filestat);                                                       //  check symlinks but do not follow
    if (err) return strerror(errno);
    if (S_ISLNK(filestat.st_mode)) return 0;
 
    if (compf) goto comparefiles;
 
-   vfid = open(vfile,open_flags);                                                //  open DVD/BRD file
+   vfid = open(vfile,open_flags);                                                      //  open DVD/BRD file
    if (vfid == -1) return strerror(errno);
 
-   err = posix_memalign((void**) &vbuff,512,vrcc);                               //  get 512-aligned buffer
+   err = posix_memalign((void**) &vbuff,512,vrcc);                                     //  get 512-aligned buffer
    if (err) zappcrash("memory allocation failure");
 
-   while (1)                                                                     //  read DVD/BRD file
+   while (1)                                                                           //  read DVD/BRD file
    {
       vcc = read(vfid,vbuff,vrcc);
       if (vcc == 0) break;
       if (vcc == -1) { errmess = strerror(errno); break; }
-      tcc += vcc;                                                                //  accumulate length
+      tcc += vcc;                                                                      //  accumulate length
       if (checkKillPause()) break;
-      zmainloop(10);                                                             //  keep gtk alive
+      zmainloop(10);                                                                   //  keep gtk alive
    }
    goto cleanup;
 
 comparefiles:
 
-   vfid = open(vfile,open_flags);                                                //  open DVD/BRD file
+   vfid = open(vfile,open_flags);                                                      //  open DVD/BRD file
    if (vfid == -1) return strerror(errno);
 
-   dfid = open(dfile,open_flags);                                                //  open corresp. disk file
+   dfid = open(dfile,open_flags);                                                      //  open corresp. disk file
    if (dfid == -1) { errmess = strerror(errno); goto cleanup; }
 
-   err = posix_memalign((void**) &vbuff,512,vrcc);                               //  get 512-aligned buffers
+   err = posix_memalign((void**) &vbuff,512,vrcc);                                     //  get 512-aligned buffers
    if (err) zappcrash("memory allocation failure");
    err = posix_memalign((void**) &dbuff,512,vrcc);
    if (err) zappcrash("memory allocation failure");
 
    while (1)
    {
-      vcc = read(vfid,vbuff,vrcc);                                               //  read two files
+      vcc = read(vfid,vbuff,vrcc);                                                     //  read two files
       if (vcc == -1) { errmess = strerror(errno); goto cleanup; }
 
       dcc = read(dfid,dbuff,vrcc);
       if (dcc == -1) { errmess = strerror(errno); goto cleanup; }
 
-      if (vcc != dcc) cmperr++;                                                  //  compare buffers
+      if (vcc != dcc) cmperr++;                                                        //  compare buffers
       if (memcmp(vbuff,dbuff,vcc)) cmperr++;
 
-      tcc += vcc;                                                                //  accumulate length
+      tcc += vcc;                                                                      //  accumulate length
       if (vcc == 0) break;
       if (dcc == 0) break;
       if (checkKillPause()) break;
-      zmainloop(5);                                                              //  keep gtk alive
+      zmainloop(5);                                                                    //  keep gtk alive
    }
 
    if (vcc != dcc) cmperr++;
 
-   if (cmperr) {                                                                 //  compare error
+   if (cmperr) {                                                                       //  compare error
       stat(dfile,&filestat);
-      dtime = filestat.st_mtime + filestat.st_mtim.tv_nsec * nano;               //  file modified since snapshot?
+      dtime = filestat.st_mtime + filestat.st_mtim.tv_nsec * nano;                     //  file modified since snapshot?
       stat(vfile,&filestat);
       vtime = filestat.st_mtime + filestat.st_mtim.tv_nsec * nano;
-      if (fabs(dtime-vtime) < modtimetolr) errmess = "compare error";            //  no, a real compare error
+      if (fabs(dtime-vtime) < modtimetolr) errmess = "compare error";                  //  no, a real compare error
    }
 
 cleanup:
-   if (vfid) close(vfid);                                                        //  close files
+   if (vfid) close(vfid);                                                              //  close files
    if (dfid) close(dfid);
-   if (vbuff) free(vbuff);                                                       //  free buffers
+   if (vbuff) free(vbuff);                                                             //  free buffers
    if (dbuff) free(dbuff);
    return errmess;
 }
@@ -3770,7 +3770,7 @@ int track_filespec(ch *filespec)
       return 0;
    }
 
-   pp = (ch   *) strrchr(filespec+1,'/');                                        //  parse directory/filename
+   pp = (ch   *) strrchr(filespec+1,'/');                                              //  parse directory/filename
    if (pp) {
       cc = pp - filespec + 2;
       strncpy0(pdirk,filespec,cc);
@@ -3781,8 +3781,8 @@ int track_filespec(ch *filespec)
       strncpy0(pfile,filespec,299);
    }
 
-   txwidget_replace(mLog,0,-2," %s \n",kleenex(pdirk));                          //  output /directory
-   txwidget_replace(mLog,0,-1," %s \n",kleenex(pfile));                          //          filename
+   txwidget_replace(mLog,0,-2," %s \n",kleenex(pdirk));                                //  output /directory
+   txwidget_replace(mLog,0,-1," %s \n",kleenex(pfile));                                //          filename
    return 0;
 }
 
@@ -3809,7 +3809,7 @@ ch *kleenex(ch *name)
    strncpy0(name2,name,999);
 
    for (int ii = 0; name2[ii]; ii++)
-      if (name2[ii] >= 8 && name2[ii] <= 13)                                     //  screen out formatting chars.
+      if (name2[ii] >= 8 && name2[ii] <= 13)                                           //  screen out formatting chars.
          name2[ii] = '?';
 
    return name2;
@@ -3829,18 +3829,18 @@ int do_shell(ch *pname, ch *command)
    ch       *errmess;
    FILE     *fid;
    
-   static pollfd *pfd = 0;                                                       //  8.1
+   static pollfd *pfd = 0;                                                             //  8.1
    
    if (! pfd)
       pfd = (pollfd *) zmalloc(sizeof(pollfd),"pollfd"); 
 
    txwidget_append2(mLog,1,"\n""shell: %s \n",command);
 
-   strncpy0(subprocName,pname,20);                                               //  set subprocess name, active
-   if (strmatch(pname,"growisofs")) track_growisofs_files(0);                    //  initialize progress tracker
+   strncpy0(subprocName,pname,20);                                                     //  set subprocess name, active
+   if (strmatch(pname,"growisofs")) track_growisofs_files(0);                          //  initialize progress tracker
 
    scroll = pscroll = 1;
-   txwidget_scroll(mLog,-1);                                                     //  scroll to last line
+   txwidget_scroll(mLog,-1);                                                           //  scroll to last line
 
    fid = popen(command,"r");
    if (! fid) {
@@ -3854,7 +3854,7 @@ int do_shell(ch *pname, ch *command)
       pfd->events = POLLIN + POLLHUP;
       pfd->revents = 0;
 
-      while (! poll(pfd,1,10000)) {                                              //  wait for data or 10 seconds           8.1
+      while (! poll(pfd,1,10000)) {                                                    //  wait for data or 10 seconds           8.1
          zmainloop();
          txwidget_append2(mLog,0," waiting ...\n");
       }
@@ -3865,23 +3865,23 @@ int do_shell(ch *pname, ch *command)
       pscroll = scroll;
       scroll = 1;
 
-      if (strmatch(pname,"growisofs")) {                                         //  growisofs output
-         if (track_growisofs_files(buff)) scroll = 0;                            //  conv. % done into file position
-         if (strstr(buff,"genisoimage:")) gerr = 999;                            //  trap errors not reported in
-         if (strstr(buff,"mkisofs:")) gerr = 998;                                //    flakey growisofs status
+      if (strmatch(pname,"growisofs")) {                                               //  growisofs output
+         if (track_growisofs_files(buff)) scroll = 0;                                  //  conv. % done into file position
+         if (strstr(buff,"genisoimage:")) gerr = 999;                                  //  trap errors not reported in
+         if (strstr(buff,"mkisofs:")) gerr = 998;                                      //    flakey growisofs status
          if (strstr(buff,"failed")) gerr = 997;
          if (strstr(buff,"media is not recognized")) gerr = 996;
       }
 
-      if (strstr(buff,"formatting")) scroll = 0;                                 //  dvd+rw-format output
+      if (strstr(buff,"formatting")) scroll = 0;                                       //  dvd+rw-format output
 
-      if (scroll) {                                                              //  output to next line
+      if (scroll) {                                                                    //  output to next line
          txwidget_append2(mLog,0," %s: %s \n",pname,kleenex(buff));
-         zsleep(0.002);                                                          //  throttle output a little
+         zsleep(0.002);                                                                //  throttle output a little
       }
-      else if (Fgui) {                                                           //  supress output in batch mode
-         if (pscroll) txwidget_append2(mLog,0,"\n");                             //  transition from scroll to overlay
-         txwidget_replace(mLog,0,-1," %s: %s \n",pname,kleenex(buff));           //  output, overlay prior output
+      else if (Fgui) {                                                                 //  supress output in batch mode
+         if (pscroll) txwidget_append2(mLog,0,"\n");                                   //  transition from scroll to overlay
+         txwidget_replace(mLog,0,-1," %s: %s \n",pname,kleenex(buff));                 //  output, overlay prior output
       } 
 
       if (killFlag) {
@@ -3903,13 +3903,13 @@ checkstat:
 
    if (strmatch(pname,"growisofs")) {
       err = gerr;
-      if (err == 997) err = 0;                                                   //  growisofs likes 997
+      if (err == 997) err = 0;                                                         //  growisofs likes 997
       if (err) errmess = "growisofs failure";
    }
    if (err) txwidget_append2(mLog,0," %s status: %d %s \n", pname, err, errmess);
    else txwidget_append2(mLog,0," %s status: OK \n",pname);
 
-   *subprocName = 0;                                                             //  no longer active
+   *subprocName = 0;                                                                   //  no longer active
    if (err) commFail++;
    return err;
 }
@@ -3924,7 +3924,7 @@ int track_growisofs_files(ch   * buff)
    static int        dii, dii2, err;
    static ch         *dfile;
 
-   if (! buff) {                                                                 //  initialize
+   if (! buff) {                                                                       //  initialize
       dii = 0;
       dii2 = -1;
       bbytes = 0;
@@ -3932,34 +3932,34 @@ int track_growisofs_files(ch   * buff)
       return 0;
    }
 
-   if (! strstr(buff,"% done")) return 0;                                        //  not a % done record
+   if (! strstr(buff,"% done")) return 0;                                              //  not a % done record
 
-   err = convSD(buff,gpct,0.0,100.0);                                            //  get % done, 0-100
+   err = convSD(buff,gpct,0.0,100.0);                                                  //  get % done, 0-100
    if (err > 1) return 0;
 
-   if (strmatch(mbmode,"full")) {                                                //  full backup, possibly > 1 DVD/BRD
+   if (strmatch(mbmode,"full")) {                                                      //  full backup, possibly > 1 DVD/BRD
       while (dii < Dnf) {
-         if (bbytes/Dbytes2 > gpct/100) break;                                   //  exit if enough bytes
-         bbytes += Drec[dii].size;                                               //  sum files
+         if (bbytes/Dbytes2 > gpct/100) break;                                         //  exit if enough bytes
+         bbytes += Drec[dii].size;                                                     //  sum files
          dii2 = dii;
          dii++;
       }
    }
 
-   else  {                                                                       //  incremental backup
-      if (bbytes == 0) gpct0 = gpct;                                             //  establish base % done
+   else  {                                                                             //  incremental backup
+      if (bbytes == 0) gpct0 = gpct;                                                   //  establish base % done
       while (dii < Dnf) {
-         if (bbytes/Mbytes > (gpct-gpct0)/(100-gpct0)) break;                    //  exit if enough bytes
+         if (bbytes/Mbytes > (gpct-gpct0)/(100-gpct0)) break;                          //  exit if enough bytes
          if (Drec[dii].disp == 'n' || Drec[dii].disp == 'm') {
-            bbytes += Drec[dii].size;                                            //  sum new and modified files
+            bbytes += Drec[dii].size;                                                  //  sum new and modified files
             dii2 = dii;
          }
          dii++;
       }
    }
 
-   if (dii2 > -1) dfile = Drec[dii2].file;                                       //  file corresponding to byte count
-   snprintf(buff,999,"%6.1f %c  %s",gpct,'%',dfile);                             //  nn.n %  /directory/.../filename
+   if (dii2 > -1) dfile = Drec[dii2].file;                                             //  file corresponding to byte count
+   snprintf(buff,999,"%6.1f %c  %s",gpct,'%',dfile);                                   //  nn.n %  /directory/.../filename
    return 1;
 }
 
Binary files 8.2-1/images/clear.png and 8.2.1-1/images/clear.png differ
Binary files 8.2-1/images/dkopp-jobedit.jpg and 8.2.1-1/images/dkopp-jobedit.jpg differ
Binary files 8.2-1/images/dkopp.png and 8.2.1-1/images/dkopp.png differ
Binary files 8.2-1/images/edit-document-icon.png and 8.2.1-1/images/edit-document-icon.png differ
Binary files 8.2-1/images/editjob.png and 8.2.1-1/images/editjob.png differ
Binary files 8.2-1/images/kill.png and 8.2.1-1/images/kill.png differ
Binary files 8.2-1/images/media-pause.png and 8.2.1-1/images/media-pause.png differ
Binary files 8.2-1/images/media-play.png and 8.2.1-1/images/media-play.png differ
Binary files 8.2-1/images/quit.png and 8.2.1-1/images/quit.png differ
Binary files 8.2-1/images/run.png and 8.2.1-1/images/run.png differ
Binary files 8.2-1/images/stop.png and 8.2.1-1/images/stop.png differ
diff -pruN 8.2-1/zfuncs.cc 8.2.1-1/zfuncs.cc
--- 8.2-1/zfuncs.cc	2025-04-24 09:45:16.000000000 +0000
+++ 8.2.1-1/zfuncs.cc	2025-08-28 12:21:03.000000000 +0000
@@ -20,7 +20,7 @@
 
 #include "zfuncs.h"
 
-#define RELEASE 25.1       //  follows Fotocx release versions
+#define RELEASE 26.0             //  follows Fotocx release versions
 
 /********************************************************************************
 
@@ -132,7 +132,7 @@
    convDS            double to string with specified digits of precision
    atofz             atof() accepting both '.' and ',' decimal points
    formatKBMB        format a byte count with specified precision and B/KB/MB/GB units
-   
+
    Wildcard Functions
    ------------------
    MatchWild         match string to wildcard string (multiple * and ?)
@@ -205,7 +205,6 @@
    zdialog_set_modal          set a zdialog to be modal
    zdialog_set_decorated      set a zdialog to be decorated or not
    zdialog_present            present a zdialog (visible and on top)
-   zdialog_can_focus          set zdialog can or cannot have focus
    zdialog_set_focus          set focus on zdialog window or window + widget
    zdialog_add_widget         add widget to existing zdialog
    zdialog_valid              return 1/0 if zdialog is valid/invalid
@@ -284,36 +283,36 @@
 
 namespace zfuncs
 {
-   GdkDisplay     *display;                                                      //  workstation (KB, mouse, screen)
-   GdkScreen      *screen;                                                       //  screen, N monitors
-   GdkDevice      *mouse;                                                        //  pointer device
-   GtkSettings    *gtksettings = 0;                                              //  screen settings
-   GtkWidget      *mainwin = 0;                                                  //  main window
-   GtkTextView    *curr_textview_widget;                                         //  curr. GtkTextView widget
-   ch          zcontact[] = "mkornelix@gmail.com";                               //  author contact
-   ch          *build_date_time = __DATE__ " " __TIME__;                         //  build date and time
-   ch          *progexe = 0;                                                     //  executable image file
-   int         Floglevel = 1;                                                    //  0/1/2 = errs/infos/dialog inputs
-   int         Fescape = 0;                                                      //  zdialog, escape key pressed
-   int         Fshutdown;                                                        //  flag, app shutdown underway           25.1
-   int         monitor_ww, monitor_hh;                                           //  monitor dimensions
-   int         appfontsize = 10;                                                 //  application font size
-   ch          *appfont = "sans 10";                                             //  application font defaults
+   GdkDisplay     *display;                                                            //  workstation (KB, mouse, screen)
+   GdkScreen      *screen;                                                             //  screen, N monitors
+   GdkDevice      *mouse;                                                              //  pointer device
+   GtkSettings    *gtksettings = 0;                                                    //  screen settings
+   GtkWidget      *mainwin = 0;                                                        //  main window
+   GtkTextView    *curr_textview_widget;                                               //  curr. GtkTextView widget
+   ch          zcontact[] = "mkornelix@gmail.com";                                     //  author contact
+   ch          *build_date_time = __DATE__ " " __TIME__;                               //  build date and time
+   ch          *progexe = 0;                                                           //  executable image file
+   int         Floglevel = 1;                                                          //  0/1/2 = errs/infos/dialog inputs
+   int         Fescape = 0;                                                            //  zdialog, escape key pressed
+   int         Fshutdown;                                                              //  flag, app shutdown underway           25.1
+   int         monitor_ww, monitor_hh;                                                 //  monitor dimensions
+   int         appfontsize = 10;                                                       //  application font size
+   ch          *appfont = "sans 10";                                                   //  application font defaults
    ch          *appboldfont = "sans bold 10";
    ch          *appmonofont = "mono 10";
    ch          *appmonoboldfont = "mono bold 10";
-   ch          zappname[40] = "undefined";                                       //  appname without version
-   ch          zappvers[40] = "undefined";                                       //  appname-N.N
-   ch          zprefix[200], zdatadir[200], zdocdir[200];                        //  app folders
+   ch          zappname[40] = "undefined";                                             //  appname without version
+   ch          zappvers[40] = "undefined";                                             //  appname-N.N
+   ch          zprefix[200], zdatadir[200], zdocdir[200];                              //  app folders
    ch          zimagedir[200], zhomedir[200];
-   ch          logfile[200];                                                     //  application log file
-   pthread_t   tid_main = 0;                                                     //  main() thread ID
-   int         vmenuclickposn;                                                   //  Vmenu image click posn. 0-100
-   int         vmenuclickbutton;                                                 //  button: 1/2/3 = L/M/R mouse
-   int         vmenustop;                                                        //  setupfunc() stop flag
-   zdialog     *zdialog_list[zdialog_max];                                       //  active zdialog list
-   int         zdialog_count = 0;                                                //  total zdialogs (new - free)
-   float       splcurve_minx = 5;                                                //  min. anchor point dist, % scale
+   ch          logfile[200];                                                           //  application log file
+   pthread_t   tid_main = 0;                                                           //  main() thread ID
+   int         vmenuclickposn;                                                         //  Vmenu image click posn. 0-100
+   int         vmenuclickbutton;                                                       //  button: 1/2/3 = L/M/R mouse
+   int         vmenustop;                                                              //  setupfunc() stop flag
+   zdialog     *zdialog_list[zdialog_max];                                             //  active zdialog list
+   int         zdialog_count = 0;                                                      //  total zdialogs (new - free)
+   float       splcurve_minx = 5;                                                      //  min. anchor point dist, % scale
    ch          *zappcrash_context1 = 0, *zappcrash_context2 = 0;
 }
 
@@ -332,13 +331,13 @@ using namespace zfuncs;
    hence the caller need not check. zmalloc() allocates memory for sentinels
    placed before and after the returned memory space, and zfree() checks the
    sentinels for validity and crashes with a message if they don't match.
-   The optional tag argument is also copied into the extra allocated space for 
+   The optional tag argument is also copied into the extra allocated space for
    use by zmalloc_report(). zmalloc() clears the allocated memory to zeros.
-   zmalloc_report() reports total allocated memory by tag to standard output. 
-   Allocation counts and bytes are listed for zmalloc() calls not yet matched 
+   zmalloc_report() reports total allocated memory by tag to standard output.
+   Allocation counts and bytes are listed for zmalloc() calls not yet matched
    by zfree() calls.
-   
-   The extra cpu time is about 4% (for the fotocx application). 
+
+   The extra cpu time is about 4% (for the fotocx application).
 
 *********************************************************************************/
 
@@ -346,7 +345,7 @@ using namespace zfuncs;
 int64    zmalloc_tot = 0;
 int      zmalloc_lock = 0;
 
-void * zmalloc(int64 cc, ch *tag)                                                //  bytes, tag
+void * zmalloc(int64 cc, ch *tag)                                                      //  bytes, tag
 {
    void  zmalloc_tabulate(ch *tag, int64 cc);
 
@@ -356,24 +355,24 @@ void * zmalloc(int64 cc, ch *tag)
 
    while (! resource_lock(zmalloc_lock)) zsleep(0.001);
 
-   ch          *OOMmessage = "                   \n"                             //  big and obvious
+   ch          *OOMmessage = "                   \n"                                   //  big and obvious
                              "  ---------------  \n"
                              "   OUT OF MEMORY   \n"
                              "  ---------------  \n";
-   if (ftf) {                                                                    //  first call
+   if (ftf) {                                                                          //  first call
       ftf = 0;
       memavail = availmemory();
-      if (! memavail) memcheck = 0;                                              //  memory checking not possible, disable
+      if (! memavail) memcheck = 0;                                                    //  memory checking not possible, disable
    }
 
    if (cc <= 0) zappcrash("zmalloc: %lld bytes",cc);
 
-   if (memcheck && cc > 1000) {                                                  //  large block
+   if (memcheck && cc > 1000) {                                                        //  large block
       mcc = cc;
-      mcc = mcc / 1024 / 1024;                                                   //  requested memory, MB
-      memavail = availmemory();                                                  //  avail. memory, MB
+      mcc = mcc / 1024 / 1024;                                                         //  requested memory, MB
+      memavail = availmemory();                                                        //  avail. memory, MB
       if (memavail - mcc < 500) {
-         Plog(0,"memory request for %.0f MB failed\n",mcc);
+         printf("*** memory request for %.0f MB failed\n",mcc);
          zexit(1,OOMmessage);
          exit(-1);
       }
@@ -381,12 +380,12 @@ void * zmalloc(int64 cc, ch *tag)
 
    if (! tag) tag = "zmalloc notag";
 
-   void *   maddr = malloc(cc + zmalloc_extra);     //  0             allocated memory with extra space
-   int64    *pcc = (int64 *) maddr;                 //  0..8          caller byte count
-   ch       *psen1 = (ch *) maddr + 8;              //  8..11         sentinel "sen1"
-   ch       *ptag = (ch *) maddr + 12;              //  12..31        tag, < 20 chars.
-   ch       *puser =  (ch *) maddr + 32;            //  32..B+31      user data, B chars.
-   ch       *psen2 =  (ch *) puser + cc;            //  B+32..B+35    sentinel "sen2"
+   void *   maddr = malloc(cc + zmalloc_extra);           //  0             allocated memory with extra space
+   int64    *pcc = (int64 *) maddr;                       //  0..8          caller byte count
+   ch       *psen1 = (ch *) maddr + 8;                    //  8..11         sentinel "sen1"
+   ch       *ptag = (ch *) maddr + 12;                    //  12..31        tag, < 20 chars.
+   ch       *puser =  (ch *) maddr + 32;                  //  32..B+31      user data, B chars.
+   ch       *psen2 =  (ch *) puser + cc;                  //  B+32..B+35    sentinel "sen2"
 
    if (! maddr) {
       zexit(1,OOMmessage);
@@ -394,14 +393,14 @@ void * zmalloc(int64 cc, ch *tag)
    }
 
    *pcc = cc;
-   strncpy(psen1,"sen1",4);                                                      //  set leading sentinel
-   strncpy0(ptag,tag,20);                                                        //  set tag
-   strncpy(psen2,"sen2",4);                                                      //  set following sentinel
+   strncpy(psen1,"sen1",4);                                                            //  set leading sentinel
+   strncpy0(ptag,tag,20);                                                              //  set tag
+   strncpy(psen2,"sen2",4);                                                            //  set following sentinel
 
-   memset(puser,0,cc);                                                           //  clear allocation (force memory commit)
+   memset(puser,0,cc);                                                                 //  clear allocation (force memory commit)
 
    zmalloc_tot += cc;
-   zmalloc_tabulate(ptag,cc);                                                    //  track usage by tag
+   zmalloc_tabulate(ptag,cc);                                                          //  track usage by tag
 
    resource_unlock(zmalloc_lock);
    return puser;
@@ -425,17 +424,15 @@ void zfree(void *puser)
 
    while (! resource_lock(zmalloc_lock)) zsleep(0.001);
 
-   if (strncmp("sen1",psen1,4) || strncmp("sen2",psen2,4))                       //  check sentinels
+   if (strncmp("sen1",psen1,4) || strncmp("sen2",psen2,4))                             //  check sentinels
       zappcrash("zfree: sentinels clobbered");
-   *psen1 = *psen2 = 0;                                                          //  destroy sentinels
-
-   ch   * puser2 = (ch *) puser;                                                 //  clobber to detect use after free
-   *puser2 = '*';
+   *psen1 = *psen2 = 0;                                                                //  destroy sentinels
 
    zmalloc_tot -= cc;
-   zmalloc_tabulate(ptag,-cc);                                                   //  track usage by tag
+   zmalloc_tabulate(ptag,-cc);                                                         //  track usage by tag
 
-   free(maddr);                                                                  //  free memory (must be last)
+   memset(maddr,-1,cc+32);                                                             //  clear to detect use-after-free        25.1
+   free(maddr);                                                                        //  free memory
 
    resource_unlock(zmalloc_lock);
    return;
@@ -480,11 +477,11 @@ int zmalloc_test(int64 cc)
    double      memavail, mb;
 
    mb = cc / 1024 / 1024;
-   memavail = availmemory();                                                     //  avail. memory, MB
+   memavail = availmemory();                                                           //  avail. memory, MB
    memavail -= mb;
-   if (memavail > 300) return 1;                                                 //  > 300 MB remaining, return OK
-   Plog(0,"planned memory allocation of %.0f MB failed \n",mb);
-   return 0;                                                                     //  not OK
+   if (memavail > 300) return 1;                                                       //  > 300 MB remaining, return OK
+   printf("*** planned memory allocation of %.0f MB failed \n",mb);
+   return 0;                                                                           //  not OK
 }
 
 
@@ -504,7 +501,7 @@ double realmemory()
    {
       pp = fgets(buff,100,fid);
       if (! pp) break;
-      if (strmatchN(pp,"MemAvailable:",13)) {                                    //  free + file cache
+      if (strmatchN(pp,"MemAvailable:",13)) {                                          //  free + file cache
          rmem = atof(pp+13) / 1024;
          break;
       }
@@ -532,12 +529,12 @@ double availmemory()
    {
       pp = fgets(buff,100,fid);
       if (! pp) break;
-      if (strmatchN(pp,"MemAvailable:",13)) {                                    //  free + file cache
+      if (strmatchN(pp,"MemAvailable:",13)) {                                          //  free + file cache
          avmem += atof(pp+13) / 1024;
          if (++Ngot == 2) break;
       }
 
-      if (strmatchN(pp,"SwapFree:",9)) {                                         //  swapfile free
+      if (strmatchN(pp,"SwapFree:",9)) {                                               //  swapfile free
          avmem += atof(pp+9) / 1024;
          if (++Ngot == 2) break;
       }
@@ -552,9 +549,9 @@ double availmemory()
 
 ch * zstrdup(ch *zstring, ch *tag, int addcc)
 {
-   if (! zstring) zappcrash("zstrdup() null arg");
+   if (! zstring) zstring = "null";                                                    //  26.0
    if (! tag) tag = "zstrdup notag";
-   ch   *pp = (ch *) zmalloc(strlen(zstring) + 2 + addcc, tag);                  //  add additional chars, clear
+   ch   *pp = (ch *) zmalloc(strlen(zstring) + 2 + addcc, tag);                        //  add additional chars, clear
    strcpy(pp,zstring);
    return pp;
 }
@@ -565,7 +562,7 @@ ch * zstrdup(ch *zstring, ch *tag, int a
 int zstrcopy(ch *&zstring, ch *string, ch *tag, int addcc)
 {
    if (! tag) tag = "zstrcopy notag";
-   if (zstring == string) zstring = 0;                                           //  if same string, make a duplicate
+   if (zstring == string) zstring = 0;                                                 //  if same string, make a duplicate
    if (zstring) zfree(zstring);
    int cc = strlen(string) + 2 + addcc;
    zstring = (ch *) zmalloc(cc,tag);
@@ -578,7 +575,7 @@ int zstrcopy(ch *&zstring, ch *string, c
 
 //  popup report of zmalloc() memory allocation per tag
 
-void zmalloc_report(GtkWidget *parent)                                           //  25.1
+void zmalloc_report(GtkWidget *parent)                                                 //  25.1
 {
    int zmalloc_report_callback(GtkWidget *,int line, int posn, ch *input);
 
@@ -588,7 +585,7 @@ void zmalloc_report(GtkWidget *parent)
    int64       cc;
    ch          tag[20];
 
-   if (! zdpop || ! zdialog_valid(zdpop,"zmalloc"))                              //  open new popup report
+   if (! zdpop || ! zdialog_valid(zdpop,"zmalloc"))                                    //  open new popup report
       zdpop = popup_report_open("zmalloc",parent,500,400,0,0,
                                  zmalloc_report_callback,"apply","clear","X",0);
 
@@ -627,7 +624,7 @@ int zmalloc_report_callback(GtkWidget *t
 //  report total memory allocated per tag - leak detection utility
 //  report only tags with increased memory consumption since prior report
 
-void zmalloc_growth(GtkWidget *parent)                                           //  25.1
+void zmalloc_growth(GtkWidget *parent)                                                 //  25.1
 {
    int zmalloc_growth_callback(GtkWidget *,int line, int posn, ch *input);
 
@@ -636,38 +633,38 @@ void zmalloc_growth(GtkWidget *parent)
    int            count, ii, first = 1;
    int64          cc;
    ch             tag[20];
-   static int     pne = 0;                                                       //  table of prior tag and cc values
+   static int     pne = 0;                                                             //  table of prior tag and cc values
    static ch      *ptag[1000];
    static int64   pcc[1000];
 
-   if (! zdpop || ! zdialog_valid(zdpop,"zmalloc growth"))                       //  open new popup report
+   if (! zdpop || ! zdialog_valid(zdpop,"zmalloc growth"))                             //  open new popup report
       zdpop = popup_report_open("zmalloc growth",parent,500,400,0,0,
                                  zmalloc_growth_callback,"apply","clear","X",0);
 
    popup_report_write(zdpop,0,"zmalloc total memory: %lld \n",zmalloc_tot);
 
-   while (true)                                                                  //  loop all tags in table
+   while (true)                                                                        //  loop all tags in table
    {
       ii = zmalloc_hashtab->GetNext(first,tag);
       if (ii < 0) break;
       ii = zmalloc_hashtab->Find(tag);
       if (ii < 0) zappcrash("zmalloc hash table bug: %s",tag);
-      cc = zmalloc_bytes[ii];                                                    //  memory allocation for tag
-      count = zmalloc_count[ii];                                                 //  zmalloc/zfree calls for tag
-      if (cc == 0) continue;                                                     //  net memory = 0, skip
+      cc = zmalloc_bytes[ii];                                                          //  memory allocation for tag
+      count = zmalloc_count[ii];                                                       //  zmalloc/zfree calls for tag
+      if (cc == 0) continue;                                                           //  net memory = 0, skip
 
-      for (ii = 0; ii < pne; ii++)                                               //  find prior allocation for tag
+      for (ii = 0; ii < pne; ii++)                                                     //  find prior allocation for tag
          if (strmatch(tag,ptag[ii])) break;
       if (ii == pne) {
-         ptag[ii] = strdup(tag);                                                 //  new tag, add to table
+         ptag[ii] = strdup(tag);                                                       //  new tag, add to table
          pcc[ii] = cc;
          pne++;
       }
 
-      if (cc <= pcc[ii]) continue;                                               //  current <= prior allocation, skip
+      if (cc <= pcc[ii]) continue;                                                     //  current <= prior allocation, skip
 
-      popup_report_write(zdpop,0,"  %-20s  %8d  %lld \n",tag,count,cc);          //  report increased allocation
-      pcc[ii] = cc;                                                              //  new high-water allocation
+      popup_report_write(zdpop,0,"  %-20s  %8d  %lld \n",tag,count,cc);                //  report increased allocation
+      pcc[ii] = cc;                                                                    //  new high-water allocation
    }
 
    popup_report_write(zdpop,0,"\n");
@@ -716,12 +713,12 @@ void Plog(int lev, ch *format, ...)
 void xmessage(ch *message)
 {
    ch       command[400];
-   ch       *font = "-*-bookman-*-r-*--0-140-0-0-p-*-*-*";                       //  big font                              25.1
+   ch       *font = "-*-bookman-*-r-*--0-140-0-0-p-*-*-*";                             //  big font                              25.1
 
-   Plog(0,"%s \n",message);
+   printf("%s \n",message);
    snprintf(command,400,"xmessage -fn %s -center \"%s\" ",font,message);
-   int err = system(command);                                                    //  do not use zshell
-   if (err) return;                                                              //  avoid gcc warning
+   int err = system(command);                                                          //  do not use zshell
+   if (err) return;                                                                    //  avoid gcc warning
    return;
 }
 
@@ -737,16 +734,16 @@ void zexit(int popup, ch *errmess, ...)
    va_list  arglist;
    ch       mess[1000];
 
-   if (errmess) {                                                                //  output error message
+   if (errmess) {                                                                      //  output error message
       va_start(arglist,errmess);
       vsnprintf(mess,1000,errmess,arglist);
-      Plog(0,"zexit: %s\n",mess);
-      if (popup) xmessage(mess);                                                 //  popup message
+      printf("zexit: %s\n",mess);
+      if (popup) xmessage(mess);                                                       //  popup message
    }
-   else Plog(0,"zexit\n");
+   else printf("zexit\n");
 
-   killpg(0,SIGKILL);                                                            //  kill all processes in group
-   sleep(1);                                                                     //  wait here to die
+   killpg(0,SIGKILL);                                                                  //  kill all processes in group
+   sleep(1);                                                                           //  wait here to die
    exit(-1);
 }
 
@@ -760,9 +757,9 @@ void zbacktrace()
    int      nstack = 100;
    void     *stacklist[100];
 
-   nstack = backtrace(stacklist,nstack);                                         //  get backtrace data
+   nstack = backtrace(stacklist,nstack);                                               //  get backtrace data
    if (nstack > 100) nstack = 100;
-   backtrace_symbols_fd(stacklist,nstack,STDOUT_FILENO);                         //  backtrace records to STDOUT
+   backtrace_symbols_fd(stacklist,nstack,STDOUT_FILENO);                               //  backtrace records to STDOUT
 
    return;
 }
@@ -788,42 +785,39 @@ void zappcrash(ch *format, ... )
    ch             buff1[300], buff2[300], hexaddr[20];
    ch             *arch, *pp1, *pp2, dlim, *pfunc;
 
-   if (crash++) return;                                                          //  re-entry or multiple threads crash
+   if (crash++) return;                                                                //  re-entry or multiple threads crash
 
    va_start(arglist,format);
    vsnprintf(message,300,format,arglist);
    va_end(arglist);
 
-   uname(&unbuff);                                                               //  get cpu arch. 32/64 bit
+   uname(&unbuff);                                                                     //  get cpu arch. 32/64 bit
    arch = unbuff.machine;
-   fid1 = popen("lsb_release -d","r");                                           //  get Linux flavor and release
+   fid1 = popen("lsb_release -d","r");                                                 //  get Linux flavor and release
    if (fid1) {
       ii = fscanf(fid1,"%s %s %s",OS1,OS2,OS3);
       pclose(fid1);
    }
 
-   xmessage("A fatal error has occurred. \n"                                     //  popup message
-            " See zappcrash file in home folder.");
-
-   Plog(0,"\n*** zappcrash: %s %s %s %s %s %s \n",
+   printf("\n*** zappcrash: %s %s %s %s %s %s \n",
                arch, OS2, OS3, zappvers, build_date_time, message);
-   Plog(0,"*** zappcrash context: %s | %s \n",zappcrash_context1, zappcrash_context2);
+   printf("*** zappcrash context: %s | %s \n",zappcrash_context1, zappcrash_context2);
 
-   nstack = backtrace(stacklist,nstack);                                         //  get backtrace data
+   nstack = backtrace(stacklist,nstack);                                               //  get backtrace data
    if (nstack <= 0) zexit(0,"zappcrash backtrace() failure");
    if (nstack > 100) nstack = 100;
 
-   fid1 = fopen("zbacktrace","w");                                               //  open backtrace data output file
+   fid1 = fopen("zbacktrace","w");                                                     //  open backtrace data output file
    if (! fid1) zexit(0,"zappcrash fopen() failure");
 
    fd = fileno(fid1);
-   backtrace_symbols_fd(stacklist,nstack,fd);                                    //  write backtrace data
-   fclose(fid1);                                                                 //  (use of malloc() is avoided)
+   backtrace_symbols_fd(stacklist,nstack,fd);                                          //  write backtrace data
+   fclose(fid1);                                                                       //  (use of malloc() is avoided)
 
-   fid1 = fopen("zbacktrace","r");                                               //  open backtrace data file
+   fid1 = fopen("zbacktrace","r");                                                     //  open backtrace data file
    if (! fid1) zexit(0,"zappcrash fopen() failure");
 
-   fid2 = fopen("zappcrash","w");                                                //  open zappcrash output file
+   fid2 = fopen("zappcrash","w");                                                      //  open zappcrash output file
    if (! fid2) zexit(0,"zappcrash fopen() failure");
 
    fprintf(fid2,"\n*** zappcrash: %s %s %s %s %s %s \n",
@@ -832,55 +826,59 @@ void zappcrash(ch *format, ... )
    fprintf(fid2,"*** please send this crash report to mkornelix@gmail.com *** \n"
                 "*** if possible, please explain how to repeat this problem *** \n");
 
-   cc = readlink("/proc/self/exe",progexe,300);                                  //  get own program path
-   if (cc > 0) progexe[cc] = 0;                                                  //  readlink() quirk
+   cc = readlink("/proc/self/exe",progexe,300);                                        //  get own program path
+   if (cc > 0) progexe[cc] = 0;                                                        //  readlink() quirk
    else {
       fprintf(fid2,"progexe not available \n");
       Flinenos = 0;
    }
 
-   err = zshell(0,"which addr2line >/dev/null");                                 //  check if addr2line() available
+   err = zshell(0,"which addr2line >/dev/null");                                       //  check if addr2line() available
    if (err) Flinenos = 0;
 
-   for (ii = 0; ii < nstack; ii++)                                               //  loop backtrace records
+   for (ii = 0; ii < nstack; ii++)                                                     //  loop backtrace records
    {
       pp1 = pp2 = 0;
-      fgets_trim(buff1,300,fid1);                                                //  read backtrace line
+      fgets_trim(buff1,300,fid1);                                                      //  read backtrace line
       if (! Flinenos) goto output;
       pfunc = 0;
-      pp1 = strstr(buff1,"+0x");                                                 //  new format (+0x12345...)
+      pp1 = strstr(buff1,"+0x");                                                       //  new format (+0x12345...)
       if (pp1) pp2 = strchr(pp1,')');
       else {
-         pp1 = strstr(buff1,"[0x");                                              //  old format [0x12345...]
+         pp1 = strstr(buff1,"[0x");                                                    //  old format [0x12345...]
          if (pp1) pp2 = strchr(pp1,']');
       }
-      if (! pp1 || ! pp2) goto output;                                           //  cannot parse
+      if (! pp1 || ! pp2) goto output;                                                 //  cannot parse
       dlim = *pp2;
       *pp2 = 0;
       strncpy0(hexaddr,pp1+1,20);
       *pp2 = dlim;
-      snprintf(buff2,300,"addr2line -i -e %s %s",progexe,hexaddr);               //  convert to source program
-      fid3 = popen(buff2,"r");                                                   //    and line number
+      snprintf(buff2,300,"addr2line -i -e %s %s",progexe,hexaddr);                     //  convert to source program
+      fid3 = popen(buff2,"r");                                                         //    and line number
       if (! fid3) goto output;
       pfunc = fgets(buff2,300,fid3);
       pclose(fid3);
       if (! pfunc) goto output;
       cc = strlen(pfunc);
       if (cc < 10) goto output;
-      if (pfunc[cc-1] < ' ') pfunc[cc-1] = 0;                                    //  remove tailing \n if present
+      if (pfunc[cc-1] < ' ') pfunc[cc-1] = 0;                                          //  remove tailing \n if present
       strncatv(buff1,300,"\n--- ",pfunc,null);
    output:
-      fprintf(fid2,"%s \n",buff1);                                               //  output
+      fprintf(fid2,"%s \n",buff1);                                                     //  output
    }
 
    fclose(fid1);
    fclose(fid2);
 
-   zshell(0,"rm zbacktrace");                                                    //  remove backtrace file
-   zshell(0,"cat zappcrash");                                                    //  add zappcrash to log file
-   zshell(0,"rm zappcrash");                                                     //  remove zappcrash file
-   if (*logfile == '/') zshell(0,"cp -f %s $HOME/zappcrash",logfile);            //  copy log file to $HOME/zappcrash
-   zexit(0,"Zexit zappcrash");                                                   //  quit
+   zshell(0,"rm zbacktrace");                                                          //  remove backtrace file
+   zshell(0,"cat zappcrash");                                                          //  add zappcrash to log file
+   if (*logfile == '/') zshell(0,"cp -f %s $HOME/zappcrash",logfile);                  //  copy log file to $HOME/zappcrash
+
+   snprintf(message,300,"A fatal error has occurred. \n"                               //  do this last                          25.1
+                        "See zappcrash file at $HOME/zappcrash");
+   xmessage(message);
+
+   zexit(0,"Zexit zappcrash");                                                         //  quit
 }
 
 
@@ -900,10 +898,10 @@ void catch_signals()
 
    sigaction(SIGTERM,&sigact,0);
    sigaction(SIGSEGV,&sigact,0);
-   sigaction(SIGILL,&sigact,0);                                                  //  man page says cannot be caught
+   sigaction(SIGILL,&sigact,0);                                                        //  man page says cannot be caught
    sigaction(SIGFPE,&sigact,0);
    sigaction(SIGBUS,&sigact,0);
-   sigaction(SIGABRT,&sigact,0);                                                 //  heap or stack corruption
+   sigaction(SIGABRT,&sigact,0);                                                       //  heap or stack corruption
    return;
 }
 
@@ -935,7 +933,7 @@ void sighandler(int signal)
 
 namespace tracenames
 {
-   ch    filebuff[50][100];                                                      //  last 50 TRACE calls
+   ch    filebuff[50][100];                                                            //  last 50 TRACE calls
    ch    funcbuff[50][60];
    int   linebuff[50];
    void  *addrbuff[50];
@@ -962,9 +960,9 @@ void trace(ch *file, ch *func, int line,
    }
 
    if (line == linebuff[ii] &&
-      strmatch(func,funcbuff[ii])) return;                                       //  same as last call, don't duplicate
+      strmatch(func,funcbuff[ii])) return;                                             //  same as last call, don't duplicate
 
-   if (++ii > 49) ii = 0;                                                        //  add data to list
+   if (++ii > 49) ii = 0;                                                              //  add data to list
    strncpy(&filebuff[ii][0],file,99);
    strncpy(&funcbuff[ii][0],func,39);
    linebuff[ii] = line;
@@ -982,11 +980,11 @@ void tracedump()
    FILE     *fid;
    int      kk;
 
-   Plog(0," *** tracedump *** \n");
+   printf(" *** tracedump *** \n");
 
    kk = ii;
    while (linebuff[kk]) {
-      Plog(0,"TRACE %s %s %d %p \n",&filebuff[kk][0],
+      printf("TRACE %s %s %d %p \n",&filebuff[kk][0],
               &funcbuff[kk][0],linebuff[kk],addrbuff[kk]);
       if (--kk == ii) break;
    }
@@ -1043,7 +1041,7 @@ ch * combine_argvs(int argc, ch *argv[],
 //  get elapsed seconds
 //  if init = 0 (default if missing), return seconds since boot.
 //  if init = 1, returns seconds since last call.
-//  theoretically uses a precise system clock but the precision is poor
+//  execution time is 0.013 microseconds on 5 GHz computer
 
 double get_seconds(int init)
 {
@@ -1056,7 +1054,7 @@ double get_seconds(int init)
       secs1 += time1.tv_nsec * 0.000000001;
       return secs1;
    }
-   else { 
+   else {
       clock_gettime(CLOCK_MONOTONIC_RAW,&time1);
       secs2 = time1.tv_sec;
       secs2 += time1.tv_nsec * 0.000000001;
@@ -1091,33 +1089,6 @@ double get_seconds(timespec *ts)
 
 /********************************************************************************/
 
-//  simplified stat() function
-//  type = zstat(ch *file, uint &mtime, uint &size)
-//  returns:   file modification date/time in seconds
-//             file size in bytes 
-//  type returned: 0 = FNF or permissions denied,
-//                 1 = reg. file,  2 = folder,  3 = other
-
-int zstat(ch *file, uint &mtime, uint &size)
-{
-   STATB    statB;
-   int      err, type;
-   
-   err = stat(file,&statB);
-   if (err) return 0;
-
-   size = statB.st_size;
-   mtime = statB.st_mtim.tv_sec;
-
-   type = statB.st_mode & S_IFMT;
-   if (type == S_IFREG) return 1;
-   if (type == S_IFDIR) return 2;
-   return 3;
-}
-
-
-/********************************************************************************/
-
 //  start a timer or get elapsed time with millisecond resolution.
 
 void start_timer(double &time0)
@@ -1157,7 +1128,7 @@ double CPUtime()
 
 //  get real memory used by current process, MB
 
-int memused()                                                                    //  24.20
+int memused()
 {
    ch       buff1[100], buff2[1000];
    ch       *pp = 0;
@@ -1165,8 +1136,8 @@ int memused()
    double   mem;
    int      MB, pagesize;
    int      mega = 1024 * 1024;
-   
-   snprintf(buff1,100,"/proc/self/stat");                                        //  read file /proc/self/stat
+
+   snprintf(buff1,100,"/proc/self/stat");                                              //  read file /proc/self/stat
    fid = fopen(buff1,"r");
    if (fid) {
       pp = fgets(buff2,1000,fid);
@@ -1174,12 +1145,12 @@ int memused()
    }
 
    MB = 0;
-   
+
    if (pp) {
-      pp = strchr(pp,')');                                                       //  closing ')' after (short) filename
+      pp = strchr(pp,')');                                                             //  closing ')' after (short) filename
       if (pp) {
-         parseprocrec(pp+1,22,&mem,null);                                        //  get real memory
-         pagesize = sysconf(_SC_PAGESIZE);                                       //  system page size
+         parseprocrec(pp+1,22,&mem,null);                                              //  get real memory
+         pagesize = sysconf(_SC_PAGESIZE);                                             //  system page size
          MB = mem * pagesize / mega + 0.5;
       }
    }
@@ -1230,9 +1201,9 @@ void compact_time(time_t DT, ch *compact
 /********************************************************************************/
 
 //  convert a time_t date/time (e.g. st_mtime from stat() call)
-//    into a pretty date/time format "yyyy:mm:dd hh:mm:ss" (19 chars. + null) 
+//    into a pretty date/time format "yyyy:mm:dd hh:mm:ss" (19 chars. + null)
 
-void pretty_datetime(time_t DT, ch *prettyDT)                                    //  25.1
+void pretty_datetime(time_t DT, ch *prettyDT)                                          //  25.1
 {
    struct tm   *fdt;
    int         year, mon, day, hour, min, sec;
@@ -1315,7 +1286,7 @@ void datetime_secs(int datetime[6], doub
 //  Read and parse /proc file with records formatted "parmname xxxxxxx"
 //  Find all requested parameters and return their numeric values
 
-int parseprocfile(ch *pfile, ch *pname, double *value, ...)                      //  EOL = 0
+int parseprocfile(ch *pfile, ch *pname, double *value, ...)                            //  EOL = 0
 {
    FILE        *fid;
    va_list     arglist;
@@ -1324,18 +1295,18 @@ int parseprocfile(ch *pfile, ch *pname,
    double      *values[20];
    int         ii, fcc, wanted, found;
 
-   pnames[0] = pname;                                                            //  1st parameter
+   pnames[0] = pname;                                                                  //  1st parameter
    values[0] = value;
    *value = 0;
 
    va_start(arglist,value);
 
-   for (ii = 1; ii < 20; ii++)                                                   //  get all parameters
+   for (ii = 1; ii < 20; ii++)                                                         //  get all parameters
    {
       pnames[ii] = va_arg(arglist,ch *);
-      if (! pnames[ii] || pnames[ii] == (ch *) 0x100000000) break;               //  ARM bug
+      if (! pnames[ii] || pnames[ii] == (ch *) 0x100000000) break;                     //  ARM bug
       values[ii] = va_arg(arglist,double *);
-      *values[ii] = 0;                                                           //  initialize to zero
+      *values[ii] = 0;                                                                 //  initialize to zero
    }
 
    va_end(arglist);
@@ -1344,22 +1315,22 @@ int parseprocfile(ch *pfile, ch *pname,
    wanted = ii;
    found = 0;
 
-   fid = fopen(pfile,"r");                                                       //  open /proc/xxx file
+   fid = fopen(pfile,"r");                                                             //  open /proc/xxx file
    if (! fid) return 0;
 
-   while ((fgets(buff,999,fid)))                                                 //  read record, "parmname nnnnn"
+   while ((fgets(buff,999,fid)))                                                       //  read record, "parmname nnnnn"
    {
       for (ii = 0; ii < wanted; ii++)
-      {                                                                          //  look for my fields
+      {                                                                                //  look for my fields
          fcc = strlen(pnames[ii]);
          if (strmatchN(buff,pnames[ii],fcc)) {
-            *values[ii] = atof(buff+fcc);                                        //  return value
+            *values[ii] = atof(buff+fcc);                                              //  return value
             found++;
             break;
          }
       }
 
-      if (found == wanted) break;                                                //  stop when all found
+      if (found == wanted) break;                                                      //  stop when all found
    }
 
    fclose(fid);
@@ -1370,37 +1341,37 @@ int parseprocfile(ch *pfile, ch *pname,
 //  Parse /proc record of the type  "xxx xxxxx xxxxx xxxxxxxx xxx"
 //  Return numeric values for requested fields (starting with 1)
 
-int parseprocrec(ch *prec, int field, double *value, ...)                        //  EOL = 0
+int parseprocrec(ch *prec, int field, double *value, ...)                              //  EOL = 0
 {
    va_list     arglist;
    int         xfield = 1, found = 0;
 
    va_start(arglist,value);
 
-   while (*prec == ' ') prec++;                                                  //  skip leading blanks
+   while (*prec == ' ') prec++;                                                        //  skip leading blanks
 
    while (field > 0)
    {
-      while (xfield < field)                                                     //  skip to next wanted field
+      while (xfield < field)                                                           //  skip to next wanted field
       {
-         prec = strchr(prec,' ');                                                //  find next blank
+         prec = strchr(prec,' ');                                                      //  find next blank
          if (! prec) break;
-         while (*prec == ' ') prec++;                                            //  skip multiple blanks
+         while (*prec == ' ') prec++;                                                  //  skip multiple blanks
          xfield++;
       }
 
       if (! prec) break;
-      *value = atof(prec);                                                       //  convert, return double
+      *value = atof(prec);                                                             //  convert, return double
       found++;
 
-      field = va_arg(arglist,int);                                               //  next field number
-      if (! field || field == (int) 0x100000000) break;                          //  ARM bug
-      value = va_arg(arglist,double *);                                          //  next output double *
+      field = va_arg(arglist,int);                                                     //  next field number
+      if (! field || field == (int) 0x100000000) break;                                //  ARM bug
+      value = va_arg(arglist,double *);                                                //  next output double *
    }
 
    while (field > 0)
    {
-      *value = 0;                                                                //  zero values not found
+      *value = 0;                                                                      //  zero values not found
       field = va_arg(arglist,int);
       value = va_arg(arglist,double *);
    }
@@ -1415,17 +1386,17 @@ int parseprocrec(ch *prec, int field, do
 //  get current CPU temperature
 //  returns 0 if cannot find
 
-int coretemp()                                                                   //  use package temp
+int coretemp()                                                                         //  use package temp
 {
    FILE           *fid;
    static int     ftf = 1, zone, temp;
    static ch      Tfile[200];
    ch             buff[200], *pp;
 
-   if (ftf)                                                                      //  first call, setup
-   {                                                                             //  dump files ".../thermal_zone*/type"
+   if (ftf)                                                                            //  first call, setup
+   {                                                                                   //  dump files ".../thermal_zone*/type"
       ftf = 0;
-      fid = popen("cat /sys/class/thermal/thermal_zone*/type","r");              //  find file containing "pkg_temp"
+      fid = popen("cat /sys/class/thermal/thermal_zone*/type","r");                    //  find file containing "pkg_temp"
       if (! fid) return 0;
       for (zone = 0; ; zone++) {
          pp = fgets(buff,200,fid);
@@ -1433,23 +1404,23 @@ int coretemp()
          pp = strstr(pp,"pkg_temp");
          if (pp) break;
       }
-      pclose(fid);                                                               //  ignore 'broken pipe' status           24.20
+      pclose(fid);                                                                     //  ignore 'broken pipe' status
 
-      if (! pp) {                                                                //  failed
+      if (! pp) {                                                                      //  failed
          zone = -1;
          return 0;
       }
-      snprintf(Tfile,200,"cat /sys/class/thermal/thermal_zone%d/temp",zone);     //  corresp. file ".../thermal_zone*/temp"
+      snprintf(Tfile,200,"cat /sys/class/thermal/thermal_zone%d/temp",zone);           //  corresp. file ".../thermal_zone*/temp"
    }
 
-   if (zone < 0) return 0;                                                       //  setup call failed
+   if (zone < 0) return 0;                                                             //  setup call failed
 
-   fid = popen(Tfile,"r");                                                       //  read temp file
+   fid = popen(Tfile,"r");                                                             //  read temp file
    if (! fid) return 0;
    pp = fgets(buff,200,fid);
    pclose(fid);
    if (! pp) return 0;
-   temp = atoi(pp) / 1000;                                                       //  get temp, deg. C x 1000
+   temp = atoi(pp) / 1000;                                                             //  get temp, deg. C x 1000
    return temp;
 }
 
@@ -1473,11 +1444,11 @@ int disktemp(ch *disk)
    if (! ffid) return 0;
 
    while (true) {
-      pp = fgets(buff,200,ffid);                                                 //  revised for smartctl report
-      if (! pp) break;                                                           //    format changes
+      pp = fgets(buff,200,ffid);                                                       //  revised for smartctl report
+      if (! pp) break;                                                                 //    format changes
       if (strmatchN(pp,"ID#",3)) pp2 = strstr(pp,"RAW_VALUE");
       id = atoi(pp);
-      if (id != 190 && id != 194) continue;                                      //  Airflow Temp. or Temp.
+      if (id != 190 && id != 194) continue;                                            //  Airflow Temp. or Temp.
       if (! pp2) continue;
       temp = atoi(pp2);
       if (temp < 10 || temp > 99) temp = 0;
@@ -1532,7 +1503,7 @@ void zloop(double dsecs)
 //  CANNOT BE USED for coroutines within one thread, e.g. GTK main loop.
 //
 //  spinlock(1);
-//    ...  protected code           //  only one thread at a time can be in here
+//    ...  protected code                 //  only one thread at a time can be in here
 //  spinlock(0);
 //
 //  will deadlock if already locked by same thread
@@ -1555,7 +1526,7 @@ void spinlock(int lock)
 //  lockfile is typically "/tmp/filename" and does not have to exist
 //
 //  fd = global_lock(lockfile);
-//    ...   protected code             //  only one process/thread at a time
+//    ...   protected code                   //  only one process/thread at a time
 //  global_unlock(fd,lockfile);
 
 
@@ -1563,14 +1534,14 @@ int global_lock(ch *lockfile)
 {
    int       err, fd;
 
-   while (true)                                                                  //  loop until success
+   while (true)                                                                        //  loop until success
    {
-      fd = open(lockfile,O_RDWR|O_CREAT,0666);                                   //  open the lock file
+      fd = open(lockfile,O_RDWR|O_CREAT,0666);                                         //  open the lock file
       if (fd < 0) zappcrash("global_lock() %s",strerror(errno));
-      err = flock(fd,LOCK_EX);                                                   //  request exclusive lock
-      if (! err) return fd + 1;                                                  //  return value >= 1
-      close(fd);                                                                 //  failed
-      zsleep(0.001);                                                             //  wait a bit and try again
+      err = flock(fd,LOCK_EX);                                                         //  request exclusive lock
+      if (! err) return fd + 1;                                                        //  return value >= 1
+      close(fd);                                                                       //  failed
+      zsleep(0.001);                                                                   //  wait a bit and try again
    }
 }
 
@@ -1594,16 +1565,16 @@ mutex_t resource_lock_lock = PTHREAD_MUT
 
 int resource_lock(int &resource)
 {
-   if (resource) return 0;                                                       //  locked
+   if (resource) return 0;                                                             //  locked
 
    mutex_lock(&resource_lock_lock);
    if (resource) {
-      mutex_unlock(&resource_lock_lock);                                         //  locked
+      mutex_unlock(&resource_lock_lock);                                               //  locked
       return 0;
    }
    resource = 1;
    mutex_unlock(&resource_lock_lock);
-   return 1;                                                                     //  locked OK
+   return 1;                                                                           //  locked OK
 }
 
 //  unlock a locked resource
@@ -1611,8 +1582,8 @@ int resource_lock(int &resource)
 void resource_unlock(int &resource)
 {
    mutex_lock(&resource_lock_lock);
-   if (resource != 1) zappcrash("resource not locked");                          //  not locked
-   resource = 0;                                                                 //  unlock
+   if (resource != 1) zappcrash("resource not locked");                                //  not locked
+   resource = 0;                                                                       //  unlock
    mutex_unlock(&resource_lock_lock);
    return;
 }
@@ -1627,20 +1598,20 @@ void resource_unlock(int &resource)
 
 mutex_t zget_lock = PTHREAD_MUTEX_INITIALIZER;
 
-int zget_locked(int &param)                                                      //  lock and return parameter
-{                                                                                //  (wait if locked)
+int zget_locked(int &param)                                                            //  lock and return parameter
+{                                                                                      //  (wait if locked)
    mutex_lock(&zget_lock);
    return param;
 }
 
-void zput_locked(int &param, int value)                                          //  set and unlock parameter
+void zput_locked(int &param, int value)                                                //  set and unlock parameter
 {
    param = value;
    mutex_unlock(&zget_lock);
    return;
 }
 
-int zadd_locked(int &param, int incr)                                            //  lock, increment, unlock, return
+int zadd_locked(int &param, int incr)                                                  //  lock, increment, unlock, return
 {
    int      retval;
 
@@ -1671,12 +1642,12 @@ pthread_t start_detached_thread(void * t
       err = pthread_create(&pthtid,&pthattr,threadfunc,arg);
       if (! err) return pthtid;
       zsleep(0.001);
-      if (err == EAGAIN) continue;                                               //  this shit happens
+      if (err == EAGAIN) continue;                                                     //  this shit happens
       break;
    }
 
    zexit(1,"pthread_create() failure: %s",strerror(err));
-   return 0;                                                                     //  avoid compiler warning
+   return 0;                                                                           //  avoid compiler warning
 }
 
 
@@ -1690,9 +1661,9 @@ pthread_t start_Jthread(void * threadfun
    pthread_t   tid;
    int         err;
 
-   err = pthread_create(&tid, null, threadfunc, arg);                            //  retry EAGAIN failure removed          24.60
-   if (! err) return tid;                                                        //  (does not work)
-   zexit(1,"pthread_create() failure: %s",strerror(err));                        //  fail totally
+   err = pthread_create(&tid, null, threadfunc, arg);                                  //  retry EAGAIN failure removed
+   if (! err) return tid;                                                              //  (does not work)
+   zexit(1,"pthread_create() failure: %s",strerror(err));                              //  fail totally
    return 0;
 }
 
@@ -1726,15 +1697,15 @@ void synch_threads(int NT)
    static pthread_barrier_t   barrier;
    static int                 bflag = 0;
 
-   if (NT) {                                                                     //  main(), initialize
+   if (NT) {                                                                           //  main(), initialize
       if (bflag) pthread_barrier_destroy(&barrier);
       pthread_barrier_init(&barrier,null,NT);
       bflag = 1;
       return;
    }
 
-   pthread_barrier_wait(&barrier);                                               //  thread(), wait for NT threads
-   return;                                                                       //  unblock
+   pthread_barrier_wait(&barrier);                                                     //  thread(), wait for NT threads
+   return;                                                                             //  unblock
 }
 
 
@@ -1755,13 +1726,13 @@ int main_thread()
    int err = zshell(ch *options, ch *command, ...)
 
    Format and perform a shell command, wait for completion, return status.
-   Shell command is performed in a thread with a GTK 
+   Shell command is performed in a thread with a GTK
 
    options: may be null or may contain any of the following substrings:
              "log"      write command to log file, stdout
              "ack"      popup user ACK message if the shell command has an error
              "noerr"    do not log error status
-             "thread"   run shell command in a thread with GTK main loop wait    //  25.1
+             "thread"   run shell command in a thread with GTK main loop wait          //  25.1
 
    command:  shell command with optional '%' printf formats
      ...  :  optional arguments to stuff into printf formats
@@ -1778,47 +1749,47 @@ int zshell(ch *options, ch *command, ...
 
    int         Flog, Fack, Fnoerr, Fthread;
    va_list     arglist;
-   int         err, cc, ccmax = 9999;                                            //  25.1
+   int         err, cc, ccmax = 9999;                                                  //  25.1
    ch          command2[10000];
    pthread_t   tid;
 
    Flog = Fack = Fnoerr = Fthread = 0;
 
    if (options) {
-      if (strstr(options,"log")) Flog = 1;                                       //  set options
+      if (strstr(options,"log")) Flog = 1;                                             //  set options
       if (strstr(options,"ack")) Fack = 1;
       if (strstr(options,"noerr")) Fnoerr = 1;
-      if (strstr(options,"thread")) Fthread = 1;                                 //  25.1
+      if (strstr(options,"thread")) Fthread = 1;                                       //  25.1
    }
 
-   va_start(arglist,command);                                                    //  format command
+   va_start(arglist,command);                                                          //  format command
    cc = vsnprintf(command2,ccmax,command,arglist);
    va_end(arglist);
    if (cc >= ccmax) zappcrash("zshell: buffer overflow: %d",cc);
-   
-   if (Fnoerr && ccmax-cc > 17) strcat(command2," >/dev/null 2>&1");             //  suppress error output if not wanted   25.0
 
-   if (Flog) Plog(0,"zshell: %s \n",command2);                                   //  command > log file if wanted
-   
-   if (Fthread)                                                                  //  do shell command in a thread          25.1
+   if (Fnoerr && ccmax-cc > 17) strcat(command2," >/dev/null 2>&1");                   //  suppress error output if not wanted   25.0
+
+   if (Flog) printf("zshell: %s \n",command2);                                         //  command > log file if wanted
+
+   if (Fthread)                                                                        //  do shell command in a thread          25.1
    {
       zshell_stat = -1;
-      tid = start_Jthread(zshell_thread,command2);                               //  start thread
-      while (zshell_stat < 0) zmainsleep(0.01);                                  //  wait for command status
-      wait_Jthread(tid);                                                         //  join thread
+      tid = start_Jthread(zshell_thread,command2);                                     //  start thread
+      while (zshell_stat < 0) zmainsleep(0.01);                                        //  wait for command status
+      wait_Jthread(tid);                                                               //  join thread
    }
 
    else zshell_stat = system(command2);
-      
-   err = WEXITSTATUS(zshell_stat);                                               //  get thread status
-   if (err && ! Fnoerr) {                                                        //  suppress log of command and error     24.20
-      if (! Flog) Plog(0,"zshell: %s \n",command2);                              //  log command if not already
-      Plog(0,"zshell error: %s \n",strerror(err));                               //  log error
+
+   err = WEXITSTATUS(zshell_stat);                                                     //  get thread status
+   if (err && ! Fnoerr) {                                                              //  suppress log of command and error
+      if (! Flog) printf("zshell: %s \n",command2);                                    //  log command if not already
+      printf("*** zshell error: %s \n",strerror(err));                                 //  log error
       if (Fack) zmessageACK(mainwin,"command: %s \n error: %s",
-                                       command2, strerror(err));                 //  popup error to user if wanted
+                                       command2, strerror(err));                       //  popup error to user if wanted
    }
 
-   return err;                                                                   //  return completion status
+   return err;                                                                         //  return completion status
 }
 
 
@@ -1832,7 +1803,7 @@ void * zshell_thread(void *command)
 /********************************************************************************/
 
 //  kill processes matching a given process name, which may have '*' wildcards
-//    int NP = kill_procname("process*name*") 
+//    int NP = kill_procname("process*name*")
 //  status returned: N = processes found (0 if none found)
 
 int kill_procname(ch *wildname)
@@ -1842,10 +1813,10 @@ int kill_procname(ch *wildname)
    int            cc, found = 0;
    ch             *pp, *pid, *filename;
    ch             buff1[100], buff2[XFCC];
-   
+
    procdir = opendir("/proc");
    if (! procdir) return 1;
-   
+
    while (true)
    {
       procent = readdir(procdir);
@@ -1862,7 +1833,7 @@ int kill_procname(ch *wildname)
       zshell("log","kill %s",pid);
       found++;
    }
-   
+
    closedir(procdir);
    return found;
 }
@@ -1882,7 +1853,7 @@ int signalProc(ch *pname, ch *signal)
    int         err, nsignal = 0;
 
    snprintf(buff,100,"ps -C %s h o pid",pname);
-   fid = popen(buff,"r");                                                        //  popen() instead of system()
+   fid = popen(buff,"r");                                                              //  popen() instead of system()
    if (! fid) return 2;
    pp = fgets(buff,100,fid);
    pclose(fid);
@@ -1928,31 +1899,31 @@ ch * fgets_trim(ch *buff, int maxcc, FIL
 //
 //    buff: buffer for reading file
 //     bcc: length of buffer
-//     fid: open file stream 
-//  
-//  returned ch * pointer: 
+//     fid: open file stream
+//
+//  returned ch * pointer:
 //       null: EOF or error - file can be closed
 //       "fgets_pend\n": next record not yet available, try again later
 //       other: pointer to record in buffer, \n\0 terminated
 
-ch * fgets_pend(ch *buff, int bcc, FILE *fid)                                    //  25.1
+ch * fgets_pend(ch *buff, int bcc, FILE *fid)                                          //  25.1
 {
    int            fd, flags;
    static FILE    *pfid = 0;
    ch             *pp;
-   
+
    if (fid != pfid) {
       pfid = fid;
-      fd = fileno(fid);                                                          //  stop fgets() from blocking
+      fd = fileno(fid);                                                                //  stop fgets() from blocking
       flags = fcntl(fd,F_GETFL,0);
       flags |= O_NONBLOCK;
       fcntl(fd,F_SETFL,flags);
    }
-   
-   pp = fgets(buff,500,fid);                                                     //  read next record in file
-   if (pp) return pp;                                                            //  success
-   if (feof(fid)) return 0;                                                      //  EOF, no more data
-   return "fgets_pend\n";                                                        //  next record not available yet
+
+   pp = fgets(buff,500,fid);                                                           //  read next record in file
+   if (pp) return pp;                                                                  //  success
+   if (feof(fid)) return 0;                                                            //  EOF, no more data
+   return "fgets_pend\n";                                                              //  next record not available yet
 }
 
 
@@ -1967,12 +1938,12 @@ int samefolder(ch *file1, ch *file2)
    ch       *p1, *p2;
    int      cc1, cc2, cc;
 
-   p1 = strrchr(file1,'/');                                                      //  /dir1/dir2
-   p2 = strrchr(file2,'/');                                                      //  /dir1/dir2/file
+   p1 = strrchr(file1,'/');                                                            //  /dir1/dir2
+   p2 = strrchr(file2,'/');                                                            //  /dir1/dir2/file
    cc1 = cc2 = 0;
-   if (p1) cc1 = p1 - file1;                                                     //  /dir1/dir2/file
-   if (p2) cc2 = p2 - file2;                                                     //  |         |
-   if (cc2 > cc1) cc = cc2;                                                      //  0         cc
+   if (p1) cc1 = p1 - file1;                                                           //  /dir1/dir2/file
+   if (p2) cc2 = p2 - file2;                                                           //  |         |
+   if (cc2 > cc1) cc = cc2;                                                            //  0         cc
    else cc = cc1;
    if (cc == 0) return 0;
    if (strmatchN(file1,file2,cc)) return 1;
@@ -1986,35 +1957,35 @@ int samefolder(ch *file1, ch *file2)
 //   Returned strings are subject to zfree() unless they are null.
 //   folder is returned without trailing '/' but with two nulls on end,
 //      to allow appending '/' if needed.
-//   file is returned without .ext 
-//   ext is returned with leading '.' 
+//   file is returned without .ext
+//   ext is returned with leading '.'
 //   returns 0 if OK, 1 if error
 
-int parsefile(ch *path, ch *&folder, ch *&file, ch *&ext)                        //  make reentrant      25.1
+int parsefile(ch *path, ch *&folder, ch *&file, ch *&ext)                              //  make reentrant      25.1
 {
    ch       *pp1, *pp2;
    int      cc;
 
    folder = file = ext = 0;
-   
-   if (! path || ! *path) return 1;                                              //  null or empty string
+
+   if (! path || ! *path) return 1;                                                    //  null or empty string
    pp1 = strrchr(path,'/');
-   if (! pp1) return 1;                                                          //  /folders/.../file.ext
-   cc = pp1 - path;                                                              //  |           |    |
-   if (cc < 2) return 1;                                                         //  path        pp1  pp2
+   if (! pp1) return 1;                                                                //  /folders/.../file.ext
+   cc = pp1 - path;                                                                    //  |           |    |
+   if (cc < 2) return 1;                                                               //  path        pp1  pp2
    *pp1 = 0;
    folder = zstrdup(path,"parsefile",2);
    *pp1 = '/';
-   
-   pp1++;                                                                        //  /folders/.../file.ext
-   if (! *pp1) return 0;                                                         //               |   |
-                                                                                 //              pp1  pp2
+
+   pp1++;                                                                              //  /folders/.../file.ext
+   if (! *pp1) return 0;                                                               //               |   |
+                                                                                       //              pp1  pp2
    pp2 = strrchr(pp1,'.');
    if (! pp2) {
       file = zstrdup(pp1,"parsefile");
       return 0;
    }
-   
+
    *pp2 = 0;
    file = zstrdup(pp1,"parsefile");
    *pp2 = '.';
@@ -2025,7 +1996,7 @@ int parsefile(ch *path, ch *&folder, ch
 
 //  free file name components allocated by parsefile()
 
-void parsefile_free(ch *&folder, ch *&file, ch *&ext)                            //  25.1
+void parsefile_free(ch *&folder, ch *&file, ch *&ext)                                  //  25.1
 {
    if (folder) zfree(folder);
    if (file) zfree(file);
@@ -2047,7 +2018,7 @@ int renamez(ch *file1, ch *file2)
    ch       *pp1, *pp2;
    int      err, Frename = 0;
 
-   if (*file1 != '/' || *file2 != '/') return 1;                                 //  not absolute pathnames
+   if (*file1 != '/' || *file2 != '/') return 1;                                       //  not absolute pathnames
 
    pp1 = strchr((ch *) file1+1,'/');
    pp2 = strchr((ch *) file2+1,'/');
@@ -2057,7 +2028,7 @@ int renamez(ch *file1, ch *file2)
    if (strmatch(file1,file2)) Frename = 1;
    *pp1 = *pp2 = '/';
 
-   if (Frename) {                                                                //  same top folder
+   if (Frename) {                                                                      //  same top folder
       err = rename(file1,file2);
       if (err) return errno;
       return 0;
@@ -2084,27 +2055,27 @@ int check_create_dir(ch *path)
    int      err, yn;
    STATB    statB;
 
-   err = stat(path,&statB);                                                      //  check status
+   err = stat(path,&statB);                                                            //  check status
    if (! err) {
-      if (S_ISDIR(statB.st_mode)) return 0;                                      //  exists, folder, OK
+      if (S_ISDIR(statB.st_mode)) return 0;                                            //  exists, folder, OK
       else {
-         zmessageACK(mainwin,"%s \n %s",path,strerror(ENOTDIR));                 //  exists, not a folder
+         zmessageACK(mainwin,"%s \n %s",path,strerror(ENOTDIR));                       //  exists, not a folder
          return ENOTDIR;
       }
    }
 
    if (errno != ENOENT) {
-      zmessageACK(mainwin,"%s \n %s",path,strerror(errno));                      //  error other than missing
+      zmessageACK(mainwin,"%s \n %s",path,strerror(errno));                            //  error other than missing
       return errno;
    }
 
-   yn = zmessageYN(0,"create folder? \n %s",path);                               //  ask to create
+   yn = zmessageYN(0,"create folder? \n %s",path);                                     //  ask to create
    if (! yn) return ENOENT;
 
-   err = zshell("ack","mkdir -p -m 0750 \"%s\" ",path);                          //  create
+   err = zshell("ack","mkdir -p -m 0750 \"%s\" ",path);                                //  create
    if (! err) return 0;
 
-   zmessageACK(mainwin,"%s \n %s",path,strerror(errno));                         //  failed to create
+   zmessageACK(mainwin,"%s \n %s",path,strerror(errno));                               //  failed to create
    return errno;
 }
 
@@ -2120,7 +2091,7 @@ int cp_copy(ch *sfile, ch *dfile)
    ch    *pps, *ppd;
 
    if (strmatch(sfile,dfile)) {
-      Plog(0,"ignore copy file to self: %s \n",sfile);
+      printf("ignore copy file to self: %s \n",sfile);
       return 0;
    }
 
@@ -2154,11 +2125,11 @@ uint diskspace(ch *file)
 
    fid = popen(command,"r");
    if (! fid) return 0;
-   pp = fgets(buff,200,fid);                                                     //  "Avail" header
-   pp = fgets(buff,200,fid);                                                     //  decimal number, KB space
+   pp = fgets(buff,200,fid);                                                           //  "Avail" header
+   pp = fgets(buff,200,fid);                                                           //  decimal number, KB space
    pclose(fid);
    if (! pp) return 0;
-   avail = 0.001 * atoll(pp);                                                    //  MB space
+   avail = 0.001 * atoll(pp);                                                          //  MB space
    return avail;
 }
 
@@ -2183,31 +2154,31 @@ ch * get_file_extension(ch *file)
    cc = strlen(file) + 20;
    buff = (ch *) zmalloc(cc,0);
    pp = zescape_quotes(file);
-   snprintf(buff,cc,"file --extension %s",pp);                                   //  'file' command - get correct extensions
+   snprintf(buff,cc,"file --extension %s",pp);                                         //  'file' command - get correct extensions
    zfree(pp);
    fid = popen(buff,"r");
    if (! fid) goto ret0;
-   extlist = fgets(buff,cc,fid);                                                 //  /.../filename.ext: ext1/ext2/...
+   extlist = fgets(buff,cc,fid);                                                       //  /.../filename.ext: ext1/ext2/...
    pclose(fid);
    if (! extlist) goto ret0;
-   extlist = strrchr(extlist,':');                                               //  extlist = : ext1/ext2/...
+   extlist = strrchr(extlist,':');                                                     //  extlist = : ext1/ext2/...
    if (! extlist) goto ret0;
-   extlist += 2;                                                                 //  extlist = ext1/ext2/...
+   extlist += 2;                                                                       //  extlist = ext1/ext2/...
 
-   fext1 = strrchr(file,'.');                                                    //  fext1 = file current .ext
+   fext1 = strrchr(file,'.');                                                          //  fext1 = file current .ext
    if (! fext1) fext1 = ".xxx";
-   if (strcasestr(extlist,fext1+1)) goto ret0;                                   //  fext1 found in extlist
+   if (strcasestr(extlist,fext1+1)) goto ret0;                                         //  fext1 found in extlist
 
    fext2 = extlist;
-   pp = strchr(fext2,'/');                                                       //  fext2 = first in extlist
+   pp = strchr(fext2,'/');                                                             //  fext2 = first in extlist
    if (pp) *pp = 0;
 
-   strncpy0(fext3,fext2,20);                                                     //  return correct .ext in static buffer
+   strncpy0(fext3,fext2,20);                                                           //  return correct .ext in static buffer
    zfree(buff);
    return fext3;
 
 ret0:
-   if (errno) Plog(0,"%s\n",strerror(errno));
+   if (errno) printf("*** %s\n",strerror(errno));
    zfree(buff);
    return 0;
 }
@@ -2231,38 +2202,38 @@ int zreaddir(ch *folder, ch **&files)
    DIR      *direc;
    ch       **ufiles, **ufiles2;
 
-   files = 0;                                                                    //  nothing returned yet
+   files = 0;                                                                          //  nothing returned yet
 
-   ufiles = (ch **) zmalloc(maxfiles * sizeof(ch *),"zreaddir");                 //  starting space
+   ufiles = (ch **) zmalloc(maxfiles * sizeof(ch *),"zreaddir");                       //  starting space
 
-   direc = opendir(folder);                                                      //  open caller's folder
+   direc = opendir(folder);                                                            //  open caller's folder
    if (! direc) return -1;
 
    while (true)
    {
-      if (Nfiles == maxfiles)                                                    //  out of space
+      if (Nfiles == maxfiles)                                                          //  out of space
       {
-         ufiles2 = (ch **) zmalloc(2 * maxfiles * sizeof(ch *),"zreaddir");      //  allocate new space = 2x old space
-         memcpy(ufiles2,ufiles, maxfiles * sizeof(ch *));                        //  copy data to new space
-         zfree(ufiles);                                                          //  free old space
-         ufiles = ufiles2;                                                       //  set new space
-         maxfiles *= 2;                                                          //  new capacity
+         ufiles2 = (ch **) zmalloc(2 * maxfiles * sizeof(ch *),"zreaddir");            //  allocate new space = 2x old space
+         memcpy(ufiles2,ufiles, maxfiles * sizeof(ch *));                              //  copy data to new space
+         zfree(ufiles);                                                                //  free old space
+         ufiles = ufiles2;                                                             //  set new space
+         maxfiles *= 2;                                                                //  new capacity
       }
 
-      dirent1 = readdir(direc);                                                  //  get next file in folder
+      dirent1 = readdir(direc);                                                        //  get next file in folder
       if (! dirent1) break;
-      if (dirent1->d_type != DT_REG) continue;                                   //  skip subfolders
-      ufiles[Nfiles] = zstrdup(dirent1->d_name,"zreaddir");                      //  add to file list
+      if (dirent1->d_type != DT_REG) continue;                                         //  skip subfolders
+      ufiles[Nfiles] = zstrdup(dirent1->d_name,"zreaddir");                            //  add to file list
       Nfiles++;
       continue;
    }
 
    closedir(direc);
 
-   if (Nfiles > 1) HeapSort(ufiles,Nfiles);                                      //  sort file list
+   if (Nfiles > 1) HeapSort(ufiles,Nfiles);                                            //  sort file list
 
-   files = ufiles;                                                               //  return allocated file list
-   return Nfiles;                                                                //  return file count
+   files = ufiles;                                                                     //  return allocated file list
+   return Nfiles;                                                                      //  return file count
 }
 
 
@@ -2289,15 +2260,15 @@ int zreadfile(ch *filename, ch **&rrecs)
    ch             buff[1001], *pp;
    int            cc, NR = 0;
 
-   rrecs = 0;                                                                    //  initz. no data
+   rrecs = 0;                                                                          //  initz. no data
 
-   fid = fopen(filename,"r");                                                    //  open file
+   fid = fopen(filename,"r");                                                          //  open file
    if (! fid) return -1;
 
    while (true)
    {
-      pp = fgets(buff,1001,fid);                                                 //  read record
-      if (! pp) break;                                                           //  EOF
+      pp = fgets(buff,1001,fid);                                                       //  read record
+      if (! pp) break;                                                                 //  EOF
       cc = strlen(pp);
       if (cc > 999) {
          zmessageACK(mainwin,"zreadfile() record too long %s",filename);
@@ -2305,12 +2276,12 @@ int zreadfile(ch *filename, ch **&rrecs)
          return -1;
       }
 
-      while (cc && pp[cc-1] > 0 && pp[cc-1] <= ' ') --cc;                        //  remove trailing \n, \r, blanks, etc.
-      pp[cc] = 0;                                                                //  terminating null
-      if (cc == 0) continue;                                                     //  discard null recs
+      while (cc && pp[cc-1] > 0 && pp[cc-1] <= ' ') --cc;                              //  remove trailing \n, \r, blanks, etc.
+      pp[cc] = 0;                                                                      //  terminating null
+      if (cc == 0) continue;                                                           //  discard null recs
 
-      recs[NR] = (ch *) zmalloc(cc+1,"zreadfile");                               //  allocate memory
-      memcpy(recs[NR],pp,cc+1);                                                  //  copy record
+      recs[NR] = (ch *) zmalloc(cc+1,"zreadfile");                                     //  allocate memory
+      memcpy(recs[NR],pp,cc+1);                                                        //  copy record
       NR++;
       if (NR == 1000) {
          zmessageACK(mainwin,"zreadfile() too many records %s",filename);
@@ -2320,11 +2291,11 @@ int zreadfile(ch *filename, ch **&rrecs)
    }
 
    fclose(fid);
-   recs[NR] = 0;                                                                 //  last record + 1 = null
+   recs[NR] = 0;                                                                       //  last record + 1 = null
 
-   cc = (NR + 1) * sizeof(ch *);                                                 //  allocate caller rrecs list
+   cc = (NR + 1) * sizeof(ch *);                                                       //  allocate caller rrecs list
    rrecs = (ch **) zmalloc(cc,"zreadfile");
-   memcpy(rrecs,recs,cc);                                                        //  copy record pointers + null
+   memcpy(rrecs,recs,cc);                                                              //  copy record pointers + null
 
    return NR;
 }
@@ -2340,7 +2311,7 @@ int zwritefile(ch *filename, ch **rrecs)
    FILE           *fid;
    int            nr, nn;
 
-   fid = fopen(filename,"w");                                                    //  open file
+   fid = fopen(filename,"w");                                                          //  open file
    if (! fid) return -1;
 
    for (nr = 0; nr < 1000; nr++)
@@ -2359,10 +2330,10 @@ int zwritefile(ch *filename, ch **rrecs)
 
 void zreadfile_free(ch **&rrecs)
 {
-   for (int ii = 0; rrecs[ii]; ii++)                                             //  loop until null pointer
+   for (int ii = 0; rrecs[ii]; ii++)                                                   //  loop until null pointer
       zfree(rrecs[ii]);
    zfree(rrecs);
-   rrecs = 0;                                                                    //  set no data
+   rrecs = 0;                                                                          //  set no data
    return;
 }
 
@@ -2447,44 +2418,44 @@ int strmatchcaseN(cch *str1, cch *str2,
 
 ch * substringR(ch *string, ch *delims, int Nth)
 {
-   ch       *pf1, pf2[2000];                                                     //  2000 char. limit
+   ch       *pf1, pf2[2000];                                                           //  2000 char. limit
    ch       quote = '"';
    int      nf, fcc = 0;
 
-   if (! string || ! *string) return 0;                                          //  bad call
+   if (! string || ! *string) return 0;                                                //  bad call
    if (Nth < 1) return 0;
 
-   pf1 = (ch *) string - 1;                                                      //  start parse
+   pf1 = (ch *) string - 1;                                                            //  start parse
    nf = 0;
 
    while (nf < Nth)
    {
-      pf1++;                                                                     //  start substring
+      pf1++;                                                                           //  start substring
       nf++;
       fcc = 0;
 
-      while (*pf1 == ' ') pf1++;                                                 //  skip leading blanks
+      while (*pf1 == ' ') pf1++;                                                       //  skip leading blanks
 
       while (true)
       {
-         if (*pf1 == quote) {                                                    //  pass chars between quotes
-            pf1++;                                                               //  (but without the quotes)
+         if (*pf1 == quote) {                                                          //  pass chars between quotes
+            pf1++;                                                                     //  (but without the quotes)
             while (*pf1 && *pf1 != quote) pf2[fcc++] = *pf1++;
             if (*pf1 == quote) pf1++;
          }
-         else if (strchr(delims,*pf1) || *pf1 == 0) break;                       //  found delimiter or null
-         else pf2[fcc++] = *pf1++;                                               //  pass normal character
+         else if (strchr(delims,*pf1) || *pf1 == 0) break;                             //  found delimiter or null
+         else pf2[fcc++] = *pf1++;                                                     //  pass normal character
          if (fcc > 1999) zappcrash("substringR() too long");
       }
 
-      if (*pf1 == 0) break;                                                      //  end of input string
+      if (*pf1 == 0) break;                                                            //  end of input string
    }
 
-   if (nf < Nth) return 0;                                                       //  no Nth substring
-   if (fcc == 0 && *pf1 == 0) return 0;                                          //  empty substring
+   if (nf < Nth) return 0;                                                             //  no Nth substring
+   if (fcc == 0 && *pf1 == 0) return 0;                                                //  empty substring
 
    pf2[fcc] = 0;
-   return zstrdup(pf2,"substringR");                                             //  returned string (needs zfree())
+   return zstrdup(pf2,"substringR");                                                   //  returned string (needs zfree())
 }
 
 
@@ -2502,17 +2473,17 @@ ch * substringR(ch *string, ch delim, in
 //  returned substring is in static memory
 //  only the last 1000 results are kept       <----- NOTE limitation
 
-ch * substring(ch *string, ch *delims, int Nth)                                  //  24.40
+ch * substring(ch *string, ch *delims, int Nth)
 {
    ch           *s1;
    static ch    *s2[1000];
    static int   kk = -1;
-   
-   if (kk == -1) memset(s2,0,1000*sizeof(ch *)); 
-   
+
+   if (kk == -1) memset(s2,0,1000*sizeof(ch *));
+
    s1 = substringR(string,delims,Nth);
    if (! s1) return 0;
-   
+
    kk++;
    if (kk == 1000) kk = 0;
    if (s2[kk]) zfree(s2[kk]);
@@ -2533,29 +2504,29 @@ ch * substring(ch *string, ch delim, int
 
    decode a string with embedded delimiters and return the substrings
    input:   string1^ string2^ ... stringN     where '^' is the delimiter
-   output:  output[0], output[1] ... output[N] 
+   output:  output[0], output[1] ... output[N]
    delim: single delimiter character
    count: max. number of output strings
-   maxcc: max. output string length
+   maxcc: max. output string length (rest truncated) 
    the output strings must be pre-allocated with at least maxcc chars.
    returns: no. substrings found
    output string = single null if two delimiters are separated by nothing or blanks
 
 ****/
 
-int get_substrings(ch *input, ch delim, int count, int maxcc, ch **output)       //  25.1
+int get_substrings(ch *input, ch delim, int count, int maxcc, ch **output)             //  25.1
 {
    int      Nth = 0, ii, cc;
    ch       *pp1 = input, *pp2;
-   
-   for (ii = 0; ii < count; ii++)                        //  clear outputs
+
+   for (ii = 0; ii < count; ii++)                              //  clear outputs
       output[ii][0] = 0;
-   
-   for (Nth = 0; Nth < count; Nth++)                     //  aaaaaaaa^  bbbbbbbbbbbbb^ ... ^  ccccccc
-   {                                                     //  |       |  |            |     |  |      |
-      while (*pp1 == ' ') pp1++;                         //  pp1    pp2 pp1         pp2   pp2 pp1    pp2
+
+   for (Nth = 0; Nth < count; Nth++)                           //  aaaaaaaa^  bbbbbbbbbbbbb^ ... ^  ccccccc
+   {                                                           //  |       |  |            |     |  |      |
+      while (*pp1 == ' ') pp1++;                               //  pp1    pp2 pp1         pp2   pp2 pp1    pp2
       if (! *pp1) break;
-      pp2 = strchr(pp1,delim);  
+      pp2 = strchr(pp1,delim);
       if (! pp2) pp2 = pp1 + strlen(pp1);
       cc = pp2 - pp1;
       if (cc >= maxcc) cc = maxcc - 1;
@@ -2564,7 +2535,7 @@ int get_substrings(ch *input, ch delim,
       if (*pp2 == delim) pp1 = pp2 + 1;
       else pp1 = pp2;
    }
-   
+
    return Nth;
 }
 
@@ -2602,7 +2573,7 @@ int strncpy0(ch *dest, ch *source, uint
 {
    strncpy(dest,source,cc);
    dest[cc-1] = 0;
-   if (strlen(source) >= cc) return 1;                                           //  truncated
+   if (strlen(source) >= cc) return 1;                                                 //  truncated
    else return 0;
 }
 
@@ -2651,7 +2622,7 @@ int strTrim2(ch *dest, ch *source)
    pp2 = source + strlen(source) - 1;
    while (*pp1 == ' ') pp1++;
    if (*pp1 == 0) {
-      strcpy(dest,"");                                                           //  null or blank input
+      strcpy(dest,"");                                                                 //  null or blank input
       return 0;
    }
    while (*pp2 == ' ' && pp2 > pp1) pp2--;
@@ -2719,7 +2690,7 @@ int strncatv(ch *dest, int maxcc, ch *so
       maxcc = maxcc - strlen(ps);
       if (maxcc < 0) break;
       ps = va_arg(arglist,ch *);
-      if (! ps || ps == (ch *) 0x100000000) break;                               //  ARM bug
+      if (! ps || ps == (ch *) 0x100000000) break;                                     //  ARM bug
    }
 
    va_end(arglist);
@@ -2745,7 +2716,7 @@ int strmatchV(ch *string, ...)
    while (true)
    {
       stringN = va_arg(arglist, ch *);
-      if (stringN == null || stringN == (ch *) 0x100000000)                      //  ARM bug
+      if (stringN == null || stringN == (ch *) 0x100000000)                            //  ARM bug
       {
          va_end(arglist);
          return 0;
@@ -2839,7 +2810,7 @@ int repl_1str(ch *strin, ch *strout, int
    }
 
    cc = strlen(pp1);
-   if (ccout + cc >= maxcc) cc = maxcc - ccout - 1;                              //  overflow, keep as much as poss.       25.1
+   if (ccout + cc >= maxcc) cc = maxcc - ccout - 1;                                    //  overflow, keep as much as poss.       25.1
    memcpy(pp2,pp1,cc);
    ccout += cc;
    strout[ccout] = 0;
@@ -2870,7 +2841,7 @@ int repl_Nstrs(ch *strin, ch *strout, in
    while (true)
    {
       ssin = va_arg(arglist, ch *);
-      if (! ssin || ssin == (ch *) 0x100000000) break;                           //  ARM bug
+      if (! ssin || ssin == (ch *) 0x100000000) break;                                 //  ARM bug
       ssout = va_arg(arglist, ch *);
 
       if (ftf) {
@@ -2912,45 +2883,45 @@ int breakup_text(ch *txin0, ch **&txout,
 
    txin = zstrdup(txin0,"breakup_text");
    ccmax = strlen(txin);
-   txout = (ch **) zmalloc(100 * sizeof(ch *),"breakup_text");                   //  100 line limit
+   txout = (ch **) zmalloc(100 * sizeof(ch *),"breakup_text");                         //  100 line limit
 
-   if (strstr(txin0,"\\n"))                                                      //  replace "\n" with real newline chars
+   if (strstr(txin0,"\\n"))                                                            //  replace "\n" with real newline chars
       repl_1str(txin0,txin,ccmax,"\\n","\n");
 
    Nout = p1 = 0;
 
    while (true)
    {
-      p2 = p1;                                                                   //  input line position
-      cc3 = 0;                                                                   //  output line cc
+      p2 = p1;                                                                         //  input line position
+      cc3 = 0;                                                                         //  output line cc
 
       Np = Bp = Sp = 0;
 
-      while (txin[p2])                                                           //  scan further up to cc2 chars
+      while (txin[p2])                                                                 //  scan further up to cc2 chars
       {
          ch1 = txin[p2];
-         if (ch1 == '\n') { Np = p2; break; }                                    //  break out if newline found
+         if (ch1 == '\n') { Np = p2; break; }                                          //  break out if newline found
          if (cc3 >= cc1) {
-            if (ch1 == ' ') Bp = p2;                                             //  remember last ' ' found after cc1 chars
-            if (delims && strchr(delims,ch1)) Sp = p2;                           //  remember last delimiter found after cc1
+            if (ch1 == ' ') Bp = p2;                                                   //  remember last ' ' found after cc1 chars
+            if (delims && strchr(delims,ch1)) Sp = p2;                                 //  remember last delimiter found after cc1
          }
-         if (ch1 < 0)                                                            //  UTF8 wide character
+         if (ch1 < 0)                                                                  //  UTF8 wide character
             while ((ch1 = txin[p2+1]) < 0xC0) p2++;
          p2++;
          cc3++;
          if (cc3 == cc2) break;
       }
 
-      if (! cc3 && ! Np) break;                                                  //  nothing left
-      if (Np) cc3 = Np - p1;                                                     //  newline found
+      if (! cc3 && ! Np) break;                                                        //  nothing left
+      if (Np) cc3 = Np - p1;                                                           //  newline found
       else {
-         if (cc3 < cc2) Bp = Sp = 0;                                             //  line fits cc2 limit
-         if (Bp) cc3 = Bp - p1 + 1;                                              //  break at previous ' '
-         else if (Sp) cc3 = Sp - p1 + 1;                                         //  break at previous delimiter
+         if (cc3 < cc2) Bp = Sp = 0;                                                   //  line fits cc2 limit
+         if (Bp) cc3 = Bp - p1 + 1;                                                    //  break at previous ' '
+         else if (Sp) cc3 = Sp - p1 + 1;                                               //  break at previous delimiter
          else cc3 = p2 - p1;
       }
-      if (txin[p1] == ' ' && cc3) { p1++; cc3--; }                               //  remove leading blank
-      if (cc3 > 0) {                                                             //  avoid blank line
+      if (txin[p1] == ' ' && cc3) { p1++; cc3--; }                                     //  remove leading blank
+      if (cc3 > 0) {                                                                   //  avoid blank line
          txout[Nout] = (ch *) zmalloc(cc3+1,"breakup_text");
          strncpy0(txout[Nout],txin+p1,cc3+1);
          if (++Nout == 100) break;
@@ -3052,12 +3023,12 @@ void StripZeros(ch *pNum)
 
 int blank_null(ch *string)
 {
-   if (! string) return 1;                                                       //  null string
-   if (! *string) return 2;                                                      //  zero length string
+   if (! string) return 1;                                                             //  null string
+   if (! *string) return 2;                                                            //  zero length string
    int cc = strlen(string);
    for (int ii = 0; ii < cc; ii++)
-      if (string[ii] != ' ') return 0;                                           //  non-blank string
-   return 3;                                                                     //  blank string
+      if (string[ii] != ' ') return 0;                                                 //  non-blank string
+   return 3;                                                                           //  blank string
 }
 
 
@@ -3110,8 +3081,8 @@ int utf8len(ch *utf8string)
 
    for (ii = cc = 0; utf8string[ii]; ii++)
    {
-      if (utf8string[ii] < 0)                                                    //  multibyte character
-         while (utf8string[ii+1] < xlimit) ii++;                                 //  skip extra bytes
+      if (utf8string[ii] < 0)                                                          //  multibyte character
+         while (utf8string[ii+1] < xlimit) ii++;                                       //  skip extra bytes
       cc++;
    }
 
@@ -3194,10 +3165,10 @@ int utf8_check(ch *string)
 /********************************************************************************/
 
 //  check a character string for valid utf8 encoding
-//  invalid characters are replaced with '?' 
+//  invalid characters are replaced with '?'
 //  returns no. of characters replaced (0 if no errors found)
 
-int utf8_clean(ch *string)                                                       //  24.60
+int utf8_clean(ch *string)
 {
    int      badbytes = 0;
    ch       *pp1, *pp2;
@@ -3206,32 +3177,32 @@ int utf8_clean(ch *string)
    for (pp1 = string; *pp1; pp1++)
    {
       ch1 = *pp1;
-      if (ch1 < 0x7F) continue;                                                  //  ascii, single byte
+      if (ch1 < 0x7F) continue;                                                        //  ascii, single byte
 
-      if (ch1 > 0xBF && ch1 < 0xE0) nch = 1;                                     //  extra bytes
+      if (ch1 > 0xBF && ch1 < 0xE0) nch = 1;                                           //  extra bytes
       else if (ch1 < 0xF0) nch = 2;
       else if (ch1 < 0xF8) nch = 3;
       else if (ch1 < 0xFC) nch = 4;
       else if (ch1 < 0xFE) nch = 5;
-      else goto fix1;                                                            //  >5 invalid
+      else goto fix1;                                                                  //  >5 invalid
 
       pp2 = pp1;
-      while (nch) {                                                              //  check extra bytes
+      while (nch) {                                                                    //  check extra bytes
          pp1++;
          ch2 = *pp1;
-         if (ch2 < 0x80 || ch2 > 0xBF) goto fix2;                                //  invalid
+         if (ch2 < 0x80 || ch2 > 0xBF) goto fix2;                                      //  invalid
          nch--;
       }
       continue;
 
-   fix1:                                                                         //  replace bad byte with '?'
+   fix1:                                                                               //  replace bad byte with '?'
       *pp1 = '?';
       badbytes++;
       continue;
 
    fix2:
-      pp1 = pp2;                                                                 //  back to initial byte
-      *pp1 = '?';                                                                //  replace with '?'
+      pp1 = pp2;                                                                       //  back to initial byte
+      *pp1 = '?';                                                                      //  replace with '?'
       badbytes++;
       continue;
    }
@@ -3255,8 +3226,8 @@ int utf8_position(ch *utf8in, int Nth)
 
    for (ii = posx = 0; posx < Nth && utf8in[ii]; ii++)
    {
-      if (utf8in[ii] < 0)                                                        //  multi-byte character
-         while (utf8in[ii+1] && utf8in[ii+1] < xlimit) ii++;                     //  traverse member bytes
+      if (utf8in[ii] < 0)                                                              //  multi-byte character
+         while (utf8in[ii+1] && utf8in[ii+1] < xlimit) ii++;                           //  traverse member bytes
       posx++;
    }
 
@@ -3290,7 +3261,7 @@ int zsed(ch *infile ...)
    strcat(outfile,"-temp");
    fid2 = fopen(outfile,"w");
    if (! fid2) {
-      Plog(0,"%d \n",strerror(errno));
+      printf("*** %s \n",strerror(errno));
       zfree(outfile);
       return -2;
    }
@@ -3309,7 +3280,7 @@ int zsed(ch *infile ...)
       while (true)
       {
          stringin = va_arg(arglist, ch *);
-         if (! stringin || stringin == (ch *) 0x100000000) break;                //  ARM bug
+         if (! stringin || stringin == (ch *) 0x100000000) break;                      //  ARM bug
          stringout = va_arg(arglist, ch *);
          if (! stringout || stringout == (ch *) 0x100000000) break;
 
@@ -3331,7 +3302,7 @@ int zsed(ch *infile ...)
    fclose(fid1);
    err = fclose(fid2);
    if (err) {
-      Plog(0,"%s \n",strerror(errno));
+      printf("*** %s \n",strerror(errno));
       zfree(outfile);
       return -2;
    }
@@ -3491,17 +3462,17 @@ ch * zescape_quotes(ch *str1)
 
 //  Convert string to integer
 
-int convSI(ch *string, int &inum, ch **delim)                                    //  use glib function
+int convSI(ch *string, int &inum, ch **delim)                                          //  use glib function
 {
    ch       *ddelim = 0;
    int      err;
 
-   inum = strtol(string,&ddelim,10);                                             //  convert next characters
+   inum = strtol(string,&ddelim,10);                                                   //  convert next characters
    if (delim) *delim = ddelim;
-   if (ddelim == string) err = 4;                                                //  no valid digits
-   else if (*ddelim == '\0') err = 0;                                            //  null delimiter
-   else if (*ddelim == ' ') err = 0;                                             //  blank delimiter
-   else err = 1;                                                                 //  other delimiter
+   if (ddelim == string) err = 4;                                                      //  no valid digits
+   else if (*ddelim == '\0') err = 0;                                                  //  null delimiter
+   else if (*ddelim == ' ') err = 0;                                                   //  blank delimiter
+   else err = 1;                                                                       //  other delimiter
    return err;
 }
 
@@ -3510,26 +3481,26 @@ int convSI(ch *string, int &inum, int lo
 {
    int stat = convSI(string,inum,delim);
 
-   if (stat > 2) return stat;                                                    //  invalid or null/blank
-   if (inum < lolim) return 2;                                                   //  return 2 if out of limits
-   if (inum > hilim) return 2;                                                   //  (has precedence over status 1)
-   return stat;                                                                  //  limits OK, return 0 or 1
+   if (stat > 2) return stat;                                                          //  invalid or null/blank
+   if (inum < lolim) return 2;                                                         //  return 2 if out of limits
+   if (inum > hilim) return 2;                                                         //  (has precedence over status 1)
+   return stat;                                                                        //  limits OK, return 0 or 1
 }
 
 
 //  Convert string to double   ***  status 3 --> status 4  ***
 
-int convSD(ch *string, double &dnum, ch **delim)                                 //  use glib function
+int convSD(ch *string, double &dnum, ch **delim)                                       //  use glib function
 {
    ch       *ddelim = 0;
    int      err;
 
    dnum = strtod(string,&ddelim);
    if (delim) *delim = ddelim;
-   if (ddelim == string) err = 4;                                                //  no valid digits
-   else if (*ddelim == '\0') err = 0;                                            //  OK, null delimiter
-   else if (*ddelim == ' ') err = 0;                                             //  OK, blank delimiter
-   else err = 1;                                                                 //  OK, other delimiter
+   if (ddelim == string) err = 4;                                                      //  no valid digits
+   else if (*ddelim == '\0') err = 0;                                                  //  OK, null delimiter
+   else if (*ddelim == ' ') err = 0;                                                   //  OK, blank delimiter
+   else err = 1;                                                                       //  OK, other delimiter
    return err;
 }
 
@@ -3538,10 +3509,10 @@ int convSD(ch *string, double &dnum, dou
 {
    int stat = convSD(string,dnum,delim);
 
-   if (stat > 2) return stat;                                                    //  invalid or null/blank
-   if (dnum < lolim) return 2;                                                   //  return 2 if out of limits
-   if (dnum > hilim) return 2;                                                   //  (has precedence over status 1)
-   return stat;                                                                  //  limits OK, return 0 or 1
+   if (stat > 2) return stat;                                                          //  invalid or null/blank
+   if (dnum < lolim) return 2;                                                         //  return 2 if out of limits
+   if (dnum > hilim) return 2;                                                         //  (has precedence over status 1)
+   return stat;                                                                        //  limits OK, return 0 or 1
 }
 
 
@@ -3583,22 +3554,22 @@ int convIS(int inum, ch *string, int *cc
 //  Output length is returned in optional argument cc.
 //  (will never exceed 20 characters)
 
-int convDS(double dnum, int digits, ch *string, int *cc)                         //  bugfix: use memmove not strcpy
+int convDS(double dnum, int digits, ch *string, int *cc)                               //  bugfix: use memmove not strcpy
 {
    ch     *pstr;
 
    snprintf(string,20,"%.*g",digits,dnum);
 
-   pstr = strstr(string,"e+");                                                   //  1.23e+12  >  1.23e12
+   pstr = strstr(string,"e+");                                                         //  1.23e+12  >  1.23e12
    if (pstr) memmove(pstr+1,pstr+2,strlen(pstr+2)+1);
 
-   pstr = strstr(string,"e0");                                                   //  1.23e02  >  1.23e2
+   pstr = strstr(string,"e0");                                                         //  1.23e02  >  1.23e2
    if (pstr) memmove(pstr+1,pstr+2,strlen(pstr+2)+1);
 
    pstr = strstr(string,"e0");
    if (pstr) memmove(pstr+1,pstr+2,strlen(pstr+2)+1);
 
-   pstr = strstr(string,"e-0");                                                  //  1.23e-02  >  1.23e-2
+   pstr = strstr(string,"e-0");                                                        //  1.23e-02  >  1.23e-2
    if (pstr) memmove(pstr+2,pstr+3,strlen(pstr+3)+1);
 
    pstr = strstr(string,"e-0");
@@ -3642,7 +3613,7 @@ ch * formatKBMB(double fnum, int prec)
    static int    ftf = 1, ii;
    double        gnum;
 
-   if (ftf) {                                                                    //  keep last 100 conversions
+   if (ftf) {                                                                          //  keep last 100 conversions
       ftf = 0;
       for (ii = 0; ii < 100; ii++)
          output[ii] = (ch *) zmalloc(20,"formatKBMB");
@@ -3665,7 +3636,7 @@ ch * formatKBMB(double fnum, int prec)
    else units = "B ";
 
    gnum = fabs(fnum);
-   if (prec == 2 && gnum >= 99.5) prec++;                                        //  avoid e+nn formats
+   if (prec == 2 && gnum >= 99.5) prec++;                                              //  avoid e+nn formats
    if (prec == 3 && gnum >= 999.5) prec++;
    if (prec == 4 && gnum >= 9999.5) prec++;
    if (prec == 5 && gnum >= 99999.5) prec++;
@@ -3757,7 +3728,7 @@ test_match:
 
    for (ii = 0; pWild[ii] && (pWild[ii] != '*'); ii++)
    {
-      if (! strmatchcaseN(pWild+ii,pString+ii,1))                                //  the only difference
+      if (! strmatchcaseN(pWild+ii,pString+ii,1))                                      //  the only difference
       {
          if (! pString[ii]) return 1;
          if (pWild[ii] == '?') continue;
@@ -3846,21 +3817,21 @@ ch * SearchWild(ch *wpath, int &uflag)
    int            cc, err;
    ch             *pp, *pp1, *pp2;
 
-   if ((uflag == 1) || (uflag == 2)) {                                           //  first call or stop flag
-      if (fid) pclose(fid);                                                      //  if file open, close it
+   if ((uflag == 1) || (uflag == 2)) {                                                 //  first call or stop flag
+      if (fid) pclose(fid);                                                            //  if file open, close it
       fid = 0;
-      if (uflag == 2) return 0;                                                  //  stop flag, done
+      if (uflag == 2) return 0;                                                        //  stop flag, done
    }
 
-   if (uflag == 1)                                                               //  first call flag
+   if (uflag == 1)                                                                     //  first call flag
    {
       cc = strlen(wpath);
       if (cc == 0) return 0;
       if (cc > XFCC-20) zappcrash("SearchWild: wpath > XFCC");
 
-      repl_Nstrs(wpath,wpath2,XFCC,"\"","\\\"","$","\\$",0);                     //  escape " and $ chars. in match pattern
+      repl_Nstrs(wpath,wpath2,XFCC,"\"","\\\"","$","\\$",0);                           //  escape " and $ chars. in match pattern
 
-      pp1 = strchr(wpath2,'*');                                                  //  find last wildcard in match pattern
+      pp1 = strchr(wpath2,'*');                                                        //  find last wildcard in match pattern
       pp2 = strchr(wpath2,'?');
       pp = 0;
       if (pp1) {
@@ -3868,39 +3839,39 @@ ch * SearchWild(ch *wpath, int &uflag)
          if (pp2 && pp2 < pp1) pp = pp2;
       }
       else if (pp2) pp = pp2;
-      if (pp) *pp = 0;                                                           //  terminate at first wildcard
+      if (pp) *pp = 0;                                                                 //  terminate at first wildcard
 
-      pp = strrchr(wpath2,'/');                                                  //  find last '/' in match pattern
-      if (pp) pp[1] = 0;                                                         //  terminate after last '/'
+      pp = strrchr(wpath2,'/');                                                        //  find last '/' in match pattern
+      if (pp) pp[1] = 0;                                                               //  terminate after last '/'
 
       pp = zescape_quotes(wpath2);
-      snprintf(command,XFCC,fcomm,pp);                                           //  result is input to find command
+      snprintf(command,XFCC,fcomm,pp);                                                 //  result is input to find command
       zfree(pp);
 
-      fid = popen(command,"r");                                                  //  start find command, get matching files
+      fid = popen(command,"r");                                                        //  start find command, get matching files
       if (! fid) zappcrash(strerror(errno));
 
-      uflag = 763568954;                                                         //  begin search
+      uflag = 763568954;                                                               //  begin search
    }
 
    if (uflag != 763568954) zappcrash("SearchWild, uflag invalid");
 
    while (true)
    {
-      pp = fgets(buff,XFCC-2,fid);                                               //  next matching file
+      pp = fgets(buff,XFCC-2,fid);                                                     //  next matching file
       if (! pp) {
-         pclose(fid);                                                            //  no more
+         pclose(fid);                                                                  //  no more
          fid = 0;
          return 0;
       }
 
-      cc = strlen(pp);                                                           //  get rid of trailing \n
+      cc = strlen(pp);                                                                 //  get rid of trailing \n
       pp[cc-1] = 0;
 
-      err = MatchWild(wpath,pp);                                                 //  wildcard match?
-      if (err) continue;                                                         //  no
+      err = MatchWild(wpath,pp);                                                       //  wildcard match?
+      if (err) continue;                                                               //  no
 
-      return pp;                                                                 //  return file
+      return pp;                                                                       //  return file
    }
 }
 
@@ -3928,21 +3899,21 @@ ch * SearchWildCase(ch *wpath, int &ufla
    int            cc, err;
    ch             *pp, *pp1, *pp2;
 
-   if ((uflag == 1) || (uflag == 2)) {                                           //  first call or stop flag
-      if (fid) pclose(fid);                                                      //  if file open, close it
+   if ((uflag == 1) || (uflag == 2)) {                                                 //  first call or stop flag
+      if (fid) pclose(fid);                                                            //  if file open, close it
       fid = 0;
-      if (uflag == 2) return 0;                                                  //  stop flag, done
+      if (uflag == 2) return 0;                                                        //  stop flag, done
    }
 
-   if (uflag == 1)                                                               //  first call flag
+   if (uflag == 1)                                                                     //  first call flag
    {
       cc = strlen(wpath);
       if (cc == 0) return 0;
       if (cc > XFCC-20) zappcrash("SearchWild: wpath > XFCC");
 
-      repl_Nstrs(wpath,wpath2,XFCC,"\"","\\\"","$","\\$",0);                     //  escape " and $ chars. in match pattern
+      repl_Nstrs(wpath,wpath2,XFCC,"\"","\\\"","$","\\$",0);                           //  escape " and $ chars. in match pattern
 
-      pp1 = strchr(wpath2,'*');                                                  //  find last wildcard in match pattern
+      pp1 = strchr(wpath2,'*');                                                        //  find last wildcard in match pattern
       pp2 = strchr(wpath2,'?');
       pp = 0;
       if (pp1) {
@@ -3950,39 +3921,39 @@ ch * SearchWildCase(ch *wpath, int &ufla
          if (pp2 && pp2 < pp1) pp = pp2;
       }
       else if (pp2) pp = pp2;
-      if (pp) *pp = 0;                                                           //  terminate at first wildcard
+      if (pp) *pp = 0;                                                                 //  terminate at first wildcard
 
-      pp = strrchr(wpath2,'/');                                                  //  find last '/' in match pattern
-      if (pp) pp[1] = 0;                                                         //  terminate after last '/'
+      pp = strrchr(wpath2,'/');                                                        //  find last '/' in match pattern
+      if (pp) pp[1] = 0;                                                               //  terminate after last '/'
 
       pp = zescape_quotes(wpath2);
-      snprintf(command,XFCC,fcomm,pp);                                           //  result is input to find command
+      snprintf(command,XFCC,fcomm,pp);                                                 //  result is input to find command
       zfree(pp);
 
-      fid = popen(command,"r");                                                  //  start find command, get matching files
+      fid = popen(command,"r");                                                        //  start find command, get matching files
       if (! fid) zappcrash(strerror(errno));
 
-      uflag = 763568954;                                                         //  begin search
+      uflag = 763568954;                                                               //  begin search
    }
 
    if (uflag != 763568954) zappcrash("SearchWild, uflag invalid");
 
    while (true)
    {
-      pp = fgets(buff,XFCC-2,fid);                                               //  next matching file
+      pp = fgets(buff,XFCC-2,fid);                                                     //  next matching file
       if (! pp) {
-         pclose(fid);                                                            //  no more
+         pclose(fid);                                                                  //  no more
          fid = 0;
          return 0;
       }
 
-      cc = strlen(pp);                                                           //  get rid of trailing \n
+      cc = strlen(pp);                                                                 //  get rid of trailing \n
       pp[cc-1] = 0;
 
-      err = MatchWildCase(wpath,pp);                                             //  wildcard match? (ignore case)
-      if (err) continue;                                                         //  no
+      err = MatchWildCase(wpath,pp);                                                   //  wildcard match? (ignore case)
+      if (err) continue;                                                               //  no
 
-      return pp;                                                                 //  return file
+      return pp;                                                                       //  return file
    }
 }
 
@@ -4007,28 +3978,28 @@ ch * SearchWildCase(ch *wpath, int &ufla
 
 int zfind(ch *pattern, ch **&flist, int &NF)
 {
-   ch       **zfind_filelist = 0;                                                //  list of filespecs returned
-   int      globflags = GLOB_PERIOD;                                             //  include dotfiles
+   ch       **zfind_filelist = 0;                                                      //  list of filespecs returned
+   int      globflags = GLOB_PERIOD;                                                   //  include dotfiles
    int      ii, jj, err, cc;
    glob_t   globdata;
    ch       *pp;
 
-   globdata.gl_pathc = 0;                                                        //  glob() setup
+   globdata.gl_pathc = 0;                                                              //  glob() setup
    globdata.gl_offs = 0;
    globdata.gl_pathc = 0;
 
-   NF = 0;                                                                       //  empty output
+   NF = 0;                                                                             //  empty output
    flist = 0;
 
-   err = glob(pattern,globflags,null,&globdata);                                 //  find all matching files
+   err = glob(pattern,globflags,null,&globdata);                                       //  find all matching files
 
    if (err) {
       if (err == GLOB_NOMATCH) err = 0;
       else if (err == GLOB_ABORTED) err = 1;
       else if (err == GLOB_NOSPACE) err = 2;
       else err = 3;
-      if (err) Plog(0,"zfind() error: %d \n",err);
-      globfree(&globdata);                                                       //  free glob memory
+      if (err) printf("*** zfind() error: %d \n",err);
+      globfree(&globdata);                                                             //  free glob memory
       return err;
    }
 
@@ -4041,18 +4012,18 @@ int zfind(ch *pattern, ch **&flist, int
    cc = NF * sizeof(ch *);
    zfind_filelist = (ch **) zmalloc(cc,"zfind");
 
-   for (ii = jj = 0; ii < NF; ii++) {                                            //  loop found files
+   for (ii = jj = 0; ii < NF; ii++) {                                                  //  loop found files
       pp = strrchr(globdata.gl_pathv[ii],'/');
       if (! pp) continue;
-      if (strmatch(pp,"/.")) continue;                                           //  skip dotfiles
+      if (strmatch(pp,"/.")) continue;                                                 //  skip dotfiles
       if (strmatch(pp,"/..")) continue;
-      zfind_filelist[jj++] = zstrdup(globdata.gl_pathv[ii],"zfind");             //  add file to output list
+      zfind_filelist[jj++] = zstrdup(globdata.gl_pathv[ii],"zfind");                   //  add file to output list
    }
 
-   flist = zfind_filelist;                                                       //  return file list and count
+   flist = zfind_filelist;                                                             //  return file list and count
    NF = jj;
 
-   globfree(&globdata);                                                          //  free glob memory
+   globfree(&globdata);                                                                //  free glob memory
    return 0;
 }
 
@@ -4068,38 +4039,38 @@ int bsearch(int seekint, int nn, int lis
 {
    int      ii, jj, kk, rkk;
 
-   ii = nn / 2;                                                                  //  next element to search
-   jj = (ii + 1) / 2;                                                            //  next increment
-   nn--;                                                                         //  last element
+   ii = nn / 2;                                                                        //  next element to search
+   jj = (ii + 1) / 2;                                                                  //  next increment
+   nn--;                                                                               //  last element
    rkk = 0;
 
    while (true)
    {
-      kk = list[ii] - seekint;                                                   //  check element
+      kk = list[ii] - seekint;                                                         //  check element
 
       if (kk > 0)
       {
-         ii -= jj;                                                               //  too high, go down
+         ii -= jj;                                                                     //  too high, go down
          if (ii < 0) return -1;
       }
 
       else if (kk < 0)
       {
-         ii += jj;                                                               //  too low, go up
+         ii += jj;                                                                     //  too low, go up
          if (ii > nn) return -1;
       }
 
-      else if (kk == 0) return ii;                                               //  matched
+      else if (kk == 0) return ii;                                                     //  matched
 
-      jj = jj / 2;                                                               //  reduce increment
+      jj = jj / 2;                                                                     //  reduce increment
 
       if (jj == 0)
       {
-         jj = 1;                                                                 //  step by 1 element
-         if (! rkk) rkk = kk;                                                    //  save direction
+         jj = 1;                                                                       //  step by 1 element
+         if (! rkk) rkk = kk;                                                          //  save direction
          else
          {
-            if (rkk > 0) { if (kk < 0) return -1; }                              //  if change direction, fail
+            if (rkk > 0) { if (kk < 0) return -1; }                                    //  if change direction, fail
             else if (kk > 0) return -1;
          }
       }
@@ -4116,38 +4087,38 @@ int bsearch(ch *seekrec, ch *allrecs, in
 {
    int      ii, jj, kk, rkk;
 
-   ii = nrecs / 2;                                                               //  next element to search
-   jj = (ii + 1) / 2;                                                            //  next increment
-   nrecs--;                                                                      //  last element
+   ii = nrecs / 2;                                                                     //  next element to search
+   jj = (ii + 1) / 2;                                                                  //  next increment
+   nrecs--;                                                                            //  last element
    rkk = 0;
 
    while (true)
    {
-      kk = strcmp(allrecs+ii*recl,seekrec);                                      //  compare member rec to seek rec
+      kk = strcmp(allrecs+ii*recl,seekrec);                                            //  compare member rec to seek rec
 
       if (kk > 0)
       {
-         ii -= jj;                                                               //  too high, go down in set
+         ii -= jj;                                                                     //  too high, go down in set
          if (ii < 0) return -1;
       }
 
       else if (kk < 0)
       {
-         ii += jj;                                                               //  too low, go up in set
+         ii += jj;                                                                     //  too low, go up in set
          if (ii > nrecs) return -1;
       }
 
-      else if (kk == 0) return ii;                                               //  matched
+      else if (kk == 0) return ii;                                                     //  matched
 
-      jj = jj / 2;                                                               //  reduce increment
+      jj = jj / 2;                                                                     //  reduce increment
 
       if (jj == 0)
       {
-         jj = 1;                                                                 //  step by 1 element
-         if (! rkk) rkk = kk;                                                    //  save direction
+         jj = 1;                                                                       //  step by 1 element
+         if (! rkk) rkk = kk;                                                          //  save direction
          else
          {
-            if (rkk > 0) { if (kk < 0) return -1; }                              //  if change direction, fail
+            if (rkk > 0) { if (kk < 0) return -1; }                                    //  if change direction, fail
             else if (kk > 0) return -1;
          }
       }
@@ -4165,38 +4136,38 @@ int bsearch(ch *seekrec, ch **allrecs, i
 {
    int      ii, jj, kk, rkk;
 
-   ii = nrecs / 2;                                                               //  next element to search
-   jj = (ii + 1) / 2;                                                            //  next increment
-   nrecs--;                                                                      //  last element
+   ii = nrecs / 2;                                                                     //  next element to search
+   jj = (ii + 1) / 2;                                                                  //  next increment
+   nrecs--;                                                                            //  last element
    rkk = 0;
 
    while (true)
    {
-      kk = strcmp(allrecs[ii]+N,seekrec);                                        //  compare member rec to seek rec
+      kk = strcmp(allrecs[ii]+N,seekrec);                                              //  compare member rec to seek rec
 
       if (kk > 0)
       {
-         ii -= jj;                                                               //  too high, go down in set
+         ii -= jj;                                                                     //  too high, go down in set
          if (ii < 0) return -1;
       }
 
       else if (kk < 0)
       {
-         ii += jj;                                                               //  too low, go up in set
+         ii += jj;                                                                     //  too low, go up in set
          if (ii > nrecs) return -1;
       }
 
-      else if (kk == 0) return ii;                                               //  matched
+      else if (kk == 0) return ii;                                                     //  matched
 
-      jj = jj / 2;                                                               //  reduce increment
+      jj = jj / 2;                                                                     //  reduce increment
 
       if (jj == 0)
       {
-         jj = 1;                                                                 //  step by 1 element
-         if (! rkk) rkk = kk;                                                    //  save direction
+         jj = 1;                                                                       //  step by 1 element
+         if (! rkk) rkk = kk;                                                          //  save direction
          else
          {
-            if (rkk > 0) { if (kk < 0) return -1; }                              //  if change direction, fail
+            if (rkk > 0) { if (kk < 0) return -1; }                                    //  if change direction, fail
             else if (kk > 0) return -1;
          }
       }
@@ -4268,7 +4239,7 @@ void adjust(int vv[], int n1, int n2)
    }
 }
 
-void heapsort(int vv[], int nn)                                                  //  single thread version
+void heapsort(int vv[], int nn)                                                        //  single thread version
 {
    int   *bb, jj, temp;
 
@@ -4291,7 +4262,7 @@ namespace HeapSort_int
    int         tt1 = 1, tt2 = 2, tt3 = 3, tt4 = 4;
 }
 
-void HeapSort(int vv[], int nn)                                                  //  4-thread version
+void HeapSort(int vv[], int nn)                                                        //  4-thread version
 {
    using namespace HeapSort_int;
 
@@ -4299,30 +4270,30 @@ void HeapSort(int vv[], int nn)
 
    int   *vv9, *next;
 
-   if (nn < 1000 || get_nprocs() < 2) {                                          //  small list or <2 SMPs
-      heapsort(vv,nn);                                                           //  use one thread
+   if (nn < 1000 || get_nprocs() < 2) {                                                //  small list or <2 SMPs
+      heapsort(vv,nn);                                                                 //  use one thread
       return;
    }
 
-   nn1 = nn2 = nn3 = nn / 4;                                                     //  1st/2nd/3rd sub-list counts
-   nn4 = nn - nn1 - nn2 - nn3;                                                   //  4th sub-list count
+   nn1 = nn2 = nn3 = nn / 4;                                                           //  1st/2nd/3rd sub-list counts
+   nn4 = nn - nn1 - nn2 - nn3;                                                         //  4th sub-list count
 
-   vv1 = vv;                                                                     //  4 sub-list start positions
+   vv1 = vv;                                                                           //  4 sub-list start positions
    vv2 = vv1 + nn1;
    vv3 = vv2 + nn2;
    vv4 = vv3 + nn3;
 
-   tid1 = start_Jthread(HeapSort_int_thread,&tt1);                               //  sort the 4 sub-lists, parallel
+   tid1 = start_Jthread(HeapSort_int_thread,&tt1);                                     //  sort the 4 sub-lists, parallel
    tid2 = start_Jthread(HeapSort_int_thread,&tt2);
    tid3 = start_Jthread(HeapSort_int_thread,&tt3);
    tid4 = start_Jthread(HeapSort_int_thread,&tt4);
 
-   wait_Jthread(tid1);                                                           //  wait for 4 thread completions
+   wait_Jthread(tid1);                                                                 //  wait for 4 thread completions
    wait_Jthread(tid2);
    wait_Jthread(tid3);
    wait_Jthread(tid4);
 
-   vv9 = (int *) malloc(nn * sizeof(int));                                       //  merge list, output list
+   vv9 = (int *) malloc(nn * sizeof(int));                                             //  merge list, output list
 
    while (true)
    {
@@ -4366,13 +4337,13 @@ void HeapSort(int vv[], int nn)
    }
 
    vv9 -= nn;
-   memcpy(vv,vv9,nn * sizeof(int));                                              //  copy output list to input list
-   free(vv9);                                                                    //  free output list
+   memcpy(vv,vv9,nn * sizeof(int));                                                    //  copy output list to input list
+   free(vv9);                                                                          //  free output list
 
    return;
 }
 
-void * HeapSort_int_thread(void *arg)                                            //  thread function
+void * HeapSort_int_thread(void *arg)                                                  //  thread function
 {
    using namespace HeapSort_int;
 
@@ -4408,7 +4379,7 @@ void adjust(float vv[], int n1, int n2)
    }
 }
 
-void heapsort(float vv[], int nn)                                                //  single thread version
+void heapsort(float vv[], int nn)                                                      //  single thread version
 {
    float    *bb, temp;
    int      jj;
@@ -4432,7 +4403,7 @@ namespace HeapSort_float
    int         tt1 = 1, tt2 = 2, tt3 = 3, tt4 = 4;
 }
 
-void HeapSort(float vv[], int nn)                                                //  4-thread version
+void HeapSort(float vv[], int nn)                                                      //  4-thread version
 {
    using namespace HeapSort_float;
 
@@ -4440,30 +4411,30 @@ void HeapSort(float vv[], int nn)
 
    float    *vv9, *next;
 
-   if (nn < 1000 || get_nprocs() < 2) {                                          //  small list or <2 SMPs
-      heapsort(vv,nn);                                                           //  use one thread
+   if (nn < 1000 || get_nprocs() < 2) {                                                //  small list or <2 SMPs
+      heapsort(vv,nn);                                                                 //  use one thread
       return;
    }
 
-   nn1 = nn2 = nn3 = nn / 4;                                                     //  1st/2nd/3rd sub-list counts
-   nn4 = nn - nn1 - nn2 - nn3;                                                   //  4th sub-list count
+   nn1 = nn2 = nn3 = nn / 4;                                                           //  1st/2nd/3rd sub-list counts
+   nn4 = nn - nn1 - nn2 - nn3;                                                         //  4th sub-list count
 
-   vv1 = vv;                                                                     //  4 sub-list start positions
+   vv1 = vv;                                                                           //  4 sub-list start positions
    vv2 = vv1 + nn1;
    vv3 = vv2 + nn2;
    vv4 = vv3 + nn3;
 
-   tid1 = start_Jthread(HeapSort_float_thread,&tt1);                             //  sort the 4 sub-lists, parallel
+   tid1 = start_Jthread(HeapSort_float_thread,&tt1);                                   //  sort the 4 sub-lists, parallel
    tid2 = start_Jthread(HeapSort_float_thread,&tt2);
    tid3 = start_Jthread(HeapSort_float_thread,&tt3);
    tid4 = start_Jthread(HeapSort_float_thread,&tt4);
 
-   wait_Jthread(tid1);                                                           //  wait for 4 thread completions
+   wait_Jthread(tid1);                                                                 //  wait for 4 thread completions
    wait_Jthread(tid2);
    wait_Jthread(tid3);
    wait_Jthread(tid4);
 
-   vv9 = (float *) malloc(nn * sizeof(float));                                   //  merge list, output list
+   vv9 = (float *) malloc(nn * sizeof(float));                                         //  merge list, output list
 
    while (true)
    {
@@ -4507,13 +4478,13 @@ void HeapSort(float vv[], int nn)
    }
 
    vv9 -= nn;
-   memcpy(vv,vv9,nn * sizeof(float));                                            //  copy output list to input list
-   free(vv9);                                                                    //  free output list
+   memcpy(vv,vv9,nn * sizeof(float));                                                  //  copy output list to input list
+   free(vv9);                                                                          //  free output list
 
    return;
 }
 
-void * HeapSort_float_thread(void *arg)                                          //  thread function
+void * HeapSort_float_thread(void *arg)                                                //  thread function
 {
    using namespace HeapSort_float;
 
@@ -4549,7 +4520,7 @@ void adjust(double vv[], int n1, int n2)
    }
 }
 
-void heapsort(double vv[], int nn)                                               //  single thread version
+void heapsort(double vv[], int nn)                                                     //  single thread version
 {
    double   *bb, temp;
    int      jj;
@@ -4573,7 +4544,7 @@ namespace HeapSort_double
    int         tt1 = 1, tt2 = 2, tt3 = 3, tt4 = 4;
 }
 
-void HeapSort(double vv[], int nn)                                               //  4-thread version
+void HeapSort(double vv[], int nn)                                                     //  4-thread version
 {
    using namespace HeapSort_double;
 
@@ -4581,30 +4552,30 @@ void HeapSort(double vv[], int nn)
 
    double   *vv9, *next;
 
-   if (nn < 1000 || get_nprocs() < 2) {                                          //  small list or <2 SMPs
-      heapsort(vv,nn);                                                           //  use one thread
+   if (nn < 1000 || get_nprocs() < 2) {                                                //  small list or <2 SMPs
+      heapsort(vv,nn);                                                                 //  use one thread
       return;
    }
 
-   nn1 = nn2 = nn3 = nn / 4;                                                     //  1st/2nd/3rd sub-list counts
-   nn4 = nn - nn1 - nn2 - nn3;                                                   //  4th sub-list count
+   nn1 = nn2 = nn3 = nn / 4;                                                           //  1st/2nd/3rd sub-list counts
+   nn4 = nn - nn1 - nn2 - nn3;                                                         //  4th sub-list count
 
-   vv1 = vv;                                                                     //  4 sub-list start positions
+   vv1 = vv;                                                                           //  4 sub-list start positions
    vv2 = vv1 + nn1;
    vv3 = vv2 + nn2;
    vv4 = vv3 + nn3;
 
-   tid1 = start_Jthread(HeapSort_double_thread,&tt1);                            //  sort the 4 sub-lists, parallel
+   tid1 = start_Jthread(HeapSort_double_thread,&tt1);                                  //  sort the 4 sub-lists, parallel
    tid2 = start_Jthread(HeapSort_double_thread,&tt2);
    tid3 = start_Jthread(HeapSort_double_thread,&tt3);
    tid4 = start_Jthread(HeapSort_double_thread,&tt4);
 
-   wait_Jthread(tid1);                                                           //  wait for 4 thread completions
+   wait_Jthread(tid1);                                                                 //  wait for 4 thread completions
    wait_Jthread(tid2);
    wait_Jthread(tid3);
    wait_Jthread(tid4);
 
-   vv9 = (double *) malloc(nn * sizeof(double));                                 //  merge list, output list
+   vv9 = (double *) malloc(nn * sizeof(double));                                       //  merge list, output list
 
    while (true)
    {
@@ -4648,13 +4619,13 @@ void HeapSort(double vv[], int nn)
    }
 
    vv9 -= nn;
-   memcpy(vv,vv9,nn * sizeof(double));                                           //  copy output list to input list
-   free(vv9);                                                                    //  free output list
+   memcpy(vv,vv9,nn * sizeof(double));                                                 //  copy output list to input list
+   free(vv9);                                                                          //  free output list
 
    return;
 }
 
-void * HeapSort_double_thread(void *arg)                                         //  thread function
+void * HeapSort_double_thread(void *arg)                                               //  thread function
 {
    using namespace HeapSort_double;
 
@@ -4751,7 +4722,7 @@ void adjust(ch *vv[], int n1, int n2, He
    }
 }
 
-void heapsort(ch *vv[], int nn, HeapSortUcomp fcomp)                             //  single thread version
+void heapsort(ch *vv[], int nn, HeapSortUcomp fcomp)                                   //  single thread version
 {
    ch       **bb, *temp;
    int      jj;
@@ -4776,7 +4747,7 @@ namespace HeapSort_string
    HeapSortUcomp  *ttfcomp;
 }
 
-void HeapSort(ch *vv[], int nn, HeapSortUcomp fcomp)                             //  4-thread version
+void HeapSort(ch *vv[], int nn, HeapSortUcomp fcomp)                                   //  4-thread version
 {
    using namespace HeapSort_string;
 
@@ -4784,32 +4755,32 @@ void HeapSort(ch *vv[], int nn, HeapSort
 
    ch     **vv9, **next;
 
-   if (nn < 1000 || get_nprocs() < 2) {                                          //  small list or <2 SMPs
-      heapsort(vv,nn,fcomp);                                                     //  use one thread
+   if (nn < 1000 || get_nprocs() < 2) {                                                //  small list or <2 SMPs
+      heapsort(vv,nn,fcomp);                                                           //  use one thread
       return;
    }
 
-   nn1 = nn2 = nn3 = nn / 4;                                                     //  1st/2nd/3rd sub-list counts
-   nn4 = nn - nn1 - nn2 - nn3;                                                   //  4th sub-list count
+   nn1 = nn2 = nn3 = nn / 4;                                                           //  1st/2nd/3rd sub-list counts
+   nn4 = nn - nn1 - nn2 - nn3;                                                         //  4th sub-list count
 
-   vv1 = vv;                                                                     //  4 sub-list start positions
+   vv1 = vv;                                                                           //  4 sub-list start positions
    vv2 = vv1 + nn1;
    vv3 = vv2 + nn2;
    vv4 = vv3 + nn3;
 
    ttfcomp = fcomp;
 
-   tid1 = start_Jthread(HeapSort_string_thread,&tt1);                            //  sort the 4 sub-lists, parallel
+   tid1 = start_Jthread(HeapSort_string_thread,&tt1);                                  //  sort the 4 sub-lists, parallel
    tid2 = start_Jthread(HeapSort_string_thread,&tt2);
    tid3 = start_Jthread(HeapSort_string_thread,&tt3);
    tid4 = start_Jthread(HeapSort_string_thread,&tt4);
 
-   wait_Jthread(tid1);                                                           //  wait for 4 thread completions
+   wait_Jthread(tid1);                                                                 //  wait for 4 thread completions
    wait_Jthread(tid2);
    wait_Jthread(tid3);
    wait_Jthread(tid4);
 
-   vv9 = (ch **) malloc(nn * sizeof(ch *));                                      //  merge list, output list
+   vv9 = (ch **) malloc(nn * sizeof(ch *));                                            //  merge list, output list
 
    while (true)
    {
@@ -4853,13 +4824,13 @@ void HeapSort(ch *vv[], int nn, HeapSort
    }
 
    vv9 -= nn;
-   memcpy(vv,vv9,nn * sizeof(ch *));                                             //  copy output list to input list
-   free(vv9);                                                                    //  free output list
+   memcpy(vv,vv9,nn * sizeof(ch *));                                                   //  copy output list to input list
+   free(vv9);                                                                          //  free output list
 
    return;
 }
 
-void * HeapSort_string_thread(void *arg)                                         //  thread function
+void * HeapSort_string_thread(void *arg)                                               //  thread function
 {
    using namespace HeapSort_string;
 
@@ -4906,7 +4877,7 @@ void adjust(ch *recs, int RL, int n1, in
 void HeapSort(ch *recs, int RL, int NR, HeapSortUcomp fcomp)
 {
    int      *bb, jj, kk, temp, flag;
-   int      *vv1, *vv2;                                                          //  make reentrant
+   int      *vv1, *vv2;                                                                //  make reentrant
    ch       *vvrec;
 
    vv1 = (int *) malloc((NR+1) * sizeof(int));
@@ -5005,75 +4976,75 @@ int MemSortComp(ch *rec1, ch *rec2)
    double      dnum1, dnum2;
    ch          *p1, *p2;
 
-   for (ii = 0; ii < MemSortNK; ii++)                                            //  loop each key
+   for (ii = 0; ii < MemSortNK; ii++)                                                  //  loop each key
    {
-      kpos = MemSortKeys[ii][0];                                                 //  relative position
-      kleng = MemSortKeys[ii][1];                                                //  length
-      ktype = MemSortKeys[ii][2];                                                //  type
+      kpos = MemSortKeys[ii][0];                                                       //  relative position
+      kleng = MemSortKeys[ii][1];                                                      //  length
+      ktype = MemSortKeys[ii][2];                                                      //  type
 
-      p1 = rec1 + kpos;                                                          //  absolute position
+      p1 = rec1 + kpos;                                                                //  absolute position
       p2 = rec2 + kpos;
 
       switch (ktype)
       {
-         case 1:                                                                 //  ch ascending
-            stat = strncmp(p1,p2,kleng);                                         //  compare 2 key values
-            if (stat) return stat;                                               //  + if rec1 > rec2, - if <
-            break;                                                               //  2 keys are equal, check next key
+         case 1:                                                                       //  ch ascending
+            stat = strncmp(p1,p2,kleng);                                               //  compare 2 key values
+            if (stat) return stat;                                                     //  + if rec1 > rec2, - if <
+            break;                                                                     //  2 keys are equal, check next key
 
-         case 2:                                                                 //  ch descending
+         case 2:                                                                       //  ch descending
             stat = strncmp(p1,p2,kleng);
             if (stat) return -stat;
             break;
 
-         case 3:                                                                 //  int ascending
+         case 3:                                                                       //  int ascending
             memmove(&inum1,p1,4);
             memmove(&inum2,p2,4);
             if (inum1 > inum2) return 1;
             if (inum1 < inum2) return -1;
             break;
 
-         case 4:                                                                 //  int descending
+         case 4:                                                                       //  int descending
             memmove(&inum1,p1,4);
             memmove(&inum2,p2,4);
             if (inum1 > inum2) return -1;
             if (inum1 < inum2) return 1;
             break;
 
-         case 5:                                                                 //  float ascending
+         case 5:                                                                       //  float ascending
             memmove(&rnum1,p1,4);
             memmove(&rnum2,p2,4);
             if (rnum1 > rnum2) return 1;
             if (rnum1 < rnum2) return -1;
             break;
 
-         case 6:                                                                 //  float descending
+         case 6:                                                                       //  float descending
             memmove(&rnum1,p1,4);
             memmove(&rnum2,p2,4);
             if (rnum1 > rnum2) return -1;
             if (rnum1 < rnum2) return 1;
             break;
 
-         case 7:                                                                 //  double ascending
+         case 7:                                                                       //  double ascending
             memmove(&dnum1,p1,8);
             memmove(&dnum2,p2,8);
             if (dnum1 > dnum2) return 1;
             if (dnum1 < dnum2) return -1;
             break;
 
-         case 8:                                                                 //  double descending
+         case 8:                                                                       //  double descending
             memmove(&dnum1,p1,8);
             memmove(&dnum2,p2,8);
             if (dnum1 > dnum2) return -1;
             if (dnum1 < dnum2) return 1;
             break;
 
-         default:                                                                //  key type not 1-8
+         default:                                                                      //  key type not 1-8
             zappcrash("MemSort, bad KEYS sort type");
       }
    }
 
-   return 0;                                                                     //  records match on all keys
+   return 0;                                                                           //  records match on all keys
 }
 
 
@@ -5096,7 +5067,7 @@ int zmember(int testval, int matchval1,
    {
       if (testval == matchval) break;
       matchval = va_arg(arglist,int);
-      if (! matchval || matchval == (int) 0x100000000);                          //  ARM bug
+      if (! matchval || matchval == (int) 0x100000000);                                //  ARM bug
    }
 
    va_end(arglist);
@@ -5127,13 +5098,13 @@ int zmember(int testval, int matchval1,
 
 //  static members (robust for tables up to 60% full)
 
-int HashTab::tries1 = 100;                                                       //  Add() tries
-int HashTab::tries2 = 200;                                                       //  Find() tries
+int HashTab::tries1 = 100;                                                             //  Add() tries
+int HashTab::tries2 = 200;                                                             //  Find() tries
 
 
-HashTab::HashTab(int _cc, int _cap)                                              //  constructor
+HashTab::HashTab(int _cc, int _cap)                                                    //  constructor
 {
-   cc = 4 * (_cc + 4) / 4;                                                       //  + 1 + mod 4 length
+   cc = 4 * (_cc + 4) / 4;                                                             //  + 1 + mod 4 length
    cap = _cap;
    int len = cc * cap;
    table = new ch [len];
@@ -5142,7 +5113,7 @@ HashTab::HashTab(int _cc, int _cap)
 }
 
 
-HashTab::~HashTab()                                                              //  destructor
+HashTab::~HashTab()                                                                    //  destructor
 {
    delete [] table;
    table = 0;
@@ -5155,31 +5126,31 @@ int HashTab::Add(ch *string)
 {
    int   pos, fpos, tries;
 
-   pos = strHash(string,cap);                                                    //  get random position
+   pos = strHash(string,cap);                                                          //  get random position
    pos = pos * cc;
 
-   for (tries = 0, fpos = -1; tries < tries1; tries++, pos += cc)                //  find next free slot at/after position
+   for (tries = 0, fpos = -1; tries < tries1; tries++, pos += cc)                      //  find next free slot at/after position
    {
-      if (pos >= cap * cc) pos = 0;                                              //  last position wraps to 1st
+      if (pos >= cap * cc) pos = 0;                                                    //  last position wraps to 1st
 
-      if (! table[pos])                                                          //  empty slot: string not found
+      if (! table[pos])                                                                //  empty slot: string not found
       {
-         if (fpos != -1) pos = fpos;                                             //  use prior deleted slot if there
-         strncpy(table+pos,string,cc);                                           //  insert new string
-         table[pos+cc-1] = 0;                                                    //  insure null terminator
-         return (pos/cc);                                                        //  return rel. table entry
+         if (fpos != -1) pos = fpos;                                                   //  use prior deleted slot if there
+         strncpy(table+pos,string,cc);                                                 //  insert new string
+         table[pos+cc-1] = 0;                                                          //  insure null terminator
+         return (pos/cc);                                                              //  return rel. table entry
       }
 
-      if (table[pos] == -1)                                                      //  deleted slot
+      if (table[pos] == -1)                                                            //  deleted slot
       {
-         if (fpos == -1) fpos = pos;                                             //  remember 1st one found
+         if (fpos == -1) fpos = pos;                                                   //  remember 1st one found
          continue;
       }
 
-      if (strmatch(string,table+pos)) return -2;                                 //  string already present
+      if (strmatch(string,table+pos)) return -2;                                       //  string already present
    }
 
-   return -3;                                                                    //  table full (tries1 exceeded)
+   return -3;                                                                          //  table full (tries1 exceeded)
 }
 
 
@@ -5189,24 +5160,24 @@ int HashTab::Del(ch *string)
 {
    int   pos, tries;
 
-   pos = strHash(string,cap);                                                    //  get random position
+   pos = strHash(string,cap);                                                          //  get random position
    pos = pos * cc;
 
-   for (tries = 0; tries < tries2; tries++, pos += cc)                           //  search for string at/after position
+   for (tries = 0; tries < tries2; tries++, pos += cc)                                 //  search for string at/after position
    {
-      if (pos >= cap * cc) pos = 0;                                              //  last position wraps to 1st
+      if (pos >= cap * cc) pos = 0;                                                    //  last position wraps to 1st
 
-      if (! table[pos]) return -1;                                               //  empty slot, string not found
+      if (! table[pos]) return -1;                                                     //  empty slot, string not found
 
-      if (strmatch(string,table+pos))                                            //  string found
+      if (strmatch(string,table+pos))                                                  //  string found
       {
-         table[pos] = -1;                                                        //  delete table entry
-         return (pos/cc);                                                        //  return rel. table entry
+         table[pos] = -1;                                                              //  delete table entry
+         return (pos/cc);                                                              //  return rel. table entry
       }
    }
 
-   zappcrash("HashTab::Del() fail",null);                                        //  exceed tries2, must not happen
-   return 0;                                                                     //  (table too full to function)
+   zappcrash("HashTab::Del() fail",null);                                              //  exceed tries2, must not happen
+   return 0;                                                                           //  (table too full to function)
 }
 
 
@@ -5216,17 +5187,17 @@ int HashTab::Find(ch *string)
 {
    int   pos, tries;
 
-   pos = strHash(string,cap);                                                    //  get random position
+   pos = strHash(string,cap);                                                          //  get random position
    pos = pos * cc;
 
-   for (tries = 0; tries < tries2; tries++, pos += cc)                           //  search for string at/after position
+   for (tries = 0; tries < tries2; tries++, pos += cc)                                 //  search for string at/after position
    {
-      if (pos >= cap * cc) pos = 0;                                              //  last position wraps to 1st
-      if (! table[pos]) return -1;                                               //  empty slot, string not found
-      if (strmatch(string,table+pos)) return (pos/cc);                           //  string found, return rel. entry
+      if (pos >= cap * cc) pos = 0;                                                    //  last position wraps to 1st
+      if (! table[pos]) return -1;                                                     //  empty slot, string not found
+      if (strmatch(string,table+pos)) return (pos/cc);                                 //  string found, return rel. entry
    }
 
-   zappcrash("HashTab::Find() fail",null);                                       //  cannot happen
+   zappcrash("HashTab::Find() fail",null);                                             //  cannot happen
    return 0;
 }
 
@@ -5237,7 +5208,7 @@ int HashTab::GetNext(int &ftf, ch *strin
 {
    static int    pos;
 
-   if (ftf)                                                                      //  initial call
+   if (ftf)                                                                            //  initial call
    {
       pos = 0;
       ftf = 0;
@@ -5245,18 +5216,18 @@ int HashTab::GetNext(int &ftf, ch *strin
 
    while (pos < (cap * cc))
    {
-      if ((table[pos] == 0) || (table[pos] == -1))                               //  empty or deleted slot
+      if ((table[pos] == 0) || (table[pos] == -1))                                     //  empty or deleted slot
       {
          pos += cc;
          continue;
       }
 
-      strcpy(string,table+pos);                                                  //  return string
+      strcpy(string,table+pos);                                                        //  return string
       pos += cc;
       return 1;
    }
 
-   return -4;                                                                    //  EOF
+   return -4;                                                                          //  EOF
 }
 
 
@@ -5269,10 +5240,10 @@ int HashTab::Dump()
       pos = ii * cc;
 
       if (table[pos] && table[pos] != -1)
-         Plog(0,"%d, %s \n", ii, table + pos);
+         printf("%d, %s \n", ii, table + pos);
 
       if (table[pos] == -1)
-         Plog(0,"%d, deleted \n", pos);
+         printf("%d, deleted \n", pos);
    }
 
    return 1;
@@ -5314,6 +5285,8 @@ int HashTab::Dump()
    zlist = zlist_from_file(filename)               make zlist from file
    zlist = zlist_from_folder(foldername)           make zlist from file names in folder
 
+   benchmark: zlist_find(): search speed 0.0016 usec per member for 20 ch. strings
+
 *********************************************************************************/
 
 
@@ -5349,10 +5322,10 @@ void zlist_free(zlist_t *zlist)
 
 void zlist_dump(zlist_t *zlist)
 {
-   Plog(0,"count: %d \n",zlist->count);
+   printf("count: %d \n",zlist->count);
    for (int ii = 0; ii < zlist->count; ii++)
-      Plog(0,"%5d  %s \n",ii,zlist->mber[ii]);
-   Plog(0,"\n");
+      printf("%5d  %s \n",ii,zlist->mber[ii]);
+   printf("\n");
    return;
 }
 
@@ -5404,7 +5377,7 @@ void zlist_insert(zlist_t *zlist, ch *st
    else newcount = Nth + 1;
    newmber = (ch **) zmalloc(newcount * sizeof(ch *),"zlist");
 
-   if (Nth > 0) {                                                                //  copy 0 - Nth-1
+   if (Nth > 0) {                                                                      //  copy 0 - Nth-1
       ii1 = 0;
       ii2 = Nth;
       if (Nth > count) ii2 = count;
@@ -5412,9 +5385,9 @@ void zlist_insert(zlist_t *zlist, ch *st
       memcpy(newmber,zlist->mber,cc);
    }
 
-   newmber[Nth] = zstrdup(string,"zlist");                                       //  insert Nth
+   newmber[Nth] = zstrdup(string,"zlist");                                             //  insert Nth
 
-   if (Nth < count) {                                                            //  copy Nth - last
+   if (Nth < count) {                                                                  //  copy Nth - last
       ii1 = Nth;
       ii2 = count;
       cc = (ii2 - ii1) * sizeof(ch *);
@@ -5443,14 +5416,14 @@ void zlist_remove(zlist_t *zlist, int Nt
       newmber = (ch **) zmalloc(newcount * sizeof(ch *),"zlist");
    else newmber = 0;
 
-   if (Nth > 0) {                                                                //  copy 0 - Nth-1
+   if (Nth > 0) {                                                                      //  copy 0 - Nth-1
       cc = Nth * sizeof(ch *);
       memcpy(newmber,zlist->mber,cc);
    }
 
-   if (zlist->mber[Nth]) zfree(zlist->mber[Nth]);                                //  remove Nth
+   if (zlist->mber[Nth]) zfree(zlist->mber[Nth]);                                      //  remove Nth
 
-   if (Nth < newcount) {                                                         //  copy Nth+1 - last
+   if (Nth < newcount) {                                                               //  copy Nth+1 - last
       cc = (newcount - Nth) * sizeof(ch *);
       memcpy(newmber+Nth,zlist->mber+Nth+1,cc);
    }
@@ -5471,16 +5444,16 @@ void zlist_clear(zlist_t *zlist, int Nth
 
    if (Nth >= zlist_count(zlist)) return;
 
-   if (Nth > 0) mber = (ch **) zmalloc(Nth * sizeof(ch *),"zlist");              //  remaining members
+   if (Nth > 0) mber = (ch **) zmalloc(Nth * sizeof(ch *),"zlist");                    //  remaining members
 
-   for (ii = 0; ii < Nth; ii++)                                                  //  copy remaining members
+   for (ii = 0; ii < Nth; ii++)                                                        //  copy remaining members
       mber[ii] = zlist->mber[ii];
 
-   for (ii = Nth; ii < zlist_count(zlist); ii++)                                 //  free deleted members
+   for (ii = Nth; ii < zlist_count(zlist); ii++)                                       //  free deleted members
       zfree(zlist->mber[ii]);
 
    zfree(zlist->mber);
-   zlist->mber = mber;                                                           //  null if empty list
+   zlist->mber = mber;                                                                 //  null if empty list
    zlist->count = Nth;
    return;
 }
@@ -5597,22 +5570,22 @@ zlist_t * zlist_copy(zlist_t *zlist1)
 zlist_t * zlist_insert_zlist(zlist_t *zlist1, zlist_t *zlist2, int Nth)
 {
    int   ii;
-   int   nn1 = zlist1->count;                   //  zlist to receive
-   int   nn2 = zlist2->count;                   //  zlist to insert
-   int   nn3 = nn1 + nn2;                       //  output zlist
+   int   nn1 = zlist1->count;                         //  zlist to receive
+   int   nn2 = zlist2->count;                         //  zlist to insert
+   int   nn3 = nn1 + nn2;                             //  output zlist
 
-   if (Nth < 0) Nth = nn1;                      //  append to end of zlist1
-   if (Nth > nn1) nn3 = Nth + nn2;              //  append with missing members in-between
+   if (Nth < 0) Nth = nn1;                            //  append to end of zlist1
+   if (Nth > nn1) nn3 = Nth + nn2;                    //  append with missing members in-between
 
    zlist_t *zlist3 = zlist_new(nn3);
 
-   for (ii = 0; ii < Nth; ii++)                                                  //  0 to Nth-1
+   for (ii = 0; ii < Nth; ii++)                                                        //  0 to Nth-1
       if (ii < nn1 && zlist1->mber[ii])
          zlist3->mber[ii] = zstrdup(zlist1->mber[ii],"zlist");
-   for (ii = Nth; ii < Nth + nn2; ii++)                                          //  Nth to Nth + nn2-1
+   for (ii = Nth; ii < Nth + nn2; ii++)                                                //  Nth to Nth + nn2-1
       if (zlist2->mber[ii-Nth])
          zlist3->mber[ii] = zstrdup(zlist2->mber[ii-Nth],"zlist");
-   for (ii = Nth + nn2; ii < nn3; ii++)                                          //  Nth + nn2 to nn3-1
+   for (ii = Nth + nn2; ii < nn3; ii++)                                                //  Nth + nn2 to nn3-1
       if (ii-nn2 < nn1 && zlist1->mber[ii-nn2])
          zlist3->mber[ii] = zstrdup(zlist1->mber[ii-nn2],"zlist");
 
@@ -5627,14 +5600,14 @@ zlist_t * zlist_remove(zlist_t *zlist1,
    int   ii, jj;
    int   nn2 = zlist2->count;
 
-   zlist_t *zlist3 = zlist_copy(zlist1);                                         //  copy input zlist
+   zlist_t *zlist3 = zlist_copy(zlist1);                                               //  copy input zlist
 
    for (ii = 0; ii < nn2; ii++) {
-      jj = zlist_find(zlist3,zlist_get(zlist2,ii),0);                            //  find zlist2 member in zlist3
-      if (jj >= 0) zlist_put(zlist3,null,jj);                                    //  if found, replace with null
+      jj = zlist_find(zlist3,zlist_get(zlist2,ii),0);                                  //  find zlist2 member in zlist3
+      if (jj >= 0) zlist_put(zlist3,null,jj);                                          //  if found, replace with null
    }
 
-   zlist_purge(zlist3);                                                          //  purge null entries
+   zlist_purge(zlist3);                                                                //  purge null entries
    return zlist3;
 }
 
@@ -5683,8 +5656,8 @@ zlist_t * zlist_from_file(ch *filename)
    int      ii, count = 0;
    ch       *pp, buff[XFCC];
 
-   fid = fopen(filename,"r");                                                    //  count recs in file
-   if (! fid) return 0;                                                          //  this adds 40% to elapsed time
+   fid = fopen(filename,"r");                                                          //  count recs in file
+   if (! fid) return 0;                                                                //  this adds 40% to elapsed time
    while (true) {
       pp = fgets(buff,XFCC,fid);
       if (! pp) break;
@@ -5694,7 +5667,7 @@ zlist_t * zlist_from_file(ch *filename)
 
    fid = fopen(filename,"r");
    if (! fid) return 0;
-   zlist = zlist_new(count);                                                     //  create zlist
+   zlist = zlist_new(count);                                                           //  create zlist
    for (ii = 0; ii < count; ii++) {
       pp = fgets_trim(buff,XFCC,fid);
       if (! pp) break;
@@ -5708,20 +5681,20 @@ zlist_t * zlist_from_file(ch *filename)
 //  create a zlist from all file names in a folder
 //  list members are file names without folder
 
-zlist_t * zlist_from_folder(ch *folder)                                          //  25.1
+zlist_t * zlist_from_folder(ch *folder)                                                //  25.1
 {
    ch       findcomm[1000];
    ch       *pp, **flist;
    int      ii, NF;
    zlist_t  *zlist;
-   
-   snprintf(findcomm,1000,"%s/*",folder);                                        //  find all files in folder
+
+   snprintf(findcomm,1000,"%s/*",folder);                                              //  find all files in folder
    zfind(findcomm,flist,NF);
    if (! NF) return 0;
-   
+
    zlist = zlist_new(NF);
 
-   for (ii = 0; ii < NF; ii++) {                                                 //  make zlist of file root names
+   for (ii = 0; ii < NF; ii++) {                                                       //  make zlist of file root names
       pp = strrchr(flist[ii],'/');
       if (! pp) pp = flist[ii];
       else pp++;
@@ -5730,7 +5703,7 @@ zlist_t * zlist_from_folder(ch *folder)
    }
 
    zfree(flist);
-   zlist_sort(zlist);                                                            //  sort zlist
+   zlist_sort(zlist);                                                                  //  sort zlist
    return zlist;
 }
 
@@ -5742,27 +5715,27 @@ zlist_t * zlist_from_folder(ch *folder)
 //  Benchmark: lrandz 0.012 usec  drandz 0.014 usec  3.3 GHz Core i5
 //  (srand() % range) is much slower.
 
-int lrandz(int64 *seed)                                                          //  returns 0 to 0x7fffffff
+int lrandz(int64 *seed)                                                                //  returns 0 to 0x7fffffff
 {
    *seed = *seed ^ (*seed << 17);
    *seed = *seed ^ (*seed << 20);
    return nrand48((unsigned int16 *) seed);
 }
 
-int lrandz()                                                                     //  implicit seed, repeatable sequence
+int lrandz()                                                                           //  implicit seed, repeatable sequence
 {
    static int64   seed = 12345678;
    return lrandz(&seed);
 }
 
-double drandz(int64 *seed)                                                       //  returns 0.0 to 0.99999...
+double drandz(int64 *seed)                                                             //  returns 0.0 to 0.99999...
 {
    *seed = *seed ^ (*seed << 17);
    *seed = *seed ^ (*seed << 20);
    return erand48((unsigned int16 *) seed);
 }
 
-double drandz()                                                                  //  automatic seed, volatile
+double drandz()                                                                        //  automatic seed, volatile
 {
    static int64 seed = get_seconds();
    return drandz(&seed);
@@ -5933,26 +5906,26 @@ void Qtext_close(Qtext *qtext)
 /********************************************************************************/
 
 //  compute variance for a list of numbers
-//  std. deviation = sqrtf(variance) 
+//  std. deviation = sqrtf(variance)
 
-float variance(float *vals, int N)                                               //  24.60
+float variance(float *vals, int N)
 {
    float    mean1, mean2, variance;
    int      ii;
-   
+
    if (N == 0) return 0;
 
    mean1 = mean2 = 0;
-      
+
    for (ii = 0; ii < N; ii++)
    {
       mean1 += vals[ii];
       mean2 += vals[ii] * vals[ii];
    }
-   
+
    mean1 = mean1 / N;
    mean2 = mean2 / N;
-   
+
    variance = fabsf(mean2 - mean1 * mean1);
    return variance;
 }
@@ -5960,8 +5933,8 @@ float variance(float *vals, int N)
 
 /********************************************************************************
 
-   Initialize application files according to following conventions:              //  new version
-     + binary executable is at:  /prefix/bin/appname                             //  = PREFIX/bin/appname
+   Initialize application files according to following conventions:                    //  new version
+     + binary executable is at:  /prefix/bin/appname                                   //  = PREFIX/bin/appname
      + other application folders are derived as follows:
          /prefix/share/appname/data/            desktop, parameters, userguide  ...
          /prefix/share/doc/appname/             README, changelog, appname.man ...
@@ -5989,14 +5962,14 @@ float variance(float *vals, int N)
 
 ***/
 
-ch * get_zprefix() { return zfuncs::zprefix; }                                   //  /usr or /usr/local
-ch * get_zhomedir() { return zfuncs::zhomedir; }                                 //  /home/<user>/.appname
-ch * get_zdatadir() { return zfuncs::zdatadir; }                                 //  data files
-ch * get_zdocdir()  { return zfuncs::zdocdir;  }                                 //  documentation files
-ch * get_zimagedir()  { return zfuncs::zimagedir;  }                             //  image files
+ch * get_zprefix() { return zfuncs::zprefix; }                                         //  /usr or /usr/local
+ch * get_zhomedir() { return zfuncs::zhomedir; }                                       //  /home/<user>/.appname
+ch * get_zdatadir() { return zfuncs::zdatadir; }                                       //  data files
+ch * get_zdocdir()  { return zfuncs::zdocdir;  }                                       //  documentation files
+ch * get_zimagedir()  { return zfuncs::zimagedir;  }                                   //  image files
 
 
-int zinitapp(ch *appvers, int argc, ch *argv[])                                  //  appname-N.N
+int zinitapp(ch *appvers, int argc, ch *argv[])                                        //  appname-N.N
 {
    ch          buff[300];
    ch          LNhomedir[200];
@@ -6008,133 +5981,130 @@ int zinitapp(ch *appvers, int argc, ch *
    STATB       statB;
    FILE        *fid;
 
-   pp = getenv("HOME");                                                          //  24.50
+   pp = getenv("HOME");
    if (pp) err = chdir(pp);
-   Plog(0,"working directory: %s \n",pp);
+   printf("working directory: %s \n",pp);
 
-   startime = time(null);                                                        //  app start time, secs. since 1970
+   startime = time(null);                                                              //  app start time, secs. since 1970
 
-   catch_signals();                                                              //  catch signals, do backtrace
+   catch_signals();                                                                    //  catch signals, do backtrace
 
-   Plog(1,"command: ");
-   for (ii = 0; ii < argc; ii++) Plog(1,"%s ",argv[ii]);                         //  log command line
-   Plog(1,"\n");
+   printf("command: ");
+   for (ii = 0; ii < argc; ii++) printf("%s ",argv[ii]);                               //  log command line
+   printf("\n");
 
-   setlocale(LC_NUMERIC,"C");                                                    //  stop comma decimal points
+   setlocale(LC_NUMERIC,"C");                                                          //  stop comma decimal points
 
-   setpgid(0,0);                                                                 //  make a new process group
+   setpgid(0,0);                                                                       //  make a new process group
 
-   strncpy0(zappvers,appvers,40);                                                //  appname-N.N
-   Plog(1,"%s \n",zappvers);
+   strncpy0(zappvers,appvers,40);                                                      //  appname-N.N
+   printf("%s \n",zappvers);
 
-   strncpy0(zappname,appvers,40);                                                //  appname   without version
+   strncpy0(zappname,appvers,40);                                                      //  appname   without version
    pp = strchr(zappname,'-');
-   if (pp && pp[1] > '9') pp = strchr(pp+1,'-');                                 //  bypass '-' in appname
+   if (pp && pp[1] > '9') pp = strchr(pp+1,'-');                                       //  bypass '-' in appname
    if (pp) *pp = 0;
 
-   if (argc > 1 && strmatchV(argv[1],"-ver","-v",0)) exit(0);                    //  exit if nothing else wanted
+   if (argc > 1 && strmatchV(argv[1],"-ver","-v",0)) exit(0);                          //  exit if nothing else wanted
 
    progexe = 0;
-   cc = readlink("/proc/self/exe",buff,300);                                     //  get my executable program path
+   cc = readlink("/proc/self/exe",buff,300);                                           //  get my executable program path
    if (cc <= 0) zexit(1,"readlink() /proc/self/exe) failed");
-   buff[cc] = 0;                                                                 //  readlink() quirk
+   buff[cc] = 0;                                                                       //  readlink() quirk
    progexe = zstrdup(buff,"zinitapp");
 
-   Plog(1,"program exe: %s \n",progexe);                                         //  executable path
+   printf("program exe: %s \n",progexe);                                               //  executable path
 
    strncpy0(zprefix,progexe,200);
-   pp = strstr(zprefix,"/bin/");                                                 //  get install prefix (e.g. /usr)
+   pp = strstr(zprefix,"/bin/");                                                       //  get install prefix (e.g. /usr)
    if (pp) *pp = 0;
-   else (strcpy(zprefix,"/usr"));                                                //  if /xxxxx/bin --> /xxxxx
+   else (strcpy(zprefix,"/usr"));                                                      //  if /xxxxx/bin --> /xxxxx
 
-   strncatv(zdatadir,199,zprefix,"/share/",zappname,"/data",null);               //  /prefix/share/appname/data
-   strncatv(zimagedir,199,zprefix,"/share/",zappname,"/images",null);            //  /prefix/share/appname/images
-   strncatv(zdocdir,199,zprefix,"/share/doc/",zappname,null);                    //  /prefix/share/doc/appname
+   strncatv(zdatadir,199,zprefix,"/share/",zappname,"/data",null);                     //  /prefix/share/appname/data
+   strncatv(zimagedir,199,zprefix,"/share/",zappname,"/images",null);                  //  /prefix/share/appname/images
+   strncatv(zdocdir,199,zprefix,"/share/doc/",zappname,null);                          //  /prefix/share/doc/appname
 
    ch_time = zstrdup(build_date_time,"zinitapp");
-   if (ch_time[4] == ' ') ch_time[4] = '0';                                      //  replace month day ' d' with '0d'
-   Plog(1,"build date/time: %s \n",ch_time);
+   if (ch_time[4] == ' ') ch_time[4] = '0';                                            //  replace month day ' d' with '0d'
+   printf("build date/time: %s \n",ch_time);
 
-   strncpy0(username,getenv("USER"),140);                                        //  get user name
-   if (strlen(username) > 138) zexit(1,"username too big");                      //  insure derived folders <200 ch.
+   strncpy0(username,getenv("USER"),140);                                              //  get user name
+   if (strlen(username) > 138) zexit(1,"username too big");                            //  insure derived folders <200 ch.
 
-   *zhomedir = 0;                                                                //  app home dir
+   *zhomedir = 0;                                                                      //  app home dir
+
+   if (argc > 2 && strmatch(argv[1],"-home") && *argv[2] == '/')                       //  get appname home folder from caller
+      strncpy0(zhomedir,argv[2],200);                                                  //  (any user-owned folder)
 
-   if (argc > 2 && strmatch(argv[1],"-home") && *argv[2] == '/')                 //  get appname home folder from caller
-      strncpy0(zhomedir,argv[2],200);                                            //  (any user-owned folder) 
-   
    if (! *zhomedir) {
-      snprintf(LNhomedir,200,"%s/.%s-home",getenv("HOME"),zappname);             //  check $HOME/.appname-home             24.20
+      snprintf(LNhomedir,200,"%s/.%s-home",getenv("HOME"),zappname);                   //  check $HOME/.appname-home
       fid = fopen(LNhomedir,"r");
       if (fid) {
-         pp = fgets_trim(LNhomedir,200,fid);                                     //  if found, read pointer to home folder
-         if (pp) strncpy0(zhomedir,pp,200);                                      //  (any user-owned folder)
+         pp = fgets_trim(LNhomedir,200,fid);                                           //  if found, read pointer to home folder
+         if (pp) strncpy0(zhomedir,pp,200);                                            //  (any user-owned folder)
          fclose(fid);
       }
    }
-   
-   if (! *zhomedir) 
-      snprintf(zhomedir,200,"%s/.%s",getenv("HOME"),zappname);                   //  use $HOME/.appname/                   24.20
-      
-   Plog(0,"%s home folder: %s \n",zappname,zhomedir);
 
-   if (strchr(zhomedir,' ')) zexit(1,"home folder name contains a space");       //  forbid space or quote in home folder
+   if (! *zhomedir)
+      snprintf(zhomedir,200,"%s/.%s",getenv("HOME"),zappname);                         //  use $HOME/.appname/
+
+   printf("%s home folder: %s \n",zappname,zhomedir);
+
+   if (strchr(zhomedir,' ')) zexit(1,"home folder name contains a space");             //  forbid space or quote in home folder
    if (strchr(zhomedir,'"')) zexit(1,"home folder name contains a quote");
    if (strchr(zhomedir,'\'')) zexit(1,"home folder name contains a quote");
 
-   err = stat(zhomedir,&statB);                                                  //  home folder exists already?
+   err = stat(zhomedir,&statB);                                                        //  home folder exists already?
    if (err) {
-      err = mkdir(zhomedir,0750);                                                //  no, create
+      err = mkdir(zhomedir,0750);                                                      //  no, create
       if (err) zexit(1,"cannot create %s: \n %s",zhomedir,strerror(errno));
    }
 
-   snprintf(logfile,199,"%s/%s.log",zhomedir,zappvers);                          //  /home/<user>/appname-N.N.log
-   Plog(0,"log file: %s \n",logfile);
+   snprintf(logfile,199,"%s/%s.log",zhomedir,zappvers);                                //  /home/<user>/appname-N.N.log
+   printf("log file: %s \n",logfile);
 
-   err = stat(logfile,&statB);                                                   //  start new log file if >50 kb          25.1
+   err = stat(logfile,&statB);                                                         //  start new log file if >50 kb          25.1
    if (! err) {
       size = statB.st_size;
       if (size > 50000) remove(logfile);
    }
 
-   if (! isatty(fileno(stdin))) {                                                //  not attached to a terminal
-      fid = freopen(logfile,"a",stdout);                                         //  redirect stdout/stderr to log file
+   if (! isatty(fileno(stdin))) {                                                      //  not attached to a terminal
+      fid = freopen(logfile,"a",stdout);                                               //  redirect stdout/stderr to log file
       fid = freopen(logfile,"a",stderr);
-      if (! fid) Plog(0,"*** cannot redirect stdout and stderr \n");
+      if (! fid) printf("*** cannot redirect stdout and stderr \n");
    }
 
-   Plog(1,"-------------------------------------------\n");                      //  log file separator
+   printf("-------------------------------------------\n");                            //  log file separator
 
-   ch_time = ctime(&startime);                                                   //  start time: Ddd Mmm dd hh:mm:ss.nn
-   ch_time[19] = 0;                                                              //  eliminate hundredths of seconds
-   if (ch_time[8] == ' ') ch_time[8] = '0';                                      //  replace ' d' with '0d'
-   Plog(1,"start %s %s \n",zappname,ch_time);
+   ch_time = ctime(&startime);                                                         //  start time: Ddd Mmm dd hh:mm:ss.nn
+   ch_time[19] = 0;                                                                    //  eliminate hundredths of seconds
+   if (ch_time[8] == ' ') ch_time[8] = '0';                                            //  replace ' d' with '0d'
+   printf("start %s %s \n",zappname,ch_time);
    fflush(0);
 
-   tid_main = pthread_self();                                                    //  thread ID of main() process
+   tid_main = pthread_self();                                                          //  thread ID of main() process
 
-   err = stat(zdatadir,&statB);                                                  //  files from .../appname/data
-   if (! err) zshell("noerr","cp -R -n %s/* %s >/dev/null 2>&1",                 //    --> user app home (no replace)      24.20
-                                       zdatadir,zhomedir);                       //  new: -n no clobber                    24.20
+   err = stat(zdatadir,&statB);                                                        //  files from .../appname/data
+   if (! err) zshell("noerr","cp -R -n %s/* %s >/dev/null 2>&1",                       //    --> user app home (no replace)
+                                       zdatadir,zhomedir);                             //  new: -n no clobber
    //  GTK initialization
 
-   setenv("GDK_BACKEND","x11",0);                                                //  needed by Fedora (11/2023) but not Ubuntu
-   setenv("GTK_THEME","default",0);                                              //    " "
-
-   if (gtk_clutter_init(&argc,&argv) != CLUTTER_INIT_SUCCESS)                    //  intiz. clutter and GTK
-      zexit(1,"gtk_clutter_init() failed");
+   setenv("GDK_BACKEND","x11",0);                                                      //  needed by Fedora (11/2023) but not Ubuntu
+   setenv("GTK_THEME","default",0);                                                    //    " "
 
    if (! gtk_init_check(0,null))
       zexit(1,"gtk_init_check() failed");
 
-   setlocale(LC_NUMERIC,"C");                                                    //  NECESSARY: GTK changes locale
+   setlocale(LC_NUMERIC,"C");                                                          //  NECESSARY: GTK changes locale
 
-   int v1 = gtk_get_major_version();                                             //  get GTK release version
+   int v1 = gtk_get_major_version();                                                   //  get GTK release version
    int v2 = gtk_get_minor_version();
    int v3 = gtk_get_micro_version();
-   Plog(1,"GTK version: %d.%02d.%02d \n",v1,v2,v3);
+   printf("GTK version: %d.%02d.%02d \n",v1,v2,v3);
 
-   display = gdk_display_get_default();                                          //  get hardware info
+   display = gdk_display_get_default();                                                //  get hardware info
    screen = gdk_screen_get_default();
 
    GdkRectangle   rect;
@@ -6147,30 +6117,30 @@ int zinitapp(ch *appvers, int argc, ch *
 
    if (! monitor_ww) zexit(1,"GTK cannot get monitor data");
 
-   GdkSeat    *gdkseat = 0;                                                      //  screen / KB / pointer associations
-   if (screen) gdkseat = gdk_display_get_default_seat(display);                  //  Ubuntu 16.10
+   GdkSeat    *gdkseat = 0;                                                            //  screen / KB / pointer associations
+   if (screen) gdkseat = gdk_display_get_default_seat(display);                        //  Ubuntu 16.10
    if (screen) gtksettings = gtk_settings_get_for_screen(screen);
    if (gdkseat) mouse = gdk_seat_get_pointer(gdkseat);
 
    if (! mouse) zexit(1,"GTK cannot get pointer device");
 
-   if (gtksettings) {                                                            //  get default font
+   if (gtksettings) {                                                                  //  get default font
       g_object_get(gtksettings,"gtk_font_name",&appfont,null);
-      zsetfont(appfont);                                                         //  set mono and bold versions
+      zsetfont(appfont);                                                               //  set mono and bold versions
    }
 
    //  widget style changes if widgets.css file is present
-   
+
    snprintf(cssfile,200,"%s/widgets.css",get_zhomedir());
-   err = stat(cssfile,&statB);                                                   //  24.10
+   err = stat(cssfile,&statB);
    if (! err) {
       GtkStyleProvider *provider = (GtkStyleProvider *) gtk_css_provider_new();
       gtk_style_context_add_provider_for_screen(zfuncs::screen,provider,999);
       gtk_css_provider_load_from_path(GTK_CSS_PROVIDER(provider),cssfile,0);
    }
 
-   zmessageACK_init();                                                           //  initz. for thread usage               25.1
-   
+   zmessageACK_init();                                                                 //  initz. for thread usage               25.1
+
    return 1;
 }
 
@@ -6193,7 +6163,7 @@ void zabout(GtkWidget *parent)
     __________________________________________________
    |               About Appname                      |
    |                                                  |
-   |  installed release: appname-N.N  Mon dd yyyy     |                          //  'query release' removed
+   |  installed release: appname-N.N  Mon dd yyyy     |                                //  'query release' removed
    |  executable: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx       |
    |  contact: mkornelix@gmail.com                    |
    |__________________________________________________|
@@ -6202,11 +6172,11 @@ void zabout(GtkWidget *parent)
 
    execfile = progexe;
 
-   snprintf(installed_release,80,"%s  %s",zappvers,build_date_time);             //  appname-N.N  Mon dd yyyy hh:mm:ss
+   snprintf(installed_release,80,"%s  %s",zappvers,build_date_time);                   //  appname-N.N  Mon dd yyyy hh:mm:ss
 
    cc = strlen(installed_release);
-   installed_release[cc-9] = 0;                                                  //  remove hh:mm:ss
-   if (installed_release[cc-16] == ' ') installed_release[cc-16] = '0';          //  replace "Jan  1" with "Jan 01"
+   installed_release[cc-9] = 0;                                                        //  remove hh:mm:ss
+   if (installed_release[cc-16] == ' ') installed_release[cc-16] = '0';                //  replace "Jan  1" with "Jan 01"
 
    snprintf(title,40,"About %s",zappname);
    zd = zdialog_new(title,parent,null);
@@ -6240,39 +6210,42 @@ int zabout_dialog_event(zdialog *zd, ch
 /********************************************************************************/
 
 //  set a new application font via GtkSettings
-//  newfont should be something like "sans 11"
+//  newfont should be something like "free sans 11"
 //  use generic monospace font since app font may not have a mono version
 
 void zsetfont(ch *newfont)
 {
-   ch       font[40], bfont[48], mfont[48], mbfont[56];
-   ch       junk[40];
-   int      nn, size;
+   ch       font[80], bfont[88], mfont[88], mbfont[100];
+   ch       *pp;
+   int      size;
 
    if (! gtksettings) return;
 
-   nn = sscanf(newfont,"%s %d",font,&size);                                      //  "sans 11"
-   if (nn != 2) {
-      nn = sscanf(newfont,"%s %s %d",font,junk,&size);
-      if (nn != 3) goto fail;
+   strncpy0(font,newfont,80);                                                          //  more robuse font parsing              25.1
+
+   pp = font + strlen(font);
+   while (*(pp-1) <= ' ') pp--;                                                        //  skip poss. trailing blanks
+   while (*(pp-1) >= '0' && *(pp-1) <= '9') pp--;                                      //  skip over font size digits
+   if (*pp == ' ') size = atoi(pp);                                                    //  get font size
+   else size = 10;                                                                     //  if missing, use 10
+   if (size < 6 || size > 20) {
+      printf("font size %d is not reasonable",size);
+      size = 10;
    }
-   if (size < 5 || size > 30) goto fail;
 
-   g_object_set(gtksettings,"gtk-font-name",newfont,null);                       //  set dialog font
+   *pp = 0;                                                                            //  font name without size
 
-   snprintf(bfont,48,"%s bold %d",font,size);                                    //  "sans bold 11"
-   snprintf(mfont,48,"mono %d",size-1);                                          //  "mono 10"
-   snprintf(mbfont,56,"mono bold %d",size-1);                                    //  "mono bold 10"
+   g_object_set(gtksettings,"gtk-font-name",newfont,null);                             //  set dialog font
+
+   snprintf(bfont,48,"%s bold %d",font,size);                                          //  "free sans 11"
+   snprintf(mfont,48,"mono %d",size-1);                                                //  "mono 10"
+   snprintf(mbfont,56,"mono bold %d",size-1);                                          //  "mono bold 10"
    appfont = zstrdup(newfont,"zsetfont");
    appboldfont = zstrdup(bfont,"zsetfont");
    appmonofont = zstrdup(mfont,"zsetfont");
    appmonoboldfont = zstrdup(mbfont,"zsetfont");
    appfontsize = size;
    return;
-
-fail:
-   Plog(0,"cannot set font: %s \n",newfont);
-   return;
 }
 
 
@@ -6293,7 +6266,7 @@ int widget_font_metrics(GtkWidget *widge
    pangolanguage = pango_language_get_default();
    pangofontmetrics = pango_context_get_metrics(pangocontext,pangofontdesc,pangolanguage);
    if (! pangofontmetrics) {
-      Plog(0,"widget_font_metrics() failed \n");
+      printf("*** widget_font_metrics() failed \n");
       return 1;
    }
 
@@ -6322,27 +6295,27 @@ int get_zfilespec(ch *filetype, ch *file
    STATB    statB;
 
    filespec[0] = '/';
-   strcat(filespec,filetype);                                                    //  leave /type as default
+   strcat(filespec,filetype);                                                          //  leave /type as default
 
-   if (strmatch(filetype,"doc")) strcpy(filespec,zdocdir);                       //  /usr/share/doc/appname
-   if (strmatch(filetype,"data")) strcpy(filespec,zdatadir);                     //  /usr/share/appname/data
-   if (strmatch(filetype,"user")) strcpy(filespec,zhomedir);                     //  /home/<user>/.appname
+   if (strmatch(filetype,"doc")) strcpy(filespec,zdocdir);                             //  /usr/share/doc/appname
+   if (strmatch(filetype,"data")) strcpy(filespec,zdatadir);                           //  /usr/share/appname/data
+   if (strmatch(filetype,"user")) strcpy(filespec,zhomedir);                           //  /home/<user>/.appname
 
    cc = strlen(filespec);
-   filespec[cc] = '/';                                                           //  /folders.../
-   strcpy(filespec+cc+1,filename);                                               //  /folders.../filename
+   filespec[cc] = '/';                                                                 //  /folders.../
+   strcpy(filespec+cc+1,filename);                                                     //  /folders.../filename
    err = stat(filespec,&statB);
-   if (! err) return 0;                                                          //  found
+   if (! err) return 0;                                                                //  found
 
-   if (! strmatch(filetype,"doc")) return 1;                                     //  doc files may be in
-   strcpy(filespec,zdocdir);                                                     //    /usr/share/doc/appname/extras
-   strcat(filespec,"/extras/");                                                  //       due to Linux chaos
+   if (! strmatch(filetype,"doc")) return 1;                                           //  doc files may be in
+   strcpy(filespec,zdocdir);                                                           //    /usr/share/doc/appname/extras
+   strcat(filespec,"/extras/");                                                        //       due to Linux chaos
    cc = strlen(filespec);
    strcpy(filespec+cc,filename);
    err = stat(filespec,&statB);
-   if (! err) return 0;                                                          //  found
+   if (! err) return 0;                                                                //  found
 
-   return 1;                                                                     //  not found
+   return 1;                                                                           //  not found
 }
 
 
@@ -6376,17 +6349,17 @@ void showz_textfile(ch *type, ch *file,
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   strncpy0(filex,file,36);                                                      //  look for gzip file first
+   strncpy0(filex,file,36);                                                            //  look for gzip file first
    strcat(filex,".gz");
 
    err = get_zfilespec(type,filex,filespec);
    if (! err) {
-      snprintf(command,200,"zcat \"%s\"",filespec);                              //  use quotes around filename
+      snprintf(command,200,"zcat \"%s\"",filespec);                                    //  use quotes around filename
       popup_command(command,700,500,parent,1);
       return;
    }
 
-   strncpy0(filex,file,35);                                                      //  look also for bzip2 file
+   strncpy0(filex,file,35);                                                            //  look also for bzip2 file
    strcat(filex,".bz2");
 
    err = get_zfilespec(type,filex,filespec);
@@ -6396,7 +6369,7 @@ void showz_textfile(ch *type, ch *file,
       return;
    }
 
-   strncpy0(filex,file,36);                                                      //  look for uncompressed file
+   strncpy0(filex,file,36);                                                            //  look for uncompressed file
 
    err = get_zfilespec(type,filex,filespec);
    if (! err) {
@@ -6428,28 +6401,28 @@ void showz_textfile(ch *type, ch *file,
 
    text text text text text text text text {TOPIC 1} text text ...               link to topic, bold
 
-   ^bold subtopic line^                                                          subtopic, bold                            24.10
+   ^bold subtopic line^                                                          subtopic, bold
    text text text text text ^bold text bold text^ text text ...                  embedded bold text
 
-   text text text text text  ^http.........^  text text text ...                 web link, bold                            24.10
+   text text text text text  ^http.........^  text text text ...                 web link, bold
 
 *********************************************************************************/
 
 namespace showz_docfile_names
 {
-   #define TMAX 1000                                                             //  max. topics and markups
+   #define TMAX 1000                                                                   //  max. topics and markups
    zdialog     *zd = 0;
    GtkWidget   *txwidget;
    int         cc, ii, jj;
    int         currline;
    ch          *pp;
-   ch          *Tname[TMAX];                                                     //  all topic names (link targets)
-   int         Tline[TMAX];                                                      //  topic lines
-   int         Bline[TMAX], Bpos[TMAX], Bcc[TMAX];                               //  bold texts: line, posn, cc
-   int         TN, BN, BF;                                                       //  counts, flags
-   zlist_t     *RTopics = 0;                                                     //  recent topics list
-   ch          RTfile[200] = "";                                                 //  recent topics file
-   int         RTmax = 10;                                                       //  max. recent topics
+   ch          *Tname[TMAX];                                                           //  all topic names (link targets)
+   int         Tline[TMAX];                                                            //  topic lines
+   int         Bline[TMAX], Bpos[TMAX], Bcc[TMAX];                                     //  bold texts: line, posn, cc
+   int         TN, BN, BF;                                                             //  counts, flags
+   zlist_t     *RTopics = 0;                                                           //  recent topics list
+   ch          RTfile[200] = "";                                                       //  recent topics file
+   int         RTmax = 10;                                                             //  max. recent topics
 }
 
 
@@ -6461,55 +6434,55 @@ void showz_docfile(GtkWidget *parent, ch
    void audit_docfile(ch *docfile);
 
    FILE        *fid;
-   ch          filespec[200], buff1[10000], buff2[10000];                        //  record cc limit (100 lines x 100 char.)
-   ch          topic[50], image[100];                                            //  limits: topic name, image name
+   ch          filespec[200], buff1[10000], buff2[10000];                              //  record cc limit (100 lines x 100 char.)
+   ch          topic[50], image[100];                                                  //  limits: topic name, image name
    ch          *pp1, *pp2;
    int         Fm, line, pos1, pos2, cc;
    GdkPixbuf   *pixbuf;
    GError      *gerror;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (utopic && strmatch(utopic,"quit")) {                                      //  quit - save recent topics list
+   if (utopic && strmatch(utopic,"quit")) {                                            //  quit - save recent topics list
       if (RTopics && *RTfile) zlist_to_file(RTopics,RTfile);
-      if (zdialog_valid2(zd)) popup_report_close(zd,0);                          //  close open report or UG
+      if (zdialog_valid2(zd)) popup_report_close(zd,0);                                //  close open report or UG
       return;
    }
 
-   if (utopic && strmatch(utopic,"validate")) {                                  //  check document for errors
-      audit_docfile(docfile);                                                    //  (developer tool)
+   if (utopic && strmatch(utopic,"validate")) {                                        //  check document for errors
+      audit_docfile(docfile);                                                          //  (developer tool)
       return;
    }
 
-   if (zd && zdialog_valid2(zd,docfile))                                         //  document active already
+   if (zd && zdialog_valid2(zd,docfile))                                               //  document active already
       goto initz_done;
 
-   snprintf(RTfile,200,"%s/recent_topics",get_zhomedir());                       //  get recent topics list
+   snprintf(RTfile,200,"%s/recent_topics",get_zhomedir());                             //  get recent topics list
    RTopics = zlist_from_file(RTfile);
    if (! RTopics) RTopics = zlist_new(0);
 
-   for (ii = 0; ii < TN; ii++) zfree(Tname[ii]);                                 //  free prior docfile data if any
+   for (ii = 0; ii < TN; ii++) zfree(Tname[ii]);                                       //  free prior docfile data if any
 
    TN = BN = 0;
 
-   snprintf(filespec,200,"%s/%s",get_zdatadir(),docfile);                        //  open docfile
+   snprintf(filespec,200,"%s/%s",get_zdatadir(),docfile);                              //  open docfile
    fid = fopen(filespec,"r");
    if (! fid) zexit(1,"%s %s \n",filespec,strerror(errno));
 
-   for (line = 0; ; line++)                                                      //  loop docfile recs/lines
+   for (line = 0; ; line++)                                                            //  loop docfile recs/lines
    {
-      pp1 = fgets_trim(buff1,10000,fid);                                         //  line with null at end
-      if (! pp1) break;                                                          //  EOF
-      if (strmatchN(pp1,"EOF",3)) break;                                         //  end of displayed text
+      pp1 = fgets_trim(buff1,10000,fid);                                               //  line with null at end
+      if (! pp1) break;                                                                //  EOF
+      if (strmatchN(pp1,"EOF",3)) break;                                               //  end of displayed text
 
-      if (! strmatchN(buff1,"TOPIC:",6)) continue;                               //  not a topic name
+      if (! strmatchN(buff1,"TOPIC:",6)) continue;                                     //  not a topic name
       pp1 = buff1 + 6;
       while (*pp1 == ' ') pp1++;
       pp2 = pp1 + strlen(pp1);
       while (*pp2 <= ' ') pp2--;
       cc = pp2 - pp1 + 1;
       if (cc < 1 || cc > 49) continue;
-      strncpy0(topic,pp1,cc+1);                                                  //  add topic and line number to topic list
+      strncpy0(topic,pp1,cc+1);                                                        //  add topic and line number to topic list
       Tname[TN] = zstrdup(topic,"docfile");
       Tline[TN] = line;
       if (++TN == TMAX) zexit(1,"docfile exceeds %d topics \n",TMAX);
@@ -6517,149 +6490,149 @@ void showz_docfile(GtkWidget *parent, ch
 
    fclose(fid);
 
-   Plog(1,"Docfile topics: %d \n",TN);
+   printf("Docfile topics: %d \n",TN);
 
-   zd = popup_report_open(docfile,parent,900,800,1,0,showz_docfile_clickfunc,    //  popup window for docfile text display
-                      "Recent", "<", ">", "Find", "Save", "X", 0);               //    + buttons
+   zd = popup_report_open(docfile,parent,1000,800,1,0,showz_docfile_clickfunc,         //  popup window for docfile text display
+                      "Recent", "<", ">", "Find", "Save", "X", 0);                     //    + buttons
    if (! zd) zexit(1,"cannot open docfile window \n");
 
-   popup_report_font_attributes(zd);                                             //  use high contrast font
-   txwidget = zdialog_gtkwidget(zd,"text");                                      //  text widget in zdialog
+   popup_report_font_attributes(zd);                                                   //  use high contrast font
+   txwidget = zdialog_gtkwidget(zd,"text");                                            //  text widget in zdialog
 
-   snprintf(filespec,200,"%s/%s",get_zdatadir(),docfile);                        //  open docfile again
+   snprintf(filespec,200,"%s/%s",get_zdatadir(),docfile);                              //  open docfile again
    fid = fopen(filespec,"r");
    if (! fid) zexit(1,"%s %s \n",filespec,strerror(errno));
 
-   for (line = 0; ; line++)                                                      //  loop docfile recs/lines
+   for (line = 0; ; line++)                                                            //  loop docfile recs/lines
    {
-      pp1 = fgets_trim(buff1,10000,fid);                                         //  line with null at end
-      if (! pp1) break;                                                          //  EOF
-      if (strmatchN(pp1,"EOF",3)) break;                                         //  end of displayed text
+      pp1 = fgets_trim(buff1,10000,fid);                                               //  line with null at end
+      if (! pp1) break;                                                                //  EOF
+      if (strmatchN(pp1,"EOF",3)) break;                                               //  end of displayed text
 
-      if (strmatchN(buff1,"TOPIC:",6))                                           //  TOPIC: TOPIC NAME
+      if (strmatchN(buff1,"TOPIC:",6))                                                 //  TOPIC: TOPIC NAME
       {
          pp1 = buff1 + 6;
          while (*pp1 == ' ') pp1++;
-         popup_report_write(zd,1,"%s \n",pp1);                                   //  output TOPIC NAME, bold
+         popup_report_write(zd,1,"%s \n",pp1);                                         //  output TOPIC NAME, bold
          continue;
       }
 
-      pp1 = strstr(buff1,"+image:");                                             //  line has image names
+      pp1 = strstr(buff1,"+image:");                                                   //  line has image names
       if (pp1) {
          while (pp1) {
             pp1 += 7;
-            while (*pp1 == ' ') pp1++;                                           //  remove blanks
+            while (*pp1 == ' ') pp1++;                                                 //  remove blanks
             strncpy0(image,pp1,100);
             pp2 = strchr(image,' ');
             if (pp2) *pp2 = 0;
-            snprintf(filespec,200,"%s/%s",get_zimagedir(),image);                //  full filespec
+            snprintf(filespec,200,"%s/%s",get_zimagedir(),image);                      //  full filespec
             gerror = 0;
-            pixbuf = gdk_pixbuf_new_from_file(filespec,&gerror);                 //  convert to pixbuf image
+            pixbuf = gdk_pixbuf_new_from_file(filespec,&gerror);                       //  convert to pixbuf image
             if (pixbuf) {
-               popup_report_write(zd,0,"  ",0);                                  //  leading spaces
-               popup_report_insert_pixbuf(zd,line,pixbuf);                       //  write image to output line
+               popup_report_write(zd,0,"  ",0);                                        //  leading spaces
+               popup_report_insert_pixbuf(zd,line,pixbuf);                             //  write image to output line
                g_object_unref(pixbuf);
             }
-            else Plog(0,"cannot load image file: %s \n",image);
-            pp1 = strstr(pp1,"+image:");                                         //  next image file
+            else printf("*** cannot load image file: %s \n",image);
+            pp1 = strstr(pp1,"+image:");                                               //  next image file
          }
-         popup_report_write(zd,0,"\n",0);                                        //  write image line EOL
-         continue;                                                               //  next input line
+         popup_report_write(zd,0,"\n",0);                                              //  write image line EOL
+         continue;                                                                     //  next input line
       }
 
-      strncpy0(buff2,buff1,10000);                                               //  line is text
-      Fm = 0;                                                                    //  buff1: line with bold markups
+      strncpy0(buff2,buff1,10000);                                                     //  line is text
+      Fm = 0;                                                                          //  buff1: line with bold markups
 
-      for (pp1 = buff2; (pp1 = strpbrk(pp1,"{}^"));) {                           //  buff2: line without markups           24.10
+      for (pp1 = buff2; (pp1 = strpbrk(pp1,"{}^"));) {                                 //  buff2: line without markups
          cc = strlen(pp1+1);
          memmove(pp1,pp1+1,cc+1);
-         Fm++;                                                                   //  markups found in this line
+         Fm++;                                                                         //  markups found in this line
       }
 
-      popup_report_write(zd,0,"%s \n",buff2);                                    //  write line to output, no markups
+      popup_report_write(zd,0,"%s \n",buff2);                                          //  write line to output, no markups
 
-      if (! Fm) continue;                                                        //  no markups found, done
+      if (! Fm) continue;                                                              //  no markups found, done
 
-      BF = 0;                                                                    //  intiz. no markups active
+      BF = 0;                                                                          //  intiz. no markups active
 
-      pos1 = pos2 = 0;                                                           //  char. posn. with/without markups
+      pos1 = pos2 = 0;                                                                 //  char. posn. with/without markups
 
-      while (buff1[pos1])                                                        //  loop chars. in line
+      while (buff1[pos1])                                                              //  loop chars. in line
       {
-         if (! strchr("{}^",buff1[pos1])) {                                      //  not a markup char.                    24.10
-            if (BF) ++Bcc[BN];                                                   //  count cc for active markups
+         if (! strchr("{}^",buff1[pos1])) {                                            //  not a markup char.
+            if (BF) ++Bcc[BN];                                                         //  count cc for active markups
             pos1++; pos2++;
             continue;
          }
 
-         if (buff1[pos1] == '{') {                                               //  ... {bold text} ... link to topic
+         if (buff1[pos1] == '{') {                                                     //  ... {bold text} ... link to topic
             if (BN == TMAX) zexit(1,"docfile > %d markups \n",TMAX);
-            BF = 1;                                                              //  start bold text
+            BF = 1;                                                                    //  start bold text
             Bline[BN] = line;
             Bpos[BN] = pos2;
             Bcc[BN] = 0;
          }
 
-         else if (buff1[pos1] == '}') {                                          //  end bold text
+         else if (buff1[pos1] == '}') {                                                //  end bold text
             BF = 0;
-            BN++;                                                                //  bold markup count
+            BN++;                                                                      //  bold markup count
          }
 
-         else if (buff1[pos1] == '^') {                                          //  ... ^bold text^ ...                   24.10
-            if (! BF) {                                                          //  starting ^
+         else if (buff1[pos1] == '^') {                                                //  ... ^bold text^ ...
+            if (! BF) {                                                                //  starting ^
               BF = 1;
               Bline[BN] = line;
               Bpos[BN] = pos2;
               Bcc[BN] = 0;
             }
-            else {                                                               //  ending ^
+            else {                                                                     //  ending ^
                BF = 0;
                BN++;
             }
          }
 
-         pos1++;                                                                 //  skip over markup char.
+         pos1++;                                                                       //  skip over markup char.
       }
 
-      if (BF) BN++;                                                              //  EOL without trailing } or ^
-   }                                                                             //  end loop line
+      if (BF) BN++;                                                                    //  EOL without trailing } or ^
+   }                                                                                   //  end loop line
 
    fclose(fid);
 
-   for (ii = 0; ii < BN; ii++)                                                   //  do all text bolds
+   for (ii = 0; ii < BN; ii++)                                                         //  do all text bolds
       popup_report_bold_word(zd,Bline[ii],Bpos[ii],Bcc[ii]);
 
-   zmainloop();                                                                  //  necessary here for some reason
+   zmainloop();                                                                        //  necessary here for some reason
 
 initz_done:
 
-   currline = 0;                                                                 //  docfile line for topic
+   currline = 0;                                                                       //  docfile line for topic
 
-   if (utopic)                                                                   //  initial topic from caller
+   if (utopic)                                                                         //  initial topic from caller
    {
       strncpy0(topic,utopic,50);
-      strToUpper(topic);                                                         //  25.0
+      strToUpper(topic);                                                               //  25.0
       cc = strlen(topic);
 
-      for (ii = 0; ii < TN; ii++) {                                              //  search docfile topics
+      for (ii = 0; ii < TN; ii++) {                                                    //  search docfile topics
          if (strmatchcase(topic,Tname[ii])) {
-            currline = Tline[ii];                                                //  get line of matching topic
+            currline = Tline[ii];                                                      //  get line of matching topic
             break;
          }
       }
 
       if (ii == TN)
-         Plog(0,"topic not found: %s %s \n",utopic,topic);
+         printf("*** topic not found: %s %s \n",utopic,topic);
       else {
-         zlist_prepend(RTopics,topic,0);                                         //  add to recent topics, 1st position
+         zlist_prepend(RTopics,topic,0);                                               //  add to recent topics, 1st position
          ii = zlist_find(RTopics,topic,1);
-         if (ii > 0) zlist_remove(RTopics,ii);                                   //  if topic present later, remove it
+         if (ii > 0) zlist_remove(RTopics,ii);                                         //  if topic present later, remove it
          ii = zlist_count(RTopics);
-         if (ii > RTmax) zlist_remove(RTopics,ii-1);                             //  limit entry count
+         if (ii > RTmax) zlist_remove(RTopics,ii-1);                                   //  limit entry count
       }
    }
 
-   popup_report_scroll_top(zd,currline);                                         //  scroll to topic line
+   popup_report_scroll_top(zd,currline);                                               //  scroll to topic line
 
    return;
 }
@@ -6676,65 +6649,65 @@ int showz_docfile_clickfunc(GtkWidget *t
    ch          *text, *pp1, *pp2;
    ch          *topic;
    ch          text2[10000], weblink[200];
-   static int  Ltab[10], maxL = 10, Lpos = 0;                                    //  last 10 links clicked
-   
-   gtk_widget_grab_focus(txwidget);                                              //  necessary for some reason
+   static int  Ltab[10], maxL = 10, Lpos = 0;                                          //  last 10 links clicked
 
-   txwidget_get_visible_lines(txwidget,vtop,vbott);                              //  range of lines on screen
-   
-   if (strmatch(input,"X")) {                                                    //  [X] kill report                       25.0
+   gtk_widget_grab_focus(txwidget);                                                    //  necessary for some reason
+
+   txwidget_get_visible_lines(txwidget,vtop,vbott);                                    //  range of lines on screen
+
+   if (strmatch(input,"X")) {                                                          //  [X] kill report                       25.0
       showz_docfile(0,0,"quit");
       return 1;
    }
 
-   if (strmatch(input,"Recent"))                                                 //  [Recent] recent topics
+   if (strmatch(input,"Recent"))                                                       //  [Recent] recent topics
    {
-      topic = popup_choose(RTopics);                                             //  choose a topic                        25.1
+      topic = popup_choose(RTopics);                                                   //  choose a topic                        25.1
       if (! topic) return 0;
 
-      for (ii = 0; ii < TN; ii++)                                                //  search docfile topics
+      for (ii = 0; ii < TN; ii++)                                                      //  search docfile topics
          if (strmatchcase(topic,Tname[ii])) break;
-      if (ii == TN) return 0;                                                    //  not found
+      if (ii == TN) return 0;                                                          //  not found
 
-      currline = Tline[ii];                                                      //  get line of matching topic
-      popup_report_scroll_top(zd,currline);                                      //  scroll to topic line
+      currline = Tline[ii];                                                            //  get line of matching topic
+      popup_report_scroll_top(zd,currline);                                            //  scroll to topic line
 
-      zlist_prepend(RTopics,topic,0);                                            //  add to recent topics, 1st position
+      zlist_prepend(RTopics,topic,0);                                                  //  add to recent topics, 1st position
       ii = zlist_find(RTopics,topic,1);
-      if (ii > 0) zlist_remove(RTopics,ii);                                      //  if topic present later, remove it
+      if (ii > 0) zlist_remove(RTopics,ii);                                            //  if topic present later, remove it
       ii = zlist_count(RTopics);
-      if (ii > RTmax) zlist_remove(RTopics,ii-1);                                //  limit entry count
+      if (ii > RTmax) zlist_remove(RTopics,ii-1);                                      //  limit entry count
       return 1;
    }
 
-   if (input)                                                                    //  25.1
+   if (input)                                                                          //  25.1
    {
-      if (*input == GDK_KEY_Left || *input == '<') {                             //  [<] or left arrow, go back
+      if (*input == GDK_KEY_Left || *input == '<') {                                   //  [<] or left arrow, go back
          Ltab[Lpos] = currline;
          if (Lpos > 0) Lpos--;
          currline = Ltab[Lpos];
-         txwidget_scroll_top(txwidget,currline);                                 //  scroll line to top of window
+         txwidget_scroll_top(txwidget,currline);                                       //  scroll line to top of window
          return 1;
       }
 
-      if (*input == GDK_KEY_Right || *input == '>') {                            //  [>] or right arrow, go forward
+      if (*input == GDK_KEY_Right || *input == '>') {                                  //  [>] or right arrow, go forward
          Ltab[Lpos] = currline;
          if (Lpos < maxL-1 && Ltab[Lpos+1] >= 0)
             currline = Ltab[++Lpos];
-         txwidget_scroll_top(txwidget,currline);                                 //  scroll line to top of window
+         txwidget_scroll_top(txwidget,currline);                                       //  scroll line to top of window
          return 1;
       }
 
-      if (strmatch(input,"Find")) {                                              //  [Find] 
+      if (strmatch(input,"Find")) {                                                    //  [Find]
          zdialog_send_event(zd,"Find");
          return 1;
       }
 
-      if (*input >= 0xfd00) {                                                    //  navigation key
-         page = vbott - vtop - 2;                                                //  page size, lines
+      if (*input >= 0xfd00) {                                                          //  navigation key
+         page = vbott - vtop - 2;                                                      //  page size, lines
          if (page < 0) page = 0;
-         currline = 0;                                                           //  default
-         if (*input == GDK_KEY_Up) currline = vtop - 1;                          //  handle navigation keys
+         currline = 0;                                                                 //  default
+         if (*input == GDK_KEY_Up) currline = vtop - 1;                                //  handle navigation keys
          else if (*input == GDK_KEY_Down) currline = vbott + 1;
          else if (*input == GDK_KEY_Page_Up) currline = vtop - page;
          else if (*input == GDK_KEY_Page_Down) currline = vbott + page;
@@ -6745,65 +6718,65 @@ int showz_docfile_clickfunc(GtkWidget *t
          else if (*input == GDK_KEY_Home) currline = 0;
          else if (*input == GDK_KEY_End) currline = 999999;
          if (currline < 0) currline = 0;
-         txwidget_scroll(txwidget,currline);                                     //  put line on screen
+         txwidget_scroll(txwidget,currline);                                           //  put line on screen
          return 1;
       }
    }
 
-   if (line < 0 || posn < 0) return 0;                                           //  clicked line and position
+   if (line < 0 || posn < 0) return 0;                                                 //  clicked line and position
 
-   text = txwidget_line(txwidget,line,1);                                        //  get line text
+   text = txwidget_line(txwidget,line,1);                                              //  get line text
    if (! text) return 0;
 
-   strncpy0(text2,text,posn+1);                                                  //  compensate utf8 chars. before posn
+   strncpy0(text2,text,posn+1);                                                        //  compensate utf8 chars. before posn
    posn8 = posn + strlen(text2) - utf8len(text2);
 
-   for (ii = 0; ii < BN; ii++) {                                                 //  is clicked text bolded text
+   for (ii = 0; ii < BN; ii++) {                                                       //  is clicked text bolded text
       if (line == Bline[ii]) {
-         if (posn8 >= Bpos[ii] && posn8 <= Bpos[ii] + Bcc[ii]) {                 //  yes
+         if (posn8 >= Bpos[ii] && posn8 <= Bpos[ii] + Bcc[ii]) {                       //  yes
             for (jj = 0; jj < TN; jj++)
-               if (strmatchN(Tname[jj],text+Bpos[ii],Bcc[ii])) break;            //  does it match a topic name
-            if (jj < TN) goto topiclink;                                         //  yes
+               if (strmatchN(Tname[jj],text+Bpos[ii],Bcc[ii])) break;                  //  does it match a topic name
+            if (jj < TN) goto topiclink;                                               //  yes
          }
       }
    }
    goto weblink;
 
 topiclink:
-   topic = Tname[jj];                                                            //  clicked topic
+   topic = Tname[jj];                                                                  //  clicked topic
    currline = Tline[jj];
-   txwidget_scroll_top(txwidget,currline);                                       //  scroll topic to top of window
+   txwidget_scroll_top(txwidget,currline);                                             //  scroll topic to top of window
 
-   zlist_prepend(RTopics,topic,0);                                               //  add to recent topics, 1st position
+   zlist_prepend(RTopics,topic,0);                                                     //  add to recent topics, 1st position
    ii = zlist_find(RTopics,topic,1);
-   if (ii > 0) zlist_remove(RTopics,ii);                                         //  if topic present later, remove it
+   if (ii > 0) zlist_remove(RTopics,ii);                                               //  if topic present later, remove it
    ii = zlist_count(RTopics);
-   if (ii > RTmax) zlist_remove(RTopics,ii-1);                                   //  limit entry count
+   if (ii > RTmax) zlist_remove(RTopics,ii-1);                                         //  limit entry count
 
    if (Lpos == maxL-1) {
-      for (jj = 0; jj < maxL-1; jj++)                                            //  back tab table full,
-         Ltab[jj] = Ltab[jj+1];                                                  //    discard oldest
+      for (jj = 0; jj < maxL-1; jj++)                                                  //  back tab table full,
+         Ltab[jj] = Ltab[jj+1];                                                        //    discard oldest
       Lpos--;
    }
 
-   Ltab[Lpos] = vtop;                                                            //  curr. top line >> back tab
-   Lpos++;                                                                       //  advance back tab position
-   Ltab[Lpos] = currline;                                                        //       >> back tab
+   Ltab[Lpos] = vtop;                                                                  //  curr. top line >> back tab
+   Lpos++;                                                                             //  advance back tab position
+   Ltab[Lpos] = currline;                                                              //       >> back tab
    return 1;
 
 weblink:
    for ( ; posn >= 0; posn--)
-      if ( *(text+posn) == ' ') break;                                           //  click position, preceding blank
+      if ( *(text+posn) == ' ') break;                                                 //  click position, preceding blank
    if (posn < 0) posn = 0;
-   if (text[posn] == ' ') posn += 1;                                             //  eliminate preceding blank
+   if (text[posn] == ' ') posn += 1;                                                   //  eliminate preceding blank
    pp1 = text + posn;
-   pp2 = strchr(pp1,' ');                                                        //  following blank or EOL
+   pp2 = strchr(pp1,' ');                                                              //  following blank or EOL
    if (pp2) cc = pp2 - pp1;
    else cc = strlen(pp1);
-   if (pp1[cc-1] == '.') cc--;                                                   //  remove trailing period
+   if (pp1[cc-1] == '.') cc--;                                                         //  remove trailing period
    if (cc > 199) return 1;
-   strncpy0(weblink,pp1,cc+1);                                                   //  copy clicked text string
-   if (strmatchN(pp1,"http",4))                                                  //  if "http..." assume a web link
+   strncpy0(weblink,pp1,cc+1);                                                         //  copy clicked text string
+   if (strmatchN(pp1,"http",4))                                                        //  if "http..." assume a web link
       zshell("log ack","xdg-open %s",weblink);
    return 1;
 }
@@ -6814,10 +6787,10 @@ weblink:
 
 void audit_docfile(ch *docfile)
 {
-   #define LMAX 10000                                                            //  max. docfile lines/recs
+   #define LMAX 10000                                                                  //  max. docfile lines/recs
    ch          *textlines[LMAX];
    ch          *Tname[TMAX];
-   ch          filespec[200], buff[10000], image[100];                           //  limits: filename, rec. cc, image name
+   ch          filespec[200], buff[10000], image[100];                                 //  limits: filename, rec. cc, image name
    ch          topic[50];
    ch          *pp1, *pp2, *pp3;
    FILE        *fid;
@@ -6826,31 +6799,31 @@ void audit_docfile(ch *docfile)
    GdkPixbuf   *pixbuf;
    GError      *gerror;
 
-   Plog(0,"\n*** audit docfile %s *** \n",docfile);
+   printf("\n*** audit docfile %s *** \n",docfile);
 
    Ntext = Ntop = Nerrs = 0;
 
-   snprintf(filespec,200,"%s/%s",get_zdatadir(),docfile);                        //  open docfile
+   snprintf(filespec,200,"%s/%s",get_zdatadir(),docfile);                              //  open docfile
    fid = fopen(filespec,"r");
    if (! fid) {
-      Plog(0,"%s %s",filespec,strerror(errno));
+      printf("%s %s",filespec,strerror(errno));
       return;
    }
 
-   for (line = 0; line < LMAX; line++)                                           //  read docfile text lines
+   for (line = 0; line < LMAX; line++)                                                 //  read docfile text lines
    {
-      pp1 = fgets_trim(buff,10000,fid);                                          //  line without \n EOL
-      if (! pp1) break;                                                          //  EOF
+      pp1 = fgets_trim(buff,10000,fid);                                                //  line without \n EOL
+      if (! pp1) break;                                                                //  EOF
 
-      textlines[Ntext] = zstrdup(pp1,"docfile");                                 //  copy text line to memory
+      textlines[Ntext] = zstrdup(pp1,"docfile");                                       //  copy text line to memory
       if (++Ntext == LMAX) zexit(1,"exceed LMAX text recs");
 
-      if (! strmatchN(pp1,"TOPIC:",6)) continue;                                 //  not a topic line
+      if (! strmatchN(pp1,"TOPIC:",6)) continue;                                       //  not a topic line
       pp1 += 6;
       while (*pp1 == ' ') pp1++;
       cc = strlen(pp1);
       if (cc < 2 || cc > 49) continue;
-      strncpy0(topic,pp1,cc+1);                                                  //  add topic to list
+      strncpy0(topic,pp1,cc+1);                                                        //  add topic to list
       Tname[Ntop] = zstrdup(topic,"docfile");
       if (++Ntop == TMAX) zexit(1,"exceed TMAX topics");
       printf("topic: %s \n",topic);
@@ -6860,43 +6833,43 @@ void audit_docfile(ch *docfile)
 
    printf("text lines: %d  topics: %d \n",Ntext,Ntop);
 
-   for (line = 0; line < Ntext; line++)                                          //  process text lines
+   for (line = 0; line < Ntext; line++)                                                //  process text lines
    {
       pp1 = textlines[line];
 
       pp2 = strstr(pp1,"+image:");
-      if (pp2) {                                                                 //  line contains images
+      if (pp2) {                                                                       //  line contains images
          while (pp2) {
             pp2 += 7;
-            while (*pp2 == ' ') pp2++;                                           //  remove blanks
+            while (*pp2 == ' ') pp2++;                                                 //  remove blanks
             strncpy0(image,pp2,100);
             pp3 = strchr(image,' ');
             if (pp3) *pp3 = 0;
-            snprintf(filespec,200,"%s/%s",get_zimagedir(),image);                //  full filespec
+            snprintf(filespec,200,"%s/%s",get_zimagedir(),image);                      //  full filespec
             gerror = 0;
-            pixbuf = gdk_pixbuf_new_from_file(filespec,&gerror);                 //  convert to pixbuf image
+            pixbuf = gdk_pixbuf_new_from_file(filespec,&gerror);                       //  convert to pixbuf image
             if (pixbuf) g_object_unref(pixbuf);
             else {
-               Plog(0,"cannot load image file: %s \n",image);
+               printf("cannot load image file: %s \n",image);
                Nerrs++;
             }
             pp2 = strstr(pp2,"+image:");
          }
-         continue;                                                               //  next line
+         continue;                                                                     //  next line
       }
 
-      if (strmatchN(pp1,"TOPIC:",6)) continue;                                   //  skip topic line
+      if (strmatchN(pp1,"TOPIC:",6)) continue;                                         //  skip topic line
       {
-         pp1 = strchr(pp1,'{');                                                  //  get topic links in line
+         pp1 = strchr(pp1,'{');                                                        //  get topic links in line
 
          while (pp1)
          {
-            pp2 = strchr(pp1+1,'}');                                             //  ... {topic name} ...
-            if (! pp2) break;                                                    //      |          |
-            pp1 += 1;                                                            //      pp1        pp2
+            pp2 = strchr(pp1+1,'}');                                                   //  ... {topic name} ...
+            if (! pp2) break;                                                          //      |          |
+            pp1 += 1;                                                                  //      pp1        pp2
             cc = pp2 - pp1;
             if (cc < 2 || cc > 49) {
-               printf("topic >49 chars, line %d: %s \n",line,pp1);               //  topic name > 49 char.
+               printf("topic >49 chars, line %d: %s \n",line,pp1);                     //  topic name > 49 char.
                Nerrs++;
                break;
             }
@@ -6904,20 +6877,20 @@ void audit_docfile(ch *docfile)
             strncpy0(topic,pp1,cc+1);
             for (ii = 0; ii < Ntop; ii++)
                if (strcmp(topic,Tname[ii]) == 0) break;
-            if (ii == Ntop) {                                                    //  topic not found
+            if (ii == Ntop) {                                                          //  topic not found
                printf("topic not found, line %d: %s \n",line,topic);
                Nerrs++;
             }
             pp1 = strchr(pp2+1,'{');
          }
 
-         continue;                                                               //  next line
+         continue;                                                                     //  next line
       }
    }
 
-   Plog(0," %d errors \n",Nerrs);
+   printf(" %d errors \n",Nerrs);
 
-   for (ii = 0; ii < Ntext; ii++)                                                //  free memory
+   for (ii = 0; ii < Ntext; ii++)                                                      //  free memory
       zfree(textlines[ii]);
 
    for (ii = 0; ii < Ntop; ii++)
@@ -6947,11 +6920,12 @@ void zmainloop(int skip)
    if (skip && ++xskip < skip) return;
    xskip = 0;
 
-   if (! main_thread()) return;                                                  //  thread caller, do nothing
+   if (! main_thread()) return;                                                        //  thread caller, do nothing
 
    while (gtk_events_pending())
       gtk_main_iteration_do(0);
 
+   xskip = 0;
    return;
 }
 
@@ -6962,7 +6936,7 @@ void zmainsleep(float secs)
 {
    while (secs > 0) {
       zmainloop();
-      zsleep(0.0001);                                                            //  24.40
+      zsleep(0.0001);
       secs = secs - 0.0001;
    }
 
@@ -6979,7 +6953,7 @@ cairo_t * draw_context_create(GdkWindow
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (context.dcr) {
-      Plog(0,"draw_context_create(): nested call");
+      printf("*** draw_context_create(): nested call");
       return context.dcr;
    }
    context.win = gdkwin;
@@ -6998,7 +6972,7 @@ void draw_context_destroy(draw_context_t
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (! context.dcr) {
-      Plog(0,"draw_context_destroy(): not created \n");
+      printf("*** draw_context_destroy(): not created \n");
       return;
    }
    gdk_window_end_draw_frame(context.win,context.ctx);
@@ -7046,9 +7020,9 @@ void txwidget_clear(GtkWidget *txwidget,
 
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
-   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                       //  iter at line start
+   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                             //  iter at line start
    gtk_text_buffer_get_end_iter(textBuff,&iter2);
-   gtk_text_buffer_delete(textBuff,&iter1,&iter2);                               //  delete existing line and rest of buffer
+   gtk_text_buffer_delete(textBuff,&iter1,&iter2);                                     //  delete existing line and rest of buffer
    return;
 }
 
@@ -7076,7 +7050,7 @@ int txwidget_linecount(GtkWidget *txwidg
 void txwidget_append(GtkWidget *txwidget, int bold, ch *format, ...)
 {
    va_list        arglist;
-   ch             textline[20000];                                               //  txwidget append cc limit
+   ch             textline[20000];                                                     //  txwidget append cc limit
    GtkTextBuffer  *textBuff;
    GtkTextIter    enditer;
    GtkTextTag     *fontag = 0;
@@ -7092,11 +7066,11 @@ void txwidget_append(GtkWidget *txwidget
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   gtk_text_buffer_get_end_iter(textBuff,&enditer);                              //  end of text
+   gtk_text_buffer_get_end_iter(textBuff,&enditer);                                    //  end of text
 
-   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);  //  prepare bold/norm tag
+   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);        //  prepare bold/norm tag
    else fontag = gtk_text_buffer_create_tag(textBuff,0,"font",normfont,0);
-   gtk_text_buffer_insert_with_tags(textBuff,&enditer,textline,-1,fontag,null);  //  insert line
+   gtk_text_buffer_insert_with_tags(textBuff,&enditer,textline,-1,fontag,null);        //  insert line
 
    return;
 }
@@ -7107,7 +7081,7 @@ void txwidget_append(GtkWidget *txwidget
 void txwidget_append2(GtkWidget *txwidget, int bold, ch *format, ...)
 {
    va_list        arglist;
-   ch             textline[20000];                                               //  txwidget append cc limit
+   ch             textline[20000];                                                     //  txwidget append cc limit
    GtkTextBuffer  *textBuff;
    GtkTextIter    enditer;
    GtkTextTag     *fontag = 0;
@@ -7125,11 +7099,11 @@ void txwidget_append2(GtkWidget *txwidge
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   gtk_text_buffer_get_end_iter(textBuff,&enditer);                              //  end of text
+   gtk_text_buffer_get_end_iter(textBuff,&enditer);                                    //  end of text
 
-   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);  //  prepare bold/norm tag
+   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);        //  prepare bold/norm tag
    else fontag = gtk_text_buffer_create_tag(textBuff,0,"font",normfont,0);
-   gtk_text_buffer_insert_with_tags(textBuff,&enditer,textline,-1,fontag,null);  //  insert line
+   gtk_text_buffer_insert_with_tags(textBuff,&enditer,textline,-1,fontag,null);        //  insert line
 
    vadjust = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(txwidget));
    upperlimit = gtk_adjustment_get_upper(vadjust);
@@ -7147,7 +7121,7 @@ void txwidget_append2(GtkWidget *txwidge
 void txwidget_insert(GtkWidget *txwidget, int bold, int line, ch *format, ...)
 {
    va_list        arglist;
-   ch             textline[20000];                                               //  txwidget insert cc limit
+   ch             textline[20000];                                                     //  txwidget insert cc limit
    GtkTextBuffer  *textBuff;
    GtkTextIter    iter;
    int            nlines;
@@ -7164,18 +7138,18 @@ void txwidget_insert(GtkWidget *txwidget
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   if (line < 0) gtk_text_buffer_get_start_iter(textBuff,&iter);                 //  insert before line 0
+   if (line < 0) gtk_text_buffer_get_start_iter(textBuff,&iter);                       //  insert before line 0
 
    if (line >= 0) {
-      nlines = gtk_text_buffer_get_line_count(textBuff);                         //  insert after line
+      nlines = gtk_text_buffer_get_line_count(textBuff);                               //  insert after line
       if (line < nlines - 1)
-         gtk_text_buffer_get_iter_at_line(textBuff,&iter,line+1);                //  start of next line
-      else gtk_text_buffer_get_end_iter(textBuff,&iter);                         //  or end of text
+         gtk_text_buffer_get_iter_at_line(textBuff,&iter,line+1);                      //  start of next line
+      else gtk_text_buffer_get_end_iter(textBuff,&iter);                               //  or end of text
    }
 
-   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);  //  prepare bold/norm tag
+   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);        //  prepare bold/norm tag
    else fontag = gtk_text_buffer_create_tag(textBuff,0,"font",normfont,0);
-   gtk_text_buffer_insert_with_tags(textBuff,&iter,textline,-1,fontag,null);     //  insert line
+   gtk_text_buffer_insert_with_tags(textBuff,&iter,textline,-1,fontag,null);           //  insert line
 
    return;
 }
@@ -7188,7 +7162,7 @@ void txwidget_insert(GtkWidget *txwidget
 void txwidget_replace(GtkWidget *txwidget, int bold, int line, ch *format, ...)
 {
    va_list        arglist;
-   ch             textline[20000];                                               //  txwidget replace cc limit
+   ch             textline[20000];                                                     //  txwidget replace cc limit
    GtkTextBuffer  *textBuff;
    GtkTextIter    iter1, iter2;
    int            nlines;
@@ -7205,19 +7179,19 @@ void txwidget_replace(GtkWidget *txwidge
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   nlines = gtk_text_buffer_get_line_count(textBuff);                            //  lines now in buffer
+   nlines = gtk_text_buffer_get_line_count(textBuff);                                  //  lines now in buffer
    if (line < 0) line = nlines + line - 1;
    if (line >= nlines) line = nlines - 1;
 
-   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                       //  line start
+   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                             //  line start
    iter2 = iter1;
-   gtk_text_iter_forward_line(&iter2);                                           //  end
-   gtk_text_buffer_delete(textBuff,&iter1,&iter2);                               //  delete line
+   gtk_text_iter_forward_line(&iter2);                                                 //  end
+   gtk_text_buffer_delete(textBuff,&iter1,&iter2);                                     //  delete line
    gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);
 
-   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);  //  prepare bold/norm tag
+   if (bold) fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);        //  prepare bold/norm tag
    else fontag = gtk_text_buffer_create_tag(textBuff,0,"font",normfont,0);
-   gtk_text_buffer_insert_with_tags(textBuff,&iter1,textline,-1,fontag,null);    //  insert line
+   gtk_text_buffer_insert_with_tags(textBuff,&iter1,textline,-1,fontag,null);          //  insert line
 
    return;
 }
@@ -7236,13 +7210,13 @@ void txwidget_delete(GtkWidget *txwidget
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   nlines = gtk_text_buffer_get_line_count(textBuff);                            //  lines now in buffer
+   nlines = gtk_text_buffer_get_line_count(textBuff);                                  //  lines now in buffer
    if (line < 0 || line >= nlines) return;
 
-   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                       //  line start
+   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                             //  line start
    iter2 = iter1;
-   gtk_text_iter_forward_line(&iter2);                                           //  end
-   gtk_text_buffer_delete(textBuff,&iter1,&iter2);                               //  delete line
+   gtk_text_iter_forward_line(&iter2);                                                 //  end
+   gtk_text_buffer_delete(textBuff,&iter1,&iter2);                                     //  delete line
 
    return;
 }
@@ -7265,32 +7239,32 @@ int txwidget_find(GtkWidget *txwidget, c
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return -1;
 
-   nlines = gtk_text_buffer_get_line_count(textBuff);                            //  lines now in buffer
+   nlines = gtk_text_buffer_get_line_count(textBuff);                                  //  lines now in buffer
    if (! nlines) return -1;
 
-   if (line1 < 0) line1 = 0;                                                     //  starting line to search
+   if (line1 < 0) line1 = 0;                                                           //  starting line to search
    if (line1 >= nlines) line1 = 0;
    line = line1;
 
    while (true)
    {
-      gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                    //  line start
+      gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                          //  line start
       iter2 = iter1;
-      gtk_text_iter_forward_line(&iter2);                                        //  end
-      textline = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);             //  get text
+      gtk_text_iter_forward_line(&iter2);                                              //  end
+      textline = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);                   //  get text
       if (textline) {
-         pp1 = strcasestr(textline,matchtext);                                   //  look for matching text
-         if (pp1) break;                                                         //  found
+         pp1 = strcasestr(textline,matchtext);                                         //  look for matching text
+         if (pp1) break;                                                               //  found
          free(textline);
       }
       line++;
       if (line == nlines) line = 0;
-      if (line == line1) return -1;                                              //  wrapped around, not found
+      if (line == line1) return -1;                                                    //  wrapped around, not found
    }
 
    if (hilite)
    {
-      cc = strlen(matchtext);                                                    //  highlight matching text
+      cc = strlen(matchtext);                                                          //  highlight matching text
       pp2 = pp1 + cc - 1;
       gtk_text_buffer_get_iter_at_line_index(textBuff,&iter1,line,pp1-textline);
       gtk_text_buffer_get_iter_at_line_index(textBuff,&iter2,line,pp2-textline+1);
@@ -7315,10 +7289,10 @@ void txwidget_insert_pixbuf(GtkWidget *t
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   nlines = gtk_text_buffer_get_line_count(textBuff);                            //  insert after line
+   nlines = gtk_text_buffer_get_line_count(textBuff);                                  //  insert after line
    if (line < nlines - 1)
-      gtk_text_buffer_get_iter_at_line(textBuff,&iter,line+1);                   //  start of next line
-   else gtk_text_buffer_get_end_iter(textBuff,&iter);                            //  or end of text
+      gtk_text_buffer_get_iter_at_line(textBuff,&iter,line+1);                         //  start of next line
+   else gtk_text_buffer_get_end_iter(textBuff,&iter);                                  //  or end of text
 
    gtk_text_buffer_insert_pixbuf(textBuff,&iter,pixbuf);
    return;
@@ -7343,8 +7317,8 @@ void txwidget_scroll(GtkWidget *txwidget
 
    vadjust = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(txwidget));
 
-   if (line < 0) {                                                               //  bottom
-      zmainloop();                                                               //  make it work (GTK problem)
+   if (line < 0) {                                                                     //  bottom
+      zmainloop();                                                                     //  make it work (GTK problem)
       upperlimit = gtk_adjustment_get_upper(vadjust);
       gtk_adjustment_set_value(vadjust,upperlimit);
    }
@@ -7409,7 +7383,7 @@ void txwidget_dump(GtkWidget *widget, ch
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   fid = fopen(filename,"w");                                                    //  open file
+   fid = fopen(filename,"w");                                                          //  open file
    if (! fid) {
       zmessageACK(mainwin,"cannot open file %s",filename);
       return;
@@ -7417,12 +7391,12 @@ void txwidget_dump(GtkWidget *widget, ch
 
    for (line = 0; ; line++)
    {
-      prec = txwidget_line(widget,line,1);                                       //  get text line, strip \n
+      prec = txwidget_line(widget,line,1);                                             //  get text line, strip \n
       if (! prec) break;
-      fprintf(fid,"%s\n",prec);                                                  //  output with \n
+      fprintf(fid,"%s\n",prec);                                                        //  output with \n
    }
 
-   err = fclose(fid);                                                            //  close file
+   err = fclose(fid);                                                                  //  close file
    if (err) zmessageACK(mainwin,"file close error");
    return;
 }
@@ -7459,13 +7433,13 @@ ch * txwidget_line(GtkWidget *txwidget,
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return 0;
 
-   nlines = gtk_text_buffer_get_line_count(textBuff);                            //  lines now in buffer
+   nlines = gtk_text_buffer_get_line_count(textBuff);                                  //  lines now in buffer
    if (line < 0 || line >= nlines) return 0;
 
-   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                       //  line start
+   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                             //  line start
    iter2 = iter1;
-   gtk_text_iter_forward_line(&iter2);                                           //  end
-   textline = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);                //  get text line
+   gtk_text_iter_forward_line(&iter2);                                                 //  end
+   textline = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);                      //  get text line
    if (! textline) return 0;
    ztext = zstrdup(textline,"txwidget");
    free(textline);
@@ -7492,13 +7466,13 @@ void txwidget_highlight_line(GtkWidget *
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   nlines = gtk_text_buffer_get_line_count(textBuff);                            //  lines now in buffer
+   nlines = gtk_text_buffer_get_line_count(textBuff);                                  //  lines now in buffer
    if (line < 0 || line >= nlines) return;
 
-   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                       //  line start
+   gtk_text_buffer_get_iter_at_line(textBuff,&iter1,line);                             //  line start
    iter2 = iter1;
-   gtk_text_iter_forward_line(&iter2);                                           //  end
-   gtk_text_buffer_select_range(textBuff,&iter1,&iter2);                         //  highlight
+   gtk_text_iter_forward_line(&iter2);                                                 //  end
+   gtk_text_buffer_select_range(textBuff,&iter1,&iter2);                               //  highlight
    return;
 }
 
@@ -7527,21 +7501,21 @@ ch * txwidget_word(GtkWidget *txwidget,
       cc--;
    }
 
-   pp1 = pp2 = txline;                                                           //  fix for utf8
+   pp1 = pp2 = txline;                                                                 //  fix for utf8
    while (true) {
-      while (*pp1 == ' ' || strchr(dlims,*pp1)) pp1++;                           //  pp1 = start of next word in line
+      while (*pp1 == ' ' || strchr(dlims,*pp1)) pp1++;                                 //  pp1 = start of next word in line
       if (*pp1 == 0) return 0;
       pp2 = pp1;
       while (true) {
          if (*pp2 == 0) break;
-         nn = utf8_position(pp2,1);                                              //  pp2 = next delimiter or EOL
+         nn = utf8_position(pp2,1);                                                    //  pp2 = next delimiter or EOL
          if (nn < 0) break;
          if (strchr(dlims,pp2[nn])) break;
          pp2 += nn;
          posn += nn-1;
          if (pp2 - txline >= cc) break;
       }
-      if (txline+posn >= pp1 && txline+posn <= pp2) break;                       //  pp1-pp2 is word clicked
+      if (txline+posn >= pp1 && txline+posn <= pp2) break;                             //  pp1-pp2 is word clicked
       nn = utf8_position(pp2,1);
       if (nn < 0) return 0;
       pp1 = pp2 + nn;
@@ -7610,7 +7584,7 @@ void txwidget_bold_word(GtkWidget *txwid
    fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,0);
 
    /***
-   fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,               //  example
+   fontag = gtk_text_buffer_create_tag(textBuff,0,"font",boldfont,                     //  example
                        "foreground","red","background","light blue",0);
    ***/
 
@@ -7669,7 +7643,7 @@ void txwidget_font_attributes(GtkWidget
    textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(txwidget));
    if (! textBuff) return;
 
-   fontag = gtk_text_buffer_create_tag(textBuff,0,                               //  high contrast
+   fontag = gtk_text_buffer_create_tag(textBuff,0,                                     //  high contrast
          "font",appmonofont,"foreground","black","background","white",0);
 
    gtk_text_buffer_get_start_iter(textBuff,&iter1);
@@ -7689,7 +7663,7 @@ void txwidget_font_attributes(GtkWidget
 //    void userfunc(GtkWidget *txwidget, int line, int posn, ch *input)
 //      receive clicked line and position (or)
 //              dialog completion button (input) (or)
-//              KB navigation key (input[0]) 
+//              KB navigation key (input[0])
 
 void txwidget_set_eventfunc(GtkWidget *txwidget, txwidget_CBfunc_t userfunc)
 {
@@ -7701,7 +7675,7 @@ void txwidget_set_eventfunc(GtkWidget *t
    gtk_widget_add_events(txwidget,GDK_KEY_PRESS_MASK);
    gtk_widget_add_events(txwidget,GDK_POINTER_MOTION_MASK);
    gtk_widget_add_events(txwidget,GDK_FOCUS_CHANGE_MASK);
-   if (userfunc) {                                                               //  25.1
+   if (userfunc) {                                                                     //  25.1
       G_SIGNAL(txwidget,"key-press-event",txwidget_eventfunc,userfunc);
       G_SIGNAL(txwidget,"button-press-event",txwidget_eventfunc,userfunc);
       G_SIGNAL(txwidget,"motion-notify-event",txwidget_eventfunc,userfunc);
@@ -7728,64 +7702,64 @@ int txwidget_eventfunc(GtkWidget *txwidg
    int               button, mpx, mpy, tbx, tby;
    int               line, pos, vtop, vbott, page, KBkey;
    ch                input[20] = "";
-   
-   if (! arrowcursor)                                                            //  first call, get arrow cursor
+
+   if (! arrowcursor)                                                                  //  first call, get arrow cursor
       arrowcursor = gdk_cursor_new_for_display(display,GDK_TOP_LEFT_ARROW);
-   gdkwin = gtk_text_view_get_window(VIEW(txwidget),TEXT);                       //  set arrow cursor for window
-   if (gdkwin) gdk_window_set_cursor(gdkwin,arrowcursor);                        //  (must reset every event)
+   gdkwin = gtk_text_view_get_window(VIEW(txwidget),TEXT);                             //  set arrow cursor for window
+   if (gdkwin) gdk_window_set_cursor(gdkwin,arrowcursor);                              //  (must reset every event)
 
    gtk_widget_grab_focus(txwidget);
 
-   if (event->type == GDK_KEY_PRESS)                                             //  KB key press event
+   if (event->type == GDK_KEY_PRESS)                                                   //  KB key press event
    {
       KBkey = ((GdkEventKey *) event)->keyval;
 
-      if (userfunc) {                                                            //  send arrow keys to userfunc
+      if (userfunc) {                                                                  //  send arrow keys to userfunc
          strcpy(input,"xxx");
          if (KBkey == GDK_KEY_Up) strcpy(input,"up");
          if (KBkey == GDK_KEY_Down) strcpy(input,"down");
          if (KBkey == GDK_KEY_Left) strcpy(input,"left");
          if (KBkey == GDK_KEY_Right) strcpy(input,"right");
          ustat = userfunc(txwidget,-1,-1,input);
-         if (ustat) return 1;                                                    //  handled by userfunc
+         if (ustat) return 1;                                                          //  handled by userfunc
       }
 
-      if (KBkey > 0xff00)                                                        //  navigation key
+      if (KBkey > 0xff00)                                                              //  navigation key
       {
-         txwidget_get_visible_lines(txwidget,vtop,vbott);                        //  range of lines on screen
-         page = vbott - vtop - 2;                                                //  page size, lines
+         txwidget_get_visible_lines(txwidget,vtop,vbott);                              //  range of lines on screen
+         page = vbott - vtop - 2;                                                      //  page size, lines
          if (page < 0) page = 0;
-         line = 0;                                                               //  default
-         if (KBkey == GDK_KEY_Up) line = vtop - 1;                               //  handle some navigation keys
+         line = 0;                                                                     //  default
+         if (KBkey == GDK_KEY_Up) line = vtop - 1;                                     //  handle some navigation keys
          if (KBkey == GDK_KEY_Down) line = vbott + 1;
          if (KBkey == GDK_KEY_Page_Up) line = vtop - page;
          if (KBkey == GDK_KEY_Page_Down) line = vbott + page;
          if (KBkey == GDK_KEY_Home) line = 0;
          if (KBkey == GDK_KEY_End) line = 999999;
          if (line < 0) line = 0;
-         txwidget_scroll(txwidget,line);                                         //  put line on screen
+         txwidget_scroll(txwidget,line);                                               //  put line on screen
          return 1;
       }
    }
-   
+
    if (! userfunc) return 1;
 
-   if (event->type == GDK_BUTTON_PRESS)                                          //  mouse button press
+   if (event->type == GDK_BUTTON_PRESS)                                                //  mouse button press
    {
-      button = ((GdkEventButton *) event)->button;                               //  ignore if not left button
+      button = ((GdkEventButton *) event)->button;                                     //  ignore if not left button
       if (button != 1) return 0;
-      mpx = int(((GdkEventButton *) event)->x);                                  //  mouse click position
+      mpx = int(((GdkEventButton *) event)->x);                                        //  mouse click position
       mpy = int(((GdkEventButton *) event)->y);
-      mpx -= appfontsize / 2;                                                    //  more accurate
+      mpx -= appfontsize / 2;                                                          //  more accurate
       if (mpx < 0) mpx = 0;
       gtk_text_view_window_to_buffer_coords(VIEW(txwidget),TEXT,mpx,mpy,&tbx,&tby);
-      if (tbx && tby) {                                                          //  can happen
+      if (tbx && tby) {                                                                //  can happen
          gtk_text_view_get_iter_at_location(VIEW(txwidget),&iter1,tbx,tby);
-         line = gtk_text_iter_get_line(&iter1);                                  //  clicked txwidget line
-         pos = gtk_text_iter_get_line_offset(&iter1);                            //  clicked position
+         line = gtk_text_iter_get_line(&iter1);                                        //  clicked txwidget line
+         pos = gtk_text_iter_get_line_offset(&iter1);                                  //  clicked position
       }
       else line = pos = 0;
-      userfunc(txwidget,line,pos,null);                                          //  pass line and posn to user func
+      userfunc(txwidget,line,pos,null);                                                //  pass line and posn to user func
       return 1;
    }
 
@@ -7889,7 +7863,7 @@ GtkWidget * add_submenu_item(GtkWidget *
 {
    GtkWidget      *wmsub, *wmsubitem;
 
-   wmsub = gtk_menu_item_get_submenu(GTK_MENU_ITEM(wmitem));                     //  add submenu if not already
+   wmsub = gtk_menu_item_get_submenu(GTK_MENU_ITEM(wmitem));                           //  add submenu if not already
    if (wmsub == null) {
       wmsub = gtk_menu_new();
       gtk_menu_item_set_submenu(GTK_MENU_ITEM(wmitem),wmsub);
@@ -7897,13 +7871,13 @@ GtkWidget * add_submenu_item(GtkWidget *
 
    if (strmatch(mlab,"separator"))
       wmsubitem = gtk_separator_menu_item_new();
-   else  wmsubitem = gtk_menu_item_new_with_label(mlab);                         //  add menu item with label only
+   else  wmsubitem = gtk_menu_item_new_with_label(mlab);                               //  add menu item with label only
 
-   gtk_menu_shell_append(GTK_MENU_SHELL(wmsub),wmsubitem);                       //  append submenu item to submenu
+   gtk_menu_shell_append(GTK_MENU_SHELL(wmsub),wmsubitem);                             //  append submenu item to submenu
 
-   if (func) G_SIGNAL(wmsubitem,"activate",func,mlab);                           //  connect optional response function
+   if (func) G_SIGNAL(wmsubitem,"activate",func,mlab);                                 //  connect optional response function
 
-   if (mtip) g_object_set(G_OBJECT(wmsubitem),"tooltip-text",mtip,null);         //  add optional popup menu tip
+   if (mtip) g_object_set(G_OBJECT(wmsubitem),"tooltip-text",mtip,null);               //  add optional popup menu tip
 
    return  wmsubitem;
 }
@@ -7913,7 +7887,7 @@ GtkWidget * add_submenu_item(GtkWidget *
 
 //  create toolbar and add to vertical packing box
 
-int      tbIconSize = 32;                                                        //  default if not supplied
+int      tbIconSize = 32;                                                              //  default if not supplied
 
 GtkWidget * create_toolbar(GtkWidget *vbox, int iconsize)
 {
@@ -7945,16 +7919,16 @@ GtkWidget * add_toolbar_button(GtkWidget
       return  (GtkWidget *) tbutton;
    }
 
-   if (icon && *icon) {                                                          //  get icon pixbuf
+   if (icon && *icon) {                                                                //  get icon pixbuf
       *iconpath = 0;
       strncatv(iconpath,199,zimagedir,"/",icon,null);
       err = stat(iconpath,&statB);
-      if (err) {                                                                 //  alternative path
-         cc = readlink("/proc/self/exe",iconpath,300);                           //  get own program path
-         if (cc > 0) iconpath[cc] = 0;                                           //  readlink() quirk
-         pp = strrchr(iconpath,'/');                                             //  folder of program
+      if (err) {                                                                       //  alternative path
+         cc = readlink("/proc/self/exe",iconpath,300);                                 //  get own program path
+         if (cc > 0) iconpath[cc] = 0;                                                 //  readlink() quirk
+         pp = strrchr(iconpath,'/');                                                   //  folder of program
          if (pp) *pp = 0;
-         strncatv(iconpath,300,"/icons/",icon,null);                             //  .../icons/iconfile.png
+         strncatv(iconpath,300,"/icons/",icon,null);                                   //  .../icons/iconfile.png
       }
       pixbuf = gdk_pixbuf_new_from_file_at_scale(iconpath,tbIconSize,tbIconSize,1,&gerror);
       if (pixbuf) wicon = gtk_image_new_from_pixbuf(pixbuf);
@@ -8026,7 +8000,7 @@ int stbar_message(GtkWidget *wstbar, ch
 
 //  create a popup menu
 
-GtkWidget * create_popmenu()                                                     //  event processing removed              24.60
+GtkWidget * create_popmenu()                                                           //  event processing removed
 {
    if (! main_thread()) zappcrash("illegal call from thread");
 
@@ -8048,8 +8022,8 @@ void add_popmenu(GtkWidget *popmenu, ch
    gtk_menu_shell_append(GTK_MENU_SHELL(popmenu),widget);
 
    if (func) {
-      if (arg) G_SIGNAL(widget,"activate",func,arg);                             //  call func with arg
-      else G_SIGNAL(widget,"activate",func,mname);                               //  call func with menu name
+      if (arg) G_SIGNAL(widget,"activate",func,arg);                                   //  call func with arg
+      else G_SIGNAL(widget,"activate",func,mname);                                     //  call func with menu name
    }
 
    if (mtip) {
@@ -8063,16 +8037,16 @@ void add_popmenu(GtkWidget *popmenu, ch
 
 //  show popup tip for selected menu item
 
-void popmenu_item_select(GtkWidget *wmitem, ch *mtip)                            //  convoluted code but it works
+void popmenu_item_select(GtkWidget *wmitem, ch *mtip)                                  //  convoluted code but it works
 {
    GdkWindow   *window;
    int         xp, yp, mx, my;
 
    window = gtk_widget_get_window(wmitem);
-   gdk_window_get_origin(window,&xp,&yp);                                        //  menu screen origin
-   xp += gdk_window_get_width(window);                                           //   + width
-   gdk_device_get_position(zfuncs::mouse,0,&mx,&my);                             //  mouse (x,y) screen position
-   poptext_screen(mtip,xp,my,0,5);                                               //  popup px = menu + width, py = mouse
+   gdk_window_get_origin(window,&xp,&yp);                                              //  menu screen origin
+   xp += gdk_window_get_width(window);                                                 //   + width
+   gdk_device_get_position(zfuncs::mouse,0,&mx,&my);                                   //  mouse (x,y) screen position
+   poptext_screen(mtip,xp,my,0,5);                                                     //  popup px = menu + width, py = mouse
    return;
 }
 
@@ -8082,7 +8056,7 @@ void popmenu_item_select(GtkWidget *wmit
 
 void popup_menu(GtkWidget *widget, GtkWidget *popmenu)
 {
-   gtk_widget_show_all(popmenu);                                                 //  GTK change: show before popup
+   gtk_widget_show_all(popmenu);                                                       //  GTK change: show before popup
    gtk_menu_popup_at_pointer(GTK_MENU(popmenu),null);
    return;
 }
@@ -8094,7 +8068,7 @@ void popup_menu(GtkWidget *widget, GtkWi
 
 ch * popup_choose_choice = 0;
 
-ch * popup_choose(zlist_t *zlist)                                                //  24.70
+ch * popup_choose(zlist_t *zlist)
 {
    void popup_choose_choose(GtkWidget *, ch *);
 
@@ -8102,11 +8076,11 @@ ch * popup_choose(zlist_t *zlist)
    static int        busy = 0;
    int               nl;
    ch                *member;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (busy++) zappcrash("popup_choose() re-entry");                             //  25.1
-   
+   if (busy++) zappcrash("popup_choose() re-entry");                                   //  25.1
+
    nl = zlist_count(zlist);
    if (! nl) {
       zmessageACK(mainwin,"popup_choose: empty list");
@@ -8115,29 +8089,29 @@ ch * popup_choose(zlist_t *zlist)
    }
 
    popmenu = create_popmenu();
-   
+
    for (int ii = 0; ii < nl; ii++)
    {
       member = zlist_get(zlist,ii);
       if (member) add_popmenu(popmenu,member,popup_choose_choose,0,0);
    }
-   
+
    add_popmenu(popmenu,"CLOSE",popup_choose_choose,0,0);
-   
-   if (popup_choose_choice) {                                                    //  25.1
+
+   if (popup_choose_choice) {                                                          //  25.1
       zfree(popup_choose_choice);
       popup_choose_choice = 0;
    }
 
    popup_menu(0,popmenu);
-   
+
    while (! popup_choose_choice) {
-      if (! gtk_widget_get_mapped(popmenu)) popup_choose_choice = "NONE";        //  escape if menu abandoned
+      if (! gtk_widget_get_mapped(popmenu)) popup_choose_choice = "NONE";              //  escape if menu abandoned
       zmainsleep(0.2);
    }
 
    if (strmatch(popup_choose_choice,"NONE")) popup_choose_choice = 0;
-   
+
    busy = 0;
    return popup_choose_choice;
 }
@@ -8147,7 +8121,7 @@ ch * popup_choose(zlist_t *zlist)
 
 void popup_choose_choose(GtkWidget *, ch *choice)
 {
-   if (! choice || strmatch(choice,"CLOSE")) 
+   if (! choice || strmatch(choice,"CLOSE"))
       popup_choose_choice = zstrdup("NONE","zlist choose");
    else popup_choose_choice = zstrdup(choice,"zlist choose");
    return;
@@ -8156,23 +8130,23 @@ void popup_choose_choose(GtkWidget *, ch
 
 /********************************************************************************/
 
-//  popup picklist from a text file and choose an entry (text line) 
+//  popup picklist from a text file and choose an entry (text line)
 
-ch * popup_choose(ch *file)                                                      //  25.1
+ch * popup_choose(ch *file)                                                            //  25.1
 {
    static zlist_t  *picklist = 0;
    ch    *choice = 0;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (picklist) zlist_free(picklist);
-   
+
    picklist = zlist_from_file(file);
    if (! picklist) {
       zmessageACK(mainwin,"picklist file not found: %s",file);
       return 0;
    }
-   
+
    choice = popup_choose(picklist);
    return choice;
 }
@@ -8191,12 +8165,12 @@ ch * popup_choose(ch *file)
    void func(GtkWidget *, ch *name);
    void RMfunc(GtkWidget *, ch *name);
 
-   vbm = Vmenu_new(GtkWidget *vbox, float fgRGB[3], float bgRGB[3]);             //  create base menu
+   vbm = Vmenu_new(GtkWidget *vbox, float fgRGB[3], float bgRGB[3]);                   //  create base menu
 
-   Vmenu_add(vbm, name, icon, iww, ihh, desc, func, arg);                        //  add left-mouse menu function
+   Vmenu_add(vbm, name, icon, iww, ihh, desc, func, arg);                              //  add left-mouse menu function
 
-   Vmenu_add_setupfunc(vbm, me, func);                                           //  add opt. setup function
-   Vmenu_add_RMfunc(vbm, me, func);                                              //  add right-mouse menu function
+   Vmenu_add_setupfunc(vbm, me, func);                                                 //  add opt. setup function
+   Vmenu_add_RMfunc(vbm, me, func);                                                    //  add right-mouse menu function
 
    Vmenu_block(int flag)      1 to block Vmenu, 0 to unblock
 
@@ -8228,7 +8202,7 @@ ch * popup_choose(ch *file)
 
 namespace Vmenunames
 {
-   #define margin 5                                                              //  margins for menu text
+   #define margin 10                                                                   //  margins for menu text                 25.1
 
    PangoFontDescription    *pfont1, *pfont2;
    PangoAttrList           *pattrlist;
@@ -8236,9 +8210,9 @@ namespace Vmenunames
    int      fontheight;
    int      Fblock = 0;
 
-   void  wpaint(GtkWidget *, cairo_t *, Vmenu *);                                //  window repaint - draw event
-   void  mouse_event(GtkWidget *, GdkEventButton *, Vmenu *);                    //  mouse event function
-   void  paint_menu(cairo_t *cr, Vmenu *vbm, int me, int hilite);                //  paint menu entry, opt. highlight
+   void  wpaint(GtkWidget *, cairo_t *, Vmenu *);                                      //  window repaint - draw event
+   void  mouse_event(GtkWidget *, GdkEventButton *, Vmenu *);                          //  mouse event function
+   void  paint_menu(cairo_t *cr, Vmenu *vbm, int me, int hilite);                      //  paint menu entry, opt. highlight
 }
 
 
@@ -8255,10 +8229,10 @@ Vmenu *Vmenu_new(GtkWidget *vbox, float
 
    cc = sizeof(Vmenu);
    Vmenu *vbm = (Vmenu *) zmalloc(cc,"Vmenu");
-   vbm->fgRGB[0] = fgRGB[0];                                                     //  background color, RGB 0-1.0
+   vbm->fgRGB[0] = fgRGB[0];                                                           //  background color, RGB 0-1.0
    vbm->fgRGB[1] = fgRGB[1];
    vbm->fgRGB[2] = fgRGB[2];
-   vbm->bgRGB[0] = bgRGB[0];                                                     //  background color, RGB 0-1.0
+   vbm->bgRGB[0] = bgRGB[0];                                                           //  background color, RGB 0-1.0
    vbm->bgRGB[1] = bgRGB[1];
    vbm->bgRGB[2] = bgRGB[2];
    vbm->vbox = vbox;
@@ -8266,13 +8240,13 @@ Vmenu *Vmenu_new(GtkWidget *vbox, float
    vbm->layout = gtk_layout_new(0,0);
    vbm->mcount = 0;
    gtk_box_pack_start(GTK_BOX(vbox),vbm->layout,1,1,0);
-   vbm->xmax = vbm->ymax = 10;                                                   //  initial layout size
+   vbm->xmax = vbm->ymax = 10;                                                         //  initial layout size
 
    pattrlist = pango_attr_list_new();
    pbackground = pango_attr_background_new(K64*bgRGB[0],K64*bgRGB[1],K64*bgRGB[2]);
    pango_attr_list_change(pattrlist,pbackground);
 
-   menufont1 = zstrdup(zfuncs::appfont,"Vmenu");                                 //  set menu fonts, normal and bold
+   menufont1 = zstrdup(zfuncs::appfont,"Vmenu");                                       //  set menu fonts, normal and bold
    menufont2 = zstrdup(zfuncs::appboldfont,"Vmenu");
 
    pfont1 = pango_font_description_from_string(menufont1);
@@ -8306,7 +8280,7 @@ void Vmenu_add(Vmenu *vbm, ch *name, ch
 
    int         me, cc, xpos, ww, hh;
    ch          iconpath[200], *mdesc, *name__;
-   ch          *blanks = "                    ";                                 //  20 blanks
+   ch          *blanks = "                    ";                                       //  20 blanks
    PIXBUF      *pixbuf;
    GError      *gerror = 0;
 
@@ -8315,9 +8289,9 @@ void Vmenu_add(Vmenu *vbm, ch *name, ch
 
    if (! name && ! icon) return;
 
-   me = vbm->mcount++;                                                           //  track no. menu entries
+   me = vbm->mcount++;                                                                 //  track no. menu entries
 
-   if (name) vbm->menu[me].name = zstrdup(name,"Vmenu");                         //  create new menu entry from caller data
+   if (name) vbm->menu[me].name = zstrdup(name,"Vmenu");                               //  create new menu entry from caller data
 
    if (icon) {
       vbm->menu[me].icon = zstrdup(icon,"Vmenu");
@@ -8325,7 +8299,7 @@ void Vmenu_add(Vmenu *vbm, ch *name, ch
       vbm->menu[me].iconhh = iconhh;
    }
 
-   if (desc) {                                                                   //  pad description with blanks for looks
+   if (desc) {                                                                         //  pad description with blanks for looks
       cc = strlen(desc);
       mdesc = (ch *) zmalloc(cc+3,"Vmenu");
       mdesc[0] = ' ';
@@ -8334,21 +8308,21 @@ void Vmenu_add(Vmenu *vbm, ch *name, ch
       vbm->menu[me].desc = mdesc;
    }
 
-   vbm->menu[me].LMfunc = func;                                                  //  left-mouse menu function
-   vbm->menu[me].arg = name;                                                     //  argument is menu name or arg if avail.
+   vbm->menu[me].LMfunc = func;                                                        //  left-mouse menu function
+   vbm->menu[me].arg = name;                                                           //  argument is menu name or arg if avail.
    if (arg) vbm->menu[me].arg = arg;
 
    vbm->menu[me].pixbuf = 0;
 
-   if (icon) {                                                                   //  if icon is named, get pixbuf
+   if (icon) {                                                                         //  if icon is named, get pixbuf
       *iconpath = 0;
       strncatv(iconpath,199,zfuncs::zimagedir,"/",icon,null);
       pixbuf = gdk_pixbuf_new_from_file_at_scale(iconpath,iconww,iconhh,1,&gerror);
       if (pixbuf) vbm->menu[me].pixbuf = pixbuf;
-      else Plog(1,"Vmenu no icon: %s \n",iconpath);
+      else printf("*** Vmenu no icon: %s \n",iconpath);
    }
 
-   if (me == 0) vbm->ymax = margin;                                              //  first menu, top position
+   if (me == 0) vbm->ymax = margin;                                                    //  first menu, top position
 
    vbm->menu[me].iconx = 0;
    vbm->menu[me].icony = 0;
@@ -8356,23 +8330,23 @@ void Vmenu_add(Vmenu *vbm, ch *name, ch
    vbm->menu[me].namey = 0;
 
    if (icon) {
-      vbm->menu[me].iconx = margin;                                              //     ______
-      vbm->menu[me].icony = vbm->ymax;                                           //    |      |
-      if (name) {                                                                //    | icon | menu name
-         vbm->menu[me].namex = margin + iconww + margin;                         //    |______|
-         vbm->menu[me].namey = vbm->ymax + (iconhh - fontheight) / 2;            //
+      vbm->menu[me].iconx = margin;                                                    //     ______
+      vbm->menu[me].icony = vbm->ymax;                                                 //    |      |
+      if (name) {                                                                      //    | icon | menu name
+         vbm->menu[me].namex = margin + iconww + margin;                               //    |______|
+         vbm->menu[me].namey = vbm->ymax + (iconhh - fontheight) / 2;                  //
       }
       vbm->menu[me].ylo = vbm->ymax;
-      vbm->ymax += iconhh + iconhh / 8;                                          //  position for next menu entry
+      vbm->ymax += iconhh + iconhh / 8;                                                //  position for next menu entry
       vbm->menu[me].yhi = vbm->ymax;
-      if (margin + iconww > vbm->xmax) vbm->xmax = margin + iconww;              //  keep track of max. layout width
+      if (margin + iconww > vbm->xmax) vbm->xmax = margin + iconww;                    //  keep track of max. layout width
    }
 
    else if (name) {
-      vbm->menu[me].namex = margin;                                              //  menu name
+      vbm->menu[me].namex = margin;                                                    //  menu name
       vbm->menu[me].namey = vbm->ymax;
       vbm->menu[me].ylo = vbm->ymax;
-      vbm->ymax += 1.5 * fontheight;                                             //  more space between text lines
+      vbm->ymax += 1.5 * fontheight;                                                   //  more space between text lines
       vbm->menu[me].yhi = vbm->ymax;
    }
 
@@ -8382,27 +8356,27 @@ void Vmenu_add(Vmenu *vbm, ch *name, ch
    if (name) {
       xpos = vbm->menu[me].namex;
 
-      cc = strlen(name);                                                         //  menu name with trailing blanks
-      name__ = zstrdup(name,"Vmenu",22);                                         //  (long enough to overwrite bold name)
+      cc = strlen(name);                                                               //  menu name with trailing blanks
+      name__ = zstrdup(name,"Vmenu",22);                                               //  (long enough to overwrite bold name)
       strncpy0(name__+cc,blanks,20);
 
-      playout = vbm->menu[me].playout1;                                          //  normal font
+      playout = vbm->menu[me].playout1;                                                //  normal font
       pfont = pfont1;
       pango_layout_set_attributes(playout,pattrlist);
       pango_layout_set_font_description(playout,pfont);
-      pango_layout_set_text(playout,name__,-1);                                  //  compute layout
-      pango_layout_get_pixel_size(playout,&ww,&hh);                              //  pixel width and height of layout
+      pango_layout_set_text(playout,name__,-1);                                        //  compute layout
+      pango_layout_get_pixel_size(playout,&ww,&hh);                                    //  pixel width and height of layout
 
-      playout = vbm->menu[me].playout2;                                          //  bold font
+      playout = vbm->menu[me].playout2;                                                //  bold font
       pfont = pfont2;
       pango_layout_set_attributes(playout,pattrlist);
       pango_layout_set_font_description(playout,pfont);
-      pango_layout_set_text(playout,name,-1);                                    //  compute layout
-      pango_layout_get_pixel_size(playout,&ww,&hh);                              //  pixel width and height of layout
-      if (xpos + ww > vbm->xmax) vbm->xmax = xpos + ww;                          //  keep track of max. layout width
+      pango_layout_set_text(playout,name,-1);                                          //  compute layout
+      pango_layout_get_pixel_size(playout,&ww,&hh);                                    //  pixel width and height of layout
+      if (xpos + ww > vbm->xmax) vbm->xmax = xpos + ww;                                //  keep track of max. layout width
    }
 
-   gtk_widget_set_size_request(vbm->layout,vbm->xmax+margin,0);                  //  add right margin to layout width
+   gtk_widget_set_size_request(vbm->layout,vbm->xmax+margin,0);                        //  add right margin to layout width
 
    return;
 }
@@ -8447,10 +8421,10 @@ void Vmenunames::wpaint(GtkWidget *widge
 {
    using namespace Vmenunames;
 
-   cairo_set_source_rgb(cr,vbm->bgRGB[0],vbm->bgRGB[1],vbm->bgRGB[2]);           //  background
+   cairo_set_source_rgb(cr,vbm->bgRGB[0],vbm->bgRGB[1],vbm->bgRGB[2]);                 //  background
    cairo_paint(cr);
 
-   for (int me = 0; me < vbm->mcount; me++)                                      //  paint all menu entries
+   for (int me = 0; me < vbm->mcount; me++)                                            //  paint all menu entries
       paint_menu(cr,vbm,me,0);
 
    return;
@@ -8469,24 +8443,24 @@ void Vmenunames::paint_menu(cairo_t *cr,
    int            iconww, iconhh;
    ch             *name;
 
-   pixbuf = vbm->menu[me].pixbuf;                                                //  icon
-   if (pixbuf) {                                                                 //  draw menu icon at menu position
+   pixbuf = vbm->menu[me].pixbuf;                                                      //  icon
+   if (pixbuf) {                                                                       //  draw menu icon at menu position
       xpos = vbm->menu[me].iconx;
       ypos = vbm->menu[me].icony;
       iconww = vbm->menu[me].iconww;
       iconhh = vbm->menu[me].iconhh;
 
-      if (! hilite) {                                                            //  erase box around icon
-         cairo_set_source_rgb(cr,vbm->bgRGB[0],vbm->bgRGB[1],vbm->bgRGB[2]);     //  background
+      if (! hilite) {                                                                  //  erase box around icon
+         cairo_set_source_rgb(cr,vbm->bgRGB[0],vbm->bgRGB[1],vbm->bgRGB[2]);           //  background
          cairo_rectangle(cr,xpos-1,ypos-1,iconww+2,iconhh+2);
          cairo_fill(cr);
       }
 
-      gdk_cairo_set_source_pixbuf(cr,pixbuf,xpos,ypos);                          //  draw icon
+      gdk_cairo_set_source_pixbuf(cr,pixbuf,xpos,ypos);                                //  draw icon
       cairo_paint(cr);
 
       if (hilite) {
-         cairo_set_source_rgb(cr,vbm->fgRGB[0],vbm->fgRGB[1],vbm->fgRGB[2]);     //  draw box around icon
+         cairo_set_source_rgb(cr,vbm->fgRGB[0],vbm->fgRGB[1],vbm->fgRGB[2]);           //  draw box around icon
          cairo_set_line_width(cr,1);
          cairo_set_line_join(cr,CAIRO_LINE_JOIN_ROUND);
          cairo_rectangle(cr,xpos,ypos,iconww,iconhh);
@@ -8494,11 +8468,11 @@ void Vmenunames::paint_menu(cairo_t *cr,
       }
    }
 
-   name = vbm->menu[me].name;                                                    //  menu text
-   if (name) {                                                                   //  draw menu text at menu position
+   name = vbm->menu[me].name;                                                          //  menu text
+   if (name) {                                                                         //  draw menu text at menu position
       xpos = vbm->menu[me].namex;
       ypos = vbm->menu[me].namey;
-      cairo_move_to(cr,xpos,ypos);                                               //  draw layout with text
+      cairo_move_to(cr,xpos,ypos);                                                     //  draw layout with text
       cairo_set_source_rgb(cr,vbm->fgRGB[0],vbm->fgRGB[1],vbm->fgRGB[2]);
       if (hilite) playout = vbm->menu[me].playout2;
       else playout = vbm->menu[me].playout1;
@@ -8524,82 +8498,82 @@ void Vmenunames::mouse_event(GtkWidget *
    static GtkWidget        *pwidget = 0;
    static cairo_t          *cr = 0;
 
-   if (widget != pwidget) {                                                      //  widget changed
+   if (widget != pwidget) {                                                            //  widget changed
       if (pwidget) draw_context_destroy(context);
       gdkwin = gtk_layout_get_bin_window(GTK_LAYOUT(widget));
       cr = draw_context_create(gdkwin,context);
-      gdkwin = gtk_widget_get_window(widget);                                    //  get width of menu widget
+      gdkwin = gtk_widget_get_window(widget);                                          //  get width of menu widget
       winww = gdk_window_get_width(gdkwin);
       pwidget = widget;
    }
 
-   mpx = int(event->x);                                                          //  mouse position
+   mpx = int(event->x);                                                                //  mouse position
    mpy = int(event->y);
    button = event->button;
-   if (button == 1 && (event->state & GDK_MOD1_MASK)) button = 3;                //  left butt + ALT key >> right butt
+   if (button == 1 && (event->state & GDK_MOD1_MASK)) button = 3;                      //  left butt + ALT key >> right butt
 
-   if (event->type == GDK_MOTION_NOTIFY)                                         //  mouse inside layout
+   if (event->type == GDK_MOTION_NOTIFY)                                               //  mouse inside layout
    {
-      for (me = 0; me < vbm->mcount; me++) {                                     //  find menu where mouse is
+      for (me = 0; me < vbm->mcount; me++) {                                           //  find menu where mouse is
          ylo = vbm->menu[me].ylo;
          yhi = vbm->menu[me].yhi;
          if (mpy < ylo) continue;
          if (mpy < yhi) break;
       }
 
-      if (me != me0 && me0 >= 0) {                                               //  unhighlight prior
+      if (me != me0 && me0 >= 0) {                                                     //  unhighlight prior
          paint_menu(cr,vbm,me0,0);
          me0 = -1;
       }
 
-      if (me == me0) return;                                                     //  same as before
-      if (me == vbm->mcount) return;                                             //  no new menu match
+      if (me == me0) return;                                                           //  same as before
+      if (me == vbm->mcount) return;                                                   //  no new menu match
 
-      paint_menu(cr,vbm,me,1);                                                   //  highlight menu entry at mouse
-      desc = vbm->menu[me].desc;                                                 //  show tool tip
-      if (desc) poptext_widget(widget,desc,winww,mpy,0,5);                       //  px = menu width, py = mouse           25.0
-      me0 = me;                                                                  //  remember last match
+      paint_menu(cr,vbm,me,1);                                                         //  highlight menu entry at mouse
+      desc = vbm->menu[me].desc;                                                       //  show tool tip
+      if (desc) poptext_widget(widget,desc,winww,mpy,0,5);                             //  px = menu width, py = mouse           25.0
+      me0 = me;                                                                        //  remember last match
       return;
    }
 
-   if (me0 >= 0)                                                                 //  mouse left layout
+   if (me0 >= 0)                                                                       //  mouse left layout
    {
-      poptext_killnow();                                                         //  25.0
-      paint_menu(cr,vbm,me0,0);                                                  //  unhighlight prior
+      poptext_killnow();                                                               //  25.0
+      paint_menu(cr,vbm,me0,0);                                                        //  unhighlight prior
       me0 = -1;
    }
 
-   if (event->type == GDK_BUTTON_PRESS)                                          //  menu entry clicked
-      Fmyclick = 1;                                                              //  button click is mine
- 
-   if (event->type == GDK_BUTTON_RELEASE)                                        //  menu entry clicked
+   if (event->type == GDK_BUTTON_PRESS)                                                //  menu entry clicked
+      Fmyclick = 1;                                                                    //  button click is mine
+
+   if (event->type == GDK_BUTTON_RELEASE)                                              //  menu entry clicked
    {
-      if (Fblock) return;                                                        //  menu is blocked
+      if (Fblock) return;                                                              //  menu is blocked
 
-      if (! Fmyclick) return;                                                    //  ignore unmatched button release
-      Fmyclick = 0;                                                              //    (from vanished popup window)
+      if (! Fmyclick) return;                                                          //  ignore unmatched button release
+      Fmyclick = 0;                                                                    //    (from vanished popup window)
 
-      for (me = 0; me < vbm->mcount; me++) {                                     //  look for clicked menu entry
+      for (me = 0; me < vbm->mcount; me++) {                                           //  look for clicked menu entry
          ylo = vbm->menu[me].ylo;
          yhi = vbm->menu[me].yhi;
          if (mpy < ylo) continue;
          if (mpy < yhi) break;
       }
 
-      if (me == vbm->mcount) return;                                             //  no menu match
+      if (me == vbm->mcount) return;                                                   //  no menu match
 
-      zfuncs::vmenuclickbutton = button;                                         //  1/2/3 = left/mid/right button
+      zfuncs::vmenuclickbutton = button;                                               //  1/2/3 = left/mid/right button
 
-      ww = vbm->menu[me].iconww;                                                 //  get horiz. click posn. on menu icon
-      if (ww) mpx = 100 * (mpx - margin) / ww;                                   //    scale 0-100
+      ww = vbm->menu[me].iconww;                                                       //  get horiz. click posn. on menu icon
+      if (ww) mpx = 100 * (mpx - margin) / ww;                                         //    scale 0-100
       else mpx = 0;
       if (mpx < 0) mpx = 0;
       if (mpx > 100) mpx = 100;
       zfuncs::vmenuclickposn = mpx;
 
-      paint_menu(cr,vbm,me,0);                                                   //  unhighlight menu
+      paint_menu(cr,vbm,me,0);                                                         //  unhighlight menu
 
-      if (vbm->menu[me].setupfunc) {                                             //  call opt. setup function
+      if (vbm->menu[me].setupfunc) {                                                   //  call opt. setup function
          vbm->menu[me].setupfunc(widget,vbm->menu[me].setuparg);
          if (vmenustop) {
             vmenustop = 0;
@@ -8607,10 +8581,10 @@ void Vmenunames::mouse_event(GtkWidget *
          }
       }
 
-      if (button == 3 && vbm->menu[me].RMfunc)                                   //  if right mouse button,
-         vbm->menu[me].RMfunc(widget,vbm->menu[me].RMarg);                       //    call right-mouse function
+      if (button == 3 && vbm->menu[me].RMfunc)                                         //  if right mouse button,
+         vbm->menu[me].RMfunc(widget,vbm->menu[me].RMarg);                             //    call right-mouse function
 
-      else if (vbm->menu[me].LMfunc)                                             //  call left-mouse menu function
+      else if (vbm->menu[me].LMfunc)                                                   //  call left-mouse menu function
          vbm->menu[me].LMfunc(widget,vbm->menu[me].arg);
    }
 
@@ -8647,15 +8621,15 @@ void Vmenunames::mouse_event(GtkWidget *
 
 spldat * splcurve_init(GtkWidget *frame, void func(int spc))
 {
-   int      cc = sizeof(spldat);                                                 //  allocate spc curve data area
+   int      cc = sizeof(spldat);                                                       //  allocate spc curve data area
    spldat * sd = (spldat *) zmalloc(cc,"splcurve");
    memset(sd,0,cc);
 
-   sd->drawarea = gtk_drawing_area_new();                                        //  drawing area for curves
+   sd->drawarea = gtk_drawing_area_new();                                              //  drawing area for curves
    gtk_container_add(GTK_CONTAINER(frame),sd->drawarea);
-   sd->spcfunc = func;                                                           //  user callback function
+   sd->spcfunc = func;                                                                 //  user callback function
 
-   gtk_widget_add_events(sd->drawarea,GDK_BUTTON_PRESS_MASK);                    //  connect mouse events to drawing area
+   gtk_widget_add_events(sd->drawarea,GDK_BUTTON_PRESS_MASK);                          //  connect mouse events to drawing area
    gtk_widget_add_events(sd->drawarea,GDK_BUTTON_RELEASE_MASK);
    gtk_widget_add_events(sd->drawarea,GDK_BUTTON1_MOTION_MASK);
    G_SIGNAL(sd->drawarea,"motion-notify-event",splcurve_adjust,sd);
@@ -8673,20 +8647,20 @@ int splcurve_adjust(void *, GdkEventButt
 {
    int            ww, hh, kk;
    int            mx, my, button, evtype;
-   static int     spc, ap, mbusy = 0, Fdrag = 0;                                 //  drag continuation logic
+   static int     spc, ap, mbusy = 0, Fdrag = 0;                                       //  drag continuation logic
    int            minspc, minap, apset = 0;
    float          mxval, myval, cxval, cyval;
    float          dist2, mindist2 = 0;
    float          dist, dx, dy;
-   float          minx = 0.01 * splcurve_minx;                                   //  % to absolute distance
+   float          minx = 0.01 * splcurve_minx;                                         //  % to absolute distance
 
-   mx = event->x;                                                                //  mouse position in drawing area
+   mx = event->x;                                                                      //  mouse position in drawing area
    my = event->y;
    evtype = event->type;
    button = event->button;
 
    if (evtype == GDK_MOTION_NOTIFY) {
-      if (mbusy) return 0;                                                       //  discard excess motion events
+      if (mbusy) return 0;                                                             //  discard excess motion events
       mbusy++;
       zmainloop();
       mbusy = 0;
@@ -8697,20 +8671,20 @@ int splcurve_adjust(void *, GdkEventButt
       return 0;
    }
 
-   ww = gtk_widget_get_allocated_width(sd->drawarea);                            //  drawing area size
+   ww = gtk_widget_get_allocated_width(sd->drawarea);                                  //  drawing area size
    hh = gtk_widget_get_allocated_height(sd->drawarea);
 
-   if (mx < 0) mx = 0;                                                           //  limit edge excursions
+   if (mx < 0) mx = 0;                                                                 //  limit edge excursions
    if (mx > ww) mx = ww;
    if (my < 0) my = 0;
    if (my > hh) my = hh;
 
-   if (evtype == GDK_BUTTON_PRESS) Fdrag = 0;                                    //  left or right click
+   if (evtype == GDK_BUTTON_PRESS) Fdrag = 0;                                          //  left or right click
 
-   if (Fdrag)                                                                    //  continuation of drag
+   if (Fdrag)                                                                          //  continuation of drag
    {
       if (sd->vert[spc]) {
-         mxval = 1.0 * my / hh;                                                  //  mouse position in curve space
+         mxval = 1.0 * my / hh;                                                        //  mouse position in curve space
          myval = 1.0 * mx / ww;
       }
       else {
@@ -8718,35 +8692,35 @@ int splcurve_adjust(void *, GdkEventButt
          myval = 1.0 * (hh - my) / hh;
       }
 
-      if (ap < sd->nap[spc] - 1) {                                               //  not the last anchor point
-         dx = sd->apx[spc][ap+1] - mxval;                                        //  get distance to next anchor point
-         if (dx < 0.01) return 0;                                                //  x-value not increasing, forbid
+      if (ap < sd->nap[spc] - 1) {                                                     //  not the last anchor point
+         dx = sd->apx[spc][ap+1] - mxval;                                              //  get distance to next anchor point
+         if (dx < 0.01) return 0;                                                      //  x-value not increasing, forbid
          dy = sd->apy[spc][ap+1] - myval;
          dist = sqrtf(dx * dx + dy * dy);
-         if (dist < minx) return 0;                                              //  too close, forbid
+         if (dist < minx) return 0;                                                    //  too close, forbid
       }
-      if (ap > 0) {                                                              //  not the first anchor point
-         dx = mxval - sd->apx[spc][ap-1];                                        //  get distance to prior anchor point
-         if (dx < 0.01) return 0;                                                //  x-value not increasing, forbid
+      if (ap > 0) {                                                                    //  not the first anchor point
+         dx = mxval - sd->apx[spc][ap-1];                                              //  get distance to prior anchor point
+         if (dx < 0.01) return 0;                                                      //  x-value not increasing, forbid
          dy = myval - sd->apy[spc][ap-1];
          dist = sqrtf(dx * dx + dy * dy);
-         if (dist < minx) return 0;                                              //  too close, forbid
+         if (dist < minx) return 0;                                                    //  too close, forbid
       }
 
-      apset = 1;                                                                 //  mxval/myval = new node position
+      apset = 1;                                                                       //  mxval/myval = new node position
    }
 
-   else                                                                          //  mouse click or new drag begin
+   else                                                                                //  mouse click or new drag begin
    {
-      minspc = minap = -1;                                                       //  find closest curve/anchor point
+      minspc = minap = -1;                                                             //  find closest curve/anchor point
       mindist2 = 999999;
 
-      for (spc = 0; spc < sd->Nspc; spc++)                                       //  loop curves
+      for (spc = 0; spc < sd->Nspc; spc++)                                             //  loop curves
       {
-         if (! sd->fact[spc]) continue;                                          //  not active
+         if (! sd->fact[spc]) continue;                                                //  not active
 
          if (sd->vert[spc]) {
-            mxval = 1.0 * my / hh;                                               //  mouse position in curve space
+            mxval = 1.0 * my / hh;                                                     //  mouse position in curve space
             myval = 1.0 * mx / ww;
          }
          else {
@@ -8754,44 +8728,44 @@ int splcurve_adjust(void *, GdkEventButt
             myval = 1.0 * (hh - my) / hh;
          }
 
-         for (ap = 0; ap < sd->nap[spc]; ap++)                                   //  loop anchor points
+         for (ap = 0; ap < sd->nap[spc]; ap++)                                         //  loop anchor points
          {
             cxval = sd->apx[spc][ap];
             cyval = sd->apy[spc][ap];
             dist2 = (mxval-cxval)*(mxval-cxval)
                   + (myval-cyval)*(myval-cyval);
             if (dist2 < mindist2) {
-               mindist2 = dist2;                                                 //  remember closest anchor point
+               mindist2 = dist2;                                                       //  remember closest anchor point
                minspc = spc;
                minap = ap;
             }
          }
       }
 
-      if (minspc < 0) return 0;                                                  //  impossible
-      spc = minspc;                                                              //  nearest curve
-      ap = minap;                                                                //  nearest anchor point
+      if (minspc < 0) return 0;                                                        //  impossible
+      spc = minspc;                                                                    //  nearest curve
+      ap = minap;                                                                      //  nearest anchor point
    }
 
-   if (evtype == GDK_BUTTON_PRESS && button == 3)                                //  right click, remove anchor point
+   if (evtype == GDK_BUTTON_PRESS && button == 3)                                      //  right click, remove anchor point
    {
-      if (sqrtf(mindist2) > minx) return 0;                                      //  not close enough
-      if (sd->nap[spc] < 3) return 0;                                            //  < 2 anchor points would remain
-      sd->nap[spc]--;                                                            //  decr. before loop
+      if (sqrtf(mindist2) > minx) return 0;                                            //  not close enough
+      if (sd->nap[spc] < 3) return 0;                                                  //  < 2 anchor points would remain
+      sd->nap[spc]--;                                                                  //  decr. before loop
       for (kk = ap; kk < sd->nap[spc]; kk++) {
          sd->apx[spc][kk] = sd->apx[spc][kk+1];
          sd->apy[spc][kk] = sd->apy[spc][kk+1];
       }
-      splcurve_generate(sd,spc);                                                 //  regenerate data for modified curve
+      splcurve_generate(sd,spc);                                                       //  regenerate data for modified curve
       gtk_widget_queue_draw(sd->drawarea);
-      sd->spcfunc(spc);                                                          //  call user function
+      sd->spcfunc(spc);                                                                //  call user function
       return 0;
    }
 
-   if (! Fdrag)                                                                  //  new drag or left click
+   if (! Fdrag)                                                                        //  new drag or left click
    {
       if (sd->vert[spc]) {
-         mxval = 1.0 * my / hh;                                                  //  mouse position in curve space
+         mxval = 1.0 * my / hh;                                                        //  mouse position in curve space
          myval = 1.0 * mx / ww;
       }
       else {
@@ -8799,37 +8773,37 @@ int splcurve_adjust(void *, GdkEventButt
          myval = 1.0 * (hh - my) / hh;
       }
 
-      if (sqrtf(mindist2) < minx)                                                //  anchor point close enough,
-      {                                                                          //    move this one to mouse position
-         if (ap < sd->nap[spc]-1) {                                              //  not the last anchor point
-            dx = sd->apx[spc][ap+1] - mxval;                                     //  get distance to next anchor point
-            if (dx < 0.01) return 0;                                             //  x-value not increasing, forbid
+      if (sqrtf(mindist2) < minx)                                                      //  anchor point close enough,
+      {                                                                                //    move this one to mouse position
+         if (ap < sd->nap[spc]-1) {                                                    //  not the last anchor point
+            dx = sd->apx[spc][ap+1] - mxval;                                           //  get distance to next anchor point
+            if (dx < 0.01) return 0;                                                   //  x-value not increasing, forbid
             dy = sd->apy[spc][ap+1] - myval;
             dist = sqrtf(dx * dx + dy * dy);
-            if (dist < minx) return 0;                                           //  too close, forbid
+            if (dist < minx) return 0;                                                 //  too close, forbid
          }
-         if (ap > 0) {                                                           //  not the first anchor point
-            dx = mxval - sd->apx[spc][ap-1];                                     //  get distance to prior anchor point
-            if (dx < 0.01) return 0;                                             //  x-value not increasing, forbid
+         if (ap > 0) {                                                                 //  not the first anchor point
+            dx = mxval - sd->apx[spc][ap-1];                                           //  get distance to prior anchor point
+            if (dx < 0.01) return 0;                                                   //  x-value not increasing, forbid
             dy = myval - sd->apy[spc][ap-1];
             dist = sqrtf(dx * dx + dy * dy);
-            if (dist < minx) return 0;                                           //  too close, forbid
+            if (dist < minx) return 0;                                                 //  too close, forbid
          }
 
-         apset = 1;                                                              //  mxval/myval = new node position
+         apset = 1;                                                                    //  mxval/myval = new node position
       }
 
-      else                                                                       //  none close, add new anchor point
+      else                                                                             //  none close, add new anchor point
       {
-         minspc = -1;                                                            //  find closest curve to mouse
+         minspc = -1;                                                                  //  find closest curve to mouse
          mindist2 = 999999;
 
-         for (spc = 0; spc < sd->Nspc; spc++)                                    //  loop curves
+         for (spc = 0; spc < sd->Nspc; spc++)                                          //  loop curves
          {
-            if (! sd->fact[spc]) continue;                                       //  not active
+            if (! sd->fact[spc]) continue;                                             //  not active
 
             if (sd->vert[spc]) {
-               mxval = 1.0 * my / hh;                                            //  mouse position in curve space
+               mxval = 1.0 * my / hh;                                                  //  mouse position in curve space
                myval = 1.0 * mx / ww;
             }
             else {
@@ -8840,13 +8814,13 @@ int splcurve_adjust(void *, GdkEventButt
             cyval = splcurve_yval(sd,spc,mxval);
             dist2 = fabsf(myval - cyval);
             if (dist2 < mindist2) {
-               mindist2 = dist2;                                                 //  remember closest curve
+               mindist2 = dist2;                                                       //  remember closest curve
                minspc = spc;
             }
          }
 
-         if (minspc < 0) return 0;                                               //  impossible
-         if (mindist2 > minx) return 0;                                          //  not close enough to any curve
+         if (minspc < 0) return 0;                                                     //  impossible
+         if (mindist2 > minx) return 0;                                                //  not close enough to any curve
          spc = minspc;
 
          if (sd->nap[spc] > 49) {
@@ -8855,7 +8829,7 @@ int splcurve_adjust(void *, GdkEventButt
          }
 
          if (sd->vert[spc]) {
-            mxval = 1.0 * my / hh;                                               //  mouse position in curve space
+            mxval = 1.0 * my / hh;                                                     //  mouse position in curve space
             myval = 1.0 * mx / ww;
          }
          else {
@@ -8863,33 +8837,33 @@ int splcurve_adjust(void *, GdkEventButt
             myval = 1.0 * (hh - my) / hh;
          }
 
-         for (ap = 0; ap < sd->nap[spc]; ap++)                                   //  find anchor point with next higher x
-            if (mxval <= sd->apx[spc][ap]) break;                                //    (ap may come out 0 or nap)
+         for (ap = 0; ap < sd->nap[spc]; ap++)                                         //  find anchor point with next higher x
+            if (mxval <= sd->apx[spc][ap]) break;                                      //    (ap may come out 0 or nap)
 
-         if (ap < sd->nap[spc] && sd->apx[spc][ap] - mxval < minx)               //  disallow < minx from next
-               return 0;                                                         //    or prior anchor point
+         if (ap < sd->nap[spc] && sd->apx[spc][ap] - mxval < minx)                     //  disallow < minx from next
+               return 0;                                                               //    or prior anchor point
          if (ap > 0 && mxval - sd->apx[spc][ap-1] < minx) return 0;
 
-         for (kk = sd->nap[spc]; kk > ap; kk--) {                                //  make hole for new point
+         for (kk = sd->nap[spc]; kk > ap; kk--) {                                      //  make hole for new point
             sd->apx[spc][kk] = sd->apx[spc][kk-1];
             sd->apy[spc][kk] = sd->apy[spc][kk-1];
          }
 
-         sd->nap[spc]++;                                                         //  up point count
-         apset = 1;                                                              //  mxval/myval = new node position
+         sd->nap[spc]++;                                                               //  up point count
+         apset = 1;                                                                    //  mxval/myval = new node position
       }
    }
 
-   if (evtype == GDK_MOTION_NOTIFY) Fdrag = 1;                                   //  remember drag is underway
+   if (evtype == GDK_MOTION_NOTIFY) Fdrag = 1;                                         //  remember drag is underway
 
    if (apset)
    {
-      sd->apx[spc][ap] = mxval;                                                  //  new or moved anchor point
-      sd->apy[spc][ap] = myval;                                                  //    at mouse position
+      sd->apx[spc][ap] = mxval;                                                        //  new or moved anchor point
+      sd->apy[spc][ap] = myval;                                                        //    at mouse position
 
-      splcurve_generate(sd,spc);                                                 //  regenerate data for modified curve
-      if (sd->drawarea) gtk_widget_queue_draw(sd->drawarea);                     //  redraw graph
-      if (sd->spcfunc) sd->spcfunc(spc);                                         //  call user function
+      splcurve_generate(sd,spc);                                                       //  regenerate data for modified curve
+      if (sd->drawarea) gtk_widget_queue_draw(sd->drawarea);                           //  redraw graph
+      if (sd->spcfunc) sd->spcfunc(spc);                                               //  call user function
    }
 
    return 0;
@@ -8903,24 +8877,24 @@ int splcurve_adjust(void *, GdkEventButt
 int splcurve_addnode(spldat *sd, int spc, float px, float py)
 {
    int      ap, kk;
-   float    minx = 0.01 * splcurve_minx;                                         //  % to absolute distance
+   float    minx = 0.01 * splcurve_minx;                                               //  % to absolute distance
 
-   for (ap = 0; ap < sd->nap[spc]; ap++)                                         //  find anchor point with next higher x
-      if (px <= sd->apx[spc][ap]) break;                                         //    (ap may come out 0 or nap)
+   for (ap = 0; ap < sd->nap[spc]; ap++)                                               //  find anchor point with next higher x
+      if (px <= sd->apx[spc][ap]) break;                                               //    (ap may come out 0 or nap)
 
-   if (ap < sd->nap[spc] && sd->apx[spc][ap] - px < minx)                        //  disallow < minx from next
-         return 0;                                                               //    or prior anchor point
+   if (ap < sd->nap[spc] && sd->apx[spc][ap] - px < minx)                              //  disallow < minx from next
+         return 0;                                                                     //    or prior anchor point
    if (ap > 0 && px - sd->apx[spc][ap-1] < minx) return 0;
 
-   for (kk = sd->nap[spc]; kk > ap; kk--) {                                      //  make hole for new point
+   for (kk = sd->nap[spc]; kk > ap; kk--) {                                            //  make hole for new point
       sd->apx[spc][kk] = sd->apx[spc][kk-1];
       sd->apy[spc][kk] = sd->apy[spc][kk-1];
    }
 
-   sd->apx[spc][ap] = px;                                                        //  add node coordinates
+   sd->apx[spc][ap] = px;                                                              //  add node coordinates
    sd->apy[spc][ap] = py;
 
-   sd->nap[spc]++;                                                               //  up point count
+   sd->nap[spc]++;                                                                     //  up point count
    return 1;
 }
 
@@ -8944,17 +8918,17 @@ int splcurve_draw(GtkWidget *drawarea, c
 {
    int         ww, hh, spc, ap;
    float       xval, yval, px, py, qx, qy;
-   
-   if (! sd || ! sd->drawarea) return 0;                                         //  25.0
-   
-   ww = gtk_widget_get_allocated_width(sd->drawarea);                            //  drawing area size
+
+   if (! sd || ! sd->drawarea) return 0;                                               //  25.0
+
+   ww = gtk_widget_get_allocated_width(sd->drawarea);                                  //  drawing area size
    hh = gtk_widget_get_allocated_height(sd->drawarea);
    if (ww < 50 || hh < 50) return 0;
 
    cairo_set_line_width(cr,1);
    cairo_set_source_rgb(cr,0.7,0.7,0.7);
 
-   for (int ii = 0; ii < sd->Nscale; ii++)                                       //  draw y-scale lines if any
+   for (int ii = 0; ii < sd->Nscale; ii++)                                             //  draw y-scale lines if any
    {
       px = ww * sd->xscale[0][ii];
       py = hh - hh * sd->yscale[0][ii];
@@ -8967,13 +8941,13 @@ int splcurve_draw(GtkWidget *drawarea, c
 
    cairo_set_source_rgb(cr,0,0,0);
 
-   for (spc = 0; spc < sd->Nspc; spc++)                                          //  loop all curves
+   for (spc = 0; spc < sd->Nspc; spc++)                                                //  loop all curves
    {
-      if (! sd->fact[spc]) continue;                                             //  not active
+      if (! sd->fact[spc]) continue;                                                   //  not active
 
-      if (sd->vert[spc])                                                         //  vert. curve
+      if (sd->vert[spc])                                                               //  vert. curve
       {
-         for (py = 0; py < hh; py++)                                             //  generate all points for curve
+         for (py = 0; py < hh; py++)                                                   //  generate all points for curve
          {
             xval = 1.0 * py / hh;
             yval = splcurve_yval(sd,spc,xval);
@@ -8983,7 +8957,7 @@ int splcurve_draw(GtkWidget *drawarea, c
          }
          cairo_stroke(cr);
 
-         for (ap = 0; ap < sd->nap[spc]; ap++)                                   //  draw boxes at anchor points
+         for (ap = 0; ap < sd->nap[spc]; ap++)                                         //  draw boxes at anchor points
          {
             xval = sd->apx[spc][ap];
             yval = sd->apy[spc][ap];
@@ -8993,9 +8967,9 @@ int splcurve_draw(GtkWidget *drawarea, c
          }
          cairo_fill(cr);
       }
-      else                                                                       //  horz. curve
+      else                                                                             //  horz. curve
       {
-         for (px = 0; px < ww; px++)                                             //  generate all points for curve
+         for (px = 0; px < ww; px++)                                                   //  generate all points for curve
          {
             xval = 1.0 * px / ww;
             yval = splcurve_yval(sd,spc,xval);
@@ -9005,7 +8979,7 @@ int splcurve_draw(GtkWidget *drawarea, c
          }
          cairo_stroke(cr);
 
-         for (ap = 0; ap < sd->nap[spc]; ap++)                                   //  draw boxes at anchor points
+         for (ap = 0; ap < sd->nap[spc]; ap++)                                         //  draw boxes at anchor points
          {
             xval = sd->apx[spc][ap];
             yval = sd->apy[spc][ap];
@@ -9028,22 +9002,22 @@ int splcurve_generate(spldat *sd, int sp
    int      kk, kklo, kkhi;
    float    xval, yvalx;
 
-   spline1(sd->nap[spc],sd->apx[spc],sd->apy[spc]);                              //  compute curve fitting anchor points
+   spline1(sd->nap[spc],sd->apx[spc],sd->apy[spc]);                                    //  compute curve fitting anchor points
 
-   kklo = 1000 * sd->apx[spc][0] - 30;                                           //  xval range = anchor point range
-   if (kklo < 0) kklo = 0;                                                       //    + 0.03 extra below/above
+   kklo = 1000 * sd->apx[spc][0] - 30;                                                 //  xval range = anchor point range
+   if (kklo < 0) kklo = 0;                                                             //    + 0.03 extra below/above
    kkhi = 1000 * sd->apx[spc][sd->nap[spc]-1] + 30;
    if (kkhi > 1000) kkhi = 1000;
 
-   for (kk = 0; kk < 1000; kk++)                                                 //  generate all points for curve
+   for (kk = 0; kk < 1000; kk++)                                                       //  generate all points for curve
    {
-      xval = 0.001 * kk;                                                         //  remove anchor point limits
+      xval = 0.001 * kk;                                                               //  remove anchor point limits
       yvalx = spline2(xval);
-      if (yvalx < 0) yvalx = 0;                                                  //  yval < 0 not allowed, > 1 OK
+      if (yvalx < 0) yvalx = 0;                                                        //  yval < 0 not allowed, > 1 OK
       sd->yval[spc][kk] = yvalx;
    }
 
-   sd->mod[spc] = 1;                                                             //  mark curve modified
+   sd->mod[spc] = 1;                                                                   //  mark curve modified
 
    return 0;
 }
@@ -9082,24 +9056,24 @@ int splcurve_load(spldat *sd, FILE *fid)
 
    pp = fgets_trim(buff,300,fid,1);
    if (! pp) goto fail;
-   nn = sscanf(pp,"%d",&Nspc);                                                   //  no. of curves
+   nn = sscanf(pp,"%d",&Nspc);                                                         //  no. of curves
    if (nn != 1) goto fail;
    if (Nspc < 1 || Nspc > 10) goto fail;
    if (Nspc != sd->Nspc) goto fail;
 
-   for (ii = 0; ii < Nspc; ii++)                                                 //  loop each curve
+   for (ii = 0; ii < Nspc; ii++)                                                       //  loop each curve
    {
       pp = fgets_trim(buff,300,fid,1);
       if (! pp) goto fail;
-      nn = sscanf(pp,"%d %d %d",&fact[ii],&vert[ii],&nap[ii]);                   //  active flag, vert flag, anchors
+      nn = sscanf(pp,"%d %d %d",&fact[ii],&vert[ii],&nap[ii]);                         //  active flag, vert flag, anchors
       if (nn != 3) goto fail;
       if (fact[ii] < 0 || fact[ii] > 1) goto fail;
       if (vert[ii] < 0 || vert[ii] > 1) goto fail;
       if (nap[ii] < 2 || nap[ii] > 50) goto fail;
 
-      pp = fgets_trim(buff,300,fid,1);                                           //  anchor points: nnn/nnn nnn/nnn ...
+      pp = fgets_trim(buff,300,fid,1);                                                 //  anchor points: nnn/nnn nnn/nnn ...
 
-      for (jj = 0; jj < nap[ii]; jj++)                                           //  anchor point values
+      for (jj = 0; jj < nap[ii]; jj++)                                                 //  anchor point values
       {
          pp = (ch *) substring(buff,"/ ",2*jj+1);
          if (! pp) goto fail;
@@ -9114,7 +9088,7 @@ int splcurve_load(spldat *sd, FILE *fid)
 
    if (myfid) fclose(fid);
 
-   sd->Nspc = Nspc;                                                              //  copy curve data to caller's arg
+   sd->Nspc = Nspc;                                                                    //  copy curve data to caller's arg
 
    for (ii = 0; ii < Nspc; ii++)
    {
@@ -9129,13 +9103,13 @@ int splcurve_load(spldat *sd, FILE *fid)
       }
    }
 
-   for (ii = 0; ii < Nspc; ii++)                                                 //  generate curve data from anchor points
+   for (ii = 0; ii < Nspc; ii++)                                                       //  generate curve data from anchor points
       splcurve_generate(sd,ii);
 
-   if (sd->drawarea)                                                             //  redraw all curves
+   if (sd->drawarea)                                                                   //  redraw all curves
       gtk_widget_queue_draw(sd->drawarea);
 
-   return 0;                                                                     //  success
+   return 0;                                                                           //  success
 
 fail:
    if (fid && myfid) fclose(fid);
@@ -9150,12 +9124,12 @@ int splcurve_save(spldat *sd, FILE *fid)
 {
    int         ii, jj, myfid = 0;
 
-   fprintf(fid,"%d \n",sd->Nspc);                                                //  no. of curves
+   fprintf(fid,"%d \n",sd->Nspc);                                                      //  no. of curves
 
-   for (ii = 0; ii < sd->Nspc; ii++)                                             //  loop each curve
+   for (ii = 0; ii < sd->Nspc; ii++)                                                   //  loop each curve
    {
-      fprintf(fid,"%d %d %d \n",sd->fact[ii],sd->vert[ii],sd->nap[ii]);          //  active flag, vert flag, anchors
-      for (jj = 0; jj < sd->nap[ii]; jj++)                                       //  anchor point values
+      fprintf(fid,"%d %d %d \n",sd->fact[ii],sd->vert[ii],sd->nap[ii]);                //  active flag, vert flag, anchors
+      for (jj = 0; jj < sd->nap[ii]; jj++)                                             //  anchor point values
          fprintf(fid,"%.4f/%.4f  ",sd->apx[ii][jj],sd->apy[ii][jj]);
       fprintf(fid,"\n");
    }
@@ -9184,7 +9158,7 @@ int splcurve_save(spldat *sd, FILE *fid)
 
 int  zdialog_widget_event(GtkWidget *, zdialog *zd);
 int  zdialog_delete_event(GtkWidget *, GdkEvent *, zdialog *zd);
-int  zdialog_zspin_event(GtkWidget *, GdkEvent *, zdialog *zd);                  //  "zspin" widget
+int  zdialog_zspin_event(GtkWidget *, GdkEvent *, zdialog *zd);                        //  "zspin" widget
 
 //  create a new zdialog dialog
 //  The title and parent arguments may be null.
@@ -9197,7 +9171,7 @@ int  zdialog_zspin_event(GtkWidget *, Gd
 //  (1-10) used to end the dialog. Status < 0 indicates the [x] button
 //  was used or the dialog was killed by the program itself.
 
-zdialog * zdialog_new(ch *title, GtkWidget *parent, ...)                         //  parent added
+zdialog * zdialog_new(ch *title, GtkWidget *parent, ...)                               //  completion buttons ending with null
 {
    zdialog        *zd;
    GtkWidget      *dialog, *hbox, *vbox, *butt, *hsep;
@@ -9209,9 +9183,9 @@ zdialog * zdialog_new(ch *title, GtkWidg
    if (! main_thread()) zappcrash("illegal call from thread");
 
    va_start(arglist,parent);
-   for (nbu = 0; nbu < zdmaxbutts; nbu++) {                                      //  get completion buttons
+   for (nbu = 0; nbu < zdmaxbutts; nbu++) {                                            //  get completion buttons
       bulab[nbu] = va_arg(arglist, ch *);
-      if (! bulab[nbu] || bulab[nbu] == (ch *) 0x100000000) break;               //  ARM bug
+      if (! bulab[nbu] || bulab[nbu] == (ch *) 0x100000000) break;                     //  ARM bug
    }
    va_end(arglist);
 
@@ -9219,9 +9193,9 @@ zdialog * zdialog_new(ch *title, GtkWidg
 
    dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(dialog),title);
-   vbox = gtk_box_new(VERTICAL,0);                                               //  vertical packing box
-   gtk_container_add(GTK_CONTAINER(dialog),vbox);                                //  add to main window
-   gtk_window_set_default_size(GTK_WINDOW(dialog),10,10);                        //  stop auto width of 150 pixels
+   vbox = gtk_box_new(VERTICAL,0);                                                     //  vertical packing box
+   gtk_container_add(GTK_CONTAINER(dialog),vbox);                                      //  add to main window
+   gtk_window_set_default_size(GTK_WINDOW(dialog),10,10);                              //  stop auto width of 150 pixels
 
    if (parent)
       gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(parent));
@@ -9229,52 +9203,52 @@ zdialog * zdialog_new(ch *title, GtkWidg
    gtk_box_set_spacing(GTK_BOX(vbox),2);
    gtk_container_set_border_width(GTK_CONTAINER(vbox),5);
 
-   cc = sizeof(zdialog);                                                         //  allocate zdialog
+   cc = sizeof(zdialog);                                                               //  allocate zdialog
    zd = (zdialog *) zmalloc(cc,"zdialog");
 
-   if (zdialog_count == zdialog_max) {                                           //  add to active list
+   if (zdialog_count == zdialog_max) {                                                 //  add to active list
       for (ii = 0; ii < zdialog_count; ii++)
-         Plog(0,"dialog: %s \n",zdialog_list[ii]->widget[0].data);
+         printf("*** dialog: %s \n",zdialog_list[ii]->widget[0].data);
       zappcrash("max. zdialogs exceeded");
    }
 
    zdialog_list[zdialog_count] = zd;
    zdialog_count++;
 
-   if (nbu) {                                                                    //  completion buttons
-      hbox = gtk_box_new(HORIZONTAL,2);                                          //  add hbox for buttons at bottom
+   if (nbu) {                                                                          //  completion buttons
+      hbox = gtk_box_new(HORIZONTAL,2);                                                //  add hbox for buttons at bottom
       gtk_box_pack_end(GTK_BOX(vbox),hbox,0,0,2);
-      hsep = gtk_separator_new(HORIZONTAL);                                      //  add separator line
+      hsep = gtk_separator_new(HORIZONTAL);                                            //  add separator line
       gtk_box_pack_end(GTK_BOX(vbox),hsep,0,0,5);
 
-      for (ii = nbu-1; ii >= 0; ii--) {                                          //  add buttons to hbox
-         butt = gtk_button_new_with_label(bulab[ii]);                            //  reverse order nbu-1...0
+      for (ii = nbu-1; ii >= 0; ii--) {                                                //  add buttons to hbox
+         butt = gtk_button_new_with_label(bulab[ii]);                                  //  reverse order nbu-1...0
          gtk_box_pack_end(GTK_BOX(hbox),butt,0,0,2);
-         G_SIGNAL(butt,"clicked",zdialog_widget_event,zd);                       //  connect to event function
-         zd->compwidget[ii] = butt;                                              //  save button widgets
-         zd->compbutton[ii] = bulab[ii];                                         //  and button labels
+         G_SIGNAL(butt,"clicked",zdialog_widget_event,zd);                             //  connect to event function
+         zd->compwidget[ii] = butt;                                                    //  save button widgets
+         zd->compbutton[ii] = bulab[ii];                                               //  and button labels
       }
    }
 
-   zd->compbutton[nbu] = 0;                                                      //  mark EOL
-
-   zd->dialog = dialog;                                                          //  dialog window
-   zd->title = zstrdup(title,"zdialog");                                         //  dialog title
-   zd->parent = parent;                                                          //  parent window
-   zd->sentinel1 = zdsentinel | (lrandz() & 0x0000FFFF);                         //  validity sentinels
-   zd->sentinel2 = zd->sentinel1;                                                //  fixed part + random part
-   zd->uniqueID = uniqueID++;                                                    //  increment unique ID
-   zd->eventCB = 0;                                                              //  no user event callback function
-   zd->zstat = 0;                                                                //  no zdialog status
-   zd->disabled = 1;                                                             //  widget signals disabled
-   zd->saveposn = 0;                                                             //  position not saved
+   zd->compbutton[nbu] = 0;                                                            //  mark EOL
+
+   zd->dialog = dialog;                                                                //  dialog window
+   zd->title = zstrdup(title,"zdialog");                                               //  dialog title
+   zd->parent = parent;                                                                //  parent window
+   zd->sentinel1 = zdsentinel | (lrandz() & 0x0000FFFF);                               //  validity sentinels
+   zd->sentinel2 = zd->sentinel1;                                                      //  fixed part + random part
+   zd->uniqueID = uniqueID++;                                                          //  increment unique ID
+   zd->eventCB = 0;                                                                    //  no user event callback function
+   zd->zstat = 0;                                                                      //  no zdialog status
+   zd->disabled = 1;                                                                   //  widget signals disabled
+   zd->saveposn = 0;                                                                   //  position not saved
 
-   zd->widget[0].wname = "dialog";                                               //  set up 1st widget = dialog
+   zd->widget[0].wname = "dialog";                                                     //  set up 1st widget = dialog
    zd->widget[0].type = "dialog";
-   zd->widget[0].pname = 0;                                                      //  no parent
+   zd->widget[0].pname = 0;                                                            //  no parent
    zd->widget[0].data = zstrdup(title,"zdialog");
    zd->widget[0].widget = dialog;
-   zd->widget[1].type = 0;                                                       //  eof - no contained widgets yet
+   zd->widget[1].type = 0;                                                             //  eof - no contained widgets yet
 
    return zd;
 }
@@ -9318,8 +9292,8 @@ void zdialog_set_decorated(zdialog *zd,
    gtk_widget_add_events(widget,GDK_BUTTON_PRESS_MASK);
    gtk_widget_add_events(widget,GDK_BUTTON_RELEASE_MASK);
    gtk_widget_add_events(widget,GDK_POINTER_MOTION_MASK);
-   G_SIGNAL(widget,"button-press-event",zdialog_drag,0);                         //  connect mouse events to drag
-   G_SIGNAL(widget,"button-release-event",zdialog_drag,0);                       //    undecorated window
+   G_SIGNAL(widget,"button-press-event",zdialog_drag,0);                               //  connect mouse events to drag
+   G_SIGNAL(widget,"button-release-event",zdialog_drag,0);                             //    undecorated window
    G_SIGNAL(widget,"motion-notify-event",zdialog_drag,0);
    return;
 }
@@ -9333,13 +9307,13 @@ void zdialog_drag(GtkWidget *widget, Gdk
    if (! main_thread()) zappcrash("illegal call from thread");
 
    type = event->type;
-   gdk_device_get_position(zfuncs::mouse,0,&mx,&my);                             //  mouse position in monitor
+   gdk_device_get_position(zfuncs::mouse,0,&mx,&my);                                   //  mouse position in monitor
 
    if (type == GDK_BUTTON_PRESS) {
       bdown = 1;
-      mx0 = mx;                                                                  //  drag start
+      mx0 = mx;                                                                        //  drag start
       my0 = my;
-      gtk_window_get_position(GTK_WINDOW(widget),&wx0,&wy0);                     //  initial window position
+      gtk_window_get_position(GTK_WINDOW(widget),&wx0,&wy0);                           //  initial window position
    }
 
    if (type == GDK_BUTTON_RELEASE)
@@ -9369,16 +9343,6 @@ void zdialog_present(zdialog *zd)
 }
 
 
-//  set zdialog can or can not receive focus (informational or report dialog)
-
-void zdialog_can_focus(zdialog *zd, int Fcan)
-{
-   if (! main_thread()) zappcrash("illegal call from thread");
-   gtk_window_set_accept_focus(GTK_WINDOW(zd->dialog),Fcan);
-   return;
-}
-
-
 //  set focus on dialog window or window and named widget
 //  (widget name may be null or missing)
 //  see also: gtk_window_activate_focus(GtkWindow *)
@@ -9422,10 +9386,10 @@ void zdialog_set_focus(zdialog *zd, ch *
 //   Multiple radio buttons with same parent are a group: pressing one turns the others OFF.
 
 int zdialog_add_widget_long (
-     zdialog *zd, ch *type, ch *wname, ch *pname,                                //  mandatory args
-     ch *data, int size, int homog, int expand, int space, int wrap)             //  optional args (default = 0)
+     zdialog *zd, ch *type, ch *wname, ch *pname,                                      //  mandatory args
+     ch *data, int size, int homog, int expand, int space, int wrap)                   //  optional args (default = 0)
 {
-   int textview_focus_in_event(GtkWidget *widget);                               //  for popup_text insertion
+   int textview_focus_in_event(GtkWidget *widget);                                     //  for popup_text insertion
    int zdialog_activate_event(GtkWidget *, zdialog *zd);
 
    GtkWidget      *widget = 0, *pwidget = 0, *fwidget = 0;
@@ -9444,10 +9408,10 @@ int zdialog_add_widget_long (
 
    if (! zdialog_valid(zd)) zappcrash("zdialog invalid");
 
-   for (iiw = 1; zd->widget[iiw].type; iiw++);                                   //  find next avail. slot
+   for (iiw = 1; zd->widget[iiw].type; iiw++);                                         //  find next avail. slot
    if (iiw > zdmaxwidgets-2) zappcrash("too many widgets: %d",iiw);
 
-   zd->widget[iiw].type = zstrdup(type,"zdialog");                               //  initz. widget struct
+   zd->widget[iiw].type = zstrdup(type,"zdialog");                                     //  initz. widget struct
    zd->widget[iiw].wname = zstrdup(wname,"zdialog");
    zd->widget[iiw].pname = zstrdup(pname,"zdialog");
    zd->widget[iiw].data = 0;
@@ -9458,42 +9422,42 @@ int zdialog_add_widget_long (
    zd->widget[iiw].wrap = wrap;
    zd->widget[iiw].widget = 0;
 
-   zd->widget[iiw+1].type = 0;                                                   //  set new EOF marker
+   zd->widget[iiw+1].type = 0;                                                         //  set new EOF marker
 
    if (strmatchV(type,"dialog","hbox","vbox","hsep","vsep","frame","scrwin",
                       "label","link","entry","zentry","zedit","text","report",
                       "button","zbutton","togbutt","check","radio",
                       "imagebutt","colorbutt","combo","spin","zspin",
                       "hscale","hscale2","vscale","icon","image",null) == 0) {
-      Plog(0,"zdialog, bad widget type: %s \n",type);
+      printf("*** zdialog, bad widget type: %s \n",type);
       return 0;
    }
 
-   for (iip = iiw-1; iip >= 0; iip--)                                            //  find parent (container) widget
+   for (iip = iiw-1; iip >= 0; iip--)                                                  //  find parent (container) widget
       if (strmatch(pname,zd->widget[iip].wname)) break;
    if (iip < 0) zappcrash("zdialog, no parent for widget: %s",wname);
 
-   pwidget = zd->widget[iip].widget;                                             //  parent widget, type
+   pwidget = zd->widget[iip].widget;                                                   //  parent widget, type
    ptype = zd->widget[iip].type;
 
    if (strmatchV(ptype,"dialog","hbox","vbox","frame","scrwin",null) == 0)
       zappcrash("zdialog, bad widget parent type: %s",ptype);
 
-   if (strmatch(type,"hbox")) widget = gtk_box_new(HORIZONTAL,space);            //  expandable container boxes
+   if (strmatch(type,"hbox")) widget = gtk_box_new(HORIZONTAL,space);                  //  expandable container boxes
    if (strmatch(type,"vbox")) widget = gtk_box_new(VERTICAL,space);
    if (strstr("hbox vbox",type))
       gtk_box_set_homogeneous(GTK_BOX(widget),homog);
 
-   if (strmatch(type,"hsep")) widget = gtk_separator_new(HORIZONTAL);            //  horiz. & vert. separators
+   if (strmatch(type,"hsep")) widget = gtk_separator_new(HORIZONTAL);                  //  horiz. & vert. separators
    if (strmatch(type,"vsep")) widget = gtk_separator_new(VERTICAL);
 
-   if (strmatch(type,"frame")) {                                                 //  frame around contained widgets
+   if (strmatch(type,"frame")) {                                                       //  frame around contained widgets
       widget = gtk_frame_new(data);
       gtk_frame_set_shadow_type(GTK_FRAME(widget),GTK_SHADOW_IN);
       data = 0;
    }
 
-   if (strmatch(type,"scrwin")) {                                                //  scrolled window container
+   if (strmatch(type,"scrwin")) {                                                      //  scrolled window container
       widget = gtk_scrolled_window_new(0,0);
       gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
                         GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
@@ -9501,7 +9465,7 @@ int zdialog_add_widget_long (
       data = 0;
    }
 
-   if (strmatch(type,"label")) {                                                 //  label (static text)
+   if (strmatch(type,"label")) {                                                       //  label (static text)
       widget = gtk_label_new(data);
       if (size) gtk_label_set_width_chars(GTK_LABEL(widget),size);
       if (data && strstr(data,"<span"))
@@ -9509,16 +9473,16 @@ int zdialog_add_widget_long (
       data = 0;
    }
 
-   if (strmatch(type,"link")) {                                                  //  label is clickable
+   if (strmatch(type,"link")) {                                                        //  label is clickable
       if (strmatch(wname,"nolabel"))
-         widget = gtk_link_button_new(data);                                     //  link is also label
+         widget = gtk_link_button_new(data);                                           //  link is also label
       else
-         widget = gtk_link_button_new_with_label(data,wname);                    //  label >> link
+         widget = gtk_link_button_new_with_label(data,wname);                          //  label >> link
       G_SIGNAL(widget,"clicked",zdialog_widget_event,zd);
       data = 0;
    }
 
-   if (strmatch(type,"entry")) {                                                 //  text input, single line
+   if (strmatch(type,"entry")) {                                                       //  text input, single line
       widget = gtk_entry_new();
       if (data) gtk_entry_set_text(GTK_ENTRY(widget),data);
       if (size) gtk_entry_set_width_chars(GTK_ENTRY(widget),size);
@@ -9526,39 +9490,39 @@ int zdialog_add_widget_long (
       G_SIGNAL(widget,"activate",zdialog_activate_event,zd);
    }
 
-   if (strmatch(type,"zentry")) {                                                //  text input, single line
+   if (strmatch(type,"zentry")) {                                                      //  text input, single line
       widget = gtk_text_view_new();
       gtk_text_view_set_top_margin(GTK_TEXT_VIEW(widget),2);
       gtk_text_view_set_bottom_margin(GTK_TEXT_VIEW(widget),2);
       gtk_text_view_set_left_margin(GTK_TEXT_VIEW(widget),5);
-      if (! size) size = 10;                                                     //  scale widget for font size
+      if (! size) size = 10;                                                           //  scale widget for font size
       gtk_widget_set_size_request(widget,size*appfontsize,2*appfontsize);
       gtk_text_view_set_editable(GTK_TEXT_VIEW(widget),1);
-      gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget),GTK_WRAP_NONE);          //  this does nothing    GTK bug
+      gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget),GTK_WRAP_NONE);                //  this does nothing    GTK bug
       gtk_text_view_set_accepts_tab(GTK_TEXT_VIEW(widget),0);
       editBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
       if (data) gtk_text_buffer_set_text(editBuff,data,-1);
-      G_SIGNAL(editBuff,"changed",zdialog_widget_event,zd);                      //  buffer signals, not widget
-      G_SIGNAL(widget,"focus-in-event",textview_focus_in_event,widget);          //  for popup_text inserts
+      G_SIGNAL(editBuff,"changed",zdialog_widget_event,zd);                            //  buffer signals, not widget
+      G_SIGNAL(widget,"focus-in-event",textview_focus_in_event,widget);                //  for popup_text inserts
    }
 
-   if (strmatch(type,"zedit")) {                                                 //  text input, opt. multi-line
+   if (strmatch(type,"zedit")) {                                                       //  text input, opt. multi-line
       widget = gtk_text_view_new();
       gtk_text_view_set_top_margin(GTK_TEXT_VIEW(widget),2);
       gtk_text_view_set_bottom_margin(GTK_TEXT_VIEW(widget),2);
       gtk_text_view_set_left_margin(GTK_TEXT_VIEW(widget),5);
-      if (! size) size = 10;                                                     //  scale widget for font size
+      if (! size) size = 10;                                                           //  scale widget for font size
       gtk_widget_set_size_request(widget,size*appfontsize,2*appfontsize);
       gtk_text_view_set_editable(GTK_TEXT_VIEW(widget),1);
       if (wrap) gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget),GTK_WRAP_WORD);
       gtk_text_view_set_accepts_tab(GTK_TEXT_VIEW(widget),0);
       editBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
       if (data) gtk_text_buffer_set_text(editBuff,data,-1);
-      G_SIGNAL(editBuff,"changed",zdialog_widget_event,zd);                      //  buffer signals, not widget
-      G_SIGNAL(widget,"focus-in-event",textview_focus_in_event,widget);          //  for popup_text inserts
+      G_SIGNAL(editBuff,"changed",zdialog_widget_event,zd);                            //  buffer signals, not widget
+      G_SIGNAL(widget,"focus-in-event",textview_focus_in_event,widget);                //  for popup_text inserts
    }
 
-   if (strmatch(type,"text") || strmatch(type,"report")) {                       //  text output (not editable)
+   if (strmatch(type,"text") || strmatch(type,"report")) {                             //  text output (not editable)
       widget = gtk_text_view_new();
       gtk_text_view_set_top_margin(GTK_TEXT_VIEW(widget),2);
       gtk_text_view_set_bottom_margin(GTK_TEXT_VIEW(widget),2);
@@ -9568,30 +9532,30 @@ int zdialog_add_widget_long (
       if (data) gtk_text_buffer_set_text(editBuff,data,-1);
       gtk_text_view_set_editable(GTK_TEXT_VIEW(widget),0);
       gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(widget),0);
-      if (strmatch(type,"text")) gtk_widget_set_can_focus(widget,0);             //  inactivate KB navi keys
+      if (strmatch(type,"text")) gtk_widget_set_can_focus(widget,0);                   //  inactivate KB navi keys
       type = "text";
    }
 
-   if (strmatch(type,"button")) {                                                //  button
+   if (strmatch(type,"button")) {                                                      //  button
       widget = gtk_button_new_with_label(data);
       G_SIGNAL(widget,"clicked",zdialog_widget_event,zd);
       data = 0;
    }
 
-   if (strmatch(type,"zbutton")) {                                               //  checkbox used as small button
+   if (strmatch(type,"zbutton")) {                                                     //  checkbox used as small button
       if (data) widget = gtk_check_button_new_with_label(data);
       else  widget = gtk_check_button_new();
       G_SIGNAL(widget,"toggled",zdialog_widget_event,zd);
-      data = "0";                                                                //  default data
+      data = "0";                                                                      //  default data
    }
 
-   if (strmatch(type,"togbutt")) {                                               //  toggle button
+   if (strmatch(type,"togbutt")) {                                                     //  toggle button
       widget = gtk_toggle_button_new_with_label(data);
       G_SIGNAL(widget,"toggled",zdialog_widget_event,zd);
-      data = "0";                                                                //  default data
+      data = "0";                                                                      //  default data
    }
 
-   if (strmatch(type,"imagebutt")) {                                             //  button with image
+   if (strmatch(type,"imagebutt")) {                                                   //  button with image
       snprintf(iconpath,200,"%s/%s",get_zimagedir(),data);
       data = 0;
       pixbuf = gdk_pixbuf_new_from_file_at_scale(iconpath,size,size,1,&gerror);
@@ -9605,9 +9569,9 @@ int zdialog_add_widget_long (
       G_SIGNAL(widget,"clicked",zdialog_widget_event,zd);
    }
 
-   if (strmatch(type,"colorbutt")) {                                             //  color edit button
-      if (! data) data = "0|0|0";                                                //  data format: "nnn|nnn|nnn" = RGB
-      pp = substring(data,'|',1); gdkrgba.red = f256 * atoi(pp);                 //  RGB values are 0-1
+   if (strmatch(type,"colorbutt")) {                                                   //  color edit button
+      if (! data) data = "0|0|0";                                                      //  data format: "nnn|nnn|nnn" = RGB
+      pp = substring(data,'|',1); gdkrgba.red = f256 * atoi(pp);                       //  RGB values are 0-1
       pp = substring(data,'|',2); gdkrgba.green = f256 * atoi(pp);
       pp = substring(data,'|',3); gdkrgba.blue = f256 * atoi(pp);
       gdkrgba.alpha = 1.0;
@@ -9615,34 +9579,34 @@ int zdialog_add_widget_long (
       G_SIGNAL(widget,"color-set",zdialog_widget_event,zd);
    }
 
-   if (strmatch(type,"check")) {                                                 //  checkbox
+   if (strmatch(type,"check")) {                                                       //  checkbox
       if (data) widget = gtk_check_button_new_with_label(data);
       else  widget = gtk_check_button_new();
       G_SIGNAL(widget,"toggled",zdialog_widget_event,zd);
-      data = "0";                                                                //  default data
+      data = "0";                                                                      //  default data
    }
 
-   if (strmatch(type,"combo")) {                                                 //  combo box
+   if (strmatch(type,"combo")) {                                                       //  combo box
       widget = gtk_combo_box_text_new();
       G_SIGNAL(widget,"changed",zdialog_widget_event,zd);
-      G_SIGNAL(widget,"popdown",zdialog_widget_event,zd);                        //  fails for wayland
+      G_SIGNAL(widget,"popdown",zdialog_widget_event,zd);                              //  fails for wayland
    }
 
-   if (strmatch(type,"radio")) {                                                 //  radio button
+   if (strmatch(type,"radio")) {                                                       //  radio button
       for (kk = iip+1; kk <= iiw; kk++)
-         if (strmatch(zd->widget[kk].pname,pname) &&                             //  find first radio button
-             strmatch(zd->widget[kk].type,"radio")) break;                       //    with same container
+         if (strmatch(zd->widget[kk].pname,pname) &&                                   //  find first radio button
+             strmatch(zd->widget[kk].type,"radio")) break;                             //    with same container
       if (kk == iiw)
-         widget = gtk_radio_button_new_with_label(null,data);                    //  this one is first
+         widget = gtk_radio_button_new_with_label(null,data);                          //  this one is first
       else
-         widget = gtk_radio_button_new_with_label_from_widget                    //  not first, add to group
+         widget = gtk_radio_button_new_with_label_from_widget                          //  not first, add to group
               (GTK_RADIO_BUTTON(zd->widget[kk].widget),data);
       G_SIGNAL(widget,"toggled",zdialog_widget_event,zd);
-      data = "0";                                                                //  default data
+      data = "0";                                                                      //  default data
    }
 
-   if (strmatchV(type,"spin","hscale","hscale2","vscale",null)) {                //  spin button or sliding scale
-      if (! data) zappcrash("zdialog_add_widget(): data missing");               //  "min|max|step|value"
+   if (strmatchV(type,"spin","hscale","hscale2","vscale",null)) {                      //  spin button or sliding scale
+      if (! data) zappcrash("zdialog_add_widget(): data missing");                     //  "min|max|step|value"
       pp = substring(data,'|',1); err = convSD(pp,min);
       pp = substring(data,'|',2); err += convSD(pp,max);
       pp = substring(data,'|',3); err += convSD(pp,step);
@@ -9663,7 +9627,7 @@ int zdialog_add_widget_long (
          gtk_scale_set_draw_value(GTK_SCALE(widget),0);
          gtk_scale_set_has_origin(GTK_SCALE(widget),0);
       }
-      if (strmatch(type,"hscale2")) {                                            //  add digital value on the right
+      if (strmatch(type,"hscale2")) {                                                  //  add digital value on the right
          widget = gtk_scale_new_with_range(HORIZONTAL,min,max,step);
          gtk_range_set_value(GTK_RANGE(widget),val);
          gtk_scale_set_draw_value(GTK_SCALE(widget),1);
@@ -9681,8 +9645,8 @@ int zdialog_add_widget_long (
       data = vdata;
    }
 
-   if (strmatch(type,"zspin")) {                                                 //  "zspin" widget with range
-      if (! data) zappcrash("zdialog_add_widget(): data missing");               //  "min|max|step|value"
+   if (strmatch(type,"zspin")) {                                                       //  "zspin" widget with range
+      if (! data) zappcrash("zdialog_add_widget(): data missing");                     //  "min|max|step|value"
       pp = substring(data,'|',1); err = convSD(pp,min);
       pp = substring(data,'|',2); err += convSD(pp,max);
       pp = substring(data,'|',3); err += convSD(pp,step);
@@ -9692,12 +9656,12 @@ int zdialog_add_widget_long (
       zd->widget[iiw].lolim = min;
       zd->widget[iiw].hilim = max;
       zd->widget[iiw].step = step;
-      err = convDS(val,7,vdata);                                                 //  initial value >> text
+      err = convDS(val,7,vdata);                                                       //  initial value >> text
       data = vdata;
-      widget = gtk_text_view_new();                                              //  GTK widget is text_view
+      widget = gtk_text_view_new();                                                    //  GTK widget is text_view
       gtk_text_view_set_top_margin(GTK_TEXT_VIEW(widget),2);
       gtk_text_view_set_left_margin(GTK_TEXT_VIEW(widget),5);
-      if (! size) size = 5;                                                      //  scale widget for font size
+      if (! size) size = 5;                                                            //  scale widget for font size
       gtk_widget_set_size_request(widget,size*appfontsize,2*appfontsize);
       gtk_text_view_set_editable(GTK_TEXT_VIEW(widget),1);
       gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget),GTK_WRAP_NONE);
@@ -9707,15 +9671,15 @@ int zdialog_add_widget_long (
       gtk_text_buffer_set_text(editBuff,data,-1);
       gtk_widget_add_events(widget,GDK_SCROLL_MASK);
       gtk_widget_add_events(widget,GDK_FOCUS_CHANGE_MASK);
-      G_SIGNAL(editBuff,"changed",zdialog_zspin_event,zd);                       //  buffer signals, not widget
+      G_SIGNAL(editBuff,"changed",zdialog_zspin_event,zd);                             //  buffer signals, not widget
       G_SIGNAL(widget,"key-press-event",zdialog_zspin_event,zd);
       G_SIGNAL(widget,"focus-out-event",zdialog_zspin_event,zd);
       G_SIGNAL(widget,"scroll-event",zdialog_zspin_event,zd);
    }
 
-   if (strmatch(type,"icon")) {                                                  //  image widget from icon
+   if (strmatch(type,"icon")) {                                                        //  image widget from icon
       snprintf(iconpath,200,"%s/%s",get_zimagedir(),data);
-      data = 0;                                                                  //  data not further used
+      data = 0;                                                                        //  data not further used
       pixbuf = gdk_pixbuf_new_from_file_at_scale(iconpath,size,size,1,&gerror);
       if (pixbuf) {
          widget = gtk_image_new_from_pixbuf(pixbuf);
@@ -9724,15 +9688,15 @@ int zdialog_add_widget_long (
       else widget = gtk_image_new_from_icon_name("missing",GTK_ICON_SIZE_BUTTON);
    }
 
-   if (strmatch(type,"image"))                                                   //  image widget from pixbuf
-      widget = gtk_image_new_from_pixbuf((GdkPixbuf *) data);                    //  use (ch *) pixbuf in call
+   if (strmatch(type,"image"))                                                         //  image widget from pixbuf
+      widget = gtk_image_new_from_pixbuf((GdkPixbuf *) data);                          //  use (ch *) pixbuf in call
 
    //  all widget types come here
 
-   zd->widget[iiw].widget = widget;                                              //  set widget in zdialog
+   zd->widget[iiw].widget = widget;                                                    //  set widget in zdialog
 
-   if (strmatchV(type,"zentry","zspin","zedit","text","scrwin",0)) {             //  add frame around these widgets        24.30
-      if (! strmatch(ptype,"scrwin")) {                                          //    unless parent is scroll widget
+   if (strmatchV(type,"zentry","zspin","zedit","text","scrwin",0)) {                   //  add frame around these widgets
+      if (! strmatch(ptype,"scrwin")) {                                                //    unless parent is scroll widget
          fwidget = gtk_frame_new(0);
          gtk_frame_set_shadow_type(GTK_FRAME(fwidget),GTK_SHADOW_IN);
          gtk_container_add(GTK_CONTAINER(fwidget),widget);
@@ -9740,17 +9704,17 @@ int zdialog_add_widget_long (
       }
    }
 
-   if (strmatch(ptype,"hbox") || strmatch(ptype,"vbox"))                         //  add to hbox/vbox
+   if (strmatch(ptype,"hbox") || strmatch(ptype,"vbox"))                               //  add to hbox/vbox
       gtk_box_pack_start(GTK_BOX(pwidget),widget,expand,expand,space);
-   if (strmatch(ptype,"frame"))                                                  //  add to frame
+   if (strmatch(ptype,"frame"))                                                        //  add to frame
       gtk_container_add(GTK_CONTAINER(pwidget),widget);
-   if (strmatch(ptype,"scrwin"))                                                 //  add to scroll window
+   if (strmatch(ptype,"scrwin"))                                                       //  add to scroll window
       gtk_container_add(GTK_CONTAINER(pwidget),widget);
-   if (strmatch(ptype,"dialog")) {                                               //  add to dialog box
-      vbox = gtk_bin_get_child(GTK_BIN(pwidget));                                //  dialog is a gtkwindow
+   if (strmatch(ptype,"dialog")) {                                                     //  add to dialog box
+      vbox = gtk_bin_get_child(GTK_BIN(pwidget));                                      //  dialog is a gtkwindow
       gtk_box_pack_start(GTK_BOX(vbox),widget,expand,expand,space);
    }
-   if (data) zd->widget[iiw].data = zstrdup(data,"zdialog");                     //  widget memory
+   if (data) zd->widget[iiw].data = zstrdup(data,"zdialog");                           //  widget memory
 
    return 0;
 }
@@ -9771,7 +9735,7 @@ int zdialog_add_widget(zdialog *zd, ch *
 
    for (Nth = 1; true; Nth++)
    {
-      param = substring(options,"|",Nth);                                        //  get pname=value
+      param = substring(options,"|",Nth);                                              //  get pname=value
       if (! param) break;
       pp = strchr(param,'=');
       if (pp) pval = atoi(pp+1);
@@ -9783,9 +9747,6 @@ int zdialog_add_widget(zdialog *zd, ch *
       else zappcrash("bad zdialog options: %s",options);
    }
 
-//   printf("zdialog_add_widget_long(type %s  wname %s  data %s  size %d  homog %d  expand %d  space %d  wrap %d \n",
-//                                     type, wname, data, size, homog, expand, space, wrap);
-
    stat = zdialog_add_widget_long(zd,type,wname,parent,data,size,homog,expand,space,wrap);
    return stat;
 }
@@ -9793,16 +9754,16 @@ int zdialog_add_widget(zdialog *zd, ch *
 
 //  return 1/0 if zdialog is valid/invalid
 
-int zdialog_valid(zdialog *zd, ch *title)                                        //  title is optional
+int zdialog_valid(zdialog *zd, ch *title)                                              //  title is optional
 {
    int      ok, ii;
 
    if (! zd) return 0;
 
-   for (ii = 0; ii < zdialog_count; ii++)                                        //  find in valid zdialog list
+   for (ii = 0; ii < zdialog_count; ii++)                                              //  find in valid zdialog list
       if (zd == zdialog_list[ii]) break;
    if (ii == zdialog_count) {
-      Plog(0,"*** zdialog invalid %s \n",title);
+      printf("*** zdialog invalid %s \n",title);
       return 0;
    }
 
@@ -9810,12 +9771,12 @@ int zdialog_valid(zdialog *zd, ch *title
    if ((zd->sentinel1 & 0xFFFF0000) != zdsentinel) ok = 0;
    if (zd->sentinel2 != zd->sentinel1) ok = 0;
    if (! ok) {
-      Plog(0,"*** zdialog sentinel invalid %s \n",title);
+      printf("*** zdialog sentinel invalid %s \n",title);
       return 0;
    }
 
    if (title && ! strmatch(title,zd->title)) {
-      Plog(0,"*** zdialog title invalid %s \n",title);
+      printf("*** zdialog title invalid %s \n",title);
       return 0;
    }
 
@@ -9829,8 +9790,8 @@ int zdialog_valid(zdialog *zd, ch *title
 int zdialog_valid2(zdialog *zd, ch *title)
 {
    int      ok, ii;
-   
-   if (! zd) return 0;                                                           //  24.20
+
+   if (! zd) return 0;
 
    for (ii = 0; ii < zdialog_count; ii++)
       if (zd == zdialog_list[ii]) break;
@@ -9852,14 +9813,14 @@ int zdialog_valid2(zdialog *zd, ch *titl
 int zdialog_find_widget(zdialog *zd, ch *wname)
 {
    if (! zdialog_valid(zd)) {
-      Plog(0,"invalid zdialog %p \n",zd);
+      printf("*** invalid zdialog %p \n",zd);
       return 0;
    }
 
    for (int ii = 0; zd->widget[ii].type; ii++)
       if (strmatch(zd->widget[ii].wname,wname)) return ii;
 
-   Plog(0,"zdialog bad widget name: %s \n",wname);
+   printf("*** zdialog bad widget name: %s \n",wname);
    return 0;
 }
 
@@ -9905,13 +9866,13 @@ int zdialog_add_ttip(zdialog *zd, ch *wn
 
    if (! zdialog_valid(zd)) return 0;
 
-   for (ii = 0; zd->compwidget[ii]; ii++)                                        //  search completion buttons
-      if (strmatch(zd->compbutton[ii],wname)) {                                  //    for matching wname
+   for (ii = 0; zd->compwidget[ii]; ii++)                                              //  search completion buttons
+      if (strmatch(zd->compbutton[ii],wname)) {                                        //    for matching wname
          gtk_widget_set_tooltip_text(zd->compwidget[ii],ttip);
          return 1;
       }
 
-   widget = zdialog_gtkwidget(zd,wname);                                         //  search zdialog widgets
+   widget = zdialog_gtkwidget(zd,wname);                                               //  search zdialog widgets
    if (! widget) return 0;
 
    gtk_widget_set_tooltip_text(widget,ttip);
@@ -9927,7 +9888,7 @@ int zdialog_resize(zdialog *zd, int widt
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (! zdialog_valid(zd)) return 0;
-   if (! width) width = 10;                                                      //  stop spurious GTK warnings
+   if (! width) width = 10;                                                            //  stop spurious GTK warnings
    if (! height) height = 10;
    GtkWidget *window = zd->widget[0].widget;
    gtk_window_set_default_size(GTK_WINDOW(window),width,height);
@@ -9949,7 +9910,7 @@ int zdialog_put_data(zdialog *zd, ch *wn
    double         dval;
    double         f256 = 1.0 / 256.0;
    double         lval, hval, nval, F, F2;
-   double         fdata, lolim, hilim, step;                                     //  double
+   double         fdata, lolim, hilim, step;                                           //  double
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
@@ -9960,16 +9921,16 @@ int zdialog_put_data(zdialog *zd, ch *wn
    widget = zd->widget[iiw].widget;
 
    wdata = zd->widget[iiw].data;
-   if (wdata) zfree(wdata);                                                      //  free prior data memory
+   if (wdata) zfree(wdata);                                                            //  free prior data memory
    zd->widget[iiw].data = 0;
 
    if (data) {
-      if (utf8_check(data)) wdata = zstrdup("bad UTF8 data","zdialog");          //  replace bad UTF-8 encoding
-      else wdata = zstrdup(data,"zdialog");                                      //  set new data for widget
+      if (utf8_check(data)) wdata = zstrdup("bad UTF8 data","zdialog");                //  replace bad UTF-8 encoding
+      else wdata = zstrdup(data,"zdialog");                                            //  set new data for widget
       zd->widget[iiw].data = wdata;
    }
 
-   zd->disabled++;                                                               //  disable for widget stuffing
+   zd->disabled++;                                                                     //  disable for widget stuffing
 
    if (strmatch(type,"label"))
       gtk_label_set_text(GTK_LABEL(widget),data);
@@ -9980,20 +9941,20 @@ int zdialog_put_data(zdialog *zd, ch *wn
    if (strmatch(type,"entry"))
       gtk_entry_set_text(GTK_ENTRY(widget),data);
 
-   if (strmatch(type,"zentry")) {                                                //  text input, single line
+   if (strmatch(type,"zentry")) {                                                      //  text input, single line
       textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
       gtk_text_buffer_set_text(textBuff,data,-1);
    }
 
-   if (strmatchV(type,"button","zbutton",null))                                  //  change button label
+   if (strmatchV(type,"button","zbutton",null))                                        //  change button label
       gtk_button_set_label(GTK_BUTTON(widget),data);
 
-   if (strmatch(type,"zedit")) {                                                 //  text input to editable text
+   if (strmatch(type,"zedit")) {                                                       //  text input to editable text
       textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
       gtk_text_buffer_set_text(textBuff,data,-1);
    }
 
-   if (strmatch(type,"text")) {                                                  //  text output
+   if (strmatch(type,"text")) {                                                        //  text output
       textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
       gtk_text_buffer_set_text(textBuff,data,-1);
    }
@@ -10002,9 +9963,9 @@ int zdialog_put_data(zdialog *zd, ch *wn
    {
       if (! data) kk = nn = 0;
       else kk = convSI(data,nn);
-      if (kk != 0) nn = 0;                                                       //  data not integer, force zero
+      if (kk != 0) nn = 0;                                                             //  data not integer, force zero
       if (nn <= 0) nn = 0; else nn = 1;
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),nn);                //  set gtk widget value
+      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),nn);                      //  set gtk widget value
    }
 
    if (strmatch(type,"spin")) {
@@ -10013,24 +9974,24 @@ int zdialog_put_data(zdialog *zd, ch *wn
       gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),dval);
    }
 
-   if (strmatch(type,"zspin")) {                                                 //  "zspin" widget
+   if (strmatch(type,"zspin")) {                                                       //  "zspin" widget
       lolim = zd->widget[iiw].lolim;
       hilim = zd->widget[iiw].hilim;
       step = zd->widget[iiw].step;
-      err = convSD(data,fdata);                                                  //  string --> double
+      err = convSD(data,fdata);                                                        //  string --> double
       if (err) goto retx;
-      Nsteps = (fdata - lolim) / step + 0.5;                                     //  nearest exact step
+      Nsteps = (fdata - lolim) / step + 0.5;                                           //  nearest exact step
       fdata = lolim + Nsteps * step;
-      if (fdata < lolim) fdata = lolim;                                          //  enforce limits
+      if (fdata < lolim) fdata = lolim;                                                //  enforce limits
       if (fdata > hilim) fdata = hilim;
-      convDS(fdata,7,sdata);                                                     //  double --> string, precision 7
+      convDS(fdata,7,sdata);                                                           //  double --> string, precision 7
       textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
       gtk_text_buffer_set_text(textBuff,sdata,-1);
    }
 
-   if (strmatch(type,"colorbutt")) {                                             //  color button data is nnn|nnn|nnn
+   if (strmatch(type,"colorbutt")) {                                                   //  color button data is nnn|nnn|nnn
       pp = substring(data,'|',1);
-      if (pp) gdkrgba.red = f256 * atoi(pp);                                     //  RGB range is 0-1
+      if (pp) gdkrgba.red = f256 * atoi(pp);                                           //  RGB range is 0-1
       pp = substring(data,'|',2);
       if (pp) gdkrgba.green = f256 * atoi(pp);
       pp = substring(data,'|',3);
@@ -10039,19 +10000,19 @@ int zdialog_put_data(zdialog *zd, ch *wn
       gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(widget),&gdkrgba);
    }
 
-   if (strmatchV(type,"hscale","hscale2","vscale",null))                         //  slider widget
+   if (strmatchV(type,"hscale","hscale2","vscale",null))                               //  slider widget
    {
-      kk = convSD(data,dval);                                                    //  zdialog widget value
+      kk = convSD(data,dval);                                                          //  zdialog widget value
       if (kk != 0) dval = 0.0;
 
-      if (zd->widget[iiw].rescale)                                               //  widget value --> slider value
+      if (zd->widget[iiw].rescale)                                                     //  widget value --> slider value
       {
-         lval = zd->widget[iiw].lval;                                            //  rescaled for more sensitivity
-         nval = zd->widget[iiw].nval;                                            //    around neutral value
+         lval = zd->widget[iiw].lval;                                                  //  rescaled for more sensitivity
+         nval = zd->widget[iiw].nval;                                                  //    around neutral value
          hval = zd->widget[iiw].hval;
 
-         if (dval > lval && dval <= nval) {                                      //  if dval == lval or dval == hval
-            F2 = (nval - dval) / (nval - lval);                                  //    then dval is not revised
+         if (dval > lval && dval <= nval) {                                            //  if dval == lval or dval == hval
+            F2 = (nval - dval) / (nval - lval);                                        //    then dval is not revised
             F = sqrtf(F2);
             dval = nval - F * (nval - lval);
          }
@@ -10066,25 +10027,25 @@ int zdialog_put_data(zdialog *zd, ch *wn
       gtk_range_set_value(GTK_RANGE(widget),dval);
    }
 
-   if (strmatch(type,"combo"))                                                   //  combo box
+   if (strmatch(type,"combo"))                                                         //  combo box
    {
-      if (blank_null(data))                                                      //  if blank, set no active entry
+      if (blank_null(data))                                                            //  if blank, set no active entry
          gtk_combo_box_set_active(GTK_COMBO_BOX(widget),-1);
       else {
-         if (! zd->widget[iiw].zlist)                                            //  add parallel zlist if not already
+         if (! zd->widget[iiw].zlist)                                                  //  add parallel zlist if not already
             zd->widget[iiw].zlist = zlist_new(0);
-         nn = zlist_find(zd->widget[iiw].zlist,data,0);                          //  find matching zlist entry
+         nn = zlist_find(zd->widget[iiw].zlist,data,0);                                //  find matching zlist entry
          if (nn < 0) {
-            zlist_append(zd->widget[iiw].zlist,data,0);                          //  not found, append new entry to zlist
-            gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widget),data);     //  append new entry to combo box
-            nn = zlist_count(zd->widget[iiw].zlist) - 1;                         //  entry = count - 1
+            zlist_append(zd->widget[iiw].zlist,data,0);                                //  not found, append new entry to zlist
+            gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widget),data);           //  append new entry to combo box
+            nn = zlist_count(zd->widget[iiw].zlist) - 1;                               //  entry = count - 1
          }
-         gtk_combo_box_set_active(GTK_COMBO_BOX(widget),nn);                     //  set combo box active entry
+         gtk_combo_box_set_active(GTK_COMBO_BOX(widget),nn);                           //  set combo box active entry
       }
    }
 
 retx:
-   zd->disabled--;                                                               //  re-enable dialog
+   zd->disabled--;                                                                     //  re-enable dialog
    return iiw;
 }
 
@@ -10113,7 +10074,7 @@ int zdialog_set_limits(zdialog *zd, ch *
 
    iiw = zdialog_find_widget(zd,wname);
    if (! iiw) {
-      Plog(0,"zdialog_set_limits, %s not found \n",wname);
+      printf("*** zdialog_set_limits, %s not found \n",wname);
       return 0;
    }
 
@@ -10126,7 +10087,7 @@ int zdialog_set_limits(zdialog *zd, ch *
    if (*type == 'h' || *type == 'v')
       gtk_range_set_range(GTK_RANGE(widget),min,max);
 
-   if (*type == 'z') {                                                           //  zspin
+   if (*type == 'z') {                                                                 //  zspin
       zd->widget[iiw].lval = min;
       zd->widget[iiw].hval = max;
    }
@@ -10168,7 +10129,7 @@ int zdialog_rescale(zdialog *zd, ch *wna
    if (! iiw) return 0;
 
    if (lval > nval || nval > hval) {
-      Plog(0,"zdialog_rescale, bad data: %s \n",wname);
+      printf("*** zdialog_rescale, bad data: %s \n",wname);
       return 0;
    }
 
@@ -10215,27 +10176,27 @@ int zdialog_run(zdialog *zd, zdialog_eve
 
    if (! zdialog_valid(zd)) return 0;
    if (zd->zrunning) {
-      Plog(0,"zdialog is already running \n");
+      printf("zdialog is already running \n");
       return 0;
    }
 
-   if (posn) zdialog_set_position(zd,posn);                                      //  put dialog at desired position
-   else zdialog_set_position(zd,"desktop");                                      //  use default
+   if (posn) zdialog_set_position(zd,posn);                                            //  put dialog at desired position
+   else zdialog_set_position(zd,"desktop");                                            //  use default
 
-   if (evfunc) zd->eventCB = (void *) evfunc;                                    //  link to dialog event callback
+   if (evfunc) zd->eventCB = (void *) evfunc;                                          //  link to dialog event callback
 
-   Plog(1,"dialog started: %s \n",zd->title);
+   printf("dialog started: %s \n",zd->title);
 
    dialog = zd->widget[0].widget;
-   gtk_widget_show_all(dialog);                                                  //  activate dialog
+   gtk_widget_show_all(dialog);                                                        //  activate dialog
 
-   G_SIGNAL(dialog,"focus-in-event",zdialog_focus_in_event,zd);                  //  connect focus event function
-   G_SIGNAL(dialog,"key-press-event",zdialog_KB_press,zd);                       //  connect key press event function
-   G_SIGNAL(dialog,"delete-event",zdialog_delete_event,zd);                      //  connect delete event function
-
-   zd->zstat = 0;                                                                //  dialog status incomplete
-   zd->disabled = 0;                                                             //  enable widget events
-   zd->zrunning = 1;                                                             //  dialog is running
+   G_SIGNAL(dialog,"focus-in-event",zdialog_focus_in_event,zd);                        //  connect focus event function
+   G_SIGNAL(dialog,"key-press-event",zdialog_KB_press,zd);                             //  connect key press event function
+   G_SIGNAL(dialog,"delete-event",zdialog_delete_event,zd);                            //  connect delete event function
+
+   zd->zstat = 0;                                                                      //  dialog status incomplete
+   zd->disabled = 0;                                                                   //  enable widget events
+   zd->zrunning = 1;                                                                   //  dialog is running
    return 0;
 }
 
@@ -10246,7 +10207,7 @@ int zdialog_run(zdialog *zd, zdialog_eve
 
 int zdialog_widget_event(GtkWidget *widget, zdialog *zd)
 {
-   zdialog_event  *evfunc = 0;                                                   //  dialog event callback function
+   zdialog_event  *evfunc = 0;                                                         //  dialog event callback function
 
    GtkTextView       *textView = 0;
    GtkTextBuffer     *textBuff = 0;
@@ -10258,34 +10219,34 @@ int zdialog_widget_event(GtkWidget *widg
    double            dval;
    float             lval, nval, hval, F;
 
-   if (! zdialog_valid2(zd)) return 1;                                           //  zdialog gone
-   if (zd->disabled) return 1;                                                   //  events disabled
+   if (! zdialog_valid2(zd)) return 1;                                                 //  zdialog gone
+   if (zd->disabled) return 1;                                                         //  events disabled
 
-   zd->disabled = 1;                                                             //  disable nested events
+   zd->disabled = 1;                                                                   //  disable nested events
 
-   for (ii = 0; ii < zdmaxbutts; ii++) {                                         //  check completion buttons
-      if (zd->compwidget[ii] == null) break;                                     //  EOL
+   for (ii = 0; ii < zdmaxbutts; ii++) {                                               //  check completion buttons
+      if (zd->compwidget[ii] == null) break;                                           //  EOL
       if (zd->compwidget[ii] != widget) continue;
-      zd->zstat = ii+1;                                                          //  zdialog status = button no.
+      zd->zstat = ii+1;                                                                //  zdialog status = button no.
       strncpy0(zd->event,"zstat",40);
-      strncpy0(zd->zstat_button,zd->compbutton[ii],40);                          //  button label "Cancel" etc.
+      strncpy0(zd->zstat_button,zd->compbutton[ii],40);                                //  button label "Cancel" etc.
       wtype = "completion button";
-      Plog(1,"dialog: %s  button: %s \n",zd->title,zd->zstat_button);
-      goto call_evfunc;                                                          //  call zdialog event function
+      printf("dialog: %s  button: %s \n",zd->title,zd->zstat_button);
+      goto call_evfunc;                                                                //  call zdialog event function
    }
 
-   for (ii = 1; zd->widget[ii].type; ii++)                                       //  find widget in zdialog
+   for (ii = 1; zd->widget[ii].type; ii++)                                             //  find widget in zdialog
       if (zd->widget[ii].widget == widget) goto found_widget;
 
-   for (ii = 1; zd->widget[ii].type; ii++) {                                     //  failed, test if buffer
-      if (strmatchV(zd->widget[ii].type,"zedit","zentry",null)) {                //    of text view widget
+   for (ii = 1; zd->widget[ii].type; ii++) {                                           //  failed, test if buffer
+      if (strmatchV(zd->widget[ii].type,"zedit","zentry",null)) {                      //    of text view widget
          textView = GTK_TEXT_VIEW(zd->widget[ii].widget);
          textBuff = gtk_text_view_get_buffer(textView);
          if (widget == (GtkWidget *) textBuff) goto found_widget;
       }
    }
 
-   Plog(0,"zdialog event ignored: %s \n",zd->title);                             //  not found, ignore event
+   printf("zdialog event ignored: %s \n",zd->title);                                   //  not found, ignore event
    zd->disabled = 0;
    return 1;
 
@@ -10295,17 +10256,15 @@ found_widget:
    wtype = zd->widget[ii].type;
    wdata = 0;
 
-   Plog(2,"dialog: %s  event: %s \n",zd->title,wname);                           //  Floglevel=2 to log dialog inputs
-
    if (strmatch(wtype,"button"))
-      wdata = (ch *) gtk_button_get_label(GTK_BUTTON(widget));                   //  button label
+      wdata = (ch *) gtk_button_get_label(GTK_BUTTON(widget));                         //  button label
 
-   if (strmatch(wtype,"zbutton")) {                                              //  checkbox as smaller button
+   if (strmatch(wtype,"zbutton")) {                                                    //  checkbox as smaller button
       wdata = (ch *) gtk_button_get_label(GTK_BUTTON(widget));
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),0);                 //  reset checkmark = off
+      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),0);                       //  reset checkmark = off
    }
 
-   if (strmatch(wtype,"zedit")) {                                                //  multi-line
+   if (strmatch(wtype,"zedit")) {                                                      //  multi-line
       gtk_text_buffer_get_bounds(textBuff,&iter1,&iter2);
       wdata = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);
    }
@@ -10313,13 +10272,13 @@ found_widget:
    if (strmatch(wtype,"entry"))
       wdata = (ch *) gtk_entry_get_text(GTK_ENTRY(widget));
 
-   if (strmatch(wtype,"zentry")) {                                               //  single line
+   if (strmatch(wtype,"zentry")) {                                                     //  single line
       gtk_text_buffer_get_bounds(textBuff,&iter1,&iter2);
       wdata = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);
-      pp = strchr(wdata,GDK_KEY_Linefeed);                                       //  prohibit return character
+      pp = strchr(wdata,GDK_KEY_Linefeed);                                             //  prohibit return character
       if (pp) {
          *pp = 0;
-         gtk_text_buffer_set_text(textBuff,wdata,-1);                            //  works, generates bogus error message
+         gtk_text_buffer_set_text(textBuff,wdata,-1);                                  //  works, generates bogus error message
       }
    }
 
@@ -10340,7 +10299,7 @@ found_widget:
       wdata = sdata;
    }
 
-   if (strmatch(wtype,"colorbutt"))                                              //  color button
+   if (strmatch(wtype,"colorbutt"))                                                    //  color button
    {
       gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(widget),&gdkrgba);
       snprintf(sdata,20,"%.0f|%.0f|%.0f",gdkrgba.red*255,gdkrgba.green*255,gdkrgba.blue*255);
@@ -10351,20 +10310,20 @@ found_widget:
    {
       dval = gtk_range_get_value(GTK_RANGE(widget));
 
-      if (zd->widget[ii].rescale)                                                //  slider value --> widget value
+      if (zd->widget[ii].rescale)                                                      //  slider value --> widget value
       {
          lval = zd->widget[ii].lval;
          nval = zd->widget[ii].nval;
          hval = zd->widget[ii].hval;
 
-         if (dval > lval && dval < nval) {                                       //  lval ... nval
-            F = (nval - dval) / (nval - lval);                                   //  1 ... 0
-            dval = (1.0 - F * F) * (nval - lval) + lval;                         //  lval ... nval
+         if (dval > lval && dval < nval) {                                             //  lval ... nval
+            F = (nval - dval) / (nval - lval);                                         //  1 ... 0
+            dval = (1.0 - F * F) * (nval - lval) + lval;                               //  lval ... nval
          }
 
-         else if (dval > nval && dval < hval) {                                  //  nval ... hval
-            F = (dval - nval) / (hval - nval);                                   //  0 ... 1
-            dval = F * F * (hval - nval) + nval;                                 //  nval ... hval
+         else if (dval > nval && dval < hval) {                                        //  nval ... hval
+            F = (dval - nval) / (hval - nval);                                         //  0 ... 1
+            dval = F * F * (hval - nval) + nval;                                       //  nval ... hval
          }
       }
 
@@ -10372,22 +10331,22 @@ found_widget:
       wdata = sdata;
    }
 
-   //  all widgets come here
+    //  all widgets come here
 
-   if (zd->widget[ii].data) zfree(zd->widget[ii].data);                          //  clear prior data
+   if (zd->widget[ii].data) zfree(zd->widget[ii].data);                                //  clear prior data
    zd->widget[ii].data = 0;
-   if (wdata) zd->widget[ii].data = zstrdup(wdata,"zdialog");                    //  set new data
-   zd->lastwidget = widget;                                                      //  remember last widget updated
-   strncpy0(zd->event,wname,40);                                                 //  event = widget name
+   if (wdata) zd->widget[ii].data = zstrdup(wdata,"zdialog");                          //  set new data
+   zd->lastwidget = widget;                                                            //  remember last widget updated
+   strncpy0(zd->event,wname,40);                                                       //  event = widget name
+
+call_evfunc:                                                                           //  call zdialog event function
 
-call_evfunc:                                                                     //  call zdialog event function
-   
    if (zd->eventCB) {
-      evfunc = (zdialog_event *) zd->eventCB;                                    //  do callback function
+      evfunc = (zdialog_event *) zd->eventCB;                                          //  do callback function
       evfunc(zd,zd->event);
    }
 
-   if (zdialog_valid2(zd)) zd->disabled = 0;                                     //  'event' may cause zdialog_free()
+   if (zdialog_valid2(zd)) zd->disabled = 0;                                           //  'event' may cause zdialog_free()
    return 1;
 }
 
@@ -10405,15 +10364,15 @@ int textview_focus_in_event(GtkWidget *w
 //  zdialog response handler for "focus-in-event" signal
 //  private function
 
-zdialog  *zdialog_focus_zd;                                                      //  current zdialog
+zdialog  *zdialog_focus_zd;                                                            //  current zdialog
 
 int zdialog_focus_in_event(GtkWidget *, GdkEvent *event, zdialog *zd)
 {
    if (! zdialog_valid2(zd)) return 0;
-   if (zd->zstat) return 0;                                                      //  already complete
+   if (zd->zstat) return 0;                                                            //  already complete
    zdialog_focus_zd = zd;
-   zdialog_send_event(zd,"focus");                                               //  notify dialog event function
-   return 0;                                                                     //  must be 0
+   zdialog_send_event(zd,"focus");                                                     //  notify dialog event function
+   return 0;                                                                           //  must be 0
 }
 
 
@@ -10423,9 +10382,9 @@ int zdialog_focus_in_event(GtkWidget *,
 int zdialog_activate_event(GtkWidget *, zdialog *zd)
 {
    if (! zdialog_valid2(zd)) return 0;
-   if (zd->zstat) return 0;                                                      //  already complete
-   zdialog_send_event(zd,"activate");                                            //  notify dialog event function
-   return 0;                                                                     //  must be 0
+   if (zd->zstat) return 0;                                                            //  already complete
+   zdialog_send_event(zd,"activate");                                                  //  notify dialog event function
+   return 0;                                                                           //  must be 0
 }
 
 
@@ -10447,7 +10406,7 @@ int zdialog_KB_press(GtkWidget *widget,
 
    if (kbevent->state & GDK_CONTROL_MASK) KB_Ctrl = 1;
 
-   if (KBkey == GDK_KEY_Escape) {                                                //  escape key
+   if (KBkey == GDK_KEY_Escape) {                                                      //  escape key
       Plog(3,"zdialog escape key \n");
       Fescape = 1;
       zd->zstat = -2;
@@ -10455,30 +10414,22 @@ int zdialog_KB_press(GtkWidget *widget,
       return 1;
    }
 
-   if (KBkey == GDK_KEY_F1) { KBevent(kbevent); return 1; };                     //  these keys handled by main app window
+   if (KBkey == GDK_KEY_F1) { KBevent(kbevent); return 1; };                           //  these keys handled by main app window
    if (KBkey == GDK_KEY_F10) { KBevent(kbevent); return 1; };
    if (KBkey == GDK_KEY_F11) { KBevent(kbevent); return 1; };
 
-   if (KB_Ctrl && KBkey == GDK_KEY_h) { KBevent(kbevent); return 1; };           //  Ctrl+h  (help, user guide)            24.10
+   if (KB_Ctrl && KBkey == GDK_KEY_h) { KBevent(kbevent); return 1; };                 //  Ctrl+h  (help, user guide)
 
-   focuswidget = gtk_window_get_focus(GTK_WINDOW(widget));                       //  find widget in zdialog
+   focuswidget = gtk_window_get_focus(GTK_WINDOW(widget));                             //  find widget in zdialog
 
    for (ii = 1; zd->widget[ii].type; ii++)
       if (zd->widget[ii].widget == focuswidget) break;
 
-   type = zd->widget[ii].type;                                                   //  screening input widget types removed
+   type = zd->widget[ii].type;                                                         //  screening input widget types removed
    if (! type) return 0;
 
-/***
-   cch   *editwidgets = "entry zentry zedit spin zspin hscale hscale2 vscale";
-   if (! strstr(editwidgets,type)) {                                             //  unless widget type edit,
-      if (KBkey == GDK_KEY_Left) { KBevent(kbevent); return 1; };                //    arrow keys --> main window          24.50
-      if (KBkey == GDK_KEY_Right) { KBevent(kbevent); return 1; };
-   }
-***/
-
-   strncpy0(zd->event,zd->widget[ii].wname,40);                                  //  save event name
-   return 0;                                                                     //  pass KB key to widget 
+   strncpy0(zd->event,zd->widget[ii].wname,40);                                        //  save event name
+   return 0;                                                                           //  pass KB key to widget
 }
 
 
@@ -10486,62 +10437,65 @@ int zdialog_KB_press(GtkWidget *widget,
 
 int zdialog_zspin_event(GtkWidget *widget, GdkEvent *event, zdialog *zd)
 {
-   zdialog_event  *evfunc = 0;                                                   //  dialog event callback function
+   zdialog_event  *evfunc = 0;                                                         //  dialog event callback function
 
    GtkTextBuffer        *textBuff;
    GtkTextIter          iter1, iter2;
 
-   int         KBkey;
-   int         ii, err, Nsteps, state, incr = 0;
-   double      fdata, lolim, hilim, step;                                        //  double
-   ch          *wdata, sdata[20];
-   int         time, elaps, Fchanged;
-   static int  time0 = 0, time1 = 0;
+   int            KBkey;
+   int            ii, err, Nsteps, state;
+   static float   fincr = 0;                                                           //  25.2
+   double         fdata, lolim, hilim, step;                                           //  double
+   ch             *wdata, sdata[20];
+   int            time, elaps, Fchanged;
+   static int     time0 = 0, time1 = 0;
 
-   if (event->type < 0) return 1;                                                //  GDK bug ?
+   if (event->type < 0) return 1;                                                      //  GDK bug ?
 
-   if (! zdialog_valid2(zd)) return 0;                                           //  event after dialog destroyed
-   if (zd->disabled) return 0;                                                   //  zdialog events disabled
+   if (! zdialog_valid2(zd)) return 0;                                                 //  event after dialog destroyed
+   if (zd->disabled) return 0;                                                         //  zdialog events disabled
 
-   for (ii = 1; zd->widget[ii].type; ii++)                                       //  find "zspin" (text view) widget
+   for (ii = 1; zd->widget[ii].type; ii++)                                             //  find "zspin" (text view) widget
       if (zd->widget[ii].widget == widget) break;
-   if (! zd->widget[ii].type) return 0;                                          //  not found
+   if (! zd->widget[ii].type) return 0;                                                //  not found
 
-   textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));                   //  get widget data
+   textBuff = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));                         //  get widget data
    gtk_text_buffer_get_bounds(textBuff,&iter1,&iter2);
    wdata = gtk_text_buffer_get_text(textBuff,&iter1,&iter2,0);
 
-   lolim = zd->widget[ii].lolim;                                                 //  limits and step size
+   lolim = zd->widget[ii].lolim;                                                       //  limits and step size
    hilim = zd->widget[ii].hilim;
    step = zd->widget[ii].step;
 
-   if (event->type == GDK_SCROLL) {                                              //  mouse wheel event
+   if (event->type == GDK_SCROLL) {                                                    //  mouse wheel event
       gtk_widget_grab_focus(widget);
-      incr = - ((GdkEventScroll *) event)->delta_y;
-      if (! incr) return 0;
-      state = ((GdkEventScroll *) event)->state;                                 //  if shift key held, use 10x step
-      if (state & GDK_SHIFT_MASK) incr *= 10;
+      fincr += - ((GdkEventScroll *) event)->delta_y;                                  //  accumulate scroll values              25.2
+      if (fincr > -0.7 && fincr < +0.7) return 0;                                      //  (new mouse, smooth scroll)
+      if (fincr < 0) fincr = -1;
+      else fincr = +1;
+      state = ((GdkEventScroll *) event)->state;                                       //  if shift key held, use 10x step
+      if (state & GDK_SHIFT_MASK) fincr *= 10;
       goto checklimits;
    }
 
-   if (event->type == GDK_KEY_PRESS) {                                           //  KB button press
+   if (event->type == GDK_KEY_PRESS) {                                                 //  KB button press
       KBkey = ((GdkEventKey *) event)->keyval;
-      if (KBkey == GDK_KEY_Return) goto checklimits;                             //  return = entry finished
-      if (KBkey == GDK_KEY_Up) incr = 1;
-      if (KBkey == GDK_KEY_Down) incr = -1;
-      if (! incr) return 0;                                                      //  must return 0
+      if (KBkey == GDK_KEY_Return) goto checklimits;                                   //  return = entry finished
+      if (KBkey == GDK_KEY_Up) fincr = 1;
+      if (KBkey == GDK_KEY_Down) fincr = -1;
+      if (! fincr) return 0;                                                           //  must return 0
 
-      state = ((GdkEventKey *) event)->state;                                    //  if shift key held, use 10x step
-      if (state & GDK_SHIFT_MASK) incr *= 10;
+      state = ((GdkEventKey *) event)->state;                                          //  if shift key held, use 10x step
+      if (state & GDK_SHIFT_MASK) fincr *= 10;
 
-      time = ((GdkEventKey *) event)->time;                                      //  track time key is held down
+      time = ((GdkEventKey *) event)->time;                                            //  track time key is held down
       if (time - time1 > 300) time0 = time;
       time1 = time;
       elaps = time - time0;
 
-      if (elaps > 5000) step = 10 * step;                                        //  acceleration table for
-      else if (elaps > 4500) step = 9 * step;                                    //    hold time 1-5+ seconds
-      else if (elaps > 4000) step = 8 * step;                                    //  use integer values only
+      if (elaps > 5000) step = 10 * step;                                              //  acceleration table for
+      else if (elaps > 4500) step = 9 * step;                                          //    hold time 1-5+ seconds
+      else if (elaps > 4000) step = 8 * step;                                          //  use integer values only
       else if (elaps > 3500) step = 7 * step;
       else if (elaps > 3000) step = 6 * step;
       else if (elaps > 2500) step = 5 * step;
@@ -10551,23 +10505,25 @@ int zdialog_zspin_event(GtkWidget *widge
       goto checklimits;
    }
 
-   if (event->type == GDK_FOCUS_CHANGE) goto checklimits;                        //  focus change = entry finished
-   if (event->type == GDK_LEAVE_NOTIFY) goto checklimits;                        //  pointer out - entry finished
+   if (event->type == GDK_FOCUS_CHANGE) goto checklimits;                              //  focus change = entry finished
+   if (event->type == GDK_LEAVE_NOTIFY) goto checklimits;                              //  pointer out - entry finished
    return 0;
 
 checklimits:
 
-   convSD(wdata,fdata);                                                          //  ignore bad char. inputs
-   fdata += incr * step;
+   convSD(wdata,fdata);                                                                //  ignore bad char. inputs
+   fdata += fincr * step;
 
-   Nsteps = (fdata - lolim) / step + 0.5;                                        //  set nearest exact step
+   Nsteps = (fdata - lolim) / step + 0.5;                                              //  set nearest exact step
    fdata = lolim + Nsteps * step;
 
-   err = 0;
+   fincr = 0;                                                                          //  reset accumulating counter            25.2
 
-   if (fdata < lolim) {                                                          //  force within range
+   err = 0;
+   
+   if (fdata < lolim) {
       err = 1;
-      fdata = lolim;
+      fdata = lolim;                                                                   //  force within limits
    }
 
    if (fdata > hilim) {
@@ -10575,33 +10531,30 @@ checklimits:
       fdata = hilim;
    }
 
-   if (err) gtk_widget_grab_focus(widget);                                       //  if error, restore focus
+   if (err) gtk_widget_grab_focus(widget);                                             //  if error, restore focus
 
-   convDS(fdata,7,sdata);                                                        //  round to 7 digits
-   gtk_text_buffer_set_text(textBuff,sdata,-1);                                  //  insert recognized value
+   convDS(fdata,7,sdata);                                                              //  round to 7 digits
+   gtk_text_buffer_set_text(textBuff,sdata,-1);                                        //  insert recognized value
 
    Fchanged = 0;
    if (zd->widget[ii].data) {
-      if (! strmatch(zd->widget[ii].data,sdata)) Fchanged = 1;                   //  detect if widget data changed
-      zfree(zd->widget[ii].data);                                                //  clear prior widget data
+      if (! strmatch(zd->widget[ii].data,sdata)) Fchanged = 1;                         //  detect if widget data changed
+      zfree(zd->widget[ii].data);                                                      //  clear prior widget data
    }
-   zd->widget[ii].data = zstrdup(sdata,"zdialog");                               //  set new data
-
-   zd->lastwidget = widget;                                                      //  remember last widget updated
-   strncpy0(zd->event,zd->widget[ii].wname,40);                                  //  event = widget name
+   zd->widget[ii].data = zstrdup(sdata,"zdialog");                                     //  set new data
 
-   if (Fchanged)
-      Plog(2,"dialog: %s  event: %s \n",zd->title,zd->widget[ii].wname);         //  Floglevel=2 to log dialog inputs
+   zd->lastwidget = widget;                                                            //  remember last widget updated
+   strncpy0(zd->event,zd->widget[ii].wname,40);                                        //  event = widget name
 
-   if (zd->eventCB && Fchanged) {                                                //  if widget data changed
+   if (zd->eventCB && Fchanged) {                                                      //  if widget data changed
       zd->disabled = 1;
-      evfunc = (zdialog_event *) zd->eventCB;                                    //  do event callback function
+      evfunc = (zdialog_event *) zd->eventCB;                                          //  do event callback function
       evfunc(zd,zd->event);
-      if (zdialog_valid2(zd)) zd->disabled = 0;                                  //  'event' may cause zdialog_free()
+      if (zdialog_valid2(zd)) zd->disabled = 0;                                        //  'event' may cause zdialog_free()
    }
 
-   if (event->type == GDK_FOCUS_CHANGE) return 0;                                //  no propagate
-   return 1;                                                                     //  propagate
+   if (event->type == GDK_FOCUS_CHANGE) return 0;                                      //  no propagate
+   return 1;                                                                           //  propagate
 }
 
 
@@ -10623,20 +10576,20 @@ void zdialog_copyfunc(GtkWidget *widget,
    zd = zdialog_focus_zd;
    if (! zdialog_valid2(zd)) return;
 
-   for (ii = 1; zd->widget[ii].type; ii++)                                       //  find widget in zdialog
+   for (ii = 1; zd->widget[ii].type; ii++)                                             //  find widget in zdialog
       if (zd->widget[ii].widget == widget) goto found_widget;
-   for (ii = 1; zd->widget[ii].type; ii++) {                                     //  failed, test if buffer
-      if (strmatchV(zd->widget[ii].type,"zedit","zentry",null)) {                //    of text view widget
+   for (ii = 1; zd->widget[ii].type; ii++) {                                           //  failed, test if buffer
+      if (strmatchV(zd->widget[ii].type,"zedit","zentry",null)) {                      //    of text view widget
          textView = GTK_TEXT_VIEW(zd->widget[ii].widget);
          textBuff = gtk_text_view_get_buffer(textView);
          if (widget == (GtkWidget *) textBuff) goto found_widget;
       }
    }
-   return;                                                                       //  not found
+   return;                                                                             //  not found
 
 found_widget:
    wname = zd->widget[ii].wname;
-   zdialog_fetch(zd,wname,text,999);                                             //  current text in widget
+   zdialog_fetch(zd,wname,text,999);                                                   //  current text in widget
    cc = strlen(text);
    gtk_clipboard_set_text(clipboard,text,cc);
    return;
@@ -10659,31 +10612,31 @@ void zdialog_pastefunc(GtkClipboard *cli
 
    window = (GtkWindow *) arg;
    widget = gtk_window_get_focus(window);
-   if (! widget) return;                                                         //  widget for pasted text
-   if (! cliptext || ! *cliptext) return;                                        //  clipboard text pasted
+   if (! widget) return;                                                               //  widget for pasted text
+   if (! cliptext || ! *cliptext) return;                                              //  clipboard text pasted
 
    zd = zdialog_focus_zd;
    if (! zdialog_valid2(zd)) return;
 
    if (zd->zstat) return;
 
-   for (ii = 1; zd->widget[ii].type; ii++)                                       //  find widget in zdialog
+   for (ii = 1; zd->widget[ii].type; ii++)                                             //  find widget in zdialog
       if (zd->widget[ii].widget == widget) goto found_widget;
-   for (ii = 1; zd->widget[ii].type; ii++) {                                     //  failed, test if buffer
-      if (strmatchV(zd->widget[ii].type,"zedit","zentry",null)) {                //    of text view widget
+   for (ii = 1; zd->widget[ii].type; ii++) {                                           //  failed, test if buffer
+      if (strmatchV(zd->widget[ii].type,"zedit","zentry",null)) {                      //    of text view widget
          textView = GTK_TEXT_VIEW(zd->widget[ii].widget);
          textBuff = gtk_text_view_get_buffer(textView);
          if (widget == (GtkWidget *) textBuff) goto found_widget;
       }
    }
-   return;                                                                       //  not found
+   return;                                                                             //  not found
 
 found_widget:
    wname = zd->widget[ii].wname;
-   zdialog_fetch(zd,wname,text,999);                                             //  current text in widget
+   zdialog_fetch(zd,wname,text,999);                                                   //  current text in widget
    cc = strlen(text);
    if (cc > 995) return;
-   strncpy(text+cc,cliptext,999-cc);                                             //  add clipboard text
+   strncpy(text+cc,cliptext,999-cc);                                                   //  add clipboard text
    text[999] = 0;
    zdialog_stuff(zd,wname,text);
    return;
@@ -10695,25 +10648,25 @@ found_widget:
 
 int zdialog_delete_event(GtkWidget *, GdkEvent *, zdialog *zd)
 {
-   zdialog_event  *evfunc = 0;                                                   //  dialog event callback function
-   
-   if (! zd) return 0;                                                           //  24.20
+   zdialog_event  *evfunc = 0;                                                         //  dialog event callback function
+
+   if (! zd) return 0;
 
-   zd->widget[0].widget = 0;                                                     //  widget no longer valid
+   zd->widget[0].widget = 0;                                                           //  widget no longer valid
 
-   if (! zdialog_valid2(zd)) return 1;                                           //  already destroyed
-   if (zd->zstat) return 1;                                                      //  already complete
-   if (zd->disabled) return 1;                                                   //  in process
+   if (! zdialog_valid2(zd)) return 1;                                                 //  already destroyed
+   if (zd->zstat) return 1;                                                            //  already complete
+   if (zd->disabled) return 1;                                                         //  in process
 
-   zd->zstat = -1;                                                               //  set zdialog cancel status
+   zd->zstat = -1;                                                                     //  set zdialog cancel status
 
-   Plog(0,"dialog: %s killed\n",zd->title);
+   printf("dialog: %s killed\n",zd->title);
 
    if (zd->eventCB) {
-      evfunc = (zdialog_event *) zd->eventCB;                                    //  do callback function
+      evfunc = (zdialog_event *) zd->eventCB;                                          //  do callback function
       zd->disabled = 1;
       evfunc(zd,"zstat");
-      if (zdialog_valid2(zd)) zd->disabled = 0;                                  //  'event' may cause zdialog_free()
+      if (zdialog_valid2(zd)) zd->disabled = 0;                                        //  'event' may cause zdialog_free()
    }
 
    zdialog_free(zd);
@@ -10723,23 +10676,23 @@ int zdialog_delete_event(GtkWidget *, Gd
 
 //  Send an event name to an active zdialog.
 //  The response function eventFunc() will be called with this event.
-//  zdialog completion buttons KB shortcuts removed                              //  24.20
+//  zdialog completion buttons KB shortcuts removed
 
 int zdialog_send_event(zdialog *zd, ch *event)
 {
-   zdialog_event * evfunc = 0;                                                   //  dialog event callback function
+   zdialog_event * evfunc = 0;                                                         //  dialog event callback function
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zdialog_valid2(zd)) return 0;                                           //  zdialog canceled
-   if (zd->disabled) return 0;                                                   //  zdialog busy
+   if (! zdialog_valid2(zd)) return 0;                                                 //  zdialog canceled
+   if (zd->disabled) return 0;                                                         //  zdialog busy
 
    evfunc = (zdialog_event *) zd->eventCB;
    if (! evfunc) return 0;
    zd->disabled = 1;
    Plog(3,"zdialog send event: %s \n",event);
-   evfunc(zd,event);                                                             //  call dialog event function
-   if (zdialog_valid2(zd)) zd->disabled = 0;                                     //  'event' may cause zdialog_free()
+   evfunc(zd,event);                                                                   //  call dialog event function
+   if (zdialog_valid2(zd)) zd->disabled = 0;                                           //  'event' may cause zdialog_free()
    return 1;
 }
 
@@ -10752,18 +10705,18 @@ int zdialog_send_event(zdialog *zd, ch *
 
 int zdialog_send_response(zdialog *zd, int zstat)
 {
-   zdialog_event  *evfunc = 0;                                                   //  dialog event callback function
+   zdialog_event  *evfunc = 0;                                                         //  dialog event callback function
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (! zdialog_valid2(zd)) return 0;
    if (zd->disabled) return 0;
-   zd->zstat = zstat;                                                            //  set status
+   zd->zstat = zstat;                                                                  //  set status
    evfunc = (zdialog_event *) zd->eventCB;
    if (! evfunc) return 0;
    zd->disabled = 1;
    evfunc(zd,"zstat");
-   if (zdialog_valid2(zd)) zd->disabled = 0;                                     //  'event' may cause zdialog_free()
+   if (zdialog_valid2(zd)) zd->disabled = 0;                                           //  'event' may cause zdialog_free()
    return 1;
 }
 
@@ -10782,17 +10735,17 @@ int zdialog_show(zdialog *zd, int show)
 
    widget = zdialog_gtkwidget(zd,"dialog");
 
-   if (show) {                                                                   //  show window
-      if (widget == pwidget) {                                                   //  restore prior position
+   if (show) {                                                                         //  show window
+      if (widget == pwidget) {                                                         //  restore prior position
          gtk_window_move(GTK_WINDOW(widget),posx,posy);
          pwidget = 0;
       }
       gtk_widget_show_all(widget);
-      gtk_window_present(GTK_WINDOW(widget));                                    //  set focus on restored window
+      gtk_window_present(GTK_WINDOW(widget));                                          //  set focus on restored window
    }
-   else {                                                                        //  hide window
+   else {                                                                              //  hide window
       pwidget = widget;
-      gtk_window_get_position(GTK_WINDOW(widget),&posx,&posy);                   //  save position
+      gtk_window_get_position(GTK_WINDOW(widget),&posx,&posy);                         //  save position
       gtk_widget_hide(widget);
    }
    return 1;
@@ -10807,18 +10760,18 @@ int zdialog_destroy(zdialog *zd)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zdialog_valid2(zd)) return 0;                                           //  destroyed, not freed yet
+   if (! zdialog_valid2(zd)) return 0;                                                 //  destroyed, not freed yet
 
-   if (zd->saveposn) zdialog_save_position(zd);                                  //  save position for next use
+   if (zd->saveposn) zdialog_save_position(zd);                                        //  save position for next use
 
-   if (zd->widget[0].widget) {                                                   //  multiple destroys OK
-      gtk_widget_destroy(zd->widget[0].widget);                                  //  destroy GTK dialog
+   if (zd->widget[0].widget) {                                                         //  multiple destroys OK
+      gtk_widget_destroy(zd->widget[0].widget);                                        //  destroy GTK dialog
       zd->widget[0].widget = 0;
    }
 
-   if (! zd->zstat) zd->zstat = -1;                                              //  status = destroyed
-   zd->zrunning = 0;                                                             //  not running
-   zd->disabled = 1;                                                             //  ignore events after destroy
+   if (! zd->zstat) zd->zstat = -1;                                                    //  status = destroyed
+   zd->zrunning = 0;                                                                   //  not running
+   zd->disabled = 1;                                                                   //  ignore events after destroy
    return 1;
 }
 
@@ -10826,44 +10779,44 @@ int zdialog_destroy(zdialog *zd)
 //  free zdialog memory (will destroy first, if not already)
 //  zd is set to null
 
-int zdialog_free(zdialog *&zd)                                                   //  reference
+int zdialog_free(zdialog *&zd)                                                         //  reference
 {
    int      ii;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zd) return 0;                                                           //  24.20
+   if (! zd) return 0;
 
-   if (! zdialog_valid2(zd)) return 0;                                           //  validate zd pointer
+   if (! zdialog_valid2(zd)) return 0;                                                 //  validate zd pointer
 
-   zdialog_save_inputs(zd);                                                      //  save user inputs for next use
+   zdialog_save_inputs(zd);                                                            //  save user inputs for next use
 
-   zdialog_destroy(zd);                                                          //  destroy GTK dialog if there
+   zdialog_destroy(zd);                                                                //  destroy GTK dialog if there
 
-   zd->sentinel1 = zd->sentinel2 = 0;                                            //  mark sentinels invalid
-   zfree(zd->title);                                                             //  free title memory
+   zd->sentinel1 = zd->sentinel2 = 0;                                                  //  mark sentinels invalid
+   zfree(zd->title);                                                                   //  free title memory
    zfree(zd->widget[0].data);
 
-   for (ii = 1; zd->widget[ii].type; ii++)                                       //  loop through widgets
+   for (ii = 1; zd->widget[ii].type; ii++)                                             //  loop through widgets
    {
-      zfree((ch *) zd->widget[ii].type);                                         //  free strings
+      zfree((ch *) zd->widget[ii].type);                                               //  free strings
       zfree((ch *) zd->widget[ii].wname);
-      if (zd->widget[ii].pname) zfree((ch *) zd->widget[ii].pname);              //  parent widget name
-      if (zd->widget[ii].data) zfree(zd->widget[ii].data);                       //  free data
-      if (zd->widget[ii].zlist) zlist_free(zd->widget[ii].zlist);                //  free combo box zlist
+      if (zd->widget[ii].pname) zfree((ch *) zd->widget[ii].pname);                    //  parent widget name
+      if (zd->widget[ii].data) zfree(zd->widget[ii].data);                             //  free data
+      if (zd->widget[ii].zlist) zlist_free(zd->widget[ii].zlist);                      //  free combo box zlist
    }
 
-   for (ii = 0; ii < zdialog_count; ii++)                                        //  remove from valid zdialog list
+   for (ii = 0; ii < zdialog_count; ii++)                                              //  remove from valid zdialog list
       if (zd == zdialog_list[ii]) break;
    if (ii < zdialog_count) {
       zdialog_count--;
-      for (NOP; ii < zdialog_count; ii++)                                        //  pack down list
+      for (NOP; ii < zdialog_count; ii++)                                              //  pack down list
          zdialog_list[ii] = zdialog_list[ii+1];
    }
-   else Plog(0,"zdialog_free(), not in zdialog_list \n");
+   else printf("*** zdialog_free(), not in zdialog_list \n");
 
-   zfree(zd);                                                                    //  free zdialog memory
-   zd = 0;                                                                       //  caller pointer = null
+   zfree(zd);                                                                          //  free zdialog memory
+   zd = 0;                                                                             //  caller pointer = null
    return 1;
 }
 
@@ -10877,8 +10830,8 @@ int zdialog_wait(zdialog *zd)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   zdialog_present(zd);                                                          //  initially has focus
-   
+   zdialog_present(zd);                                                                //  initially has focus
+
    while (true)
    {
       zmainsleep(0.01);
@@ -10927,15 +10880,15 @@ void zdialog_set_cursor(zdialog *zd, Gdk
 
 //  insert data into a zdialog widget
 
-int zdialog_stuff(zdialog *zd, ch *wname, ch *data)                              //  stuff a string
+int zdialog_stuff(zdialog *zd, ch *wname, ch *data)                                    //  stuff a string
 {
    if (! main_thread()) zappcrash("illegal call from thread");
    if (data) zdialog_put_data(zd,wname,data);
-   else zdialog_put_data(zd,wname,"");                                           //  null > ""
+   else zdialog_put_data(zd,wname,"");                                                 //  null > ""
    return 1;
 }
 
-int zdialog_stuff(zdialog *zd, ch *wname, int idata)                             //  stuff an integer
+int zdialog_stuff(zdialog *zd, ch *wname, int idata)                                   //  stuff an integer
 {
    ch       string[16];
    double   min, max;
@@ -10943,13 +10896,13 @@ int zdialog_stuff(zdialog *zd, ch *wname
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (zdialog_get_limits(zd,wname,min,max))
-      if (idata < min || idata > max) return 0;                                  //  bad data, do nothing
+      if (idata < min || idata > max) return 0;                                        //  bad data, do nothing
    snprintf(string,16,"%d",idata);
    zdialog_put_data(zd,wname,string);
    return 1;
 }
 
-int zdialog_stuff(zdialog *zd, ch *wname, double ddata)                          //  stuff a double
+int zdialog_stuff(zdialog *zd, ch *wname, double ddata)                                //  stuff a double
 {
    ch       string[32];
    double   min, max;
@@ -10957,13 +10910,13 @@ int zdialog_stuff(zdialog *zd, ch *wname
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (zdialog_get_limits(zd,wname,min,max))
-      if (ddata < min || ddata > max) return 0;                                  //  bad data, do nothing
-   snprintf(string,32,"%.7g",ddata);                                             //  increase from 6 to 7 digits
-   zdialog_put_data(zd,wname,string);                                            //  'g' uses decimal or comma
-   return 1;                                                                     //      (per locale)
+      if (ddata < min || ddata > max) return 0;                                        //  bad data, do nothing
+   snprintf(string,32,"%.7g",ddata);                                                   //  increase from 6 to 7 digits
+   zdialog_put_data(zd,wname,string);                                                  //  'g' uses decimal or comma
+   return 1;                                                                           //      (per locale)
 }
 
-int zdialog_stuff(zdialog *zd, ch *wname, double ddata, ch *format)              //  stuff a double, formatted
+int zdialog_stuff(zdialog *zd, ch *wname, double ddata, ch *format)                    //  stuff a double, formatted
 {
    ch       string[32];
    double   min, max;
@@ -10971,13 +10924,13 @@ int zdialog_stuff(zdialog *zd, ch *wname
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (zdialog_get_limits(zd,wname,min,max))
-      if (ddata < min || ddata > max) return 0;                                  //  bad data, do nothing
-   snprintf(string,32,format,ddata);                                             //  use "%.2g" etc. for
-   zdialog_put_data(zd,wname,string);                                            //    locale dependent point/comma
+      if (ddata < min || ddata > max) return 0;                                        //  bad data, do nothing
+   snprintf(string,32,format,ddata);                                                   //  use "%.2g" etc. for
+   zdialog_put_data(zd,wname,string);                                                  //    locale dependent point/comma
    return 1;
 }
 
-int zdialog_labelfont(zdialog *zd, ch *labl, ch *font, ch *txt)                  //  stuff label text using specified font
+int zdialog_labelfont(zdialog *zd, ch *labl, ch *font, ch *txt)                        //  stuff label text using specified font
 {
    GtkWidget   *widget;
    ch          *format =  "<span font=\"%s\" >%s</span>";
@@ -10985,7 +10938,7 @@ int zdialog_labelfont(zdialog *zd, ch *l
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! font) font = zfuncs::appfont;                                           //  default font
+   if (! font) font = zfuncs::appfont;                                                 //  default font
    snprintf(txt2,1000,format,font,txt);
    widget = zdialog_gtkwidget(zd,labl);
    gtk_label_set_markup(GTK_LABEL(widget),txt2);
@@ -10995,7 +10948,7 @@ int zdialog_labelfont(zdialog *zd, ch *l
 
 //  get data from a zdialog widget
 
-int zdialog_fetch(zdialog *zd, ch *wname, ch *data, int maxcc)                   //  fetch string data
+int zdialog_fetch(zdialog *zd, ch *wname, ch *data, int maxcc)                         //  fetch string data
 {
    ch  *zdata;
 
@@ -11007,10 +10960,10 @@ int zdialog_fetch(zdialog *zd, ch *wname
       return 0;
    }
 
-   return strncpy0(data,zdata,maxcc);                                            //  0 = OK, 1 = truncation
+   return strncpy0(data,zdata,maxcc);                                                  //  0 = OK, 1 = truncation
 }
 
-int zdialog_fetch(zdialog *zd, ch *wname, int &idata)                            //  fetch an integer
+int zdialog_fetch(zdialog *zd, ch *wname, int &idata)                                  //  fetch an integer
 {
    ch  *zdata;
 
@@ -11026,7 +10979,7 @@ int zdialog_fetch(zdialog *zd, ch *wname
    return 1;
 }
 
-int zdialog_fetch(zdialog *zd, ch *wname, double &ddata)                         //  fetch a double
+int zdialog_fetch(zdialog *zd, ch *wname, double &ddata)                               //  fetch a double
 {
    int         stat;
    ch          *zdata;
@@ -11039,12 +10992,12 @@ int zdialog_fetch(zdialog *zd, ch *wname
       return 0;
    }
 
-   stat = convSD(zdata,ddata);                                                   //  period or comma decimal point OK
+   stat = convSD(zdata,ddata);                                                         //  period or comma decimal point OK
    if (stat < 4) return 1;
    return 0;
 }
 
-int zdialog_fetch(zdialog *zd, ch *wname, float &fdata)                          //  fetch a float
+int zdialog_fetch(zdialog *zd, ch *wname, float &fdata)                                //  fetch a float
 {
    int         stat;
    ch          *zdata;
@@ -11058,7 +11011,7 @@ int zdialog_fetch(zdialog *zd, ch *wname
       return 0;
    }
 
-   stat = convSD(zdata,ddata);                                                   //  period or comma decimal point OK
+   stat = convSD(zdata,ddata);                                                         //  period or comma decimal point OK
    fdata = ddata;
    if (stat < 4) return 1;
    return 0;
@@ -11075,7 +11028,7 @@ int zdialog_combo_clear(zdialog *zd, ch
 
    ii = zdialog_find_widget(zd,wname);
    if (! ii) return 0;
-   gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(zd->widget[ii].widget));     //  remove all entries
+   gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(zd->widget[ii].widget));           //  remove all entries
    if (zd->widget[ii].zlist) zlist_clear(zd->widget[ii].zlist,0);
    return 1;
 }
@@ -11116,11 +11069,11 @@ int zdialog_load_widgets(zdialog *zd, sp
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! fid)                                                                    //  fid from script
+   if (! fid)                                                                          //  fid from script
    {
-      snprintf(dirname,200,"%s/%s",get_zhomedir(),funcname);                     //  folder for data files
-      filename = zgetfile(mess,GTK_WINDOW(mainwin),"file",dirname,0);            //  open data file
-      if (! filename) return 1;                                                  //  user cancel
+      snprintf(dirname,200,"%s/%s",get_zhomedir(),funcname);                           //  folder for data files
+      filename = zgetfile(mess,GTK_WINDOW(mainwin),"file",dirname,0);                  //  open data file
+      if (! filename) return 1;                                                        //  user cancel
       fid = fopen(filename,"r");
       if (! fid) {
          zmessageACK(mainwin,"%s \n %s",filename,strerror(errno));
@@ -11130,35 +11083,34 @@ int zdialog_load_widgets(zdialog *zd, sp
       myfid = 1;
    }
 
-   for (ii = 0; ii < zdmaxwidgets; ii++)                                         //  read widget data recs
+   for (ii = 0; ii < zdmaxwidgets; ii++)                                               //  read widget data recs
    {
       pp = fgets_trim(buff,1000,fid,1);
       if (! pp) break;
       if (strmatch(pp,"curves")) {
          if (! sd) goto baddata;
-         err = splcurve_load(sd,fid);                                            //  load curves data
+         err = splcurve_load(sd,fid);                                                  //  load curves data
          if (err) goto baddata;
          continue;
       }
       if (strmatch(pp,"end")) break;
       pp1 = pp;
       pp2 = strstr(pp1," ==");
-      if (! pp2) continue;                                                       //  widget has no data
+      if (! pp2) continue;                                                             //  widget has no data
       cc1 = pp2 - pp1;
       if (cc1 > 100) continue;
       pp1[cc1] = 0;
-      wname = pp1;                                                               //  widget name
-      if (strstr("defcats deftags",wname)) continue;                             //  fotocx only kludge
+      wname = pp1;                                                                     //  widget name
+      if (strstr("defcats deftags",wname)) continue;                                   //  fotocx only kludge
       pp2 += 3;
       if (*pp2 == ' ') pp2++;
-      wdata = pp2;                                                               //  widget data
+      wdata = pp2;                                                                     //  widget data
       cc2 = strlen(wdata);
       if (cc2 < 1) wdata = "";
       if (cc2 > 1000) continue;
-      repl_1str(wdata,wdata2,1000,"\\n","\n");                                   //  replace "\n" with newline chars.
+      repl_1str(wdata,wdata2,1000,"\\n","\n");                                         //  replace "\n" with newline chars.
       kk = zdialog_put_data(zd,wname,wdata2);
       if (! kk) goto baddata;
-      Plog(2,"put dialog data: %s %s \n",wname,wdata2);                          //  24.30
    }
 
    if (myfid) fclose(fid);
@@ -11181,17 +11133,17 @@ int zdialog_save_widgets(zdialog *zd, sp
    ch       *wtype, *wname, *wdata, wdata2[1000];
    int      ii, cc;
 
-   ch       *editwidgets = "entry zentry edit text togbutt check combo"          //  widget types to save
+   ch       *editwidgets = "entry zentry edit text togbutt check combo"                //  widget types to save
                            "radio spin zspin hscale hscale2 vscale colorbutt";
-   ch       *editwidgetsX = "defcats deftags";                                   //  exclude list, fotocx kludge
+   ch       *editwidgetsX = "defcats deftags";                                         //  exclude list, fotocx kludge
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! fid)                                                                    //  fid from script
+   if (! fid)                                                                          //  fid from script
    {
-      snprintf(dirname,200,"%s/%s",get_zhomedir(),funcname);                     //  folder for data files
-      filename = zgetfile(mess,GTK_WINDOW(mainwin),"save",dirname,0);            //  open data file
-      if (! filename) return 1;                                                  //  user cancel
+      snprintf(dirname,200,"%s/%s",get_zhomedir(),funcname);                           //  folder for data files
+      filename = zgetfile(mess,GTK_WINDOW(mainwin),"save",dirname,0);                  //  open data file
+      if (! filename) return 1;                                                        //  user cancel
       fid = fopen(filename,"w");
       if (! fid) {
          zmessageACK(mainwin,"%s \n %s",filename,strerror(errno));
@@ -11206,13 +11158,13 @@ int zdialog_save_widgets(zdialog *zd, sp
       wtype = (ch *) zd->widget[ii].type;
       if (! wtype) break;
       if (! strstr(editwidgets,wtype)) continue;
-      wname = (ch *) zd->widget[ii].wname;                                       //  write widget data recs:
+      wname = (ch *) zd->widget[ii].wname;                                             //  write widget data recs:
       if (strstr(editwidgetsX,wname)) continue;
-      wdata = zd->widget[ii].data;                                               //  widgetname == widgetdata
+      wdata = zd->widget[ii].data;                                                     //  widgetname == widgetdata
       if (! wdata) continue;
       cc = strlen(wdata);
       if (cc > 900) continue;
-      repl_1str(wdata,wdata2,1000,"\n","\\n");                                   //  replace newline with "\n"
+      repl_1str(wdata,wdata2,1000,"\n","\\n");                                         //  replace newline with "\n"
       fprintf(fid,"%s == %s \n",wname,wdata);
    }
 
@@ -11267,17 +11219,17 @@ int zdialog_save_last_widgets(zdialog *z
    snprintf(filename,200,"%s/%s/last-used",get_zhomedir(),funcname);
    fid = fopen(filename,"w");
    if (! fid) {
-      snprintf(dirname,200,"%s/%s",get_zhomedir(),funcname);                     //  create missing folder
+      snprintf(dirname,200,"%s/%s",get_zhomedir(),funcname);                           //  create missing folder
       err = mkdir(dirname,0750);
       if (err) {
-         Plog(0,"%s \n %s \n",dirname,strerror(errno));
+         printf("*** %s \n %s \n",dirname,strerror(errno));
          return 1;
       }
-      fid = fopen(filename,"w");                                                 //  open again
+      fid = fopen(filename,"w");                                                       //  open again
    }
 
    if (! fid) {
-      Plog(0,"%s \n %s \n",filename,strerror(errno));
+      printf("*** %s \n %s \n",filename,strerror(errno));
       return 1;
    }
 
@@ -11294,13 +11246,13 @@ int zdialog_save_last_widgets(zdialog *z
 namespace zdposn_names
 {
    struct zdposn_t {
-      ch       wintitle[64];                                                     //  window title (ID)
-      float    xpos, ypos;                                                       //  window posn WRT parent or desktop, 0-100
-      int      xsize, ysize;                                                     //  window size, pixels
-   }  zdposn[200];                                                               //  space to remember 200 windows
+      ch       wintitle[64];                                                           //  window title (ID)
+      float    xpos, ypos;                                                             //  window posn WRT parent or desktop, 0-100
+      int      xsize, ysize;                                                           //  window size, pixels
+   }  zdposn[200];                                                                     //  space to remember 200 windows
 
-   int      Nzdposn;                                                             //  no. in use
-   int      Nzdpmax = 200;                                                       //  table size
+   int      Nzdposn;                                                                   //  no. in use
+   int      Nzdpmax = 200;                                                             //  table size
 }
 
 
@@ -11320,9 +11272,9 @@ int zdialog_geometry(ch *action)
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   snprintf(posfile,199,"%s/zdialog_geometry",zhomedir);                         //  /home/<user>/.appname/zdialog_geometry
+   snprintf(posfile,199,"%s/zdialog_geometry",zhomedir);                               //  /home/<user>/.appname/zdialog_geometry
 
-   if (strmatch(action,"load"))                                                  //  load dialog positions table from file
+   if (strmatch(action,"load"))                                                        //  load dialog positions table from file
    {
       fid = fopen(posfile,"r");
       if (! fid) {
@@ -11356,16 +11308,16 @@ int zdialog_geometry(ch *action)
       return Nzdposn;
    }
 
-   if (strmatch(action,"save"))                                                  //  save dialog positions table to file
+   if (strmatch(action,"save"))                                                        //  save dialog positions table to file
    {
       fid = fopen(posfile,"w");
       if (! fid) {
-         Plog(0,"cannot write zdialog_geometry file \n");
+         printf("*** cannot write zdialog_geometry file \n");
          return 0;
       }
 
       for (ii = 0; ii < Nzdposn; ii++) {
-         fprintf(fid,"%s || %0.1f %0.1f %d %d \n",                               //  dialog-title || xpos ypos xsize ysize
+         fprintf(fid,"%s || %0.1f %0.1f %d %d \n",                                     //  dialog-title || xpos ypos xsize ysize
                            zdposn[ii].wintitle,
                            zdposn[ii].xpos, zdposn[ii].ypos,
                            zdposn[ii].xsize, zdposn[ii].ysize);
@@ -11375,7 +11327,7 @@ int zdialog_geometry(ch *action)
       return Nzdposn;
    }
 
-   Plog(0,"zdialog_geometry bad action: %s \n",action);
+   printf("*** zdialog_geometry bad action: %s \n",action);
    return 0;
 }
 
@@ -11424,50 +11376,50 @@ void zdialog_set_position(zdialog *zd, c
 
    if (! parent) parent = mainwin;
 
-   if (! parent) {                                                               //  no parent window
-      ppx = ppy = 0;                                                             //  use desktop
+   if (! parent) {                                                                     //  no parent window
+      ppx = ppy = 0;                                                                   //  use desktop
       pww = monitor_ww;
       phh = monitor_hh;
    }
    else {
-      gtk_window_get_position(GTK_WINDOW(parent),&ppx,&ppy);                     //  parent window NW corner
-      gtk_window_get_size(GTK_WINDOW(parent),&pww,&phh);                         //  parent window size
+      gtk_window_get_position(GTK_WINDOW(parent),&ppx,&ppy);                           //  parent window NW corner
+      gtk_window_get_size(GTK_WINDOW(parent),&pww,&phh);                               //  parent window size
    }
 
-   if (strmatch(posn,"save"))                                                    //  use last saved window position
+   if (strmatch(posn,"save"))                                                          //  use last saved window position
    {
-      zd->saveposn = 1;                                                          //  set flag for zdialog_free()
+      zd->saveposn = 1;                                                                //  set flag for zdialog_free()
 
-      pp = (ch *) gtk_window_get_title(GTK_WINDOW(dialog));                      //  get window title, used as ID
+      pp = (ch *) gtk_window_get_title(GTK_WINDOW(dialog));                            //  get window title, used as ID
       if (! pp || strlen(pp) < 2) goto center_parent;
 
-      strncpy0(wintitle,pp,64);                                                  //  window title, < 64 chars.
+      strncpy0(wintitle,pp,64);                                                        //  window title, < 64 chars.
 
-      for (ii = 0; ii < Nzdposn; ii++)                                           //  search table for title
+      for (ii = 0; ii < Nzdposn; ii++)                                                 //  search table for title
          if (strmatch(wintitle,zdposn[ii].wintitle)) break;
-      if (ii == Nzdposn) goto center_parent;                                     //  not found - zdialog_destroy() will add
+      if (ii == Nzdposn) goto center_parent;                                           //  not found - zdialog_destroy() will add
 
-      zdpx = ppx + 0.01 * zdposn[ii].xpos * pww;                                 //  set position for dialog window
+      zdpx = ppx + 0.01 * zdposn[ii].xpos * pww;                                       //  set position for dialog window
       zdpy = ppy + 0.01 * zdposn[ii].ypos * phh;
-      xsize = zdposn[ii].xsize;                                                  //  set size
+      xsize = zdposn[ii].xsize;                                                        //  set size
       ysize = zdposn[ii].ysize;
       gtk_window_move(GTK_WINDOW(dialog),zdpx,zdpy);
       gtk_window_resize(GTK_WINDOW(dialog),xsize,ysize);
       return;
    }
 
-   else     //  "nn/nn"                                                          //  position from caller
+   else     //  "nn/nn"                                                                //  position from caller
    {
-      ii = sscanf(posn,"%f/%f",&xpos,&ypos);                                     //  parse "nn/nn"
+      ii = sscanf(posn,"%f/%f",&xpos,&ypos);                                           //  parse "nn/nn"
       if (ii != 2) goto center_parent;
 
-      zdpx = ppx + 0.01 * xpos * pww;                                            //  position for dialog window
+      zdpx = ppx + 0.01 * xpos * pww;                                                  //  position for dialog window
       zdpy = ppy + 0.01 * ypos * phh;
       gtk_window_move(GTK_WINDOW(dialog),zdpx,zdpy);
       return;
    }
 
-center_parent:                                                                   //  center on parent window
+center_parent:                                                                         //  center on parent window
    gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_CENTER_ON_PARENT);
    return;
 }
@@ -11495,44 +11447,44 @@ void zdialog_save_position(zdialog *zd)
    if (! dialog) return;
    if (! gtk_widget_get_window(dialog)) return;
 
-   gtk_window_get_position(GTK_WINDOW(dialog),&zdpx,&zdpy);                      //  dialog window NW corner
-   if (! zdpx && ! zdpy) return;                                                 //  (0,0) ignore
+   gtk_window_get_position(GTK_WINDOW(dialog),&zdpx,&zdpy);                            //  dialog window NW corner
+   if (! zdpx && ! zdpy) return;                                                       //  (0,0) ignore
 
-   gtk_window_get_size(GTK_WINDOW(dialog),&xsize,&ysize);                        //  window size
+   gtk_window_get_size(GTK_WINDOW(dialog),&xsize,&ysize);                              //  window size
 
-   parent = zd->parent;                                                          //  parent window
+   parent = zd->parent;                                                                //  parent window
 
    if (! parent) parent = mainwin;
 
-   if (! parent) {                                                               //  no parent window
-      ppx = ppy = 0;                                                             //  use desktop
+   if (! parent) {                                                                     //  no parent window
+      ppx = ppy = 0;                                                                   //  use desktop
       pww = monitor_ww;
       phh = monitor_hh;
    }
    else {
-      gtk_window_get_position(GTK_WINDOW(parent),&ppx,&ppy);                     //  parent window NW corner
-      gtk_window_get_size(GTK_WINDOW(parent),&pww,&phh);                         //  parent window size
+      gtk_window_get_position(GTK_WINDOW(parent),&ppx,&ppy);                           //  parent window NW corner
+      gtk_window_get_size(GTK_WINDOW(parent),&pww,&phh);                               //  parent window size
    }
 
-   xpos = 100.0 * (zdpx - ppx) / pww;                                            //  dialog window relative position
-   ypos = 100.0 * (zdpy - ppy) / phh;                                            //  (as percent of parent size)
+   xpos = 100.0 * (zdpx - ppx) / pww;                                                  //  dialog window relative position
+   ypos = 100.0 * (zdpy - ppy) / phh;                                                  //  (as percent of parent size)
 
    pp = (ch *) gtk_window_get_title(GTK_WINDOW(dialog));
    if (! pp) return;
    if (strlen(pp) < 2) return;
-   strncpy0(wintitle,pp,64);                                                     //  window title, < 64 chars.
+   strncpy0(wintitle,pp,64);                                                           //  window title, < 64 chars.
 
-   for (ii = 0; ii < Nzdposn; ii++)                                              //  search table for window
+   for (ii = 0; ii < Nzdposn; ii++)                                                    //  search table for window
       if (strmatch(wintitle,zdposn[ii].wintitle)) break;
-   if (ii == Nzdposn) {                                                          //  not found
-      if (ii == Nzdpmax) return;                                                 //  table full
-      Nzdposn++;                                                                 //  new entry
+   if (ii == Nzdposn) {                                                                //  not found
+      if (ii == Nzdpmax) return;                                                       //  table full
+      Nzdposn++;                                                                       //  new entry
    }
 
-   strcpy(zdposn[ii].wintitle,wintitle);                                         //  add window to table
-   zdposn[ii].xpos = xpos;                                                       //  save window position
+   strcpy(zdposn[ii].wintitle,wintitle);                                               //  add window to table
+   zdposn[ii].xpos = xpos;                                                             //  save window position
    zdposn[ii].ypos = ypos;
-   zdposn[ii].xsize = xsize;                                                     //  and window size
+   zdposn[ii].xsize = xsize;                                                           //  and window size
    zdposn[ii].ysize = ysize;
    return;
 }
@@ -11545,19 +11497,19 @@ void zdialog_save_position(zdialog *zd)
 
 namespace zdinputs_names
 {
-   #define  Nwmax zdmaxwidgets                                                   //  max. widgets in a dialog
-   #define  Nzdmax 200                                                           //  max. zdialogs
-   #define  ccmax1 100                                                           //  max. widget name length
-   #define  ccmax2 400                                                           //  max. widget data length
+   #define  Nwmax zdmaxwidgets                                                         //  max. widgets in a dialog
+   #define  Nzdmax 200                                                                 //  max. zdialogs
+   #define  ccmax1 100                                                                 //  max. widget name length
+   #define  ccmax2 400                                                                 //  max. widget data length
 
    struct zdinputs_t {
-      ch       *zdtitle = 0;                                                     //  zdialog title
-      int      Nw;                                                               //  no. of widgets
-      ch       **wname;                                                          //  list of widget names
-      ch       **wdata;                                                          //  list of widget data
-   }  zdinputs[Nzdmax];                                                          //  space for Nzdmax dialogs
+      ch       *zdtitle = 0;                                                           //  zdialog title
+      int      Nw;                                                                     //  no. of widgets
+      ch       **wname;                                                                //  list of widget names
+      ch       **wdata;                                                                //  list of widget data
+   }  zdinputs[Nzdmax];                                                                //  space for Nzdmax dialogs
 
-   int      Nzd = 0;                                                             //  no. zdialogs in use
+   int      Nzd = 0;                                                                   //  no. zdialogs in use
 }
 
 
@@ -11566,7 +11518,7 @@ namespace zdinputs_names
 //  Action is "load" or "save".
 //  Number of zdialogs is returned.
 
-int zdialog_inputs(ch *action)                                                   //  sequence numbers added                25.1
+int zdialog_inputs(ch *action)                                                         //  sequence numbers added                25.1
 {
    using namespace zdinputs_names;
 
@@ -11579,43 +11531,43 @@ int zdialog_inputs(ch *action)
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   snprintf(zdinputsfile,200,"%s/zdialog_inputs",zhomedir);                      //  /home/<user>/.appname/zdialog_inputs
+   snprintf(zdinputsfile,200,"%s/zdialog_inputs",zhomedir);                            //  /home/<user>/.appname/zdialog_inputs
 
-   if (strmatch(action,"load"))                                                  //  load dialog input fields from its file
+   if (strmatch(action,"load"))                                                        //  load dialog input fields from its file
    {
       Nzd = seq = 0;
 
-      fid = fopen(zdinputsfile,"r");                                             //  no file
+      fid = fopen(zdinputsfile,"r");                                                   //  no file
       if (! fid) return 0;
 
       while (true)
       {
-         pp = fgets_trim(buff,ccmax2,fid,1);                                     //  read next zdialog title record
+         pp = fgets_trim(buff,ccmax2,fid,1);                                           //  read next zdialog title record
          if (! pp || seq++ != atoi(pp)) goto abend;
-         pp += 4; 
+         pp += 4;
 
-         if (strstr(pp,"EOF")) break;                                            //  normal EOF, OK
+         if (strstr(pp,"EOF")) break;                                                  //  normal EOF, OK
 
-         if (! strmatchN(pp,"zdialog == ",11)) continue;                         //  expect zdialog title record
+         if (! strmatchN(pp,"zdialog == ",11)) continue;                               //  expect zdialog title record
 
-         strncpy0(zdtitle,pp+11,ccmax1);                                         //  save new zdialog title
+         strncpy0(zdtitle,pp+11,ccmax1);                                               //  save new zdialog title
 
-         pp = fgets_trim(buff,ccmax2,fid,1);                                     //  read next zdialog title record
+         pp = fgets_trim(buff,ccmax2,fid,1);                                           //  read next zdialog title record
          if (! pp || seq++ != atoi(pp)) goto abend;
-         pp += 4; 
+         pp += 4;
 
-         Nw = atoi(pp);                                                          //  dialog widget count
+         Nw = atoi(pp);                                                                //  dialog widget count
          if (Nw < 1 || Nw > Nwmax) goto abend;
 
-         for (ii = 0; ii < Nw; ii++)                                             //  read widget data recs
+         for (ii = 0; ii < Nw; ii++)                                                   //  read widget data recs
          {
-            pp = fgets_trim(buff,ccmax2,fid,1);                                  //  read next zdialog title record
+            pp = fgets_trim(buff,ccmax2,fid,1);                                        //  read next zdialog title record
             if (! pp || seq++ != atoi(pp)) goto abend;
-            pp += 4; 
+            pp += 4;
 
             pp1 = pp;
             pp2 = strstr(pp1," ==");
-            if (! pp2) break;                                                    //  widget has no data
+            if (! pp2) break;                                                          //  widget has no data
             cc1 = pp2 - pp1;
             pp1[cc1] = 0;
             pp2 += 3;
@@ -11623,20 +11575,20 @@ int zdialog_inputs(ch *action)
             cc2 = strlen(pp2);
             if (cc1 < 1 || cc1 >= ccmax1) break;
             if (cc2 < 1) pp2 = "";
-            if (cc2 >= ccmax2) break;                                            //  do not copy large inputs
-            strcpy(wname[ii],pp1);                                               //  save widget name and data
+            if (cc2 >= ccmax2) break;                                                  //  do not copy large inputs
+            strcpy(wname[ii],pp1);                                                     //  save widget name and data
             strcpy(wdata2,pp2);
-            repl_1str(wdata2,wdata[ii],ccmax2,"\\n","\n");                       //  replace "\n" with newline chars.
+            repl_1str(wdata2,wdata[ii],ccmax2,"\\n","\n");                             //  replace "\n" with newline chars.
          }
 
          if (ii < Nw) goto abend;
 
          if (Nzd == Nzdmax) {
-            Plog(0,"zdialog_inputs() overflow \n");
+            printf("*** zdialog_inputs() overflow \n");
             break;
          }
 
-         zdinputs[Nzd].zdtitle = zstrdup(zdtitle,"zdialog_inputs");              //  save acculumated zdialog data
+         zdinputs[Nzd].zdtitle = zstrdup(zdtitle,"zdialog_inputs");                    //  save acculumated zdialog data
          zdinputs[Nzd].Nw = Nw;
          cc = Nw * sizeof(ch *);
          zdinputs[Nzd].wname = (ch **) zmalloc(cc,"zdialog_inputs");
@@ -11651,20 +11603,20 @@ int zdialog_inputs(ch *action)
 
       fclose(fid);
       return Nzd;
-      
+
    abend:
-      Plog(0,"zdialog_inputs file corrupted - deleted \n");                      //  25.1
+      printf("*** zdialog_inputs file corrupted - deleted \n");                        //  25.1
       fclose(fid);
       remove(zdinputsfile);
       Nzd = 0;
       return 0;
    }
 
-   if (strmatch(action,"save"))                                                  //  save dialog input fields to its file
+   if (strmatch(action,"save"))                                                        //  save dialog input fields to its file
    {
       fid = fopen(zdinputsfile,"w");
       if (! fid) {
-         Plog(0,"zdialog_inputs() cannot write file \n");
+         printf("*** zdialog_inputs() cannot write file \n");
          return 0;
       }
 
@@ -11672,13 +11624,13 @@ int zdialog_inputs(ch *action)
 
       for (ii = 0; ii < Nzd; ii++)
       {
-         fprintf(fid,"%03d zdialog == %s \n",seq++,zdinputs[ii].zdtitle);        //  zdialog == zdialog title
+         fprintf(fid,"%03d zdialog == %s \n",seq++,zdinputs[ii].zdtitle);              //  zdialog == zdialog title
          Nw = zdinputs[ii].Nw;
-         fprintf(fid,"%03d %d \n",seq++,Nw);                                     //  widget count
+         fprintf(fid,"%03d %d \n",seq++,Nw);                                           //  widget count
          for (jj = 0; jj < Nw; jj++) {
-            pp1 = zdinputs[ii].wname[jj];                                        //  widget name == widget data
+            pp1 = zdinputs[ii].wname[jj];                                              //  widget name == widget data
             pp2 = zdinputs[ii].wdata[jj];
-            repl_1str(pp2,wdata2,ccmax2+50,"\n","\\n");                          //  replace newline chars. with "\n"
+            repl_1str(pp2,wdata2,ccmax2+50,"\n","\\n");                                //  replace newline chars. with "\n"
             fprintf(fid,"%03d %s == %s \n",seq++,pp1,wdata2);
          }
          fprintf(fid,"%03d \n",seq++);
@@ -11689,7 +11641,7 @@ int zdialog_inputs(ch *action)
       return Nzd;
    }
 
-   Plog(0,"zdialog_inputs bad action: %s \n",action);
+   printf("*** zdialog_inputs bad action: %s \n",action);
    return 0;
 }
 
@@ -11705,64 +11657,64 @@ int zdialog_save_inputs(zdialog *zd)
    ch       *wnamex, *type;
    int      ii, jj, Nw, cc;
 
-   ch       *skipwidgets = "dialog hbox vbox hsep vsep frame scrwin"             //  non-input widgets to omit
+   ch       *skipwidgets = "dialog hbox vbox hsep vsep frame scrwin"                   //  non-input widgets to omit
                            "label link button zbutton";
-   ch       *skipexceptions = "searchtags";                                      //  fotocx kludge
+   ch       *skipexceptions = "searchtags";                                            //  fotocx kludge
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
    if (! zdialog_valid(zd)) return 0;
-   if (! zd->saveinputs) return 0;                                               //  zdialog does not use this service
+   if (! zd->saveinputs) return 0;                                                     //  zdialog does not use this service
 
-   strncpy0(zdtitle,zd->widget[0].data,ccmax1);                                  //  zdialog title is widget[0].data
+   strncpy0(zdtitle,zd->widget[0].data,ccmax1);                                        //  zdialog title is widget[0].data
 
-   for (ii = 0; ii < Nzd; ii++)                                                  //  find zdialog in zdinputs table
+   for (ii = 0; ii < Nzd; ii++)                                                        //  find zdialog in zdinputs table
       if (strmatch(zdtitle,zdinputs[ii].zdtitle)) break;
 
-   if (ii < Nzd) {                                                               //  found
-      zfree(zdinputs[ii].zdtitle);                                               //  delete obsolete zdinputs data
+   if (ii < Nzd) {                                                                     //  found
+      zfree(zdinputs[ii].zdtitle);                                                     //  delete obsolete zdinputs data
       for (jj = 0; jj < zdinputs[ii].Nw; jj++) {
          zfree(zdinputs[ii].wname[jj]);
          zfree(zdinputs[ii].wdata[jj]);
       }
       zfree(zdinputs[ii].wname);
       zfree(zdinputs[ii].wdata);
-      Nzd--;                                                                     //  decr. zdialog count
-      for (NOP; ii < Nzd; ii++)                                                  //  pack down the rest
+      Nzd--;                                                                           //  decr. zdialog count
+      for (NOP; ii < Nzd; ii++)                                                        //  pack down the rest
          zdinputs[ii] = zdinputs[ii+1];
    }
 
    if (Nzd == Nzdmax) {
-      Plog(0,"zdialog_save_inputs, too many zdialogs \n");
+      printf("*** zdialog_save_inputs, too many zdialogs \n");
       return 0;
    }
 
-   ii = Nzd;                                                                     //  next zdinputs table entry
+   ii = Nzd;                                                                           //  next zdinputs table entry
 
-   for (Nw = 0, jj = 1; zd->widget[jj].type; jj++) {                             //  count zdialog widgets
+   for (Nw = 0, jj = 1; zd->widget[jj].type; jj++) {                                   //  count zdialog widgets
       wnamex = (ch *) zd->widget[jj].wname;
       type = (ch *) zd->widget[jj].type;
-      if (strstr(skipwidgets,type))                                              //  skip non-input widgets
+      if (strstr(skipwidgets,type))                                                    //  skip non-input widgets
          if (! strstr(skipexceptions,wnamex)) continue;
       Nw++;
    }
 
-   if (! Nw) return 0;                                                           //  no input widgets
+   if (! Nw) return 0;                                                                 //  no input widgets
    if (Nw > Nwmax) {
-      Plog(0,"zdialog_save_inputs() bad data: %s \n",zdtitle);
+      printf("*** zdialog_save_inputs() bad data: %s \n",zdtitle);
       return 0;
    }
 
-   zdinputs[ii].zdtitle = zstrdup(zdtitle,"zdialog_save");                       //  set zdialog title
+   zdinputs[ii].zdtitle = zstrdup(zdtitle,"zdialog_save");                             //  set zdialog title
 
-   cc = Nw * sizeof(ch *);                                                       //  allocate pointers for widgets
+   cc = Nw * sizeof(ch *);                                                             //  allocate pointers for widgets
    zdinputs[ii].wname = (ch **) zmalloc(cc,"zdialog_save");
    zdinputs[ii].wdata = (ch **) zmalloc(cc,"zdialog_save");
 
-   for (Nw = 0, jj = 1; zd->widget[jj].type; jj++) {                             //  add widget names and data
+   for (Nw = 0, jj = 1; zd->widget[jj].type; jj++) {                                   //  add widget names and data
       wnamex = (ch *) zd->widget[jj].wname;
       type = (ch *) zd->widget[jj].type;
-      if (strstr(skipwidgets,type))                                              //  skip non-input widgets
+      if (strstr(skipwidgets,type))                                                    //  skip non-input widgets
          if (! strstr(skipexceptions,wnamex)) continue;
       strncpy0(wname,zd->widget[jj].wname,ccmax1);
       if (zd->widget[jj].data)
@@ -11773,8 +11725,8 @@ int zdialog_save_inputs(zdialog *zd)
       Nw++;
    }
 
-   zdinputs[ii].Nw = Nw;                                                         //  set widget count
-   Nzd++;                                                                        //  add zdialog to end of zdinputs
+   zdinputs[ii].Nw = Nw;                                                               //  set widget count
+   Nzd++;                                                                              //  add zdialog to end of zdinputs
 
    return 1;
 }
@@ -11791,17 +11743,17 @@ int zdialog_load_inputs(zdialog *zd)
    ch       *zdtitle, *wname, *wdata;
    int      ii, jj;
 
-   zd->saveinputs = 1;                                                           //  flag, save data at zdialog_free()
+   zd->saveinputs = 1;                                                                 //  flag, save data at zdialog_free()
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   zdtitle = (ch *) zd->widget[0].data;                                          //  zdialog title
+   zdtitle = (ch *) zd->widget[0].data;                                                //  zdialog title
 
-   for (ii = 0; ii < Nzd; ii++)                                                  //  find zdialog in zdinputs
+   for (ii = 0; ii < Nzd; ii++)                                                        //  find zdialog in zdinputs
       if (strmatch(zdtitle,zdinputs[ii].zdtitle)) break;
-   if (ii == Nzd) return 0;                                                      //  not found
+   if (ii == Nzd) return 0;                                                            //  not found
 
-   for (jj = 0; jj < zdinputs[ii].Nw; jj++) {                                    //  stuff all saved widget data
+   for (jj = 0; jj < zdinputs[ii].Nw; jj++) {                                          //  stuff all saved widget data
       wname = zdinputs[ii].wname[jj];
       wdata = zdinputs[ii].wdata[jj];
       zdialog_put_data(zd,wname,wdata);
@@ -11932,10 +11884,10 @@ int zdialog_password_event(zdialog *zd,
 
 namespace zdialog_choose_names
 {
-   int      button;                                                              //  button pushed 1-5
+   int      button;                                                                    //  button pushed 1-5
 }
 
-int zdialog_choose(GtkWidget *parent, ch *where, ch *message, ...)               //  improved         25.0
+int zdialog_choose(GtkWidget *parent, ch *where, ch *message, ...)                     //  improved         25.0
 {
    using namespace zdialog_choose_names;
 
@@ -11948,15 +11900,15 @@ int zdialog_choose(GtkWidget *parent, ch
    ch          butt[4] = "B0";
 
    if (! main_thread()) zappcrash("illegal call from thread");
-   
-   button = 1;                                                                   //  default
+
+   button = 1;                                                                         //  default
 
    va_start(arglist,message);
 
    for (ii = 0; ii < 5; ii++)
    {
       text[ii] = va_arg(arglist,ch *);
-      if (! text[ii] || text[ii] == (ch *) 0x100000000) break;                   //  ARM bug, funny null
+      if (! text[ii] || text[ii] == (ch *) 0x100000000) break;                         //  ARM bug, funny null
    }
 
    Ntext = ii;
@@ -11966,7 +11918,7 @@ int zdialog_choose(GtkWidget *parent, ch
    zdialog_add_widget(zd,"label","labmess","dialog",message,"space=5");
 
    for (ii = 0; ii < Ntext; ii++) {
-      butt[1] = '1' + ii;                                                        //  button names: "B1" "B2" etc.
+      butt[1] = '1' + ii;                                                              //  button names: "B1" "B2" etc.
       zdialog_add_widget(zd,"radio",butt,"dialog",text[ii],"space=2");
    }
 
@@ -11986,9 +11938,9 @@ int zdialog_choose_event(zdialog *zd, ch
    using namespace zdialog_choose_names;
 
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (strstr("B1 B2 B3 B4 B5",event)) button = event[1] - '0';                  //  set button pushed 1-5
-   if (strmatch(event,"escape")) zd->zstat = -2;                                 //  escape key
-   if (zd->zstat) zdialog_destroy(zd);                                           //  [-] [OK] [X] 
+   if (strstr("B1 B2 B3 B4 B5",event)) button = event[1] - '0';                        //  set button pushed 1-5
+   if (strmatch(event,"escape")) zd->zstat = -2;                                       //  escape key
+   if (zd->zstat) zdialog_destroy(zd);                                                 //  [-] [OK] [X]
    return 1;
 }
 
@@ -11998,69 +11950,69 @@ int zdialog_choose_event(zdialog *zd, ch
 //  popup zdialog to edit a text file
 //  returns 0 if OK or user cancel, +N if error
 
-int zdialog_edit_textfile(GtkWidget *parent, char *file)                         //  24.30
+int zdialog_edit_textfile(GtkWidget *parent, char *file)
 {
    zdialog  *zd;
-   int      cc, err, zstat, maxcc = 1000000;                                     //  max. file size
-   char     *pp, *title, buff[1000001]; 
+   int      cc, err, zstat, maxcc = 1000000;                                           //  max. file size
+   char     *pp, *title, buff[1000001];
    FILE     *fid;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   snprintf(buff,maxcc,"du -b %s",file);                                         //  command to get file size
-   
-   fid = popen(buff,"r");                                                        //  run 'du' command
+   snprintf(buff,maxcc,"du -b %s",file);                                               //  command to get file size
+
+   fid = popen(buff,"r");                                                              //  run 'du' command
    if (! fid) goto filerr;
-   
-   pp = fgets(buff,100,fid);                                                     //  read command output
+
+   pp = fgets(buff,100,fid);                                                           //  read command output
    pclose(fid);
    if (! pp) goto filerr;
 
-   cc = atoi(pp);                                                                //  file size
-   if (cc < 0 || cc > maxcc) {                                                   //  reject file > 1 MB
-      Plog(0,"file size > %d: %s \n",maxcc,file);
+   cc = atoi(pp);                                                                      //  file size
+   if (cc < 0 || cc > maxcc) {                                                         //  reject file > 1 MB
+      printf("*** file size > %d: %s \n",maxcc,file);
       return 1;
    }
 
-   fid = fopen(file,"r");                                                        //  open file
+   fid = fopen(file,"r");                                                              //  open file
    if (! fid) goto filerr;
 
    for (cc = 0; ; ) {
-      pp = fgets(buff+cc,maxcc-cc,fid);                                          //  read entire file
+      pp = fgets(buff+cc,maxcc-cc,fid);                                                //  read entire file
       if (! pp) break;
       cc += strlen(pp);
    }
-   
+
    fclose(fid);
 
-   title = strrchr(file,'/');                                                    //  get root file name
+   title = strrchr(file,'/');                                                          //  get root file name
    if (title) title++;
    else title = file;
-   
-   zd = zdialog_new(title,parent,"Apply"," X ",null);                            //  create text edit dialog
+
+   zd = zdialog_new(title,parent,"Apply"," X ",null);                                  //  create text edit dialog
    zdialog_add_widget(zd,"scrwin","scroll","dialog",0,"expand");
    zdialog_add_widget(zd,"zedit","text","scroll",0,"expand");
-   
-   zdialog_stuff(zd,"text",buff);                                                //  stuff file text into dialog
-   
+
+   zdialog_stuff(zd,"text",buff);                                                      //  stuff file text into dialog
+
    zdialog_resize(zd,500,400);
-   zdialog_run(zd,0,"parent");                                                   //  run dialog
+   zdialog_run(zd,0,"parent");                                                         //  run dialog
 
-   zstat = zdialog_wait(zd);                                                     //  wait for completion
+   zstat = zdialog_wait(zd);                                                           //  wait for completion
    if (zstat != 1) {
-      zdialog_free(zd);                                                          //  user cancel
+      zdialog_free(zd);                                                                //  user cancel
       return 0;
    }
-   
-   zdialog_fetch(zd,"text",buff,maxcc);                                          //  get edited text
+
+   zdialog_fetch(zd,"text",buff,maxcc);                                                //  get edited text
    zdialog_free(zd);
-   
+
    cc = strlen(buff);
    if (cc > maxcc) {
-      Plog(0,"edited file size > %d: %s \n",maxcc,file);
+      printf("*** edited file size > %d: %s \n",maxcc,file);
       return 1;
    }
-   
+
    fid = fopen(file,"w");
    if (! fid) goto filerr;
 
@@ -12073,7 +12025,7 @@ int zdialog_edit_textfile(GtkWidget *par
    return 0;
 
 filerr:
-   Plog(0,"file error: %s %s \n",strerror(errno),file);
+   printf("*** file error: %s %s \n",strerror(errno),file);
    return 1;
 }
 
@@ -12100,54 +12052,54 @@ zdialog * popup_report_open(ch *title, G
    int popup_report_dialog_event(zdialog *zd, ch *event);
 
    va_list     arglist;
-   ch          *butn[6];                                                         //  up to 5 buttons + null
+   ch          *butn[6];                                                               //  up to 5 buttons + null
    int         ii, NB;
    zdialog     *zd;
    GtkWidget   *mHead, *mText;
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   va_start(arglist,CBfunc);                                                     //  get button args, if any
+   va_start(arglist,CBfunc);                                                           //  get button args, if any
 
-   for (ii = 0; ii < 5; ii++) {                                                  //  up to 5 buttons                       25.1
+   for (ii = 0; ii < 5; ii++) {                                                        //  up to 5 buttons                       25.1
       butn[ii] = va_arg(arglist,ch *);
-      if (! butn[ii] || butn[ii] == (ch *) 0x100000000) break;                   //  ARM bug
+      if (! butn[ii] || butn[ii] == (ch *) 0x100000000) break;                         //  ARM bug
    }
 
-   NB = ii;                                                                      //  no. buttons
+   NB = ii;                                                                            //  no. buttons
 
    zd = zdialog_new(title,parent,null);
 
-   if (Fheader) {                                                                //  non-scrolling header
+   if (Fheader) {                                                                      //  non-scrolling header
       zdialog_add_widget(zd,"text","header","dialog");
       zdialog_add_widget(zd,"hsep","hsep","dialog");
    }
 
-   zdialog_add_widget(zd,"scrwin","scroll","dialog",0,"expand");                 //  scrolling text window for report
+   zdialog_add_widget(zd,"scrwin","scroll","dialog",0,"expand");                       //  scrolling text window for report
 
-   if (wrap) zdialog_add_widget(zd,"report","text","scroll",0,"expand|wrap");    //  text > report
+   if (wrap) zdialog_add_widget(zd,"report","text","scroll",0,"expand|wrap");          //  text > report
    else zdialog_add_widget(zd,"report","text","scroll",0,"expand");
 
-   if (NB) {                                                                     //  optional event buttons
+   if (NB) {                                                                           //  optional event buttons
       zdialog_add_widget(zd,"hbox","hbbutn","dialog");
       zdialog_add_widget(zd,"label","space","hbbutn",0,"expand");
       for (ii = 0; ii < NB; ii++)
          zdialog_add_widget(zd,"button",butn[ii],"hbbutn",butn[ii],"space=5");
    }
 
-   zdialog_resize(zd,ww,hh);                                                     //  show report dialog box
-   zdialog_run(zd,popup_report_dialog_event,"save");                             //  keep window size and position
+   zdialog_resize(zd,ww,hh);                                                           //  show report dialog box
+   zdialog_run(zd,popup_report_dialog_event);                                          //  keep window size and position
 
    if (Fheader) {
-      mHead = zdialog_gtkwidget(zd,"header");                                    //  header initially invisible
+      mHead = zdialog_gtkwidget(zd,"header");                                          //  header initially invisible
       gtk_widget_set_visible(mHead,0);
    }
 
-   mText = zdialog_gtkwidget(zd,"text");                                         //  report text not editable
+   mText = zdialog_gtkwidget(zd,"text");                                               //  report text not editable
    gtk_widget_grab_focus(mText);
 
-   if (CBfunc) {                                                                 //  25.1
-      txwidget_set_eventfunc(mText,CBfunc);                                      //  set mouse/KB event function
+   if (CBfunc) {                                                                       //  25.1
+      txwidget_set_eventfunc(mText,CBfunc);                                            //  set mouse/KB event function
       zd->popup_report_CB = (void *) CBfunc;
    }
 
@@ -12165,47 +12117,47 @@ int popup_report_dialog_event(zdialog *z
    static ch    findtext[40] = "";
    int          linem, line1, line2;
    zdialog      *zdf;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zdialog_valid(zd)) return 1;                                            //  report cancelled
+   if (! zdialog_valid(zd)) return 1;                                                  //  report cancelled
 
    if (strmatch(event,"focus")) return 0;
 
-   if (zd->zstat) {                                                              //  [x] cancel or escape, kill dialog
+   if (zd->zstat) {                                                                    //  [x] cancel or escape, kill dialog
       zdialog_free(zd);
       return 1;
    }
 
-   if (strstr(" OK  X  escape",event)) {                                         //  kill report window                    25.0
+   if (strstr(" OK  X  escape",event)) {                                               //  kill report window                    25.0
       zdialog_free(zd);
       return 1;
    }
 
-   if (strmatch(event,"Find")) {                                                 //  [Find]
-      zdf = zdialog_new("find text",zd->dialog,"Find","Cancel",0);               //  popup dialog to enter text
+   if (strmatch(event,"Find")) {                                                       //  [Find]
+      zdf = zdialog_new("find text",zd->dialog,"Find","Cancel",0);                     //  popup dialog to enter text
       zdialog_add_widget(zdf,"zentry","text","dialog",findtext,"size=20");
       zdialog_run(zdf,0,"mouse");
-      linem = -1;                                                                //  no match line yet
+      linem = -1;                                                                      //  no match line yet
       while (true)
       {
          zdialog_wait(zdf);
-         if (zdf->zstat != 1) {                                                  //  [cancel]
+         if (zdf->zstat != 1) {                                                        //  [cancel]
             zdialog_free(zdf);
             return 1;
          }
          zdf->zstat = 0;
-         zdialog_fetch(zdf,"text",findtext,40);                                  //  get text
-         popup_report_get_visible_lines(zd,line1,line2);                         //  lines now visible
-         if (linem < 0) linem = line1;                                           //  search from 1st visible line
-         linem = popup_report_find(zd,findtext,linem);                           //  search for text
-         if (linem < 0) continue;                                                //  not found
-         popup_report_scroll_top(zd,linem);                                      //  found, scroll to top
-         linem++;                                                                //  next search from line
+         zdialog_fetch(zdf,"text",findtext,40);                                        //  get text
+         popup_report_get_visible_lines(zd,line1,line2);                               //  lines now visible
+         if (linem < 0) linem = line1;                                                 //  search from 1st visible line
+         linem = popup_report_find(zd,findtext,linem);                                 //  search for text
+         if (linem < 0) continue;                                                      //  not found
+         popup_report_scroll_top(zd,linem);                                            //  found, scroll to top
+         linem++;                                                                      //  next search from line
       }
    }
 
-   if (strmatch(event,"Save")) {                                                 //  [Save]   save text to file
+   if (strmatch(event,"Save")) {                                                       //  [Save]   save text to file
       mText = zdialog_gtkwidget(zd,"text");
       txwidget_save(mText,GTK_WINDOW(zd->parent));
       return 1;
@@ -12213,8 +12165,8 @@ int popup_report_dialog_event(zdialog *z
 
    mText = zdialog_gtkwidget(zd,"text");
 
-   CBfunc = (txwidget_CBfunc_t *) zd->popup_report_CB;                           //  other event
-   if (CBfunc) CBfunc(mText,-1,-1,event);                                        //  pass to callback function 
+   CBfunc = (txwidget_CBfunc_t *) zd->popup_report_CB;                                 //  other event
+   if (CBfunc) CBfunc(mText,-1,-1,event);                                              //  pass to callback function
 
    return 1;
 }
@@ -12230,7 +12182,7 @@ void popup_report_header(zdialog *zd, in
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
 
    va_start(arglist,format);
    vsnprintf(message,999,format,arglist);
@@ -12254,7 +12206,7 @@ void popup_report_write(zdialog *zd, int
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
 
    va_start(arglist,format);
    vsnprintf(message,19999,format,arglist);
@@ -12276,7 +12228,7 @@ void popup_report_write2(zdialog *zd, in
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
 
    va_start(arglist,format);
    vsnprintf(message,19999,format,arglist);
@@ -12346,7 +12298,7 @@ void popup_report_insert(zdialog *zd, in
    vsnprintf(message,19999,format,arglist);
    va_end(arglist);
 
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
 
    mText = zdialog_gtkwidget(zd,"text");
    txwidget_insert(mText,bold,line,message);
@@ -12368,7 +12320,7 @@ void popup_report_replace(zdialog *zd, i
    vsnprintf(message,19999,format,arglist);
    va_end(arglist);
 
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
 
    mText = zdialog_gtkwidget(zd,"text");
    txwidget_replace(mText,bold,line,message);
@@ -12396,9 +12348,9 @@ void popup_report_delete(zdialog *zd, in
 int  popup_report_find(zdialog *zd, ch *matchtext, int line1)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return 1; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return 1; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
-   return txwidget_find(mText,matchtext,line1,1);                                //  highlight line
+   return txwidget_find(mText,matchtext,line1,1);                                      //  highlight line
 }
 
 
@@ -12407,7 +12359,7 @@ int  popup_report_find(zdialog *zd, ch *
 void popup_report_insert_pixbuf(zdialog *zd, int line, GdkPixbuf *pixbuf)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_insert_pixbuf(mText,line,pixbuf);
    return;
@@ -12419,7 +12371,7 @@ void popup_report_insert_pixbuf(zdialog
 void popup_report_scroll(zdialog *zd, int line)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_scroll(mText,line);
    return;
@@ -12431,7 +12383,7 @@ void popup_report_scroll(zdialog *zd, in
 void popup_report_scroll_top(zdialog *zd, int line)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_scroll_top(mText,line);
    return;
@@ -12443,7 +12395,7 @@ void popup_report_scroll_top(zdialog *zd
 void popup_report_get_visible_lines(zdialog *zd, int &vtop, int &vbott)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_get_visible_lines(mText,vtop,vbott);
    return;
@@ -12455,7 +12407,7 @@ void popup_report_get_visible_lines(zdia
 ch * popup_report_line(zdialog *zd, int line, int strip)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return 0; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return 0; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    return txwidget_line(mText,line,strip);
 }
@@ -12476,7 +12428,7 @@ ch * popup_report_word(zdialog *zd, int
 void popup_report_highlight_line(zdialog *zd, int line)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_highlight_line(mText,line);
    return;
@@ -12488,7 +12440,7 @@ void popup_report_highlight_line(zdialog
 void popup_report_highlight_word(zdialog *zd, int line, int posn, int cc)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_highlight_word(mText,line,posn,cc);
    return;
@@ -12500,7 +12452,7 @@ void popup_report_highlight_word(zdialog
 void popup_report_underline_word(zdialog *zd, int line, int posn, int cc)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_underline_word(mText,line,posn,cc);
    return;
@@ -12512,14 +12464,14 @@ void popup_report_underline_word(zdialog
 void popup_report_bold_word(zdialog *zd, int line, int posn, int cc)
 {
    if (! main_thread()) zappcrash("illegal call from thread");
-   if (! zdialog_valid(zd)) { Plog(1,"report cancelled \n"); return; }
+   if (! zdialog_valid(zd)) { printf("report cancelled \n"); return; }
    GtkWidget *mText = zdialog_gtkwidget(zd,"text");
    txwidget_bold_word(mText,line,posn,cc);
    return;
 }
 
 
-//  set font attributes for entire report                                        //  temp. kludge
+//  set font attributes for entire report                                              //  temp. kludge
 
 void popup_report_font_attributes(zdialog *zd)
 {
@@ -12576,7 +12528,7 @@ int popup_command(ch *command, int ww, i
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   Plog(1,"run command: %s \n",command);
+   printf("run command: %s \n",command);
 
    zd = popup_report_open(command,parent,ww,hh,0,0,0,"Find","Save","X",0);
 
@@ -12589,7 +12541,7 @@ int popup_command(ch *command, int ww, i
    }
    pclose(fid);
 
-   if (top) popup_report_top(zd);                                                //  back to top of window
+   if (top) popup_report_top(zd);                                                      //  back to top of window
    return 0;
 }
 
@@ -12603,18 +12555,18 @@ int popup_command(ch *command, int ww, i
 //          2 = cannot open popup report window
 //          3 = cannot open file
 
-int monitor_file(ch *file)                                                       //  25.1
+int monitor_file(ch *file)                                                             //  25.1
 {
    zdialog  *zd;
    FILE     *fid;
    ch       buff[500];
    ch       *title, *pp;
-   
+
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   Plog(0,"monitor file: %s \n",file);
+   printf("monitor file: %s \n",file);
 
-   snprintf(buff,500,"file \"%s\" ",file);                                       //  check for text file
+   snprintf(buff,500,"file \"%s\" ",file);                                             //  check for text file
    fid = popen(buff,"r");
    pp = fgets(buff,500,fid);
    pclose(fid);
@@ -12623,23 +12575,36 @@ int monitor_file(ch *file)
    title = strrchr(file,'/') + 1;
    zd = popup_report_open(title,0,600,400,1,0,0,"Find","Save","X",0);
    if (! zd) return 2;
-   
+
    snprintf(buff,500,"tail -f \"%s\" ",file);
    fid = popen(buff,"r");
    if (! fid) return 3;
-   
+
    while (true)
    {
       zmainsleep(0.01);
-      if (! zdialog_valid(zd)) break;                                            //  popup window closed, exit
-      pp = fgets_pend(buff,500,fid);                                             //  read next log record
-      if (! pp) break;                                                           //  EOF or error, exit
-      if (strmatch(pp,"fgets_pend\n")) continue;                                 //  next record not available yet
-      popup_report_write2(zd,0,"%s",pp);                                         //  output record to window
+      if (! zdialog_valid(zd)) break;                                                  //  popup window closed, exit
+      pp = fgets_pend(buff,500,fid);                                                   //  read next log record
+      if (! pp) break;                                                                 //  EOF or error, exit
+      if (strmatch(pp,"fgets_pend\n")) continue;                                       //  next record not available yet
+      popup_report_write2(zd,0,"%s",pp);                                               //  output record to window
    }
-   
+
    pclose(fid);
-   exit(0); 
+   exit(0);
+}
+
+
+/********************************************************************************/
+
+//  convert a dialog message into a bold/red font
+
+ch * boldred(ch *message)                                                              //  25.1
+{
+   static ch   boldredmess[2000];
+
+   snprintf(boldredmess,2000,"<span font=\"bold\" color=\"red\">%s</span>",message);
+   return boldredmess;
 }
 
 
@@ -12655,48 +12620,48 @@ namespace zmessageACK_names
    GtkWidget   *Pwindow;
 }
 
-void zmessageACK(GtkWidget *parent, ch *format, ... )                            //  rewrite for threads                   25.1
+void zmessageACK(GtkWidget *parent, ch *format, ... )                                  //  rewrite for threads                   25.1
 {
    using namespace zmessageACK_names;
 
    va_list        arglist;
    ch             message[2000];
 
-   va_start(arglist,format);                                                     //  format the message
+   va_start(arglist,format);                                                           //  format the message
    vsnprintf(message,2000,format,arglist);
    va_end(arglist);
 
-   Plog(1,"%s \n",message);                                                      //  output to log file
-   
-   while (*buffer) zsleep(0.1);                                                  //  wait for parallel caller
-   strncpy0(buffer,message,2000);
+   printf("%s \n",message);                                                            //  output to log file
+
+   while (*buffer) zsleep(0.1);                                                        //  wait for parallel caller
+   strncpy0(buffer,boldred(message),2000);                                             //  bold/red                              25.1
    Pwindow = parent;
-   while (* buffer) zmainsleep(0.1);                                             //  wait for this caller response
+   while (* buffer) zmainsleep(0.1);                                                   //  wait for this caller response
    return;
 }
 
-void zmessageACK_init()                                                          //  25.1
+void zmessageACK_init()                                                                //  25.1
 {
    using namespace zmessageACK_names;
 
-   int zmessageACK_timerfunc(void *); 
+   int zmessageACK_timerfunc(void *);
 
-   if (! Finit) {                                                                //  initz. message processor
+   if (! Finit) {                                                                      //  initz. message processor
       Finit = 1;
       *buffer = 0;
       g_timeout_add(100,zmessageACK_timerfunc,0);
    }
-   
+
    return;
 }
 
-int zmessageACK_timerfunc(void *)                                                //  loop every 0.1 sec.
+int zmessageACK_timerfunc(void *)                                                      //  loop every 0.1 sec.
 {
    using namespace zmessageACK_names;
-   
+
    zdialog  *zd;
    ch       *posn;
-   
+
    if (! *buffer) return 1;
    if (Fshutdown) return 0;
 
@@ -12705,10 +12670,9 @@ int zmessageACK_timerfunc(void *)
 
    zd = zdialog_new("ACK",Pwindow,"OK",null);
    zdialog_add_widget(zd,"hbox","hb1","dialog",0,"space=3");
-   zdialog_add_widget(zd,"text","lab1","hb1",buffer,"space=5");
+   zdialog_add_widget(zd,"label","lab1","hb1",buffer,"space=5");
    zdialog_resize(zd,200,0);
    zdialog_set_modal(zd);
-   gtk_window_set_urgency_hint(GTK_WINDOW(zd->dialog),1);
    zdialog_set_decorated(zd,0);
    zdialog_run(zd,0,posn);
    zdialog_wait(zd);
@@ -12716,7 +12680,7 @@ int zmessageACK_timerfunc(void *)
    *buffer = 0;
    return 1;
 }
-  
+
 
 /********************************************************************************/
 
@@ -12737,21 +12701,21 @@ int zmessageYN(GtkWidget *parent, ch *fo
    vsnprintf(message,500,format,arglist);
    va_end(arglist);
 
-   Plog(1,"%s \n",message);                                                      //  output to log file
+   printf("%s \n",message);                                                            //  output to log file
 
    if (parent) posn = "parent";
    else posn = "desktop";
 
    zd = zdialog_new("YN",parent,"Yes","No",null);
    zdialog_add_widget(zd,"hbox","hb1","dialog",0,"space=3");
-   zdialog_add_widget(zd,"label","lab1","hb1",message,"space=5");
+   zdialog_add_widget(zd,"label","lab1","hb1",boldred(message),"space=5");
    zdialog_resize(zd,200,0);
    zdialog_set_modal(zd);
-   zdialog_set_decorated(zd,0);                                                  //  24.40
+   zdialog_set_decorated(zd,0);
    zdialog_run(zd,0,posn);
    zstat = zdialog_wait(zd);
    zdialog_free(zd);
-   zmainloop();                                                                  //  24.10
+   zmainloop();
    if (zstat == 1) return 1;
    return 0;
 }
@@ -12780,7 +12744,7 @@ zdialog * zmessage_post(GtkWidget *paren
    int  zmessage_post_timeout(zdx_t *zdx);
 
    va_list           arglist;
-   ch                message[400], messagebold[460];
+   ch                message[400];
    static zdx_t      zdx[100];
    static int        ii = 0;
    zdialog           *zd;
@@ -12791,20 +12755,17 @@ zdialog * zmessage_post(GtkWidget *paren
    vsnprintf(message,400,format,arglist);
    va_end(arglist);
 
-   Plog(1,"%s \n",message);                                                      //  output to log file
-
-   snprintf(messagebold,460,"<span font=\"bold\" color=\"red\">%s</span>",message);
+   printf("%s \n",message);                                                            //  output to log file
 
    zd = zdialog_new("post",parent,null);
    zdialog_add_widget(zd,"hbox","hb1","dialog",0,"space=3");
-   zdialog_add_widget(zd,"label","lab1","hb1",messagebold,"space=5");
-   zdialog_can_focus(zd,0);
-   zdialog_run(zd,0,posn);                                                       //  mouse position
-   zdialog_set_decorated(zd,0);                                                  //  24.40
+   zdialog_add_widget(zd,"label","lab1","hb1",boldred(message),"space=5");
+   zdialog_run(zd,0,posn);                                                             //  mouse position
+   zdialog_set_decorated(zd,0);
    zdialog_present(zd);
 
    if (seconds) {
-      if (ii < 99) ii++;                                                         //  track unique zdialogs
+      if (ii < 99) ii++;                                                               //  track unique zdialogs
       else ii = 0;
       zdx[ii].zd = zd;
       zdx[ii].uniqueID = zd->uniqueID;
@@ -12817,7 +12778,7 @@ zdialog * zmessage_post(GtkWidget *paren
 
 int zmessage_post_timeout(zdx_t *zdx)
 {
-   zdialog  *zd = zdx->zd;                                                       //  check unique zdialog active
+   zdialog  *zd = zdx->zd;                                                             //  check unique zdialog active
    if (! zdialog_valid2(zd,"post")) return 0;
    if (zd->uniqueID != zdx->uniqueID) return 0;
    zdialog_free(zd);
@@ -12858,7 +12819,7 @@ int poptext_timeout(ch *current)
 
    if (! main_thread()) zappcrash("illegal call from thread");
    if (current != pcurrent) return 0;
-   poptext_killnow();                                                            //  25.0
+   poptext_killnow();                                                                  //  25.0
    return 0;
 }
 
@@ -12881,23 +12842,23 @@ void poptext_screen(ch *text, int px, in
 
    poptext_killnow();
 
-   pcurrent++;                                                                   //  make current != pcurrent
-   
+   pcurrent++;                                                                         //  make current != pcurrent
+
    if (! text) return;
 
    popwin = gtk_window_new(GTK_WINDOW_POPUP);
    label = gtk_label_new(text);
-   gtk_container_set_border_width(GTK_CONTAINER(popwin),5);                      //  25.0
+   gtk_container_set_border_width(GTK_CONTAINER(popwin),5);                            //  25.0
    gtk_container_add(GTK_CONTAINER(popwin),label);
    gtk_window_move(GTK_WINDOW(popwin),px,py);
 
-   if (secs1 > 0) {                                                              //  delayed popup display
+   if (secs1 > 0) {                                                                    //  delayed popup display
       millisec1 = secs1 * 1000;
       g_timeout_add(millisec1,(GSourceFunc) poptext_show,pcurrent);
    }
-   else gtk_widget_show_all(popwin);                                             //  immediate display
+   else gtk_widget_show_all(popwin);                                                   //  immediate display
 
-   if (secs2 > 0) {                                                              //  popup kill timer
+   if (secs2 > 0) {                                                                    //  popup kill timer
       millisec2 = (secs1 + secs2) * 1000;
       g_timeout_add(millisec2,(GSourceFunc) poptext_timeout,pcurrent);
    }
@@ -12917,7 +12878,7 @@ void poptext_mouse(ch *text, int dx, int
    GtkWidget   *popwin2;
 
    if (! main_thread()) zappcrash("illegal call from thread");
-   
+
    if (! text) {
       poptext_killnow();
       return;
@@ -12928,13 +12889,13 @@ void poptext_mouse(ch *text, int dx, int
    popwin = 0;
    ptext = 0;
 
-   gdk_device_get_position(zfuncs::mouse,0,&mx,&my);                             //  mouse screen position
-   poptext_screen(text,mx+dx,my+dy,secs1,secs2);                                 //  add displacements
+   gdk_device_get_position(zfuncs::mouse,0,&mx,&my);                                   //  mouse screen position
+   poptext_screen(text,mx+dx,my+dy,secs1,secs2);                                       //  add displacements
 
    zmainloop();
-   
-   if (popwin2) gtk_widget_destroy(popwin2);                                     //  kill prior after create new           24.60
-   if (ptext2) zfree(ptext2);                                                    //  (prevent flicker) 
+
+   if (popwin2) gtk_widget_destroy(popwin2);                                           //  kill prior after create new
+   if (ptext2) zfree(ptext2);                                                          //  (prevent flicker)
 
    return;
 }
@@ -13018,7 +12979,7 @@ ch * zgetfile(ch *title, GtkWindow *pare
 
 ch ** zgetfiles(ch *title, GtkWindow *parent, ch *action, ch *initfile, int hidden)
 {
-   void zgetfile_preview(GtkWidget *dialog, GtkWidget *pvwidget);                //  private functions
+   void zgetfile_preview(GtkWidget *dialog, GtkWidget *pvwidget);                      //  private functions
    int  zgetfile_KBkey(GtkWidget *dialog, GdkEventKey *event, int &fcdes);
    void zgetfile_newfolder(GtkFileChooser *dialog, void *);
 
@@ -13077,48 +13038,48 @@ ch ** zgetfiles(ch *title, GtkWindow *pa
       bcode = 103;
    }
 
-   dialog = gtk_file_chooser_dialog_new(title, parent, fcact,                    //  create file selection dialog
-                              button1, GTK_RESPONSE_ACCEPT,                      //  parent added
+   dialog = gtk_file_chooser_dialog_new(title, parent, fcact,                          //  create file selection dialog
+                              button1, GTK_RESPONSE_ACCEPT,                            //  parent added
                               "Cancel", GTK_RESPONSE_CANCEL,
                               buttxx, bcode, null);
 
    gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(dialog),pvwidget);
 
-   G_SIGNAL(dialog,"update-preview",zgetfile_preview,pvwidget);                  //  create preview for selected file
-   G_SIGNAL(dialog,"key-press-event",zgetfile_KBkey,&fcdes);                     //  respond to special KB keys
+   G_SIGNAL(dialog,"update-preview",zgetfile_preview,pvwidget);                        //  create preview for selected file
+   G_SIGNAL(dialog,"key-press-event",zgetfile_KBkey,&fcdes);                           //  respond to special KB keys
 
-   gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_MOUSE);                //  put dialog at mouse position
-   gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog),0);                 //  default: no show hidden
+   gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_MOUSE);                      //  put dialog at mouse position
+   gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog),0);                       //  default: no show hidden
 
-   if (strmatch(action,"save"))                                                  //  overwrite confirmation
+   if (strmatch(action,"save"))                                                        //  overwrite confirmation
       gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog),1);
 
    if (strmatch(action,"files") || strmatch(action,"folders"))
-      gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog),1);          //  select multiple files or folders
+      gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog),1);                //  select multiple files or folders
 
-   if (initfile) {                                                               //  pre-select filespec
+   if (initfile) {                                                                     //  pre-select filespec
       err = stat(initfile,&statB);
       if (err) {
-         pdir = zstrdup(initfile,"zgetfiles");                                   //  non-existent file
+         pdir = zstrdup(initfile,"zgetfiles");                                         //  non-existent file
          pfile = strrchr(pdir,'/');
          if (pfile && pfile > pdir) {
-            *pfile++ = 0;                                                        //  set folder name
+            *pfile++ = 0;                                                              //  set folder name
             gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),pdir);
          }
-         if (setfname) {                                                         //  set new file name
+         if (setfname) {                                                               //  set new file name
             if (! pfile) pfile = (ch *) initfile;
             gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog),pfile);
          }
          zfree(pdir);
       }
-      else if (S_ISREG(statB.st_mode))                                           //  select given file
+      else if (S_ISREG(statB.st_mode))                                                 //  select given file
          gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog),initfile);
-      else if (S_ISDIR(statB.st_mode))                                           //  select given folder
+      else if (S_ISDIR(statB.st_mode))                                                 //  select given folder
          gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),initfile);
    }
 
    if (initfile) {
-      thumbnail = get_thumbnail(initfile,256);                                   //  preview for initial file
+      thumbnail = get_thumbnail(initfile,256);                                         //  preview for initial file
       if (thumbnail) {
          gtk_image_set_from_pixbuf(GTK_IMAGE(pvwidget),thumbnail);
          gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(dialog),1);
@@ -13131,9 +13092,9 @@ ch ** zgetfiles(ch *title, GtkWindow *pa
 
    while (true)
    {
-      fcstat = gtk_dialog_run(GTK_DIALOG(dialog));                               //  run dialog, get status button
+      fcstat = gtk_dialog_run(GTK_DIALOG(dialog));                                     //  run dialog, get status button
 
-      if (fcstat == 103) {                                                       //  show/hide hidden files
+      if (fcstat == 103) {                                                             //  show/hide hidden files
          hide = 1 - hide;
          gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog),hide);
          continue;
@@ -13144,25 +13105,25 @@ ch ** zgetfiles(ch *title, GtkWindow *pa
          gslist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
          if (! gslist) continue;
 
-         NF = g_slist_length(gslist);                                            //  no. selected files
-         flist = (ch **) zmalloc((NF+1)*sizeof(ch *),"zgetfiles");               //  allocate returned list
+         NF = g_slist_length(gslist);                                                  //  no. selected files
+         flist = (ch **) zmalloc((NF+1)*sizeof(ch *),"zgetfiles");                     //  allocate returned list
 
          for (ii = 0; ii < NF; ii++)
-         {                                                                       //  process selected files
+         {                                                                             //  process selected files
             file1 = (ch *) g_slist_nth_data(gslist,ii);
-            file2 = zstrdup(file1,"zgetfiles");                                  //  re-allocate memory
+            file2 = zstrdup(file1,"zgetfiles");                                        //  re-allocate memory
             flist[ii] = file2;
             g_free(file1);
          }
-         flist[ii] = 0;                                                          //  EOL marker
+         flist[ii] = 0;                                                                //  EOL marker
          break;
       }
 
-      else break;                                                                //  user bailout
+      else break;                                                                      //  user bailout
    }
 
-   if (gslist) g_slist_free(gslist);                                             //  return selected file(s)
-   if (! fcdes) gtk_widget_destroy(dialog);                                      //  destroy if not already
+   if (gslist) g_slist_free(gslist);                                                   //  return selected file(s)
+   if (! fcdes) gtk_widget_destroy(dialog);                                            //  destroy if not already
    return flist;
 }
 
@@ -13181,7 +13142,7 @@ void zgetfile_preview(GtkWidget *dialog,
       return;
    }
 
-   thumbnail = get_thumbnail(filename,256);                                      //  256x256 pixels
+   thumbnail = get_thumbnail(filename,256);                                            //  256x256 pixels
    g_free(filename);
 
    if (thumbnail) {
@@ -13201,12 +13162,12 @@ int zgetfile_KBkey(GtkWidget *dialog, Gd
 {
    int KBkey = event->keyval;
 
-   if (KBkey == GDK_KEY_F1) {                                                    //  F1 = help
+   if (KBkey == GDK_KEY_F1) {                                                          //  F1 = help
       KBevent(event);
       return 1;
    }
 
-   if (KBkey == GDK_KEY_Escape) {                                                //  escape = cancel
+   if (KBkey == GDK_KEY_Escape) {                                                      //  escape = cancel
       gtk_widget_destroy(dialog);
       fcdes = 1;
       return 1;
@@ -13290,11 +13251,11 @@ namespace print_image
    GtkPageOrientation         orientation = PORTRAIT;
    PIXBUF                     *pixbuf;
    ch                         *printer = 0;
-   int                        landscape = 0;                                     //  true if landscape
-   double                     width = 21.0, height = 29.7;                       //  paper size, CM (default A4 portrait)
-   double                     margins[4] = { 0.5, 0.5, 0.5, 0.5 };               //  margins, CM (default 0.5)
-   double                     imagescale = 100;                                  //  image print scale, percent
-   double                     pwidth, pheight;                                   //  printed image size
+   int                        landscape = 0;                                           //  true if landscape
+   double                     width = 21.0, height = 29.7;                             //  paper size, CM (default A4 portrait)
+   double                     margins[4] = { 0.5, 0.5, 0.5, 0.5 };                     //  margins, CM (default 0.5)
+   double                     imagescale = 100;                                        //  image print scale, percent
+   double                     pwidth, pheight;                                         //  printed image size
 
    int   page_setup();
    int   margins_setup();
@@ -13316,26 +13277,26 @@ void print_image_file(GtkWidget *pwin, c
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   parent = pwin;                                                                //  save parent window
+   parent = pwin;                                                                      //  save parent window
 
-   pixbuf = gdk_pixbuf_new_from_file(imagefile,&gerror);                         //  read image file
+   pixbuf = gdk_pixbuf_new_from_file(imagefile,&gerror);                               //  read image file
    if (! pixbuf) {
       zmessageACK(mainwin,gerror->message);
       return;
    }
 
-   err = page_setup();                                                           //  select size and orientation
+   err = page_setup();                                                                 //  select size and orientation
    if (err) return;
 
-   err = margins_setup();                                                        //  set margins and scale
+   err = margins_setup();                                                              //  set margins and scale
    if (err) return;
 
-   printop = gtk_print_operation_new();                                          //  print operation
+   printop = gtk_print_operation_new();                                                //  print operation
    gtk_print_operation_set_default_page_setup(printop,pagesetup);
    gtk_print_operation_set_print_settings(printop,printsettings);
    gtk_print_operation_set_n_pages(printop,1);
 
-   g_signal_connect(printop,"draw-page",G_CALLBACK(print_page),0);               //  start print
+   g_signal_connect(printop,"draw-page",G_CALLBACK(print_page),0);                     //  start print
    printstat = gtk_print_operation_run(printop,PRINTOP,0,0);
 
    if (printstat == GTK_PRINT_OPERATION_RESULT_ERROR) {
@@ -13358,16 +13319,16 @@ void print_image::print_page(GtkPrintOpe
    cairo_t           *cairocontext;
    double            iww, ihh, pww, phh, scale;
 
-   pww = gtk_print_context_get_width(printcontext);                              //  print context size, pixels
+   pww = gtk_print_context_get_width(printcontext);                                    //  print context size, pixels
    phh = gtk_print_context_get_height(printcontext);
 
-   iww = gdk_pixbuf_get_width(pixbuf);                                           //  original image size
+   iww = gdk_pixbuf_get_width(pixbuf);                                                 //  original image size
    ihh = gdk_pixbuf_get_height(pixbuf);
 
-   scale = pww / iww;                                                            //  rescale to fit page
+   scale = pww / iww;                                                                  //  rescale to fit page
    if (phh / ihh < scale) scale = phh / ihh;
 
-   cairocontext = gtk_print_context_get_cairo_context(printcontext);             //  use cairo to rescale
+   cairocontext = gtk_print_context_get_cairo_context(printcontext);                   //  use cairo to rescale
    cairo_translate(cairocontext,0,0);
    cairo_scale(cairocontext,scale,scale);
    gdk_cairo_set_source_pixbuf(cairocontext,pixbuf,0,0);
@@ -13390,33 +13351,33 @@ int print_image::page_setup()
    snprintf(printsettingsfile,200,"%s/printsettings",zhomedir);
    snprintf(pagesetupfile,200,"%s/pagesetup",zhomedir);
 
-   if (! printsettings) {                                                        //  start with prior print settings
+   if (! printsettings) {                                                              //  start with prior print settings
       printsettings = gtk_print_settings_new_from_file(printsettingsfile,0);
       if (! printsettings)
          printsettings = gtk_print_settings_new();
    }
 
-   if (! priorpagesetup) {                                                       //  start with prior page setup
+   if (! priorpagesetup) {                                                             //  start with prior page setup
       priorpagesetup = gtk_page_setup_new_from_file(pagesetupfile,0);
       if (! priorpagesetup)
          priorpagesetup = gtk_page_setup_new();
    }
 
-   pagesetup = gtk_print_run_page_setup_dialog                                   //  select printer, paper, orientation
-            (GTK_WINDOW(parent),priorpagesetup,printsettings);                   //  user cancel cannot be detected
+   pagesetup = gtk_print_run_page_setup_dialog                                         //  select printer, paper, orientation
+            (GTK_WINDOW(parent),priorpagesetup,printsettings);                         //  user cancel cannot be detected
 
-   g_object_unref(priorpagesetup);                                               //  save for next call
+   g_object_unref(priorpagesetup);                                                     //  save for next call
    priorpagesetup = pagesetup;
 
-   orientation = gtk_print_settings_get_orientation(printsettings);              //  save orientation
+   orientation = gtk_print_settings_get_orientation(printsettings);                    //  save orientation
    if (orientation == LANDSCAPE) landscape = 1;
    else landscape = 0;
 
-   gtk_print_settings_set_quality(printsettings,QUALITY);                        //  set high quality 300 dpi
+   gtk_print_settings_set_quality(printsettings,QUALITY);                              //  set high quality 300 dpi
    gtk_print_settings_set_resolution(printsettings,300);
 
-   gtk_print_settings_to_file(printsettings,printsettingsfile,0);                //  save print settings to file
-   gtk_page_setup_to_file(pagesetup,pagesetupfile,0);                            //  save print settings to file
+   gtk_print_settings_to_file(printsettings,printsettingsfile,0);                      //  save print settings to file
+   gtk_page_setup_to_file(pagesetup,pagesetupfile,0);                                  //  save print settings to file
 
    return 0;
 }
@@ -13502,7 +13463,7 @@ int print_image::margins_setup()
    zdialog_add_widget(zd,"label","labhcm","vbheight","xx.x");
    zdialog_add_widget(zd,"label","labhin","vbheight","xx.x");
 
-   zdialog_load_inputs(zd);                                                      //  recall prior settings
+   zdialog_load_inputs(zd);                                                            //  recall prior settings
 
    zdialog_fetch(zd,"mtopcm",margins[0]);
    zdialog_fetch(zd,"mbottcm",margins[1]);
@@ -13511,20 +13472,20 @@ int print_image::margins_setup()
    zdialog_fetch(zd,"scale",imagescale);
 
    get_printed_image_size();
-   zdialog_stuff(zd,"labwcm",pwidth,"%.2f");                                     //  update image size in dialog
+   zdialog_stuff(zd,"labwcm",pwidth,"%.2f");                                           //  update image size in dialog
    zdialog_stuff(zd,"labhcm",pheight,"%.2f");
    zdialog_stuff(zd,"labwin",pwidth/2.54,"%.2f");
    zdialog_stuff(zd,"labhin",pheight/2.54,"%.2f");
 
-   gtk_page_setup_set_top_margin(pagesetup,10*margins[0],MM);                    //  set page margins
-   gtk_page_setup_set_bottom_margin(pagesetup,10*margins[1],MM);                 //  (cm to mm units)
+   gtk_page_setup_set_top_margin(pagesetup,10*margins[0],MM);                          //  set page margins
+   gtk_page_setup_set_bottom_margin(pagesetup,10*margins[1],MM);                       //  (cm to mm units)
    gtk_page_setup_set_left_margin(pagesetup,10*margins[2],MM);
    gtk_page_setup_set_right_margin(pagesetup,10*margins[3],MM);
-   gtk_print_settings_set_scale(printsettings,imagescale);                       //  set image print scale %
+   gtk_print_settings_set_scale(printsettings,imagescale);                             //  set image print scale %
 
-   zdialog_run(zd,margins_dialog_event,"parent");                                //  run dialog
-   zstat = zdialog_wait(zd);                                                     //  wait for completion
-   zdialog_free(zd);                                                             //  kill dialog
+   zdialog_run(zd,margins_dialog_event,"parent");                                      //  run dialog
+   zstat = zdialog_wait(zd);                                                           //  wait for completion
+   zdialog_free(zd);                                                                   //  kill dialog
 
    if (zstat == 1) return 0;
    return 1;
@@ -13541,9 +13502,9 @@ int print_image::margins_dialog_event(zd
 
    double   temp;
 
-   if (strmatch(event,"escape")) zd->zstat = -2;                                 //  escape key
+   if (strmatch(event,"escape")) zd->zstat = -2;                                       //  escape key
 
-   if (strmatch(event,"mtopcm")) {                                               //  get cm inputs and set inch values
+   if (strmatch(event,"mtopcm")) {                                                     //  get cm inputs and set inch values
       zdialog_fetch(zd,"mtopcm",margins[0]);
       zdialog_stuff(zd,"mtopin",margins[0]/2.54);
    }
@@ -13563,7 +13524,7 @@ int print_image::margins_dialog_event(zd
       zdialog_stuff(zd,"mrightin",margins[3]/2.54);
    }
 
-   if (strmatch(event,"mtopin")) {                                               //  get inch inputs and set cm values
+   if (strmatch(event,"mtopin")) {                                                     //  get inch inputs and set cm values
       zdialog_fetch(zd,"mtopin",temp);
       margins[0] = temp * 2.54;
       zdialog_stuff(zd,"mtopcm",margins[0]);
@@ -13587,19 +13548,19 @@ int print_image::margins_dialog_event(zd
       zdialog_stuff(zd,"mrightcm",margins[3]);
    }
 
-   zdialog_fetch(zd,"scale",imagescale);                                         //  get image scale
+   zdialog_fetch(zd,"scale",imagescale);                                               //  get image scale
 
    get_printed_image_size();
-   zdialog_stuff(zd,"labwcm",pwidth,"%.2f");                                     //  update image size in dialog
+   zdialog_stuff(zd,"labwcm",pwidth,"%.2f");                                           //  update image size in dialog
    zdialog_stuff(zd,"labhcm",pheight,"%.2f");
    zdialog_stuff(zd,"labwin",pwidth/2.54,"%.2f");
    zdialog_stuff(zd,"labhin",pheight/2.54,"%.2f");
 
-   gtk_page_setup_set_top_margin(pagesetup,10*margins[0],MM);                    //  set page margins
-   gtk_page_setup_set_bottom_margin(pagesetup,10*margins[1],MM);                 //  (cm to mm units)
+   gtk_page_setup_set_top_margin(pagesetup,10*margins[0],MM);                          //  set page margins
+   gtk_page_setup_set_bottom_margin(pagesetup,10*margins[1],MM);                       //  (cm to mm units)
    gtk_page_setup_set_left_margin(pagesetup,10*margins[2],MM);
    gtk_page_setup_set_right_margin(pagesetup,10*margins[3],MM);
-   gtk_print_settings_set_scale(printsettings,imagescale);                       //  set image print scale %
+   gtk_print_settings_set_scale(printsettings,imagescale);                             //  set image print scale %
 
    return 1;
 }
@@ -13614,24 +13575,24 @@ void print_image::get_printed_image_size
 
    double   iww, ihh, pww, phh, scale;
 
-   pww = 0.1 * gtk_page_setup_get_paper_width(pagesetup,MM);                     //  get paper size
-   phh = 0.1 * gtk_page_setup_get_paper_height(pagesetup,MM);                    //  (mm to cm units)
+   pww = 0.1 * gtk_page_setup_get_paper_width(pagesetup,MM);                           //  get paper size
+   phh = 0.1 * gtk_page_setup_get_paper_height(pagesetup,MM);                          //  (mm to cm units)
 
-   pww = pww - margins[2] - margins[3];                                          //  reduce for margins
+   pww = pww - margins[2] - margins[3];                                                //  reduce for margins
    phh = phh - margins[0] - margins[1];
 
-   pww = pww / 2.54 * 300;                                                       //  convert to dots @ 300 dpi
+   pww = pww / 2.54 * 300;                                                             //  convert to dots @ 300 dpi
    phh = phh / 2.54 * 300;
 
-   iww = gdk_pixbuf_get_width(pixbuf);                                           //  original image size, pixels
+   iww = gdk_pixbuf_get_width(pixbuf);                                                 //  original image size, pixels
    ihh = gdk_pixbuf_get_height(pixbuf);
 
-   scale = pww / iww;                                                            //  rescale image to fit page
+   scale = pww / iww;                                                                  //  rescale image to fit page
    if (phh / ihh < scale) scale = phh / ihh;
 
-   scale = scale * 0.01 * imagescale;                                            //  adjust for user scale setting
+   scale = scale * 0.01 * imagescale;                                                  //  adjust for user scale setting
 
-   pwidth = iww * scale / 300 * 2.54;                                            //  dots to cm
+   pwidth = iww * scale / 300 * 2.54;                                                  //  dots to cm
    pheight = ihh * scale / 300 * 2.54;
 
    return;
@@ -13676,15 +13637,15 @@ void drag_drop_source2(GtkWidget *widget
 
    pixbuf = gdk_pixbuf_new_from_file_at_size(file,128,128,&gerror);
    if (! pixbuf) {
-      if (gerror) Plog(0,"%s \n",gerror->message);
+      if (gerror) printf("*** %s \n",gerror->message);
       return;
    }
 
-   gtk_drag_set_icon_pixbuf(context,pixbuf,64,64);                               //  hot spot is middle of image
+   gtk_drag_set_icon_pixbuf(context,pixbuf,64,64);                                     //  hot spot is middle of image
    return;
 
 cancel:
-   Plog(2,"drag canceled \n");
+   printf("drag canceled \n");
    return;
 }
 
@@ -13702,11 +13663,11 @@ void drag_drop_source3(GtkWidget *widget
    ufunc2 = (drag_drop_source_func *) ufunc;
    file = ufunc2();
    if (! file) goto cancel;
-   gtk_selection_data_set_text(data,file,-1);                                    //  drops text
+   gtk_selection_data_set_text(data,file,-1);                                          //  drops text
    return;
 
 cancel:
-   Plog(2,"drag canceled \n");
+   printf("drag canceled \n");
    return;
 }
 
@@ -13749,18 +13710,18 @@ int drag_drop_dest2(GtkWidget *, GdkDrag
 
    ufunc2 = (drag_drop_dest_func *) ufunc;
 
-   if (strstr(text,"file://"))                                                   //  text is a filespec
+   if (strstr(text,"file://"))                                                         //  text is a filespec
    {
-      file = zstrdup(text+7,"drag_drop");                                        //  get rid of junk added by GTK
+      file = zstrdup(text+7,"drag_drop");                                              //  get rid of junk added by GTK
       cc = strlen(file);
       while (file[cc-1] < ' ') cc--;
       file[cc] = 0;
-      file2 = drag_drop_unescape(file);                                          //  clean %xx escapes from Nautilus
+      file2 = drag_drop_unescape(file);                                                //  clean %xx escapes from Nautilus
       zfree(file);
-      ufunc2(mpx,mpy,file2);                                                     //  pass file to user function
+      ufunc2(mpx,mpy,file2);                                                           //  pass file to user function
    }
 
-   else                                                                          //  text is text
+   else                                                                                //  text is text
    {
       text2 = zstrdup(text,"drag_drop");
       ufunc2(mpx,mpy,text2);
@@ -13854,10 +13815,10 @@ PIXBUF * get_thumbnail(ch *fpath, int si
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   err = stat(fpath,&statB);                                                     //  fpath status info
+   err = stat(fpath,&statB);                                                           //  fpath status info
    if (err) return 0;
 
-   if (S_ISDIR(statB.st_mode)) {                                                 //  if folder, return folder image
+   if (S_ISDIR(statB.st_mode)) {                                                       //  if folder, return folder image
       bpath = (ch *) zmalloc(500,"get_thumbnail");
       *bpath = 0;
       strncatv(bpath,499,zimagedir,"/folder.png",null);
@@ -13867,7 +13828,7 @@ PIXBUF * get_thumbnail(ch *fpath, int si
    }
 
    thumbpxb = gdk_pixbuf_new_from_file_at_size(fpath,size,size,&gerror);
-   return thumbpxb;                                                              //  return pixbuf to caller
+   return thumbpxb;                                                                    //  return pixbuf to caller
 }
 
 
@@ -13890,7 +13851,7 @@ GdkCursor * zmakecursor(ch *imagefile)
    pixbuf = gdk_pixbuf_new_from_file(imagepath,&gerror);
    if (pixbuf && display)
       cursor = gdk_cursor_new_from_pixbuf(display,pixbuf,0,0);
-   else Plog(0,"*** %s \n",gerror->message);
+   else printf("*** %s \n",gerror->message);
    return cursor;
 }
 
@@ -13918,11 +13879,11 @@ PIXBUF * gdk_pixbuf_stripalpha(PIXBUF *p
    ww = gdk_pixbuf_get_width(pixbuf1);
    hh = gdk_pixbuf_get_height(pixbuf1);
 
-   pixbuf2 = gdk_pixbuf_new(color,0,8,ww,hh);                                    //  create output pixbuf2
+   pixbuf2 = gdk_pixbuf_new(color,0,8,ww,hh);                                          //  create output pixbuf2
    if (! pixbuf2) return 0;
 
-   ppix1 = gdk_pixbuf_get_pixels(pixbuf1);                                       //  input pixel array
-   ppix2 = gdk_pixbuf_get_pixels(pixbuf2);                                       //  output pixel array
+   ppix1 = gdk_pixbuf_get_pixels(pixbuf1);                                             //  input pixel array
+   ppix2 = gdk_pixbuf_get_pixels(pixbuf2);                                             //  output pixel array
    rs1 = gdk_pixbuf_get_rowstride(pixbuf1);
    rs2 = gdk_pixbuf_get_rowstride(pixbuf2);
 
@@ -13961,29 +13922,29 @@ PIXBUF * text_pixbuf(ch *text, ch *font,
 
    if (! main_thread()) zappcrash("illegal call from thread");
 
-   if (! font) font = zfuncs::appfont;                                           //  default font
+   if (! font) font = zfuncs::appfont;                                                 //  default font
 
-   snprintf(font2,60,"%s %d",font,fontsize);                                     //  combine font and size
+   snprintf(font2,60,"%s %d",font,fontsize);                                           //  combine font and size
 
-   pfont = pango_font_description_from_string(font2);                            //  make layout with text
+   pfont = pango_font_description_from_string(font2);                                  //  make layout with text
    playout = gtk_widget_create_pango_layout(widget,text);
    pango_layout_set_font_description(playout,pfont);
 
    pango_layout_get_pixel_size(playout,&ww,&hh);
-   ww += 2 + 0.2 * fontsize;                                                     //  compensate bad font metrics
+   ww += 2 + 0.2 * fontsize;                                                           //  compensate bad font metrics
    hh += 2 + 0.1 * fontsize;
 
-   surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,ww,hh);               //  cairo output image
+   surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,ww,hh);                     //  cairo output image
    cr = cairo_create(surface);
-   pango_cairo_show_layout(cr,playout);                                          //  write text layout to image
+   pango_cairo_show_layout(cr,playout);                                                //  write text layout to image
 
-   cairo_data = cairo_image_surface_get_data(surface);                           //  get text image pixels
+   cairo_data = cairo_image_surface_get_data(surface);                                 //  get text image pixels
 
    pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,0,8,ww,hh);
    rs = gdk_pixbuf_get_rowstride(pixbuf);
    pixels = gdk_pixbuf_get_pixels(pixbuf);
 
-   for (py = 0; py < hh; py++)                                                   //  copy text image to PXB
+   for (py = 0; py < hh; py++)                                                         //  copy text image to PXB
    for (px = 0; px < ww; px++)
    {
       cpix = cairo_data + 4 * (ww * py + px);
@@ -13991,7 +13952,7 @@ PIXBUF * text_pixbuf(ch *text, ch *font,
       pix2[0] = pix2[1] = pix2[2] = cpix[3];
    }
 
-   pango_font_description_free(pfont);                                           //  free resources
+   pango_font_description_free(pfont);                                                 //  free resources
    g_object_unref(playout);
    cairo_destroy(cr);
    cairo_surface_destroy(surface);
@@ -14030,7 +13991,7 @@ void window_to_mouse(GtkWidget *window)
    int      px, py;
 
    if (! main_thread()) zappcrash("illegal call from thread");
-   gdk_device_get_position(mouse,&screen,&px,&py);                               //  get mouse position
+   gdk_device_get_position(mouse,&screen,&px,&py);                                     //  get mouse position
    gtk_window_move(GTK_WINDOW(window),px,py);
    return;
 }
diff -pruN 8.2-1/zfuncs.h 8.2.1-1/zfuncs.h
--- 8.2-1/zfuncs.h	2025-04-24 09:45:16.000000000 +0000
+++ 8.2.1-1/zfuncs.h	2025-08-28 12:21:03.000000000 +0000
@@ -12,14 +12,13 @@
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU General Public License for more details.
 
 *********************************************************************************/
 
 #include <sys/sysinfo.h>
 #include <sys/time.h>
-#include <sys/timeb.h>
 #include <sys/stat.h>
 #include <sys/resource.h>
 #include <sys/file.h>
@@ -41,17 +40,16 @@
 #include <locale.h>
 #include <glob.h>
 #include <gtk/gtk.h>
-#include <clutter-gtk/clutter-gtk.h>
 
-#define VERTICAL GTK_ORIENTATION_VERTICAL                                        //  GTK shortcuts
+#define VERTICAL GTK_ORIENTATION_VERTICAL                                              //  GTK shortcuts
 #define HORIZONTAL GTK_ORIENTATION_HORIZONTAL
 #define PIXBUF GdkPixbuf
 #define GDKCOLOR GdkColorspace
 
-#define  int8    ch                                                              //  number types
+#define  int8    ch                                                                    //  number types
 #define  int16   short
 #define  int32   int
-#define  int64   long long                                                       //  long long is always 64 bits
+#define  int64   long long                                                             //  long long is always 64 bits
 #define  uint8   unsigned char
 #define  uint16  unsigned short
 #define  uint32  unsigned int
@@ -63,16 +61,16 @@
 
 #define  VOL volatile
 
-#define  STATB  struct stat                                                      //  stat() file status buffer
+#define  STATB  struct stat                                                            //  stat() file status buffer
 
-#define  mutex_t        pthread_mutex_t                                          //  abbreviations
+#define  mutex_t        pthread_mutex_t                                                //  abbreviations
 #define  mutex_init     pthread_mutex_init
 #define  mutex_lock     pthread_mutex_lock
 #define  mutex_trylock  pthread_mutex_trylock
 #define  mutex_unlock   pthread_mutex_unlock
 #define  mutex_destroy  pthread_mutex_destroy
 
-#define  XFCC 1000                                                               //  max. file pathname cc tolerated
+#define  XFCC 1000                                                                     //  max. file pathname cc tolerated
 #define  null NULL
 #define  true 1
 #define  false 0
@@ -84,245 +82,243 @@
 
 //  system functions ============================================================
 
-void *zmalloc(int64 cc, ch *tag);                                                //  malloc() wrapper
-void zfree(void *pp);                                                            //  free() wrapper
-int  zmalloc_test(int64 cc);                                                     //  test if cc free memory available
-double realmemory();                                                             //  get available real memory in MB units
-double availmemory();                                                            //  get available memory (+swap) in MB units
-ch * zstrdup(ch *zstring, ch *tag, int addcc = 0);                               //  strdup() wrapper with added space
-int  zstrcopy(ch *&zstring, ch *string, ch *tag, int addcc = 0);                 //  replace string with new string + added cc
-void zmalloc_report(GtkWidget *parent);                                          //  memory usage by tag > popup report
-void zmalloc_growth(GtkWidget *parent);                                          //  memory growth by tag > popup report
-void Plog(int lev, ch *format, ...);                                             //  add message to stdout log file, fflush()
-void xmessage(ch *message);                                                      //  popup message not needing GTK
-void zexit(int popup, ch *message, ...);                                         //  exit a process and kill child processes
-void zbacktrace();                                                               //  produce a backtrace to stdout
-void zappcrash(ch *format, ...);                                                 //  crash with popup message in text window
-void catch_signals();                                                            //  catch signals and do backtrace dump
-void trace(ch *file, ch *func, int line, void *addr);                            //  implements TRACE macro
-void tracedump();                                                                //  dump program trace data
-ch * combine_argvs(int argc, ch *argv[], int Nth);                               //  combine argv[ii] elements Nth to last
-double get_seconds(int init = 0);                                                //  get elapsed seconds since last call
-void print_seconds(ch *label);                                                   //  print seconds since last call
-double get_seconds(timespec *ts);                                                //  real seconds from timespec struct
-int zstat(ch *file, uint &mtime, uint &size);                                    //  get file mod time (secs-1970) and size
-void start_timer(double &time0);                                                 //  start a timer
-double get_timer(double &time0);                                                 //  get elapsed time in seconds
-double CPUtime();                                                                //  get elapsed process CPU time
-int  memused();                                                                  //  get process real memory, MB
-void compact_time(time_t DT, ch *compactDT);                                     //  time_t DT to yyyymmddhhmmss
-void pretty_datetime(time_t DT, ch *prettyDT);                                   //  time_t DT to yyyy:mm:dd hh:mm:ss
-void secs_datetime(double secs, int datetime[6]);                                //  seconds to year/mon/day/hour/min/secs
-void datetime_secs(int datetime[6], double *secs);                               //  year/mon/day/hour/min/secs to seconds
-int  parseprocfile(ch *pfile, ch *pname, double *value, ...);                    //  get data from /proc file
-int  parseprocrec(ch *prec, int field, double *value, ...);                      //  get data from /proc file record
-int  coretemp();                                                                 //  get CPU temperature (package temp)
-int  disktemp(ch *disk);                                                         //  get disk temp, e.g. "/dev/sda"
-void zsleep(double dsecs);                                                       //  sleep specified seconds
-void zloop(double dsecs);                                                        //  loop specified seconds
-void spinlock(int lock);                                                         //  lock/unlock enclosed code block
-int  global_lock(ch *lockfile);                                                  //  obtain exclusive lock, multi-process
-void global_unlock(int fd, ch *lockfile);                                        //  release the lock
-int  resource_lock(int &resource);                                               //  simple lock/unlock usable with GTK
-void resource_unlock(int &resource);                                             //  (never waits, returns lock status)
-int  zget_locked(int &param);                                                    //  lock and get multi-thread parameter
-void zput_locked(int &param, int value);                                         //  put and unlock multi-thread parameter
-int  zadd_locked(int &param, int incr);                                          //  increment multi-thread parameter
-pthread_t start_detached_thread(void * tfunc(void *), void * arg);               //  start detached thread function
-pthread_t start_Jthread(void * threadfunc(void *), void * arg);                  //  start joinable thread function
-int  wait_Jthread(pthread_t tid);                                                //  wait for completion (join thread)
-void synch_threads(int NT = 0);                                                  //  synchronize NT threads
-int  main_thread();                                                              //  return 1 if main() thread, else 0
-int  zshell(ch *options, ch *command, ...);                                      //  do shell command and get status
-int  kill_procname(ch *wildname);                                                //  kill processes matching wilcard name
-int  signalProc(ch *pname, ch *signal);                                          //  send signal to process by process name
-ch * fgets_trim(ch * buff, int bcc, FILE *, int bf = 0);                         //  fgets() + trim trailing \n \r (blanks)
-ch * fgets_pend(ch * buff, int bcc, FILE *);                                     //  fgets() non-blocking wrapper
-int  samefolder(ch *file1, ch *file2);                                           //  returns 1 if files in same folder
-int  parsefile(ch *path, ch *&folder, ch *&file, ch *&ext);                      //  parse components of a file name
-void parsefile_free(ch *&folder, ch *&file, ch *&ext);                           //  zfree file name components
-int  renamez(ch *file1, ch *file2);                                              //  rename, also across file systems
-int  check_create_dir(ch *path);                                                 //  check if folder exists, ask to create
-int  cp_copy(ch *sfile, ch *dfile);                                              //  same, using shell "cp -f -p"
-uint diskspace(ch *file);                                                        //  get disk space for given file, MB
-ch * get_file_extension(ch *file);                                               //  get correct .ext if file.ext is wrong
-int  zreaddir(ch *folder, ch **&files);                                          //  return all files in a folder, sorted
-int  zreadfile(ch *filename, ch **&rrecs);                                       //  read file, return array of records
-int  zwritefile(ch *filename, ch **&rrecs);                                      //  write array of records to file
-void zreadfile_free(ch **&rrecs);                                                //  free zreadfile() memory
+void *zmalloc(int64 cc, ch *tag);                                                      //  malloc() wrapper
+void zfree(void *pp);                                                                  //  free() wrapper
+int  zmalloc_test(int64 cc);                                                           //  test if cc free memory available
+double realmemory();                                                                   //  get available real memory in MB units
+double availmemory();                                                                  //  get available memory (+swap) in MB units
+ch * zstrdup(ch *zstring, ch *tag, int addcc = 0);                                     //  strdup() wrapper with added space
+int  zstrcopy(ch *&zstring, ch *string, ch *tag, int addcc = 0);                       //  replace string with new string + added cc
+void zmalloc_report(GtkWidget *parent);                                                //  memory usage by tag > popup report
+void zmalloc_growth(GtkWidget *parent);                                                //  memory growth by tag > popup report
+void xmessage(ch *message);                                                            //  popup message not needing GTK
+void zexit(int popup, ch *message, ...);                                               //  exit a process and kill child processes
+void zbacktrace();                                                                     //  produce a backtrace to stdout
+void zappcrash(ch *format, ...);                                                       //  crash with popup message in text window
+void catch_signals();                                                                  //  catch signals and do backtrace dump
+void trace(ch *file, ch *func, int line, void *addr);                                  //  implements TRACE macro
+void tracedump();                                                                      //  dump program trace data
+ch * combine_argvs(int argc, ch *argv[], int Nth);                                     //  combine argv[ii] elements Nth to last
+double get_seconds(int init = 0);                                                      //  get elapsed seconds since last call
+void print_seconds(ch *label);                                                         //  print seconds since last call
+double get_seconds(timespec *ts);                                                      //  real seconds from timespec struct
+void start_timer(double &time0);                                                       //  start a timer
+double get_timer(double &time0);                                                       //  get elapsed time in seconds
+double CPUtime();                                                                      //  get elapsed process CPU time
+int  memused();                                                                        //  get process real memory, MB
+void compact_time(time_t DT, ch *compactDT);                                           //  time_t DT to yyyymmddhhmmss
+void pretty_datetime(time_t DT, ch *prettyDT);                                         //  time_t DT to yyyy:mm:dd hh:mm:ss
+void secs_datetime(double secs, int datetime[6]);                                      //  seconds to year/mon/day/hour/min/secs
+void datetime_secs(int datetime[6], double *secs);                                     //  year/mon/day/hour/min/secs to seconds
+int  parseprocfile(ch *pfile, ch *pname, double *value, ...);                          //  get data from /proc file
+int  parseprocrec(ch *prec, int field, double *value, ...);                            //  get data from /proc file record
+int  coretemp();                                                                       //  get CPU temperature (package temp)
+int  disktemp(ch *disk);                                                               //  get disk temp, e.g. "/dev/sda"
+void zsleep(double dsecs);                                                             //  sleep specified seconds
+void zloop(double dsecs);                                                              //  loop specified seconds
+void spinlock(int lock);                                                               //  lock/unlock enclosed code block
+int  global_lock(ch *lockfile);                                                        //  obtain exclusive lock, multi-process
+void global_unlock(int fd, ch *lockfile);                                              //  release the lock
+int  resource_lock(int &resource);                                                     //  simple lock/unlock usable with GTK
+void resource_unlock(int &resource);                                                   //  (never waits, returns lock status)
+int  zget_locked(int &param);                                                          //  lock and get multi-thread parameter
+void zput_locked(int &param, int value);                                               //  put and unlock multi-thread parameter
+int  zadd_locked(int &param, int incr);                                                //  increment multi-thread parameter
+pthread_t start_detached_thread(void * tfunc(void *), void * arg);                     //  start detached thread function
+pthread_t start_Jthread(void * threadfunc(void *), void * arg);                        //  start joinable thread function
+int  wait_Jthread(pthread_t tid);                                                      //  wait for completion (join thread)
+void synch_threads(int NT = 0);                                                        //  synchronize NT threads
+int  main_thread();                                                                    //  return 1 if main() thread, else 0
+int  zshell(ch *options, ch *command, ...);                                            //  do shell command and get status
+int  kill_procname(ch *wildname);                                                      //  kill processes matching wilcard name
+int  signalProc(ch *pname, ch *signal);                                                //  send signal to process by process name
+ch * fgets_trim(ch * buff, int bcc, FILE *, int bf = 0);                               //  fgets() + trim trailing \n \r (blanks)
+ch * fgets_pend(ch * buff, int bcc, FILE *);                                           //  fgets() non-blocking wrapper
+int  samefolder(ch *file1, ch *file2);                                                 //  returns 1 if files in same folder
+int  parsefile(ch *path, ch *&folder, ch *&file, ch *&ext);                            //  parse components of a file name
+void parsefile_free(ch *&folder, ch *&file, ch *&ext);                                 //  zfree file name components
+int  renamez(ch *file1, ch *file2);                                                    //  rename, also across file systems
+int  check_create_dir(ch *path);                                                       //  check if folder exists, ask to create
+int  cp_copy(ch *sfile, ch *dfile);                                                    //  same, using shell "cp -f -p"
+uint diskspace(ch *file);                                                              //  get disk space for given file, MB
+ch * get_file_extension(ch *file);                                                     //  get correct .ext if file.ext is wrong
+int  zreaddir(ch *folder, ch **&files);                                                //  return all files in a folder, sorted
+int  zreadfile(ch *filename, ch **&rrecs);                                             //  read file, return array of records
+int  zwritefile(ch *filename, ch **&rrecs);                                            //  write array of records to file
+void zreadfile_free(ch **&rrecs);                                                      //  free zreadfile() memory
 
 //  string functions ============================================================
 
-int strmatch(cch *str1, cch *str2);                                              //  true if strings equal, null strings allowed
-int strmatchN(cch *str1, cch *str2, int cc);                                     //  true if leading N characters equal
-int strmatchcase(cch *str1, cch *str2);                                          //  true if strings equal except for case
-int strmatchcaseN(cch *str1, cch *str2, int cc);                                 //  true if leading N chars equal except case
-ch * substringR(ch *string, ch *delims, int Nth);                                //  get Nth delimited substring, thread-safe
-ch * substringR(ch *string, ch delim, int Nth);                                  //  same, single delimiter
-ch * substring(ch *string, ch *delims, int Nth);                                 //  same, no zfree() needed, not thread-safe
-ch * substring(ch *string, ch delim, int Nth);                                   //  same, single delimiter
-int  get_substrings(ch *instr, ch dlm, int cnt, int maxcc, ch **outstr);         //  get all substrings from delimited string
-int  strHash(ch *string, uint max);                                              //  string --> random int 0 to max-1
-int  strncpy0(ch *dest, ch *source, uint cc);                                    //  strncpy, insure null, return 0 if fit
-void strnPad(ch *dest, ch *source, int cc);                                      //  strncpy with blank padding to cc
-int  strTrim(ch *dest, ch *source);                                              //  remove trailing blanks
-int  strTrim(ch *string);                                                        //  remove trailing blanks
-int  strTrim2(ch *dest, ch *source);                                             //  remove leading and trailing blanks
-int  strTrim2(ch *string);                                                       //  remove leading and trailing blanks
-int  strCompress(ch *dest, ch *source);                                          //  remove all blanks incl. embedded
-int  strCompress(ch *string);                                                    //  remove all blanks
-int  strncatv(ch *dest, int maxcc, ch *source, ...);                             //  catenate strings (last = null)
-int  strmatchV(ch *string, ...);                                                 //  compare to N strings, return 1-N or 0
-void strToUpper(ch *dest, ch *source);                                           //  move and conv. string to upper case
-void strToUpper(ch *string);                                                     //  conv. string to upper case
-void strToLower(ch *dest, ch *source);                                           //  move and conv. string to lower case
-void strToLower(ch *string);                                                     //  conv. string to lower case
-int  repl_1str(ch *strin, ch *strout, int maxcc, ch *ssin, ch *ssout);           //  copy string and replace 1 substring
-int  repl_Nstrs(ch *strin, ch *strout, int maxcc, ...);                          //  copy string and replace N substrings
-int  breakup_text(ch *in, ch **&out, ch *delims, int cc1, int cc2);              //  break long string into substrings
-void strncpyx(ch *out, ch *in, int ccin);                                        //  conv. string to hex format
-void StripZeros(ch *pNum);                                                       //  1.230000E+12 --> 1.23E+12
-int  blank_null(ch *string);                                                     //  test for blank/null string
-int  clean_escapes(ch *string);                                                  //  replace \x escapes with real characters
-int  utf8len(ch *utf8string);                                                    //  get graphic cc for UTF8 string
-int  utf8substring(ch *utf8out, ch *utf8in, int pos, int cc);                    //  get graphic substring from UTF8 string
-int  utf8_check(ch *string);                                                     //  check utf8 string for encoding errors
-int  utf8_clean(ch *string);                                                     //  clean utf8 string: '?' > bad characters
-int  utf8_position(ch *utf8in, int Nth);                                         //  get byte position of Nth graphic char.
-int  zsed(ch *file, ...);                                                        //  replace string1/3/5... with string2/4/6...
-ch * zstrstr(ch *haystack, ch *needle);                                          //  work like strstr() and strcasestr()
-ch * zstrcasestr(ch *haystack, ch *needle);                                      //   (but "" does NOT match any string)
-ch * zstrcpy(ch *dest, ch *source);                                              //  strcpy with overlap allowed
-ch * zstrncpy(ch *dest, ch *source, int cc);                                     //  strncpy with overlap allowed
-int  zstrcmp(ch *s1, ch *s2);                                                    //  like strcmp, but \n terminates like null
-int  zstrcmp2(ch *s1, ch *s2);                                                   //  strcmp using ch *args, not cch*
-int  zstrcasecmp(ch *s1, ch *s2);                                                //  strcasecmp using ch *args, not cch*
-ch * zescape_quotes(ch *string);                                                 //  escape quotes for use in shell commands
+int strmatch(cch *str1, cch *str2);                                                    //  true if strings equal, null strings allowed
+int strmatchN(cch *str1, cch *str2, int cc);                                           //  true if leading N characters equal
+int strmatchcase(cch *str1, cch *str2);                                                //  true if strings equal except for case
+int strmatchcaseN(cch *str1, cch *str2, int cc);                                       //  true if leading N chars equal except case
+ch * substringR(ch *string, ch *delims, int Nth);                                      //  get Nth delimited substring, thread-safe
+ch * substringR(ch *string, ch delim, int Nth);                                        //  same, single delimiter
+ch * substring(ch *string, ch *delims, int Nth);                                       //  same, no zfree() needed, not thread-safe
+ch * substring(ch *string, ch delim, int Nth);                                         //  same, single delimiter
+int  get_substrings(ch *instr, ch dlm, int cnt, int maxcc, ch **outstr);               //  get all substrings from delimited string
+int  strHash(ch *string, uint max);                                                    //  string --> random int 0 to max-1
+int  strncpy0(ch *dest, ch *source, uint cc);                                          //  strncpy, insure null, return 0 if fit
+void strnPad(ch *dest, ch *source, int cc);                                            //  strncpy with blank padding to cc
+int  strTrim(ch *dest, ch *source);                                                    //  remove trailing blanks
+int  strTrim(ch *string);                                                              //  remove trailing blanks
+int  strTrim2(ch *dest, ch *source);                                                   //  remove leading and trailing blanks
+int  strTrim2(ch *string);                                                             //  remove leading and trailing blanks
+int  strCompress(ch *dest, ch *source);                                                //  remove all blanks incl. embedded
+int  strCompress(ch *string);                                                          //  remove all blanks
+int  strncatv(ch *dest, int maxcc, ch *source, ...);                                   //  catenate strings (last = null)
+int  strmatchV(ch *string, ...);                                                       //  compare to N strings, return 1-N or 0
+void strToUpper(ch *dest, ch *source);                                                 //  move and conv. string to upper case
+void strToUpper(ch *string);                                                           //  conv. string to upper case
+void strToLower(ch *dest, ch *source);                                                 //  move and conv. string to lower case
+void strToLower(ch *string);                                                           //  conv. string to lower case
+int  repl_1str(ch *strin, ch *strout, int maxcc, ch *ssin, ch *ssout);                 //  copy string and replace 1 substring
+int  repl_Nstrs(ch *strin, ch *strout, int maxcc, ...);                                //  copy string and replace N substrings
+int  breakup_text(ch *in, ch **&out, ch *delims, int cc1, int cc2);                    //  break long string into substrings
+void strncpyx(ch *out, ch *in, int ccin);                                              //  conv. string to hex format
+void StripZeros(ch *pNum);                                                             //  1.230000E+12 --> 1.23E+12
+int  blank_null(ch *string);                                                           //  test for blank/null string
+int  clean_escapes(ch *string);                                                        //  replace \x escapes with real characters
+int  utf8len(ch *utf8string);                                                          //  get graphic cc for UTF8 string
+int  utf8substring(ch *utf8out, ch *utf8in, int pos, int cc);                          //  get graphic substring from UTF8 string
+int  utf8_check(ch *string);                                                           //  check utf8 string for encoding errors
+int  utf8_clean(ch *string);                                                           //  clean utf8 string: '?' > bad characters
+int  utf8_position(ch *utf8in, int Nth);                                               //  get byte position of Nth graphic char.
+int  zsed(ch *file, ...);                                                              //  replace string1/3/5... with string2/4/6...
+ch * zstrstr(ch *haystack, ch *needle);                                                //  work like strstr() and strcasestr()
+ch * zstrcasestr(ch *haystack, ch *needle);                                            //   (but "" does NOT match any string)
+ch * zstrcpy(ch *dest, ch *source);                                                    //  strcpy with overlap allowed
+ch * zstrncpy(ch *dest, ch *source, int cc);                                           //  strncpy with overlap allowed
+int  zstrcmp(ch *s1, ch *s2);                                                          //  like strcmp, but \n terminates like null
+int  zstrcmp2(ch *s1, ch *s2);                                                         //  strcmp using ch *args, not cch*
+int  zstrcasecmp(ch *s1, ch *s2);                                                      //  strcasecmp using ch *args, not cch*
+ch * zescape_quotes(ch *string);                                                       //  escape quotes for use in shell commands
 
 //  number conversion ===========================================================
 
-int convSI (ch *s, int &i, ch **delm = 0);                                       //  string to int
-int convSI (ch *s, int &i, int low, int hi, ch **delm = 0);                      //  (with low/high limit checking)
-int convSD (ch *s, double &d, ch **delm = 0);                                    //  string to double
-int convSD (ch *s, double &d, double low, double hi, ch **delm = 0);             //  (with low/high limit checking)
-int convSF (ch *s, float &f, ch **delm = 0);                                     //  string to double
-int convSF (ch *s, float &f, float low, float hi, ch **delm = 0);                //  (with low/high limit checking)
-int convIS (int iin, ch *outp, int *cc = 0);                                     //  int to string, returned cc
-int convDS (double din, int prec, ch *outp, int *cc = 0);                        //  double to string, precision, output cc
-double atofz(ch *string);                                                        //  atof() for comma/period decimal points
-ch * formatKBMB(double fnum, int prec);                                          //  format nnn B, nn.n KB, n.nn MB, etc.
+int convSI (ch *s, int &i, ch **delm = 0);                                             //  string to int
+int convSI (ch *s, int &i, int low, int hi, ch **delm = 0);                            //  (with low/high limit checking)
+int convSD (ch *s, double &d, ch **delm = 0);                                          //  string to double
+int convSD (ch *s, double &d, double low, double hi, ch **delm = 0);                   //  (with low/high limit checking)
+int convSF (ch *s, float &f, ch **delm = 0);                                           //  string to double
+int convSF (ch *s, float &f, float low, float hi, ch **delm = 0);                      //  (with low/high limit checking)
+int convIS (int iin, ch *outp, int *cc = 0);                                           //  int to string, returned cc
+int convDS (double din, int prec, ch *outp, int *cc = 0);                              //  double to string, precision, output cc
+double atofz(ch *string);                                                              //  atof() for comma/period decimal points
+ch * formatKBMB(double fnum, int prec);                                                //  format nnn B, nn.n KB, n.nn MB, etc.
 
 //  wildcard functions ==========================================================
 
-int MatchWild(ch * wildstr, ch * str);                                           //  wildcard string match (match = 0)
-int MatchWildCase(ch * wildstr, ch * str);                                       //  wildcard string match, ignoring case
-ch * SearchWild(ch *wpath, int &flag);                                           //  wildcard file search
-ch * SearchWildCase(ch *wpath, int &flag);                                       //  wildcard file search, ignoring case
-int zfind(ch *pattern, ch **&flist, int &NF);                                    //  wildcard file search using glob()
+int MatchWild(ch * wildstr, ch * str);                                                 //  wildcard string match (match = 0)
+int MatchWildCase(ch * wildstr, ch * str);                                             //  wildcard string match, ignoring case
+ch * SearchWild(ch *wpath, int &flag);                                                 //  wildcard file search
+ch * SearchWildCase(ch *wpath, int &flag);                                             //  wildcard file search, ignoring case
+int zfind(ch *pattern, ch **&flist, int &NF);                                          //  wildcard file search using glob()
 
 //  search and sort functions ===================================================
 
-int bsearch(int seekint, int nn, int list[]);                                    //  binary search sorted list[nn]
-int bsearch(ch *seekrec, ch *allrecs, int recl, int nrecs);                      //  binary search sorted records
-int bsearch(ch *seekrec, ch **allrecs, int N, int nrecs);                        //  binary search sorted pointers to recs
+int bsearch(int seekint, int nn, int list[]);                                          //  binary search sorted list[nn]
+int bsearch(ch *seekrec, ch *allrecs, int recl, int nrecs);                            //  binary search sorted records
+int bsearch(ch *seekrec, ch **allrecs, int N, int nrecs);                              //  binary search sorted pointers to recs
 
-typedef int HeapSortUcomp(ch *rec1, ch *rec2);                                   //  return -1/0/+1 if rec1 </=/> rec2
+typedef int HeapSortUcomp(ch *rec1, ch *rec2);                                         //  return -1/0/+1 if rec1 </=/> rec2
 //  single-thread versions
-void heapsort(int vv[], int nn);                                                 //  Heap Sort - integer
-void heapsort(float vv[], int nn);                                               //  Heap Sort - float
-void heapsort(double vv[], int nn);                                              //  Heap Sort - double
-void heapsort(ch *vv[], int nn, HeapSortUcomp);                                  //  Heap Sort - char *, user-defined order
+void heapsort(int vv[], int nn);                                                       //  Heap Sort - integer
+void heapsort(float vv[], int nn);                                                     //  Heap Sort - float
+void heapsort(double vv[], int nn);                                                    //  Heap Sort - double
+void heapsort(ch *vv[], int nn, HeapSortUcomp);                                        //  Heap Sort - char *, user-defined order
 //  4-thread versions
-void HeapSort(int vv[], int nn);                                                 //  Heap Sort - integer
-void HeapSort(float vv[], int nn);                                               //  Heap Sort - float
-void HeapSort(double vv[], int nn);                                              //  Heap Sort - double
-void HeapSort(ch *vv[], int nn);                                                 //  Heap Sort - char *, ascending order
-void HeapSort(ch *vv1[], ch *vv2[], int nn);                                     //  Heap Sort - parallel char *, ascending
-void HeapSort(ch *vv[], int nn, HeapSortUcomp);                                  //  Heap Sort - char *, user-defined order
-void HeapSort(ch *recs, int RL, int NR, HeapSortUcomp);                          //  Heap Sort - records, user-defined order
+void HeapSort(int vv[], int nn);                                                       //  Heap Sort - integer
+void HeapSort(float vv[], int nn);                                                     //  Heap Sort - float
+void HeapSort(double vv[], int nn);                                                    //  Heap Sort - double
+void HeapSort(ch *vv[], int nn);                                                       //  Heap Sort - char *, ascending order
+void HeapSort(ch *vv1[], ch *vv2[], int nn);                                           //  Heap Sort - parallel char *, ascending
+void HeapSort(ch *vv[], int nn, HeapSortUcomp);                                        //  Heap Sort - char *, user-defined order
+void HeapSort(ch *recs, int RL, int NR, HeapSortUcomp);                                //  Heap Sort - records, user-defined order
 
-int MemSort(ch * RECS, int RL, int NR, int KEYS[][3], int NK);                   //  memory sort, records with multiple keys
+int MemSort(ch * RECS, int RL, int NR, int KEYS[][3], int NK);                         //  memory sort, records with multiple keys
 
-int zmember(int testval, int matchval1, ...);                                    //  test if value matches any in a list
+int zmember(int testval, int matchval1, ...);                                          //  test if value matches any in a list
 
 //  hash table class ============================================================
 
 class HashTab
 {
-   static int tries1;                                                            //  insert tries
-   static int tries2;                                                            //  find/delete tries
-   int     cap;                                                                  //  table capacity
-   int     count;                                                                //  strings contained
-   int     cc;                                                                   //  string length
-   ch      *table = 0;                                                           //  table[cc][cap]
+   static int tries1;                                                                  //  insert tries
+   static int tries2;                                                                  //  find/delete tries
+   int     cap;                                                                        //  table capacity
+   int     count;                                                                      //  strings contained
+   int     cc;                                                                         //  string length
+   ch      *table = 0;                                                                 //  table[cc][cap]
 public:
-   HashTab(int cc, int cap);                                                     //  constructor
-   ~HashTab();                                                                   //  destructor
-   int Add(ch * string);                                                         //  add a new string
-   int Del(ch * string);                                                         //  delete a string
-   int Find(ch * string);                                                        //  find a string
-   int GetCount() { return count; };                                             //  get string count
-   int GetNext(int & first, ch * string);                                        //  get first/next string
-   int Dump();                                                                   //  dump hash table
+   HashTab(int cc, int cap);                                                           //  constructor
+   ~HashTab();                                                                         //  destructor
+   int Add(ch * string);                                                               //  add a new string
+   int Del(ch * string);                                                               //  delete a string
+   int Find(ch * string);                                                              //  find a string
+   int GetCount() { return count; };                                                   //  get string count
+   int GetNext(int & first, ch * string);                                              //  get first/next string
+   int Dump();                                                                         //  dump hash table
 };
 
 //  list processing functions ===================================================
 
-typedef struct {                                                                 //  list data type
-   int      count;                                                               //  count of member strings
-   ch       **mber = 0;                                                          //  member strings, null == missing
+typedef struct {                                                                       //  list data type
+   int      count;                                                                     //  count of member strings
+   ch       **mber = 0;                                                                //  member strings, null == missing
 }  zlist_t;
 
-zlist_t * zlist_new(int count);                                                  //  create zlist with 'count' empty members
-void zlist_free(zlist_t *zlist);                                                 //  delete zlist, free memory
-void zlist_dump(zlist_t *zlist);                                                 //  dump zlist to stdout
-int zlist_count(zlist_t *zlist);                                                 //  get zlist member count
-ch * zlist_get(zlist_t *zlist, int Nth);                                         //  get a zlist member
-void zlist_put(zlist_t *zlist, ch *string, int Nth);                             //  put a zlist member (replace existing)
-void zlist_insert(zlist_t *zlist, ch *string, int Nth);                          //  insert Nth member, old Nth >> Nth+1
-void zlist_remove(zlist_t *zlist, int Nth);                                      //  remove a zlist member (count -= 1)
-void zlist_clear(zlist_t *zlist, int Nth);                                       //  clear zlist from Nth member to end
-void zlist_purge(zlist_t *zlist);                                                //  purge zlist of all null members
-int zlist_add(zlist_t *zlist, ch *string, int Funiq);                            //  add new member at first null or append
-int zlist_append(zlist_t *zlist, ch *string, int Funiq);                         //  append new member at end (if unique)
-int zlist_prepend(zlist_t *zlist, ch *string, int Funiq);                        //  prepend new member at posn 0 (if unique) 
-int zlist_find(zlist_t *zlist, ch *string, int posn);                            //  find next match from posn
-int zlist_findwild(zlist_t *zlist, ch *wstring, int posn);                       //  find next wildcard match from posn
-zlist_t * zlist_copy(zlist_t *zlist1);                                           //  copy a zlist
-zlist_t * zlist_insert_zlist(zlist_t *zlist1, zlist_t *zlist2, int Nth);         //  insert zlist2 into zlist1 at posn Nth
-zlist_t * zlist_remove(zlist_t *zlist1, zlist_t *zlist2);                        //  remove all members of zlist2 from zlist1
-void zlist_sort(zlist_t *zlist);                                                 //  sort zlist ascending
-void zlist_sort(zlist_t *zlist, int ccfunc(ch *, ch *));                         //  sort zlist via caller compare function
-int zlist_to_file(zlist_t *zlist, ch *filename);                                 //  make file from zlist
-zlist_t * zlist_from_file(ch *filename);                                         //  make zlist from file
-zlist_t * zlist_from_folder(ch *foldername);                                     //  make zlist from files in a folder
+zlist_t * zlist_new(int count);                                                        //  create zlist with 'count' empty members
+void zlist_free(zlist_t *zlist);                                                       //  delete zlist, free memory
+void zlist_dump(zlist_t *zlist);                                                       //  dump zlist to stdout
+int zlist_count(zlist_t *zlist);                                                       //  get zlist member count
+ch * zlist_get(zlist_t *zlist, int Nth);                                               //  get a zlist member
+void zlist_put(zlist_t *zlist, ch *string, int Nth);                                   //  put a zlist member (replace existing)
+void zlist_insert(zlist_t *zlist, ch *string, int Nth);                                //  insert Nth member, old Nth >> Nth+1
+void zlist_remove(zlist_t *zlist, int Nth);                                            //  remove a zlist member (count -= 1)
+void zlist_clear(zlist_t *zlist, int Nth);                                             //  clear zlist from Nth member to end
+void zlist_purge(zlist_t *zlist);                                                      //  purge zlist of all null members
+int zlist_add(zlist_t *zlist, ch *string, int Funiq);                                  //  add new member at first null or append
+int zlist_append(zlist_t *zlist, ch *string, int Funiq);                               //  append new member at end (if unique)
+int zlist_prepend(zlist_t *zlist, ch *string, int Funiq);                              //  prepend new member at posn 0 (if unique)
+int zlist_find(zlist_t *zlist, ch *string, int posn);                                  //  find next match from posn
+int zlist_findwild(zlist_t *zlist, ch *wstring, int posn);                             //  find next wildcard match from posn
+zlist_t * zlist_copy(zlist_t *zlist1);                                                 //  copy a zlist
+zlist_t * zlist_insert_zlist(zlist_t *zlist1, zlist_t *zlist2, int Nth);               //  insert zlist2 into zlist1 at posn Nth
+zlist_t * zlist_remove(zlist_t *zlist1, zlist_t *zlist2);                              //  remove all members of zlist2 from zlist1
+void zlist_sort(zlist_t *zlist);                                                       //  sort zlist ascending
+void zlist_sort(zlist_t *zlist, int ccfunc(ch *, ch *));                               //  sort zlist via caller compare function
+int zlist_to_file(zlist_t *zlist, ch *filename);                                       //  make file from zlist
+zlist_t * zlist_from_file(ch *filename);                                               //  make zlist from file
+zlist_t * zlist_from_folder(ch *foldername);                                           //  make zlist from files in a folder
 
 //  random number functions =====================================================
 
-int lrandz(int64 * seed);                                                        //  returns 0 to 0x7fffffff
-int lrandz();                                                                    //  built-in seed
-double drandz(int64 * seed);                                                     //  returns 0.0 to 0.99999...
-double drandz();                                                                 //  built-in seed
+int lrandz(int64 * seed);                                                              //  returns 0 to 0x7fffffff
+int lrandz();                                                                          //  built-in seed
+double drandz(int64 * seed);                                                           //  returns 0.0 to 0.99999...
+double drandz();                                                                       //  built-in seed
 
 //  spline curve-fitting functions ==============================================
 
-void spline1(int nn, float *dx, float *dy);                                      //  define a curve using nn data points
-float spline2(float x);                                                          //  return y-value for given x-value
+void spline1(int nn, float *dx, float *dy);                                            //  define a curve using nn data points
+float spline2(float x);                                                                //  return y-value for given x-value
 
 //  FIFO queue for text strings, single or dual-thread access ===================
 
 typedef struct  {
-   int      qcap;                                                                //  queue capacity
-   int      qnewest;                                                             //  newest entry position, circular
-   int      qoldest;                                                             //  oldest entry position, circular
-   int      qdone;                                                               //  flag, last entry added to queue
-   ch       **qtext;                                                             //  up to qcap text strings
+   int      qcap;                                                                      //  queue capacity
+   int      qnewest;                                                                   //  newest entry position, circular
+   int      qoldest;                                                                   //  oldest entry position, circular
+   int      qdone;                                                                     //  flag, last entry added to queue
+   ch       **qtext;                                                                   //  up to qcap text strings
 }  Qtext;
 
-void Qtext_open(Qtext *qtext, int cap);                                          //  initialize Qtext queue, empty
-void Qtext_put(Qtext *qtext, ch *format, ...);                                   //  add text string to Qtext queue
-ch * Qtext_get(Qtext *qtext);                                                    //  remove text string from Qtext queue
-void Qtext_close(Qtext *qtext);                                                  //  close Qtext, zfree() leftover strings
+void Qtext_open(Qtext *qtext, int cap);                                                //  initialize Qtext queue, empty
+void Qtext_put(Qtext *qtext, ch *format, ...);                                         //  add text string to Qtext queue
+ch * Qtext_get(Qtext *qtext);                                                          //  remove text string from Qtext queue
+void Qtext_close(Qtext *qtext);                                                        //  close Qtext, zfree() leftover strings
 
 //  compute variance for a list of numbers (std. deviation = sqrtf(variance))
 
@@ -330,30 +326,30 @@ float variance(float *vals, int N);
 
 //  application initialization and administration ===============================
 
-int zinitapp(ch *appvers, int argc, ch *argv[]);                                 //  initialize app (appname-N.N, custom homedir)
+int zinitapp(ch *appvers, int argc, ch *argv[]);                                       //  initialize app (appname-N.N, custom homedir)
 
-ch * get_zprefix();                                                              //  get /usr or /usr/local  ... 
-ch * get_zhomedir();                                                             //  get /home/user/.appname/
-ch * get_zdatadir();                                                             //  get data folder
-ch * get_zimagedir();                                                            //  get image folder
-ch * get_zdocdir();                                                              //  get document folder
-
-void zabout(GtkWidget *parent);                                                  //  popup app 'about' information
-void zsetfont(ch *newfont);                                                      //  set new app font and size
-int  widget_font_metrics(GtkWidget *widget, int &fww, int &fhh);                 //  get widget font char width/height
-
-int  get_zfilespec(ch *ftype, ch *fname, ch *filespec);                          //  get installation data file
-void showz_logfile(GtkWidget *parent);                                           //  show log file in popup window
-void showz_textfile(ch *type, ch *file, GtkWidget *parent);                      //  show text file [.gz] in popup window
-void showz_docfile(GtkWidget *, ch *docfile, ch *topic);                         //  show docfile topic and assoc. image
+ch * get_zprefix();                                                                    //  get /usr or /usr/local  ...
+ch * get_zhomedir();                                                                   //  get /home/user/.appname/
+ch * get_zdatadir();                                                                   //  get data folder
+ch * get_zimagedir();                                                                  //  get image folder
+ch * get_zdocdir();                                                                    //  get document folder
+
+void zabout(GtkWidget *parent);                                                        //  popup app 'about' information
+void zsetfont(ch *newfont);                                                            //  set new app font and size
+int  widget_font_metrics(GtkWidget *widget, int &fww, int &fhh);                       //  get widget font char width/height
+
+int  get_zfilespec(ch *ftype, ch *fname, ch *filespec);                                //  get installation data file
+void showz_logfile(GtkWidget *parent);                                                 //  show log file in popup window
+void showz_textfile(ch *type, ch *file, GtkWidget *parent);                            //  show text file [.gz] in popup window
+void showz_docfile(GtkWidget *, ch *docfile, ch *topic);                               //  show docfile topic and assoc. image
 
 
 /********************************************************************************
    GTK utility functions
 *********************************************************************************/
 
-void zmainloop(int skip = 0);                                                    //  do main loop, process menu events
-void zmainsleep(float secs);                                                     //  do main loop and sleep designated time
+void zmainloop(int skip = 0);                                                          //  do main loop, process menu events
+void zmainsleep(float secs);                                                           //  do main loop and sleep designated time
 
 
 /********************************************************************************/
@@ -385,303 +381,304 @@ void draw_context_destroy(draw_context_t
 //  txwidget functions - scrollable text widget for text reports and line editing
 //  widget = zdialog_gtkwidget(zd,txwidget) where txwidget is a zdialog "text" widget type
 
-void txwidget_clear(GtkWidget *widget);                                          //  clear all text
-void txwidget_clear(GtkWidget *widget, int line);                                //  clear text from line to end
-int  txwidget_linecount(GtkWidget *widget);                                      //  get current line count
-void txwidget_append(GtkWidget *widget, int bold, ch *format, ...);              //  append line
-void txwidget_append2(GtkWidget *widget, int bold, ch *format, ...);             //  append line and scroll to end
-void txwidget_insert(GtkWidget *widget, int bold, int line, ch *format, ...);    //  insert line 
-void txwidget_replace(GtkWidget *widget, int bold, int line, ch *format, ...);   //  replace line
-void txwidget_delete(GtkWidget *widget, int line);                               //  delete line
-int  txwidget_find(GtkWidget *widget, ch *matchtext, int line1, int hilite);     //  find matching line
-void txwidget_insert_pixbuf(GtkWidget *widget, int line, GdkPixbuf *pixbuf);     //  insert pixbuf image
-void txwidget_scroll(GtkWidget *widget, int line);                               //  scroll line on screen
-void txwidget_scroll_top(GtkWidget *widget, int line);                           //  scroll line to top of window
-void txwidget_get_visible_lines(GtkWidget *widget, int &top, int &bott);         //  get range of visible lines
-void txwidget_dump(GtkWidget *widget, ch *filename);                             //  dump all text into a file
-void txwidget_save(GtkWidget *widget, GtkWindow *parent);                        //  same, with save-as dialog
-ch * txwidget_line(GtkWidget *widget, int line, int strip);                      //  retrieve line (strip \n) 
-void txwidget_highlight_line(GtkWidget *widget, int line);                       //  highlight line
-ch * txwidget_word(GtkWidget *, int line, int posn, ch *dlims, ch &end);         //  retrieve word
-void txwidget_highlight_word(GtkWidget *widget, int line, int posn, int cc);     //  highlight word
-void txwidget_bold_word(GtkWidget *widget, int line, int posn, int cc);          //  make word bold
-void txwidget_underline_word(GtkWidget *widget, int line, int posn, int cc);     //  make word underlined
-void txwidget_font_attributes(GtkWidget *widget);                                //  set font attributes for all text
+void txwidget_clear(GtkWidget *widget);                                                //  clear all text
+void txwidget_clear(GtkWidget *widget, int line);                                      //  clear text from line to end
+int  txwidget_linecount(GtkWidget *widget);                                            //  get current line count
+void txwidget_append(GtkWidget *widget, int bold, ch *format, ...);                    //  append line
+void txwidget_append2(GtkWidget *widget, int bold, ch *format, ...);                   //  append line and scroll to end
+void txwidget_insert(GtkWidget *widget, int bold, int line, ch *format, ...);          //  insert line
+void txwidget_replace(GtkWidget *widget, int bold, int line, ch *format, ...);         //  replace line
+void txwidget_delete(GtkWidget *widget, int line);                                     //  delete line
+int  txwidget_find(GtkWidget *widget, ch *matchtext, int line1, int hilite);           //  find matching line
+void txwidget_insert_pixbuf(GtkWidget *widget, int line, GdkPixbuf *pixbuf);           //  insert pixbuf image
+void txwidget_scroll(GtkWidget *widget, int line);                                     //  scroll line on screen
+void txwidget_scroll_top(GtkWidget *widget, int line);                                 //  scroll line to top of window
+void txwidget_get_visible_lines(GtkWidget *widget, int &top, int &bott);               //  get range of visible lines
+void txwidget_dump(GtkWidget *widget, ch *filename);                                   //  dump all text into a file
+void txwidget_save(GtkWidget *widget, GtkWindow *parent);                              //  same, with save-as dialog
+ch * txwidget_line(GtkWidget *widget, int line, int strip);                            //  retrieve line (strip \n)
+void txwidget_highlight_line(GtkWidget *widget, int line);                             //  highlight line
+ch * txwidget_word(GtkWidget *, int line, int posn, ch *dlims, ch &end);               //  retrieve word
+void txwidget_highlight_word(GtkWidget *widget, int line, int posn, int cc);           //  highlight word
+void txwidget_bold_word(GtkWidget *widget, int line, int posn, int cc);                //  make word bold
+void txwidget_underline_word(GtkWidget *widget, int line, int posn, int cc);           //  make word underlined
+void txwidget_font_attributes(GtkWidget *widget);                                      //  set font attributes for all text
 
-typedef int txwidget_CBfunc_t(GtkWidget *, int line, int posn, ch *input);       //  widget event function to receive
-void txwidget_set_eventfunc(GtkWidget *, txwidget_CBfunc_t func);                //    mouse click and KB events
+typedef int txwidget_CBfunc_t(GtkWidget *, int line, int posn, ch *input);             //  widget event function to receive
+void txwidget_set_eventfunc(GtkWidget *, txwidget_CBfunc_t func);                      //    mouse click and KB events
 
 
 /********************************************************************************/
 
 //  functions to simplify building menus, tool bars, status bars
 
-typedef void cbFunc(GtkWidget *, ch *mname);                                     //  menu or button response function
+typedef void cbFunc(GtkWidget *, ch *mname);                                           //  menu or button response function
 
-GtkWidget * create_menubar(GtkWidget *vbox);                                     //  create menubar in packing box
-GtkWidget * add_menubar_item(GtkWidget *mbar, ch *mname, cbFunc func = 0);       //  add menu item to menubar
-GtkWidget * add_submenu_item(GtkWidget *mitem, ch *subname,                      //  add submenu item to menu item
-                             cbFunc func = 0, ch *mtip = 0);                     //    with opt. function and popup tip
+GtkWidget * create_menubar(GtkWidget *vbox);                                           //  create menubar in packing box
+GtkWidget * add_menubar_item(GtkWidget *mbar, ch *mname, cbFunc func = 0);             //  add menu item to menubar
+GtkWidget * add_submenu_item(GtkWidget *mitem, ch *subname,                            //  add submenu item to menu item
+                             cbFunc func = 0, ch *mtip = 0);                           //    with opt. function and popup tip
 
-GtkWidget * create_toolbar(GtkWidget *vbox, int iconsize = 24);                  //  toolbar in packing box (no vert gtk3)
-GtkWidget * add_toolbar_button(GtkWidget *tbar, ch *lab, ch *tip,                //  add button with label, tool-tip, icon
+GtkWidget * create_toolbar(GtkWidget *vbox, int iconsize = 24);                        //  toolbar in packing box (no vert gtk3)
+GtkWidget * add_toolbar_button(GtkWidget *tbar, ch *lab, ch *tip,                      //  add button with label, tool-tip, icon
                                  ch *icon, cbFunc func);
 
-GtkWidget * create_stbar(GtkWidget *vbox);                                       //  create status bar in packing box
-int stbar_message(GtkWidget *stbar, ch *message);                                //  display message in status bar
+GtkWidget * create_stbar(GtkWidget *vbox);                                             //  create status bar in packing box
+int stbar_message(GtkWidget *stbar, ch *message);                                      //  display message in status bar
 
 /********************************************************************************/
 
-GtkWidget * create_popmenu();                                                    //  create an empty popup menu
-void add_popmenu(GtkWidget *popmenu, ch *item, cbFunc func, ch *arg, ch *tip);   //  add menu item to popup menu
-void popup_menu(GtkWidget *, GtkWidget *popmenu);                                //  pop-up menu at current mouse posn.
+GtkWidget * create_popmenu();                                                          //  create an empty popup menu
+void add_popmenu(GtkWidget *popmenu, ch *item, cbFunc func, ch *arg, ch *tip);         //  add menu item to popup menu
+void popup_menu(GtkWidget *, GtkWidget *popmenu);                                      //  pop-up menu at current mouse posn.
 
-ch * popup_choose(zlist_t *zlist);                                               //  popup to choose item from list
-ch * popup_choose(ch *file);                                                     //  same, list from text file
+ch * popup_choose(zlist_t *zlist);                                                     //  popup to choose item from list
+ch * popup_choose(ch *file);                                                           //  same, list from text file
 
 /********************************************************************************/
 
 //  create vertical menu/toolbar in vertical packing box
 
-struct vmenuent {                                                                //  menu data from caller
-   ch          *name = 0;                                                        //  menu name, text
-   ch          *icon = 0;                                                        //  opt. icon file name
-   ch          *desc = 0;                                                        //  description (mouse hover popup)
-   cbFunc      *LMfunc;                                                          //  menu func for left mouse click
-   cbFunc      *RMfunc;                                                          //  menu func for right mouse click
-   cbFunc      *setupfunc;                                                       //  opt. setup func for menu func
-   ch          *arg = 0;                                                         //  callback arg for menu func
-   ch          *setuparg = 0;                                                    //  callback arg for setup func
-   ch          *RMarg = 0;                                                       //  callback arg for RMfunc
-   PIXBUF      *pixbuf;                                                          //  icon pixbuf or null
-   PangoLayout *playout1, *playout2;                                             //  normal and bold menu text
-   int         namex, namey;                                                     //  menu name position in layout
-   int         iconx, icony;                                                     //  menu icon position
-   int         ylo, yhi;                                                         //  menu height limits
-   int         iconww, iconhh;                                                   //  icon width and height
+struct vmenuent {                                                                      //  menu data from caller
+   ch          *name = 0;                                                              //  menu name, text
+   ch          *icon = 0;                                                              //  opt. icon file name
+   ch          *desc = 0;                                                              //  description (mouse hover popup)
+   cbFunc      *LMfunc;                                                                //  menu func for left mouse click
+   cbFunc      *RMfunc;                                                                //  menu func for right mouse click
+   cbFunc      *setupfunc;                                                             //  opt. setup func for menu func
+   ch          *arg = 0;                                                               //  callback arg for menu func
+   ch          *setuparg = 0;                                                          //  callback arg for setup func
+   ch          *RMarg = 0;                                                             //  callback arg for RMfunc
+   PIXBUF      *pixbuf;                                                                //  icon pixbuf or null
+   PangoLayout *playout1, *playout2;                                                   //  normal and bold menu text
+   int         namex, namey;                                                           //  menu name position in layout
+   int         iconx, icony;                                                           //  menu icon position
+   int         ylo, yhi;                                                               //  menu height limits
+   int         iconww, iconhh;                                                         //  icon width and height
 };
 
 struct Vmenu {
-   GtkWidget   *vbox;                                                            //  parent window (container)
-   GtkWidget   *topwin;                                                          //  top-level window of parent
-   GtkWidget   *layout;                                                          //  drawing window
-   float       fgRGB[3];                                                         //  font color, RGB scaled 0-1
-   float       bgRGB[3];                                                         //  background color, RGB scaled 0-1
-   int         xmax, ymax;                                                       //  layout size
-   int         mcount;                                                           //  menu entry count
+   GtkWidget   *vbox;                                                                  //  parent window (container)
+   GtkWidget   *topwin;                                                                //  top-level window of parent
+   GtkWidget   *layout;                                                                //  drawing window
+   float       fgRGB[3];                                                               //  font color, RGB scaled 0-1
+   float       bgRGB[3];                                                               //  background color, RGB scaled 0-1
+   int         xmax, ymax;                                                             //  layout size
+   int         mcount;                                                                 //  menu entry count
    vmenuent    menu[100];
 };
 
-Vmenu *Vmenu_new(GtkWidget *vbox, float fgRGB[3], float bgRGB[3]);               //  create new menu in parent vbox
-void Vmenu_add(Vmenu *vbm, ch *name, ch *icon, int iconww, int iconhh,           //  add menu item with response function
-                                       ch *desc, cbFunc func, ch *arg);          //  function may be popup_menu()
-void Vmenu_add_setup(Vmenu *vbm, int me, cbFunc RMfunc, ch *arg);                //  add opt. setup function
-void Vmenu_add_RMfunc(Vmenu *vbm, int me, cbFunc RMfunc, ch *arg);               //  add function for right mouse click
-void Vmenu_block(int flag);                                                      //  block or unblock menu
+Vmenu *Vmenu_new(GtkWidget *vbox, float fgRGB[3], float bgRGB[3]);                     //  create new menu in parent vbox
+void Vmenu_add(Vmenu *vbm, ch *name, ch *icon, int iconww, int iconhh,                 //  add menu item with response function
+                                       ch *desc, cbFunc func, ch *arg);                //  function may be popup_menu()
+void Vmenu_add_setup(Vmenu *vbm, int me, cbFunc RMfunc, ch *arg);                      //  add opt. setup function
+void Vmenu_add_RMfunc(Vmenu *vbm, int me, cbFunc RMfunc, ch *arg);                     //  add function for right mouse click
+void Vmenu_block(int flag);                                                            //  block or unblock menu
 
 
 /********************************************************************************/
 
 //  spline curve edit functions
 
-typedef void spcfunc_t(int spc);                                                 //  callback function, spline curve edit
+typedef void spcfunc_t(int spc);                                                       //  callback function, spline curve edit
 
-struct spldat {                                                                  //  spline curve data
-   GtkWidget   *drawarea;                                                        //  drawing area for spline curves
-   spcfunc_t   *spcfunc;                                                         //  callback function when curve changed
-   int         Nscale;                                                           //  no. of fixed scale lines, 0-10
-   float       xscale[2][10];                                                    //  2 x-values for end points
-   float       yscale[2][10];                                                    //  2 y-values for end points
-   int         Nspc;                                                             //  number of curves, 1-10
-   int         fact[10];                                                         //  curve is active 
-   int         vert[10];                                                         //  curve is vert. (1) or horz. (0)
-   int         mod[10];                                                          //  curve is edited/modified 
-   int         nap[10];                                                          //  anchor points per curve
-   float       apx[10][50], apy[10][50];                                         //  up to 50 anchor points per curve
-   float       yval[10][1000];                                                   //  y-values for x = 0 to 1 by 0.001
+struct spldat {                                                                        //  spline curve data
+   GtkWidget   *drawarea;                                                              //  drawing area for spline curves
+   spcfunc_t   *spcfunc;                                                               //  callback function when curve changed
+   int         Nscale;                                                                 //  no. of fixed scale lines, 0-10
+   float       xscale[2][10];                                                          //  2 x-values for end points
+   float       yscale[2][10];                                                          //  2 y-values for end points
+   int         Nspc;                                                                   //  number of curves, 1-10
+   int         fact[10];                                                               //  curve is active
+   int         vert[10];                                                               //  curve is vert. (1) or horz. (0)
+   int         mod[10];                                                                //  curve is edited/modified
+   int         nap[10];                                                                //  anchor points per curve
+   float       apx[10][50], apy[10][50];                                               //  up to 50 anchor points per curve
+   float       yval[10][1000];                                                         //  y-values for x = 0 to 1 by 0.001
 };
 
-spldat * splcurve_init(GtkWidget *frame, void func(int spc));                    //  initialize spline curves
-int      splcurve_adjust(void *, GdkEventButton *event, spldat *);               //  curve editing function
-int      splcurve_addnode(spldat *, int spc, float px, float py);                //  add a new node to a curve
-int      splcurve_resize(GtkWidget *);                                           //  adjust drawing area height
-int      splcurve_draw(GtkWidget *, cairo_t *, spldat *);                        //  spline curve draw signal function
-int      splcurve_generate(spldat *, int spc);                                   //  generate data from anchor points
-float    splcurve_yval(spldat *, int spc, float xval);                           //  get curve y-value
-int      splcurve_load(spldat *sd, FILE *fid);                                   //  load curve from a file
-int      splcurve_save(spldat *sd, FILE *fid);                                   //  save curve to a file
+spldat * splcurve_init(GtkWidget *frame, void func(int spc));                          //  initialize spline curves
+int      splcurve_adjust(void *, GdkEventButton *event, spldat *);                     //  curve editing function
+int      splcurve_addnode(spldat *, int spc, float px, float py);                      //  add a new node to a curve
+int      splcurve_resize(GtkWidget *);                                                 //  adjust drawing area height
+int      splcurve_draw(GtkWidget *, cairo_t *, spldat *);                              //  spline curve draw signal function
+int      splcurve_generate(spldat *, int spc);                                         //  generate data from anchor points
+float    splcurve_yval(spldat *, int spc, float xval);                                 //  get curve y-value
+int      splcurve_load(spldat *sd, FILE *fid);                                         //  load curve from a file
+int      splcurve_save(spldat *sd, FILE *fid);                                         //  save curve to a file
 
 
 /********************************************************************************/
 
 //   functions to implement GTK dialogs with less complexity
-//   widget types: dialog, hbox, vbox, hsep, vsep, frame, scrwin, label, link, 
-//                 entry, edit, text, radio, check, button, togbutt, spin, 
+//   widget types: dialog, hbox, vbox, hsep, vsep, frame, scrwin, label, link,
+//                 entry, edit, text, radio, check, button, togbutt, spin,
 //                 combo, hscale, vscale, imagebutt, colorbutt, icon, image
-                                            
+
 #define zdmaxwidgets 300
 #define zdmaxbutts 10
 #define zdsentinel 0x97530000
 #define zdialog_max 20
 
 struct zwidget  {
-      ch          *type = 0;                       //  hbox, vbox, label, entry ...
-      ch          *wname = 0;                      //  widget name
-      ch          *pname = 0;                      //  parent (container) name
-      ch          *data = 0;                       //  widget data, initial / returned
-      int         size;                            //  text entry cc or image pixel size
-      int         homog;                           //  hbox/vbox: equal spacing flag
-      int         expand;                          //  widget is expandable flag
-      int         space;                           //  extra padding space (pixels)
-      int         wrap;                            //  wrap mode for edit widget
-      int         rescale;                         //  widget is rescaled for more resolution
-      double      lval, nval, hval;                //  scale range and neutral value
-      double      lolim, hilim, step;              //  range and step value for number widget
-      zlist_t     *zlist;                          //  combo box list of text entries 
-      GtkWidget   *widget;                         //  GTK widget pointer
+      ch          *type = 0;                             //  hbox, vbox, label, entry ...
+      ch          *wname = 0;                            //  widget name
+      ch          *pname = 0;                            //  parent (container) name
+      ch          *data = 0;                             //  widget data, initial / returned
+      int         size;                                  //  text entry cc or image pixel size
+      int         homog;                                 //  hbox/vbox: equal spacing flag
+      int         expand;                                //  widget is expandable flag
+      int         space;                                 //  extra padding space (pixels)
+      int         wrap;                                  //  wrap mode for edit widget
+      int         rescale;                               //  widget is rescaled for more resolution
+      double      lval, nval, hval;                      //  scale range and neutral value
+      double      lolim, hilim, step;                    //  range and step value for number widget
+      zlist_t     *zlist;                                //  combo box list of text entries
+      GtkWidget   *widget;                               //  GTK widget pointer
 };
 
 struct zdialog  {
-      int         sentinel1;                       //  validity sentinel1
-      int         uniqueID;                        //  unique ID, monotone increasing
-      ch          *title = 0;                      //  dialog title
-      void        *eventCB;                        //  dialog event user callback function
-      void        *popup_report_CB;                //  callback function for popup_report
-      int         zrunning;                        //  dialog is running (0,1)
-      int         zstat;                           //  dialog status (from completion button)
-      ch          zstat_button[40];                //  completion button label
-      int         disabled;                        //  widget signals/events are disabled
-      int         saveposn;                        //  save and recall window position each use
-      int         saveinputs;                      //  save and recall user inputs each use
-      GtkWidget   *dialog;                         //  dialog window or null (box parent)
-      GtkWidget   *parent;                         //  parent window or null
-      ch          *ptype = 0;                      //  null or "window" or "box" parent
-      ch          *compbutton[zdmaxbutts];         //  dialog completion button labels
-      GtkWidget   *compwidget[zdmaxbutts];         //  dialog completion button widgets
-      zwidget     widget[zdmaxwidgets];            //  dialog widgets (EOF = type = 0)
-      ch          event[40];                       //  active event or widget
-      GtkWidget   *lastwidget;                     //  last widget active
-      int         sentinel2;                       //  validity sentinel2
+      int         sentinel1;                             //  validity sentinel1
+      int         uniqueID;                              //  unique ID, monotone increasing
+      ch          *title = 0;                            //  dialog title
+      void        *eventCB;                              //  dialog event user callback function
+      void        *popup_report_CB;                      //  callback function for popup_report
+      int         zrunning;                              //  dialog is running (0,1)
+      int         zstat;                                 //  dialog status (from completion button)
+      ch          zstat_button[40];                      //  completion button label
+      int         disabled;                              //  widget signals/events are disabled
+      int         saveposn;                              //  save and recall window position each use
+      int         saveinputs;                            //  save and recall user inputs each use
+      GtkWidget   *dialog;                               //  dialog window or null (box parent)
+      GtkWidget   *parent;                               //  parent window or null
+      ch          *ptype = 0;                            //  null or "window" or "box" parent
+      ch          *compbutton[zdmaxbutts];               //  dialog completion button labels
+      GtkWidget   *compwidget[zdmaxbutts];               //  dialog completion button widgets
+      zwidget     widget[zdmaxwidgets];                  //  dialog widgets (EOF = type = 0)
+      ch          event[40];                             //  active event or widget
+      GtkWidget   *lastwidget;                           //  last widget active
+      int         sentinel2;                             //  validity sentinel2
 };
 
-zdialog *zdialog_new(ch *title, GtkWidget *parent, ...);                         //  create a zdialog with opt. buttons
-void zdialog_set_title(zdialog *zd, ch *title);                                  //  change zdialog title
-void zdialog_set_modal(zdialog *zd);                                             //  set zdialog modal
-void zdialog_set_decorated(zdialog *zd, int decorated);                          //  set zdialog decorated or not
-void zdialog_present(zdialog *zd);                                               //  zdialog visible and on top
-void zdialog_can_focus(zdialog *zd, int Fcan);                                   //  zdialog can/not have focus (e.g. report)
-void zdialog_set_focus(zdialog *zd, ch *widget = null);                          //  set focus on window [ widget ]
-
-int zdialog_add_widget_long(zdialog *zd,                                         //  add widget to zdialog
-      ch *type, ch *wname, ch *pname,                                            //  required args
-      ch *data = 0, int size = 0, int homog = 0,                                 //  optional args
+zdialog *zdialog_new(ch *title, GtkWidget *parent, ...);                               //  create a zdialog with opt. buttons
+void zdialog_set_title(zdialog *zd, ch *title);                                        //  change zdialog title
+void zdialog_set_modal(zdialog *zd);                                                   //  set zdialog modal
+void zdialog_set_decorated(zdialog *zd, int decorated);                                //  set zdialog decorated or not
+void zdialog_present(zdialog *zd);                                                     //  zdialog visible and on top
+void zdialog_can_focus(zdialog *zd, int Fcan);                                         //  zdialog can/not have focus (e.g. report)
+void zdialog_set_focus(zdialog *zd, ch *widget = null);                                //  set focus on window [ widget ]
+
+int zdialog_add_widget_long(zdialog *zd,                                               //  add widget to zdialog
+      ch *type, ch *wname, ch *pname,                                                  //  required args
+      ch *data = 0, int size = 0, int homog = 0,                                       //  optional args
       int expand = 0, int space = 0, int wrap = 0);
 
-int zdialog_add_widget(zdialog *zd,                                              //  add widget to zdialog
-      ch *type, ch *wname, ch *pname,                                            //  (alternative form)
-      ch *data = 0, ch *options = 0);                                            //  "size=nn|homog|expand|space=nn|wrap"
-
-int zdialog_valid(zdialog *zd, ch *title = 0);                                   //  return 1/0 if zdialog valid/invalid
-int zdialog_valid2(zdialog *zd, ch *title = 0);                                  //  silent version of above
-int zdialog_find_widget(zdialog *zd, ch *wname);                                 //  find zdialog widget from widget name
-GtkWidget * zdialog_gtkwidget(zdialog *zd, ch *wname);                           //  GTK widget from zdialog widget name
-int zdialog_set_image(zdialog *zd, ch *wname, GdkPixbuf *);                      //  set "image" widget from a GDK pixbuf
-int zdialog_add_ttip(zdialog *zd, ch *wname, ch *ttip);                          //  add popup tool tip to a widget
-int zdialog_resize(zdialog *zd, int width, int height);                          //  set size > widget sizes
-int zdialog_put_data(zdialog *zd, ch *wname, ch *data);                          //  put data in widget (entry, spin ...)
-ch * zdialog_get_data(zdialog *zd, ch *wname);                                   //  get widget data
-int zdialog_set_limits(zdialog *, ch *wname, double min, double max);            //  set new widget limits (spin, scale)
-int zdialog_get_limits(zdialog *, ch *wname, double &min, double &max);          //  get widget limits (spin, scale)
-int zdialog_rescale(zdialog *zd, ch *wname, float, float, float);                //  rescale widget, lo/neut/hi vals
-
-typedef int zdialog_event(zdialog *zd, ch *wname);                               //  widget event callback function
-int zdialog_run(zdialog *zd, zdialog_event = 0, ch *posn = 0);                   //  run dialog, handle events
-void KBevent(GdkEventKey *event);                                                //  extern: pass KB events to main app
-
-int zdialog_send_event(zdialog *zd, ch *event);                                  //  send an event to an active dialog
-int zdialog_send_response(zdialog *zd, int zstat);                               //  complete a dialog, set status
-int zdialog_show(zdialog *zd, int flag);                                         //  show or hide a dialog
-int zdialog_destroy(zdialog *zd);                                                //  destroy dialog (caller resp.)
-int zdialog_free(zdialog *&zd);                                                  //  free zdialog memory
-int zdialog_wait(zdialog *zd);                                                   //  wait for dialog completion
-int zdialog_goto(zdialog *zd, ch *wname);                                        //  put cursor at named widget
-void zdialog_set_cursor(zdialog *zd, GdkCursor *cursor);                         //  set cursor for dialog window
-
-int zdialog_stuff(zdialog *zd, ch *wname, ch *data);                             //  stuff string data into widget
-int zdialog_stuff(zdialog *zd, ch *wname, int  data);                            //  stuff int data
-int zdialog_stuff(zdialog *zd, ch *wname, double data);                          //  stuff double data
-int zdialog_stuff(zdialog *zd, ch *wname, double data, ch *format);              //  stuff double data, formatted
-int zdialog_labelfont(zdialog *zd, ch *lab, ch *font, ch *txt);                  //  stuff label text with font
-
-int zdialog_fetch(zdialog *zd, ch *wname, ch *data, int maxcc);                  //  get string data from widget
-int zdialog_fetch(zdialog *zd, ch *wname, int  &data);                           //  get int data
-int zdialog_fetch(zdialog *zd, ch *wname, double &data);                         //  get double data
-int zdialog_fetch(zdialog *zd, ch *wname, float &data);                          //  get float data
-
-int zdialog_combo_clear(zdialog *zd, ch *wname);                                 //  clear combo box entries
-int zdialog_combo_popup(zdialog *zd, ch *wname);                                 //  open combo box pick list
-
-int zdialog_load_widgets(zdialog *zd, spldat *sd, ch *fname, FILE *fid);         //  load zdialog widgets from a file
-int zdialog_save_widgets(zdialog *zd, spldat *sd, ch *fname, FILE *fid);         //  save zdialog widgets to a file
-int zdialog_load_prev_widgets(zdialog *zd, spldat *sd, ch *fname);               //  save last-used zdialog widgets
-int zdialog_save_last_widgets(zdialog *zd, spldat *sd, ch *fname);               //  load last-used zdialog widgets
-
-int  zdialog_geometry(ch *action);                                               //  load/save zdialog window positiion/size
-void zdialog_set_position(zdialog *zd, ch *posn);                                //  set initial/new zdialog window position
-void zdialog_save_position(zdialog *zd);                                         //  save zdialog window position
-
-int zdialog_inputs(ch *action);                                                  //  load or save zdialog input fields
-int zdialog_save_inputs(zdialog *zd);                                            //  save zdialog input fields when finished
-int zdialog_load_inputs(zdialog *zd);                                            //  restore zdialog inputs from prior use
-
-ch * zdialog_text(GtkWidget *parent, ch *title, ch *inittext);                   //  get N text input lines from user
-ch * zdialog_text1(GtkWidget *parent, ch *title, ch *inittext);                  //  get one text input line from user
-ch * zdialog_password(GtkWidget *parent, ch *title, ch *inittext);               //  same, but input is replaced with '*'s
-int  zdialog_choose(GtkWidget *parent, ch *where, ch *message, ...);             //  show message, return button choice  
-int  zdialog_edit_textfile(GtkWidget *parent, char *file);                       //  popup zdialog to edit a text file
+int zdialog_add_widget(zdialog *zd,                                                    //  add widget to zdialog
+      ch *type, ch *wname, ch *pname,                                                  //  (alternative form)
+      ch *data = 0, ch *options = 0);                                                  //  "size=nn|homog|expand|space=nn|wrap"
+
+int zdialog_valid(zdialog *zd, ch *title = 0);                                         //  return 1/0 if zdialog valid/invalid
+int zdialog_valid2(zdialog *zd, ch *title = 0);                                        //  silent version of above
+int zdialog_find_widget(zdialog *zd, ch *wname);                                       //  find zdialog widget from widget name
+GtkWidget * zdialog_gtkwidget(zdialog *zd, ch *wname);                                 //  GTK widget from zdialog widget name
+int zdialog_set_image(zdialog *zd, ch *wname, GdkPixbuf *);                            //  set "image" widget from a GDK pixbuf
+int zdialog_add_ttip(zdialog *zd, ch *wname, ch *ttip);                                //  add popup tool tip to a widget
+int zdialog_resize(zdialog *zd, int width, int height);                                //  set size > widget sizes
+int zdialog_put_data(zdialog *zd, ch *wname, ch *data);                                //  put data in widget (entry, spin ...)
+ch * zdialog_get_data(zdialog *zd, ch *wname);                                         //  get widget data
+int zdialog_set_limits(zdialog *, ch *wname, double min, double max);                  //  set new widget limits (spin, scale)
+int zdialog_get_limits(zdialog *, ch *wname, double &min, double &max);                //  get widget limits (spin, scale)
+int zdialog_rescale(zdialog *zd, ch *wname, float, float, float);                      //  rescale widget, lo/neut/hi vals
+
+typedef int zdialog_event(zdialog *zd, ch *wname);                                     //  widget event callback function
+int zdialog_run(zdialog *zd, zdialog_event = 0, ch *posn = 0);                         //  run dialog, handle events
+void KBevent(GdkEventKey *event);                                                      //  extern: pass KB events to main app
+
+int zdialog_send_event(zdialog *zd, ch *event);                                        //  send an event to an active dialog
+int zdialog_send_response(zdialog *zd, int zstat);                                     //  complete a dialog, set status
+int zdialog_show(zdialog *zd, int flag);                                               //  show or hide a dialog
+int zdialog_destroy(zdialog *zd);                                                      //  destroy dialog (caller resp.)
+int zdialog_free(zdialog *&zd);                                                        //  free zdialog memory
+int zdialog_wait(zdialog *zd);                                                         //  wait for dialog completion
+int zdialog_goto(zdialog *zd, ch *wname);                                              //  put cursor at named widget
+void zdialog_set_cursor(zdialog *zd, GdkCursor *cursor);                               //  set cursor for dialog window
+
+int zdialog_stuff(zdialog *zd, ch *wname, ch *data);                                   //  stuff string data into widget
+int zdialog_stuff(zdialog *zd, ch *wname, int  data);                                  //  stuff int data
+int zdialog_stuff(zdialog *zd, ch *wname, double data);                                //  stuff double data
+int zdialog_stuff(zdialog *zd, ch *wname, double data, ch *format);                    //  stuff double data, formatted
+int zdialog_labelfont(zdialog *zd, ch *lab, ch *font, ch *txt);                        //  stuff label text with font
+
+int zdialog_fetch(zdialog *zd, ch *wname, ch *data, int maxcc);                        //  get string data from widget
+int zdialog_fetch(zdialog *zd, ch *wname, int  &data);                                 //  get int data
+int zdialog_fetch(zdialog *zd, ch *wname, double &data);                               //  get double data
+int zdialog_fetch(zdialog *zd, ch *wname, float &data);                                //  get float data
+
+int zdialog_combo_clear(zdialog *zd, ch *wname);                                       //  clear combo box entries
+int zdialog_combo_popup(zdialog *zd, ch *wname);                                       //  open combo box pick list
+
+int zdialog_load_widgets(zdialog *zd, spldat *sd, ch *fname, FILE *fid);               //  load zdialog widgets from a file
+int zdialog_save_widgets(zdialog *zd, spldat *sd, ch *fname, FILE *fid);               //  save zdialog widgets to a file
+int zdialog_load_prev_widgets(zdialog *zd, spldat *sd, ch *fname);                     //  save last-used zdialog widgets
+int zdialog_save_last_widgets(zdialog *zd, spldat *sd, ch *fname);                     //  load last-used zdialog widgets
+
+int  zdialog_geometry(ch *action);                                                     //  load/save zdialog window positiion/size
+void zdialog_set_position(zdialog *zd, ch *posn);                                      //  set initial/new zdialog window position
+void zdialog_save_position(zdialog *zd);                                               //  save zdialog window position
+
+int zdialog_inputs(ch *action);                                                        //  load or save zdialog input fields
+int zdialog_save_inputs(zdialog *zd);                                                  //  save zdialog input fields when finished
+int zdialog_load_inputs(zdialog *zd);                                                  //  restore zdialog inputs from prior use
+
+ch * zdialog_text(GtkWidget *parent, ch *title, ch *inittext);                         //  get N text input lines from user
+ch * zdialog_text1(GtkWidget *parent, ch *title, ch *inittext);                        //  get one text input line from user
+ch * zdialog_password(GtkWidget *parent, ch *title, ch *inittext);                     //  same, but input is replaced with '*'s
+int  zdialog_choose(GtkWidget *parent, ch *where, ch *message, ...);                   //  show message, return button choice
+int  zdialog_edit_textfile(GtkWidget *parent, char *file);                             //  popup zdialog to edit a text file
 
 //  write text report in popup window
 
-zdialog * popup_report_open(ch *title, GtkWidget *parent, int ww, int hh,        //  open popup report - pixel size,
-               int wrap, int Fheader, txwidget_CBfunc_t CBfunc, ...);            //    wrap, header line, callback function
-void popup_report_header(zdialog *zd, int bold, ch *format, ...);                //  write non-scrolling header line
-void popup_report_write(zdialog *zd, int bold, ch *format, ...);                 //  write text line
-void popup_report_write2(zdialog *zd, int bold, ch *format, ...);                //  write text line and scroll to end
-void popup_report_top(zdialog *zd);                                              //  go to top of report window
-void popup_report_bottom(zdialog *zd);                                           //  go to bottom of report window
-void popup_report_clear(zdialog *zd);                                            //  clear report window
-void popup_report_clear(zdialog *zd, int line);                                  //  clear from line to end
-void popup_report_insert(zdialog *zd, int bold, int line, ch *format, ...);      //  insert new line
-void popup_report_replace(zdialog *zd, int bold, int line, ch *format, ...);     //  replace existing line
-void popup_report_delete(zdialog *zd, int line);                                 //  delete line
-int  popup_report_find(zdialog *zd, ch *matchtext, int line1);                   //  find matching line
-void popup_report_insert_pixbuf(zdialog *zd, int line, GdkPixbuf *pixbuf);       //  insert pixbuf image after line
-void popup_report_scroll(zdialog *zd, int line);                                 //  scroll to make line visible
-void popup_report_scroll_top(zdialog *zd, int line);                             //  scroll to put line at top
-void popup_report_get_visible_lines(zdialog *zd, int &top, int &bott);           //  get visible lines range
-ch * popup_report_line(zdialog *zd, int line, int strip);                        //  retrieve line (strip \n) 
-ch * popup_report_word(zdialog *zd, int line, int posn, ch *dlims, ch &end);     //  retrieve word
-void popup_report_highlight_line(zdialog *zd, int line);                         //  highlight line
-void popup_report_highlight_word(zdialog *zd, int line, int posn, int cc);       //  highlight word
-void popup_report_underline_word(zdialog *zd, int line, int posn, int cc);       //  underline word 
-void popup_report_bold_word(zdialog *zd, int line, int posn, int cc);            //  bold word
-void popup_report_font_attributes(zdialog *zd);                                  //  font attributes for entire report
-void popup_report_close(zdialog *zd, int secs);                                  //  close window after seconds
+zdialog * popup_report_open(ch *title, GtkWidget *parent, int ww, int hh,              //  open popup report - pixel size,
+               int wrap, int Fheader, txwidget_CBfunc_t CBfunc, ...);                  //    wrap, header line, callback function
+void popup_report_header(zdialog *zd, int bold, ch *format, ...);                      //  write non-scrolling header line
+void popup_report_write(zdialog *zd, int bold, ch *format, ...);                       //  write text line
+void popup_report_write2(zdialog *zd, int bold, ch *format, ...);                      //  write text line and scroll to end
+void popup_report_top(zdialog *zd);                                                    //  go to top of report window
+void popup_report_bottom(zdialog *zd);                                                 //  go to bottom of report window
+void popup_report_clear(zdialog *zd);                                                  //  clear report window
+void popup_report_clear(zdialog *zd, int line);                                        //  clear from line to end
+void popup_report_insert(zdialog *zd, int bold, int line, ch *format, ...);            //  insert new line
+void popup_report_replace(zdialog *zd, int bold, int line, ch *format, ...);           //  replace existing line
+void popup_report_delete(zdialog *zd, int line);                                       //  delete line
+int  popup_report_find(zdialog *zd, ch *matchtext, int line1);                         //  find matching line
+void popup_report_insert_pixbuf(zdialog *zd, int line, GdkPixbuf *pixbuf);             //  insert pixbuf image after line
+void popup_report_scroll(zdialog *zd, int line);                                       //  scroll to make line visible
+void popup_report_scroll_top(zdialog *zd, int line);                                   //  scroll to put line at top
+void popup_report_get_visible_lines(zdialog *zd, int &top, int &bott);                 //  get visible lines range
+ch * popup_report_line(zdialog *zd, int line, int strip);                              //  retrieve line (strip \n)
+ch * popup_report_word(zdialog *zd, int line, int posn, ch *dlims, ch &end);           //  retrieve word
+void popup_report_highlight_line(zdialog *zd, int line);                               //  highlight line
+void popup_report_highlight_word(zdialog *zd, int line, int posn, int cc);             //  highlight word
+void popup_report_underline_word(zdialog *zd, int line, int posn, int cc);             //  underline word
+void popup_report_bold_word(zdialog *zd, int line, int posn, int cc);                  //  bold word
+void popup_report_font_attributes(zdialog *zd);                                        //  font attributes for entire report
+void popup_report_close(zdialog *zd, int secs);                                        //  close window after seconds
 
-int popup_command(ch *cmd, int ww=400, int hh=300, GtkWidget *p=0, int top=0);   //  shell command to popup window
-int  monitor_file(ch *file);                                                     //  monitor a text file in a popup window
+int popup_command(ch *cmd, int ww=400, int hh=300, GtkWidget *p=0, int top=0);         //  shell command to popup window
+int  monitor_file(ch *file);                                                           //  monitor a text file in a popup window
 
 //  popups: message, dialog, image
 
-void zmessageACK_init();                                                         //  initz. for thread usage
-void zmessageACK(GtkWidget *parent, ch *format, ... );                           //  display message, wait for OK
-int  zmessageYN(GtkWidget *parent, ch *format, ... );                            //  display message, wait for YES/NO
-zdialog * zmessage_post(GtkWidget *, ch *loc, int s, ch *f, ...);                //  show message, timeout or cancel
-
-void poptext_screen(ch *text, int px, int py, float s1, float s2);               //  show popup text at screen posn
-void poptext_mouse(ch *text, int dx, int dy, float s1, float s2);                //  same, at mouse posn + offset
-void poptext_widget(GtkWidget *, ch *tx, int x, int y, float s1, float s2);      //  same, at widget posn + offset
-int  poptext_killnow();                                                          //  kill current popup window
+ch * boldred(ch *message);                                                             //  convert dialog message to bold/red font
+void zmessageACK_init();                                                               //  initz. for thread usage
+void zmessageACK(GtkWidget *parent, ch *format, ... );                                 //  display message, wait for OK
+int  zmessageYN(GtkWidget *parent, ch *format, ... );                                  //  display message, wait for YES/NO
+zdialog * zmessage_post(GtkWidget *, ch *loc, int s, ch *f, ...);                      //  show message, timeout or cancel
+
+void poptext_screen(ch *text, int px, int py, float s1, float s2);                     //  show popup text at screen posn
+void poptext_mouse(ch *text, int dx, int dy, float s1, float s2);                      //  same, at mouse posn + offset
+void poptext_widget(GtkWidget *, ch *tx, int x, int y, float s1, float s2);            //  same, at widget posn + offset
+int  poptext_killnow();                                                                //  kill current popup window
 
 //  file chooser dialogs for one file, multiple files, or folder
 
@@ -695,19 +692,19 @@ void print_image_file(GtkWidget *parent,
 
 //  drag and drop functions
 
-typedef ch * drag_drop_source_func();                                            //  user function, set drag-drop text
-typedef void drag_drop_dest_func(int x, int y, ch *text);                        //  user function, get drag-drop text
-void drag_drop_source(GtkWidget *window, drag_drop_source_func);                 //  connect source window to user function
-void drag_drop_dest(GtkWidget *window, drag_drop_dest_func);                     //  connect dest. window to user function
+typedef ch * drag_drop_source_func();                                                  //  user function, set drag-drop text
+typedef void drag_drop_dest_func(int x, int y, ch *text);                              //  user function, get drag-drop text
+void drag_drop_source(GtkWidget *window, drag_drop_source_func);                       //  connect source window to user function
+void drag_drop_dest(GtkWidget *window, drag_drop_dest_func);                           //  connect dest. window to user function
 
 //  miscellaneous GDK/GTK functions
 
-PIXBUF * get_thumbnail(ch *fpath, int size);                                     //  get sized thumbnail for image file
-GdkCursor * zmakecursor(ch *iconfile);                                           //  make a cursor from an image file
-PIXBUF * gdk_pixbuf_stripalpha(PIXBUF *pixbuf);                                  //  strip alpha channel from pixbuf
-PIXBUF * text_pixbuf(ch *text, ch *font, int fsize, GtkWidget *);                //  create pixbuf with text using font
+PIXBUF * get_thumbnail(ch *fpath, int size);                                           //  get sized thumbnail for image file
+GdkCursor * zmakecursor(ch *iconfile);                                                 //  make a cursor from an image file
+PIXBUF * gdk_pixbuf_stripalpha(PIXBUF *pixbuf);                                        //  strip alpha channel from pixbuf
+PIXBUF * text_pixbuf(ch *text, ch *font, int fsize, GtkWidget *);                      //  create pixbuf with text using font
 
-int  move_pointer(GtkWidget *, int px, int py);                                  //  move the mouse pointer to px, py
-void window_to_mouse(GtkWidget *window);                                         //  move GtkWidget/window to mouse position
+int  move_pointer(GtkWidget *, int px, int py);                                        //  move the mouse pointer to px, py
+void window_to_mouse(GtkWidget *window);                                               //  move GtkWidget/window to mouse position
 
 
