Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/flux.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/flux.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/flux.c	(revision 39419)
@@ -1,8 +1,8 @@
 # include "astro.h"
+# include <signal.h>
 
 int flux (int argc, char **argv) {
   
   int i, j, k, xmin, ymin, xmax, ymax;
-  void *oldsignal;
   double ax, ay, s, S, flux;
   double bx[5], by[5], x[5], y[5], bb[5];
@@ -55,6 +55,6 @@
    we have to add up the angles for concave contours */
   flux = 0;
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+
+  struct sigaction *old_sigaction = SetInterrupt();
   for (j = ymin; (j < ymax) && !interrupt; j++) {
     V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + xmin; 
@@ -72,5 +72,5 @@
     }
   }
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
 
   gprint (GP_LOG, "flux: %f\n", flux);
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-fgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-fgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-fgauss.c	(revision 39419)
@@ -41,4 +41,5 @@
 /* real 2D gaussian -- x, y, sx, sy, sxy, I, sky */
 opihi_flt fgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss-psf.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss-psf.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss-psf.c	(revision 39419)
@@ -39,4 +39,5 @@
 /* pseudo 2D gaussian -- x, y, (sx), (sy), (sxy), I, sky */
 opihi_flt pgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss.c	(revision 39419)
@@ -41,4 +41,5 @@
 /* pseudo 2D gaussian -- x, y, sx, sy, sxy, I, sky */
 opihi_flt pgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qfgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qfgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qfgauss.c	(revision 39419)
@@ -45,4 +45,5 @@
 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky */
 opihi_flt qfgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss-psf.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss-psf.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss-psf.c	(revision 39419)
@@ -42,4 +42,5 @@
 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */
 opihi_flt qgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss.c	(revision 39419)
@@ -45,4 +45,5 @@
 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */
 opihi_flt qgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qrgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qrgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qrgauss.c	(revision 39419)
@@ -45,4 +45,5 @@
 
 opihi_flt qrgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-rgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-rgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-rgauss.c	(revision 39419)
@@ -37,4 +37,5 @@
 /* two components: (1 + z_1 + 0.5*z_1^2 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt rgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-serbulge.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-serbulge.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-serbulge.c	(revision 39419)
@@ -42,4 +42,5 @@
 /* exp (-b (r/r_e)^(1/n)) + pgauss (r) */
 opihi_flt serbulgeTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, px2, py1, py2;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sersic.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sersic.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sersic.c	(revision 39419)
@@ -34,4 +34,5 @@
 /* exp (-b (r/r_e)^(1/n)) */
 opihi_flt sersicTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss-psf.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss-psf.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss-psf.c	(revision 39419)
@@ -44,4 +44,5 @@
 /* two components: (1 + z_1 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt sgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss.c	(revision 39419)
@@ -53,4 +53,5 @@
 /* two components: (1 + z_1 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt sgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-tgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-tgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-tgauss.c	(revision 39419)
@@ -32,4 +32,5 @@
 /* two components: (1 + z_1^M + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */
 opihi_flt tgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px1, py1, px2, py2;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-vgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-vgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-vgauss.c	(revision 39419)
@@ -27,4 +27,5 @@
 /* pseudo 2D gaussian with opihi_flting 2nd and 3rd order terms -- x, y, sx, sy, sxy, I, sky, f1, f2 */
 opihi_flt vgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt X, Y, px, py;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/spexseq.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/spexseq.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/spexseq.c	(revision 39419)
@@ -43,4 +43,6 @@
 
 void get_sequence (Object *object, int Nobject, int idx1, float Dmax, float f1, float f2, int pin1, int pin2) {
+  OHANA_UNUSED_PARAM(pin1);
+  OHANA_UNUSED_PARAM(pin2);
 
   int i, j, N;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/continue.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/continue.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/continue.c	(revision 39419)
@@ -2,4 +2,7 @@
 
 int exec_next (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+
   loop_next = TRUE;
   return (TRUE);
@@ -7,4 +10,7 @@
 
 int exec_last (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+
   loop_last = TRUE;
   return (TRUE);
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_help.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_help.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_help.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int list_help (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   FILE *f;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_vars.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_vars.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_vars.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int list_vars (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   ListVariables ();
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/nop.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/nop.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/nop.c	(revision 39419)
@@ -2,4 +2,7 @@
 
 int nop (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+
   return (TRUE);
 }
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_for.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_for.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_for.c	(revision 39419)
@@ -104,5 +104,4 @@
 
   status = TRUE;
-  interrupt = FALSE;
   for (value = start; (sign*value < sign*end) && !interrupt; value += delta) {
     if ((int)value == value) 
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_foreach.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_foreach.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_foreach.c	(revision 39419)
@@ -72,5 +72,4 @@
 
   status = TRUE;
-  interrupt = FALSE;
   for (i = 2; (i < argc) && !interrupt; i++) {
     set_str_variable (argv[1], argv[i]);
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/shell.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/shell.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/shell.c	(revision 39419)
@@ -51,5 +51,5 @@
   // wait for process to finish or timeout
   // loop forever if desired, but catch C-C and stop the process on interrupt
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   while (!interrupt) {
     result = waitpid (pid, &wait_status, WNOHANG);
@@ -59,4 +59,5 @@
 	  case ECHILD:
 	    gprint (GP_ERR, "unknown PID, not a child process: %d\n", pid);
+	    ClearInterrupt (old_sigaction);
 	    return (FALSE);
 	  default:
@@ -72,4 +73,5 @@
 	  if (DTIME(now, start) > timeout) {
 	    gprint (GP_ERR, "timeout on %s (pid %d)\n", argv[1], pid);
+	    ClearInterrupt (old_sigaction);
 	    return (FALSE);
 	  }
@@ -83,4 +85,5 @@
 	}
 	if (WIFEXITED(wait_status)) {
+	  ClearInterrupt (old_sigaction);
 	  exit_status = WEXITSTATUS(wait_status);
 	  if (exit_status) {
@@ -91,4 +94,5 @@
 	}
 	if (WIFSIGNALED(wait_status)) {
+	  ClearInterrupt (old_sigaction);
 	  gprint (GP_ERR, "job %d exited on signal %d\n", pid, WTERMSIG(wait_status));
 	  return (FALSE);
@@ -100,4 +104,5 @@
     }
   }
+  ClearInterrupt (old_sigaction);
   gprint (GP_ERR, "caught interrupt, killing %s (%d)\n", argv[1], pid);
 
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/book_commands.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/book_commands.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/book_commands.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int book_list (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: book list\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/cursor.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/cursor.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/cursor.c	(revision 39419)
@@ -6,5 +6,4 @@
   int i, N, kapa, VERBOSE;
   double X, Y, R, D, Z;
-  void *oldsignal;
 
   // XXX need to be able to specify graph vs image coords
@@ -38,7 +37,5 @@
   KiiCursorOn (kapa);
   
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
-
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; ((i < N) || (N == 0)) && !interrupt; i++) {
 
@@ -62,6 +59,6 @@
     if (!strcasecmp (key, "Q")) break;
   }
+  ClearInterrupt (old_sigaction);
 
-  signal (SIGINT, oldsignal);
   KiiCursorOff (kapa);
   return (TRUE);
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/gaussdeviate.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/gaussdeviate.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/gaussdeviate.c	(revision 39419)
@@ -30,4 +30,6 @@
 
 int gaussintegral (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   gprint (GP_ERR, "fix gaussintegral\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_buffers.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_buffers.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_buffers.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int list_buffers (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc == 3) PrintBuffers (TRUE);
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_vectors.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_vectors.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_vectors.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int list_vectors (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   ListVectors ();
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage.c	(revision 39419)
@@ -18,4 +18,6 @@
 
 int medimage_help (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "USAGE: medimage (command)\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage_commands.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage_commands.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage_commands.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int medimage_list (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
+
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: medimage list\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/queuelist.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/queuelist.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/queuelist.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int queuelist (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
   
   if (argc != 1) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline.c	(revision 39419)
@@ -23,4 +23,6 @@
 
 int spline_help (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "USAGE: spline (command)\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline_commands.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline_commands.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline_commands.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int spline_list (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
+
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: spline list\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/uniq.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/uniq.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/uniq.c	(revision 39419)
@@ -56,6 +56,5 @@
     int onePercent = ivec->Nelements / 100;
 
-    void *Signal = signal (SIGINT, handle_interrupt);
-    interrupt = FALSE;
+    struct sigaction *old_sigaction = SetInterrupt();
     for (i = 0; (i < ivec->Nelements) && !interrupt; Nnew++) {
       vtgt[Nnew] = *vsrc;
@@ -72,5 +71,5 @@
       }
     }
-    signal (SIGINT, Signal);
+    ClearInterrupt (old_sigaction);
     if (VERBOSE) gprint (GP_ERR, "\n");
     free (indata);
@@ -90,6 +89,5 @@
     int onePercent = ivec->Nelements / 100;
 
-    void *Signal = signal (SIGINT, handle_interrupt);
-    interrupt = FALSE;
+    struct sigaction *old_sigaction = SetInterrupt();
     for (i = 0; (i < ivec->Nelements) && !interrupt; Nnew++) {
       vtgt[Nnew] = *vsrc;
@@ -106,5 +104,5 @@
       }
     }
-    signal (SIGINT, Signal);
+    ClearInterrupt (old_sigaction);
     if (VERBOSE) gprint (GP_ERR, "\n");
     free (indata);
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vellipse.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vellipse.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vellipse.c	(revision 39419)
@@ -230,4 +230,5 @@
 // XXX NOTE that PHI is defined with the wrong sign, should fix this...
 opihi_flt fellipseOD (opihi_flt alpha, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
   
   static int pass = 0;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vgauss.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vgauss.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vgauss.c	(revision 39419)
@@ -127,4 +127,5 @@
 /* pars: x_o, sigma, I, back */
 opihi_flt fgaussOD (opihi_flt x, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt z, r, f;
Index: /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vmaxwell.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vmaxwell.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vmaxwell.c	(revision 39419)
@@ -96,4 +96,5 @@
 // f = C3 + C2*(x - C4)^2 * exp(-0.5*(x - C0)^2 / C1^2)
 opihi_flt fmaxwellOD (opihi_flt x, opihi_flt *par, int Npar, opihi_flt *dpar) {
+  OHANA_UNUSED_PARAM(Npar);
 
   opihi_flt z, r, f;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/avextract.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/avextract.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/avextract.c	(revision 39419)
@@ -4,7 +4,8 @@
   
   off_t i, j, n, m;
-  int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
+  int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack;
   int Nsecfilt, VERBOSE;
   char **cstack, name[1024];
+  unsigned int Ncstack;
 
   Catalog catalog;
@@ -169,6 +170,5 @@
 
   // grab data from all selected sky regions
-  void *Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
 
@@ -254,6 +254,6 @@
     dvo_catalog_free (&catalog);
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
+
   for (n = 0; n < Nreturn; n++) {
     ResetVector (vec[n], fields[n].type, Npts);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/avmatch.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/avmatch.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/avmatch.c	(revision 39419)
@@ -17,5 +17,4 @@
   int VERBOSE;
   char name[1024], *found;
-  void *Signal;
   float RADIUS;
 
@@ -179,6 +178,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
 
@@ -253,6 +251,5 @@
     dvo_catalog_free (&catalog);
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
 
   // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/catname.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/catname.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/catname.c	(revision 39419)
@@ -55,6 +55,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -99,4 +98,5 @@
     set_str_variable ("CATNAME", filename);
   }
+  ClearInterrupt (old_sigaction);
 
   return (TRUE);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/ccd.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/ccd.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/ccd.c	(revision 39419)
@@ -62,8 +62,7 @@
 
   // grab data from all selected sky regions
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* loop over regions, extract data for each region */
+  struct sigaction *old_sigaction = SetInterrupt();
   for (k = 0; (k < skylist[0].Nregions) && !interrupt; k++) {
     /* lock, load, unlock catalog */
@@ -119,4 +118,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
 
   xvec[0].Nelements = yvec[0].Nelements = Npts;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/cmd.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/cmd.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/cmd.c	(revision 39419)
@@ -21,4 +21,5 @@
   skylist = NULL;
   selection = NULL;
+  struct sigaction *old_sigaction = NULL:
 
   /* load photcode information */
@@ -60,7 +61,5 @@
 
   // grab data from all selected sky regions
-  // void *Signal = signal (SIGINT, handle_interrupt);
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  old_sigaction = SetInterrupt();
 
   /* loop over regions, extract data for each region */
@@ -118,4 +117,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
 
   xvec[0].Nelements = yvec[0].Nelements = Npts;
@@ -129,4 +129,5 @@
 
 escape:
+  ClearInterrupt (old_sigaction);
   dvo_catalog_free (&catalog);
   SkyListFree (skylist);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/dmt.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/dmt.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/dmt.c	(revision 39419)
@@ -3,4 +3,6 @@
 /* extract vectors giving delta mags for multiple measurements */ 
 int dmt (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   // XXX this needs to be fixed: how to access different graphs at once?
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo.c.in	(revision 39419)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo_host_utils.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo_host_utils.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo_host_utils.c	(revision 39419)
@@ -249,4 +249,5 @@
 // and has since been re-run
 int HostTableReloadResults (char *uniquer, int VERBOSE) {
+  OHANA_UNUSED_PARAM(VERBOSE);
 
   int i;
@@ -317,4 +318,5 @@
 // and has since been re-run
 int HostTableGetResults (char *uniquer, int VERBOSE) {
+  OHANA_UNUSED_PARAM(VERBOSE);
 
   int i;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/fitcolors.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/fitcolors.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/fitcolors.c	(revision 39419)
@@ -14,5 +14,4 @@
   int mode[4];
   int Nsecfilt, status;
-  void *oldsignal;
   char *cmd, *outcmd, *camera;
   char name[64], filename[64], plotname[64], label[64];
@@ -40,7 +39,4 @@
   colorFit = NULL;
   deltaFit = NULL;
-
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* load photcode information */
@@ -199,4 +195,6 @@
     graphdata.ptype = 2;
   }
+
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /*** generate the color-color vectors for the pairs ***/
@@ -357,5 +355,5 @@
   if (colorFit != NULL) free (colorFit);
   if (deltaFit != NULL) free (deltaFit);
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
   return (TRUE);
 
@@ -381,5 +379,6 @@
   DeleteVector (xvec);
   DeleteVector (yvec);
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
+
   return (FALSE);
 }
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/fitsed.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/fitsed.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/fitsed.c	(revision 39419)
@@ -27,5 +27,4 @@
   int N, done, Nfit;
   int status;
-  void *oldsignal;
   char name[64], line[1024], key[20];
   float *fitmags, *fiterrs, *wavecode, *vegaToAB;
@@ -48,4 +47,5 @@
   SEDtableRow sourceValue, sourceError;
   SEDfit minFit, testFit;
+  struct sigaction *old_sigaction = NULL;
 
   /* defaults */
@@ -74,7 +74,4 @@
   fiterrs = NULL;
   fitmags = NULL;
-
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* load photcode information */
@@ -184,6 +181,7 @@
   /* loop over regions, extract data for each region */
   // XXX add interrupt checks
+  old_sigaction = SetInterrupt();
   gprint (GP_ERR, "using "OFF_T_FMT" possible regions\n",  skylist[0].Nregions);
-  for (k = 0; k < skylist[0].Nregions; k++) {
+  for (k = 0; (k < skylist[0].Nregions) && !interrupt; k++) {
     /* lock, load, unlock catalog */
     dvo_catalog_init (&catalog, TRUE);
@@ -377,5 +375,5 @@
   if (sourceError.mags != NULL) free (sourceError.mags);
 
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
   return (status);
 }
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/gcat.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/gcat.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/gcat.c	(revision 39419)
@@ -57,6 +57,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -101,4 +100,5 @@
     set_str_variable ("CATNAME", hostfile);
   }
+  ClearInterrupt (old_sigaction);
 
   return (TRUE);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/gstar.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/gstar.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/gstar.c	(revision 39419)
@@ -876,4 +876,5 @@
 
 void printPhotcodeSequence (Average *average, SecFilt *secfilt, int entry, int type) {
+  OHANA_UNUSED_PARAM(average);
 
   int seq;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/imdata.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/imdata.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/imdata.c	(revision 39419)
@@ -128,6 +128,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /* for each region file, extract the data of interest in the right time range */
@@ -216,4 +215,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
   
   vec[0].Nelements = N;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/imextract.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/imextract.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/imextract.c	(revision 39419)
@@ -4,7 +4,6 @@
   
   off_t i, j, Nimage;
-  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
+  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack;
   char **cstack, name[1024];
-  void *Signal;
 
   Vector **vec;
@@ -57,4 +56,5 @@
 
   // parse the remainder of the line as a boolean math expression
+  unsigned int Ncstack;
   cstack = isolate_elements (argc-next, &argv[next], &Ncstack);
   
@@ -97,6 +97,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (j = 0; (j < Nimage) && !interrupt; j++) {
 
@@ -128,6 +127,6 @@
     }
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
+
   for (n = 0; n < Nreturn; n++) {
     vec[n][0].Nelements = Npts;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/mextract.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/mextract.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/mextract.c	(revision 39419)
@@ -25,9 +25,8 @@
   
   off_t i, j, k, m; // used for counter averages and measures
-  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
+  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack;
   int Nsecfilt, VERBOSE, loadImages;
   char **cstack, name[1024];
   dbValue *values;
-  void *Signal;
 
   Catalog catalog;
@@ -115,4 +114,5 @@
 
   // parse the remainder of the line as a boolean math expression
+  unsigned int Ncstack;
   cstack = isolate_elements (argc-next, &argv[next], &Ncstack);
   
@@ -217,8 +217,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
-
-  // fprintf (stderr, "done setup...");
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -310,5 +307,5 @@
     // dbStackFreeReset ();
   }
-  signal (SIGINT, Signal);
+  ClearInterrupt (old_sigaction);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/mmatch.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/mmatch.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/mmatch.c	(revision 39419)
@@ -14,5 +14,4 @@
   int VERBOSE;
   char name[1024];
-  void *Signal;
   float RADIUS;
 
@@ -237,6 +236,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
 
@@ -331,6 +329,5 @@
     dvo_catalog_free (&catalog);
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
 
   for (n = 0; n < Nfields; n++) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/mmextract.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/mmextract.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/mmextract.c	(revision 39419)
@@ -6,10 +6,9 @@
   off_t i, j, k, m;
   int n, N, Npts, NPTS, last, next, state;
-  int Nfields, Nreturn, Nreturn_base, Ncstack1, Ncstack2, Nstack1, Nstack2;
+  int Nfields, Nreturn, Nreturn_base, Nstack1, Nstack2;
   int Nwhere, Iwhere, Nmatch, Imatch, NTABLE, Nt1, Nt2, n1, n2;
   int Nsecfilt, VERBOSE, loadImages;
   char **cstack1, **cstack2, name1[1024], name2[1024];
   dbValue *values, **table1, **table2;
-  void *Signal;
 
   Catalog catalog;
@@ -102,4 +101,5 @@
 
   // parse the 'where' and 'matched to' segments of the line as boolean math expressions
+  unsigned int Ncstack1, Ncstack2;
   cstack1 = isolate_elements (Nwhere, &argv[Iwhere], &Ncstack1);
   cstack2 = isolate_elements (Nmatch, &argv[Imatch], &Ncstack2);
@@ -178,6 +178,6 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
+
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
     /* lock, load, unlock catalog */
@@ -286,6 +286,5 @@
     // dbStackFreeReset ();
   }
-  signal (SIGINT, Signal);
-  interrupt = FALSE;
+  ClearInterrupt (old_sigaction);
 
   // free excess memory
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/objectcoverage.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/objectcoverage.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/objectcoverage.c	(revision 39419)
@@ -174,9 +174,9 @@
   Nsecfilt = GetPhotcodeNsecfilt();
   // grab data from all selected sky regions
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
 
   /* load region corresponding to selection above */
   if ((skylist = SelectRegions (selection)) == NULL) goto escape;
+
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /* loop over regions, extract data for each region */
@@ -224,4 +224,5 @@
     }
   }
+  ClearInterrupt (old_sigaction);
   return (TRUE);
 
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/paverage.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/paverage.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/paverage.c	(revision 39419)
@@ -99,6 +99,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   Nloaded = 0;
@@ -154,4 +153,5 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
   if (Npts > 0) {
     KapaPrepPlot (kapa, Npts, &graphmode);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/pmeasure.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/pmeasure.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/pmeasure.c	(revision 39419)
@@ -172,6 +172,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   Nloaded = 0;
@@ -240,4 +239,6 @@
     dvo_catalog_free (&catalog);
   }
+  ClearInterrupt (old_sigaction);
+
   if (Npts > 0) {
     KapaPrepPlot (kapa, Npts, &graphmode);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/procks.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/procks.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/procks.c	(revision 39419)
@@ -74,5 +74,5 @@
     NROCKS = 100;
     ALLOCATE (rocks, Rocks, NROCKS);
-    for (i = 0; fscanf (f, "%lf %lf %d%lf%lf%lf %d%lf%lf%lf %d%lf%lf%lf", 
+    for (i = 0; fscanf (f, "%lf %lf %u%lf%lf%lf %u%lf%lf%lf %u%lf%lf%lf", 
 			&rocks[i].X[0], &rocks[i].Y[0], 
 			&rocks[i].t[0], &rocks[i].ra[0], &rocks[i].dec[0], &rocks[i].mag[0], 
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/showtile.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/showtile.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/showtile.c	(revision 39419)
@@ -4,4 +4,5 @@
 
 int showtile (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int kapa, Nd, N, NPTS, status, i, InPic;
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/skycat.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/skycat.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/skycat.c	(revision 39419)
@@ -71,6 +71,5 @@
 
   // prepare to handle interrupt signals
-  signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   for (i = 0; (i < Nregions) && !interrupt; i++) {
@@ -113,4 +112,5 @@
     }
   }
+  ClearInterrupt (old_sigaction);
 
   gprint (GP_ERR, "plotting %d catalogs\n", Npts/8);
Index: /branches/eam_branches/ohana.20160226/src/opihi/dvo/version.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/dvo/version.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/dvo/version.c	(revision 39419)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: /branches/eam_branches/ohana.20160226/src/opihi/include/dvoshell.h
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/include/dvoshell.h	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/include/dvoshell.h	(revision 39419)
@@ -81,7 +81,5 @@
 void          compare               PROTO((Catalog *catlog1, Catalog *catlog2, Vector *rvec,  Vector *dvec,  Vector *mvec, Vector *drvec, Vector *ddvec, Vector *dmvec, double radius));
 void          cprecess              PROTO((Average *average, off_t Naverage, double in_epoch, double out_epoch));
-void          image_subset          PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, unsigned long int tzero, double trange, int TimeSelect));
 off_t         match_image           PROTO((Image *image, off_t Nimage, unsigned int T, short int S));
-off_t         match_image_subset    PROTO((Image *image, off_t *subset, off_t Nsubset, unsigned int T, short int S));
 void          print_value           PROTO((double value, short int ival));
 CMPstars     *cmpReadFits           PROTO((FILE *f, off_t *nstars));
Index: /branches/eam_branches/ohana.20160226/src/opihi/include/shell.h
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/include/shell.h	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/include/shell.h	(revision 39419)
@@ -132,4 +132,6 @@
 #endif
 
+struct sigaction *SetInterrupt          PROTO((void));
+int           ClearInterrupt            PROTO((struct sigaction *old_sigaction));
 void          handle_interrupt      	PROTO((int));
 char        **command_completer     	PROTO((const char *, int, int));
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.data/hermitian.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.data/hermitian.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.data/hermitian.c	(revision 39419)
@@ -3,118 +3,120 @@
 double hermitian_polynomial (double x, int order) {
   double value;
-    switch (order) {
-      case 0:
-	value = hermitian_00(x);
-	break;
-      case 1:
-	value = hermitian_01(x);
-	break;
-      case 2:
-	value = hermitian_02(x);
-	break;
-      case 3:
-	value = hermitian_03(x);
-	break;
-      case 4:
-	value = hermitian_04(x);
-	break;
-      case 5:
-	value = hermitian_05(x);
-	break;
-      case 6:
-	value = hermitian_06(x);
-	break;
-      case 7:
-	value = hermitian_07(x);
-	break;
-      case 8:
-	value = hermitian_08(x);
-	break;
-      case 9:
-	value = hermitian_09(x);
-	break;
-      case 10:
-	value = hermitian_10(x);
-	break;
-      default:
-	value = NAN;
-	break;
-    }
-    return value;
+  switch (order) {
+    case 0:
+      value = hermitian_00(x);
+      break;
+    case 1:
+      value = hermitian_01(x);
+      break;
+    case 2:
+      value = hermitian_02(x);
+      break;
+    case 3:
+      value = hermitian_03(x);
+      break;
+    case 4:
+      value = hermitian_04(x);
+      break;
+    case 5:
+      value = hermitian_05(x);
+      break;
+    case 6:
+      value = hermitian_06(x);
+      break;
+    case 7:
+      value = hermitian_07(x);
+      break;
+    case 8:
+      value = hermitian_08(x);
+      break;
+    case 9:
+      value = hermitian_09(x);
+      break;
+    case 10:
+      value = hermitian_10(x);
+      break;
+    default:
+      value = NAN;
+      break;
+  }
+  return value;
 }
 
 double hermitian_00(double x) {
-    double value;
-    // H_0(x) = 1
-    value = 1;
-    return value;
+  OHANA_UNUSED_PARAM(x);
+
+  double value;
+  // H_0(x) = 1
+  value = 1;
+  return value;
 }
 double hermitian_01(double x) {
-    double value;
-    // H_1(x) = x
-    value = x;
-    return value;
+  double value;
+  // H_1(x) = x
+  value = x;
+  return value;
 }
 double hermitian_02(double x) {
-    double value, x2;
-    // H_2(x) = x^2-1
-    x2 = x*x;
-    value = x2 - 1.0;
-    return value;
+  double value, x2;
+  // H_2(x) = x^2-1
+  x2 = x*x;
+  value = x2 - 1.0;
+  return value;
 }
 double hermitian_03(double x) {
-    double value, x2;
-    // H_3(x) = x^3-3x
-    x2 = x*x;
-    value = x*(x2 - 3.0);
-    return value;
+  double value, x2;
+  // H_3(x) = x^3-3x
+  x2 = x*x;
+  value = x*(x2 - 3.0);
+  return value;
 }
 double hermitian_04(double x) {
-    double value, x2;
-    // H_4(x) = x^4-6x^2+3
-    x2 = x*x;
-    value = (x2 - 6.0)*x2 + 3.0;
-    return value;
+  double value, x2;
+  // H_4(x) = x^4-6x^2+3
+  x2 = x*x;
+  value = (x2 - 6.0)*x2 + 3.0;
+  return value;
 }
 double hermitian_05(double x) {
-    double value, x2;
-    // H_5(x) = x^5-10x^3+15x
-    x2 = x*x;
-    value = ((x2 - 10.0)*x2 + 15.0)*x;
-    return value;
+  double value, x2;
+  // H_5(x) = x^5-10x^3+15x
+  x2 = x*x;
+  value = ((x2 - 10.0)*x2 + 15.0)*x;
+  return value;
 }
 double hermitian_06(double x) {
-    double value, x2;
-    // H_6(x) = x^6-15x^4+45x^2-15
-    x2 = x*x;
-    value = (((x2 - 15.0)*x2 + 45.0)*x2) - 15.0;
-    return value;
+  double value, x2;
+  // H_6(x) = x^6-15x^4+45x^2-15
+  x2 = x*x;
+  value = (((x2 - 15.0)*x2 + 45.0)*x2) - 15.0;
+  return value;
 }
 double hermitian_07(double x) {
-    double value, x2;
-    // H_7(x) = x^7-21x^5+105x^3-105x
-    x2 = x*x;
-    value = (((x2 - 21.0)*x2+105.0)*x2 - 105.0)*x;
-    return value;
+  double value, x2;
+  // H_7(x) = x^7-21x^5+105x^3-105x
+  x2 = x*x;
+  value = (((x2 - 21.0)*x2+105.0)*x2 - 105.0)*x;
+  return value;
 }
 double hermitian_08(double x) {
-    double value, x2;
-    // H_8(x) = x^8-28x^6+210x^4-420x^2+105
-    x2 = x*x;
-    value = ((((x2 - 28.0)*x2 + 210.0)*x2 - 420.0)*x2 + 105.0);
-    return value;
+  double value, x2;
+  // H_8(x) = x^8-28x^6+210x^4-420x^2+105
+  x2 = x*x;
+  value = ((((x2 - 28.0)*x2 + 210.0)*x2 - 420.0)*x2 + 105.0);
+  return value;
 }
 double hermitian_09(double x) {
-    double value, x2;
-    // H_9(x) = x^9-36x^7+378x^5-1260x^3+945x
-    x2 = x*x;
-    value = ((((x2 - 36.0)*x2 + 378.0)*x2 - 1260.0)*x2 + 945.0)*x;
-    return value;
+  double value, x2;
+  // H_9(x) = x^9-36x^7+378x^5-1260x^3+945x
+  x2 = x*x;
+  value = ((((x2 - 36.0)*x2 + 378.0)*x2 - 1260.0)*x2 + 945.0)*x;
+  return value;
 }
 double hermitian_10(double x) {
-    double value, x2;
-    // H_{10}(x) = x^{10}-45x^8+630x^6-3150x^4+4725x^2-945 
-    x2 = x*x;
-    value = (((((x2 - 45.0)*x2 + 630.0)*x2 - 3150.0)*x2 + 4725.0)*x2 - 945.0);
-    return value;
+  double value, x2;
+  // H_{10}(x) = x^{10}-45x^8+630x^6-3150x^4+4725x^2-945 
+  x2 = x*x;
+  value = (((((x2 - 45.0)*x2 + 630.0)*x2 - 3150.0)*x2 + 4725.0)*x2 - 945.0);
+  return value;
 }
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/CommandOps.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/CommandOps.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/CommandOps.c	(revision 39419)
@@ -151,4 +151,5 @@
 /* tell readline to use out command_generator rather than basic completion */
 char **command_completer (const char *text, int start, int end) {
+  OHANA_UNUSED_PARAM(end);
   
   char **matches;
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/VectorIO.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/VectorIO.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/VectorIO.c	(revision 39419)
@@ -81,4 +81,7 @@
   }
   fprintf (stderr, "\n");
+# else
+  OHANA_UNUSED_PARAM(table);
+  OHANA_UNUSED_PARAM(message);
 # endif
   return TRUE;
@@ -99,4 +102,7 @@
   }
   fprintf (stderr, "\n");
+# else
+  OHANA_UNUSED_PARAM(table);
+  OHANA_UNUSED_PARAM(message);
 # endif
   return TRUE;
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/dvomath.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/dvomath.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/dvomath.c	(revision 39419)
@@ -16,5 +16,5 @@
 char *dvomath (int argc, char **argv, int *size, int validsize) {
   
-  int  i, Nstack, Ncstack;
+  int  i, Nstack;
   char   **cstack, *outname;
   StackVar *stack;
@@ -27,4 +27,5 @@
 
   /* take char array with expression, convert to important elements */
+  unsigned int Ncstack;
   cstack = isolate_elements (argc, argv, &Ncstack); 
 
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/exec_loop.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/exec_loop.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/exec_loop.c	(revision 39419)
@@ -3,5 +3,4 @@
 int exec_loop (Macro *loop) {
 
-  void *Signal;
   int j, status, ThisList;
   char *line;
@@ -17,6 +16,5 @@
 
   /* set up interrupts */
-  Signal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+  struct sigaction *old_sigaction = SetInterrupt();
 
   /* process the list */
@@ -32,5 +30,5 @@
     if (loop_break || loop_last || loop_next) break;
   }
-  signal (SIGINT, Signal);
+  ClearInterrupt (old_sigaction);
 
   /* free remaining lines on the list, free the list, decrement the shell level */
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/interrupt.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/interrupt.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/interrupt.c	(revision 39419)
@@ -7,9 +7,10 @@
 
 void handle_interrupt (int input) {
+  OHANA_UNUSED_PARAM(input);
   
   char string[64];
   int Nask;
 
-  signal (SIGINT, SIG_IGN);
+  // signal (SIGINT, SIG_IGN);
 
   Nask = 0;
@@ -31,5 +32,5 @@
     if ((string[0] == 'y') || (string[0] == 'Y')) {
       interrupt = FALSE;
-      signal (SIGINT, handle_interrupt);
+      // signal (SIGINT, handle_interrupt);
       Nint = 0;
       return;
@@ -38,5 +39,5 @@
     if ((string[0] == 'n') || (string[0] == 'N')) {
       interrupt = TRUE;
-      signal (SIGINT, handle_interrupt);
+      // signal (SIGINT, handle_interrupt);
       Nint = 0;
       return;
@@ -45,5 +46,5 @@
     if (Nask > 3) {
       interrupt = TRUE;
-      signal (SIGINT, handle_interrupt);
+      // signal (SIGINT, handle_interrupt);
       Nint = 0;
       return;
@@ -52,2 +53,41 @@
 
 }
+
+struct sigaction *SetInterrupt () {
+
+  struct sigaction  new_sigaction;
+  struct sigaction *old_sigaction;
+
+  ALLOCATE (old_sigaction, struct sigaction, 1);
+
+  new_sigaction.sa_handler = handle_interrupt;
+  new_sigaction.sa_flags = 0;
+
+  int sigstat = sigaction (SIGINT, &new_sigaction, old_sigaction);
+  if (sigstat) {
+    perror ("failed to set signal handler: ");
+    free (old_sigaction);
+    return NULL;
+  }
+
+  interrupt = FALSE;
+  return old_sigaction;
+}
+
+int ClearInterrupt (struct sigaction *old_sigaction) {
+
+  // interrupt = FALSE;
+
+  if (!old_sigaction) return TRUE;
+
+  struct sigaction new_sigaction;
+
+  if (sigaction (SIGINT, old_sigaction, &new_sigaction)) {
+    perror ("failed to reset signal handler: ");
+    FREE (old_sigaction);
+    return FALSE;
+  }
+  FREE (old_sigaction);
+
+  return TRUE;
+}
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_edit.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_edit.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_edit.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int macro_edit (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "this function is not implemented yet\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_read.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_read.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_read.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int macro_read (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "this function is not implemented yet\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_write.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_write.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_write.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int macro_write (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   gprint (GP_ERR, "this function is not implemented yet\n");
Index: /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/multicommand.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/multicommand.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/lib.shell/multicommand.c	(revision 39419)
@@ -65,4 +65,5 @@
   done = FALSE;
   status = TRUE;
+  interrupt = FALSE;
   while (!done) {
     q = strchr (p, ';');
Index: /branches/eam_branches/ohana.20160226/src/opihi/mana/mana.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/mana/mana.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/mana/mana.c.in	(revision 39419)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
Index: /branches/eam_branches/ohana.20160226/src/opihi/mana/version.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/mana/version.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/mana/version.c	(revision 39419)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/ListenClients.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/ListenClients.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/ListenClients.c	(revision 39419)
@@ -68,4 +68,5 @@
 /* select for messages from the current clients; wait for 0.5s before updating client list */
 void *ListenClients (void *data) {
+  OHANA_UNUSED_PARAM(data);
   
   int i, Ncurrent, Nmax, status, Nread;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_machines.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_machines.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_machines.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int controller_machines (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int status;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_threads.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_threads.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_threads.c	(revision 39419)
@@ -13,4 +13,5 @@
 
 void *CheckControllerThread (void *data) {
+  OHANA_UNUSED_PARAM(data);
 
   char log_stdout[128], log_stderr[128];
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_version.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_version.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_version.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int controller_version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int status;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/invalid.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/invalid.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/invalid.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int invalid (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
 
   gprint (GP_ERR, "%s is not valid for the pantasks client\n", argv[0]);
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/jobs_and_tasks_thread.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/jobs_and_tasks_thread.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/jobs_and_tasks_thread.c	(revision 39419)
@@ -24,4 +24,5 @@
 
 void *CheckJobsAndTasksThread (void *data) {
+  OHANA_UNUSED_PARAM(data);
 
   char log_stdout[128], log_stderr[128];
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks.c.in	(revision 39419)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   pthread_t JobsAndTasksThread;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_client.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_client.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_client.c.in	(revision 39419)
@@ -9,4 +9,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_server.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_server.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_server.c.in	(revision 39419)
@@ -149,5 +149,8 @@
 /* these are needed to resolve symbols expected by libshell.so */
 void welcome () { }
-void program_init (int *argc, char **argv) {}
+void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
+}
 
 // I need to do things in a different order here to have config / freopen / gprint sequenced correctly
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/run.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/run.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/run.c	(revision 39419)
@@ -9,4 +9,5 @@
 
 int run (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_connect.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_connect.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_connect.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int server_connect (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int server;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_disconnect.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_disconnect.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_disconnect.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int server_disconnect (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int server;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_run.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_run.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_run.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int server_run (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -15,4 +16,5 @@
 
 int server_stop (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -26,4 +28,5 @@
 
 int server_halt (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/stop.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/stop.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/stop.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int stop (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -16,4 +17,5 @@
 
 int halt (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/thread_locks.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/thread_locks.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/thread_locks.c	(revision 39419)
@@ -29,4 +29,5 @@
 
 void ControlLock (const char *func) {
+  OHANA_UNUSED_PARAM(func);
   // fprintf (stderr, "control lock %s\n", func);
   pthread_mutex_lock (&ControlMutex);
@@ -34,4 +35,5 @@
 
 void ControlUnlock (const char *func) {
+  OHANA_UNUSED_PARAM(func);
   // fprintf (stderr, "control unlock %s\n", func);
   pthread_mutex_unlock (&ControlMutex);
Index: /branches/eam_branches/ohana.20160226/src/opihi/pantasks/version.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pantasks/version.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pantasks/version.c	(revision 39419)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pclient/check.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pclient/check.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pclient/check.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int check (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   /* force a check */
Index: /branches/eam_branches/ohana.20160226/src/opihi/pclient/pclient.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pclient/pclient.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pclient/pclient.c.in	(revision 39419)
@@ -8,8 +8,11 @@
 
 void dummy_prep_term (int flag) {
+  OHANA_UNUSED_PARAM(flag);
 }
 
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
   auto_break = TRUE;
@@ -80,4 +83,6 @@
 
 void pipe_signal (int signum) {
+  OHANA_UNUSED_PARAM(signum);
+
   Npipe ++;
   if (Npipe > 100) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/pclient/reset.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pclient/reset.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pclient/reset.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int reset (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   int i, result, waitstatus;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pclient/status.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pclient/status.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pclient/status.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int status (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   char status_string[64];
Index: /branches/eam_branches/ohana.20160226/src/opihi/pclient/stdout.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pclient/stdout.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pclient/stdout.c	(revision 39419)
@@ -2,4 +2,5 @@
 
 int stdout_pclient (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
@@ -16,4 +17,5 @@
 
 int stderr_pclient (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argv);
 
   if (argc != 1) {
Index: /branches/eam_branches/ohana.20160226/src/opihi/pclient/version.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pclient/version.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pclient/version.c	(revision 39419)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/CheckSystem.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/CheckSystem.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/CheckSystem.c	(revision 39419)
@@ -61,4 +61,5 @@
 
 void *CheckSystem_Threaded (void *data) {
+  OHANA_UNUSED_PARAM(data);
 
   int Njobchecks, Nhostchecks, Ndonejobs;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/JobOps.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/JobOps.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/JobOps.c	(revision 39419)
@@ -208,4 +208,5 @@
 
 IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts) {
+  OHANA_UNUSED_PARAM(timeout);
 
   int JobID;
@@ -215,8 +216,9 @@
 
   job[0].JobID    = NextJobID();
-  if (job[0].JobID < 0) {
-    free (job);
-    return -1;
-  }
+  // XXX this test does not make sense
+  // if (job[0].JobID < 0) {
+  //   free (job);
+  //   return -1;
+  // }
 
   job[0].argc     = argc;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/MachineOps.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/MachineOps.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/MachineOps.c	(revision 39419)
@@ -74,4 +74,5 @@
 // delete a new machine (if not new, return TRUE)
 int DelMachine (char *name) {
+  OHANA_UNUSED_PARAM(name);
 
   return TRUE;
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/StackOps.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/StackOps.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/StackOps.c	(revision 39419)
@@ -16,6 +16,6 @@
 
   if (!DEBUG) return;
-  fprintf (stderr, "%s: %p  ", func, stack);
-  fprintf (stderr, "objects: %p  ", stack[0].object);
+  fprintf (stderr, "%s: %p  ", func, (void *) stack);
+  fprintf (stderr, "objects: %p  ", (void *) stack[0].object);
   fprintf (stderr, "Nobjects: %d, NOBJECTS: %d\n", stack[0].Nobject, stack[0].NOBJECT);
 }
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/machines.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/machines.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/machines.c	(revision 39419)
@@ -2,4 +2,6 @@
 
 int machines (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   PrintMachines ();
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/pcontrol.c.in
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/pcontrol.c.in	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/pcontrol.c.in	(revision 39419)
@@ -11,4 +11,6 @@
 /* program-dependent initialization */
 void program_init (int *argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
   
 # ifdef THREADED  
Index: /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/version.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/version.c	(revision 39418)
+++ /branches/eam_branches/ohana.20160226/src/opihi/pcontrol/version.c	(revision 39419)
@@ -3,4 +3,6 @@
 
 int version (int argc, char **argv) {
+  OHANA_UNUSED_PARAM(argc);
+  OHANA_UNUSED_PARAM(argv);
 
   char *tmp;
