Index: /trunk/Ohana/src/opihi/dvo/dvo.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dvo.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/dvo/dvo.c	(revision 7960)
@@ -17,4 +17,6 @@
   InitAstro ();
   InitDVO ();
+
+  gprintInit ();
 
   if (!SetCATDIR (NULL, FALSE)) {
@@ -48,2 +50,9 @@
   return;
 }
+
+/* call to opihi shell */
+int main (int argc, char **argv) {
+  int status;
+  status = opihi (argc, argv);
+  exit (status);
+}
Index: /trunk/Ohana/src/opihi/dvo/fitcolors.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 7960)
@@ -268,5 +268,5 @@
       /* perform robust fit on dmag vs color */
       cmd = strcreate ("fit tmp_x tmp_y 1 -clip 3 3 -quiet");
-      status = command (cmd, &outcmd);
+      status = command (cmd, &outcmd, TRUE);
       if (outcmd != NULL) free (outcmd);
       
Index: /trunk/Ohana/src/opihi/dvo/fitsed.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/fitsed.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/dvo/fitsed.c	(revision 7960)
@@ -85,11 +85,4 @@
     remove_argument (N, &argc, argv);
     PLOT = TRUE;
-  }
-
-  SAVEDIR = NULL;
-  if ((N = get_argument (argc, argv, "-save"))) {
-    remove_argument (N, &argc, argv);
-    SAVEDIR = strcreate (argv[N]);
-    remove_argument (N, &argc, argv);
   }
 
Index: /trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/gstar.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/dvo/gstar.c	(revision 7960)
@@ -1,5 +1,4 @@
 # include "dvoshell.h"
 
-void print_value (double value, short int ival);
 void initPhotcodeSequence (int Nsec);
 void freePhotcodeSequence ();
Index: /trunk/Ohana/src/opihi/include/dvoshell.h
===================================================================
--- /trunk/Ohana/src/opihi/include/dvoshell.h	(revision 7959)
+++ /trunk/Ohana/src/opihi/include/dvoshell.h	(revision 7960)
@@ -88,5 +88,5 @@
 int           match_image           PROTO((Image *image, int Nimage, unsigned int T, short int S));
 int           match_image_subset    PROTO((Image *image, int *subset, int Nsubset, unsigned int T, short int S));
-void          print_value           PROTO((FILE *f, double value, short int ival));
+void          print_value           PROTO((double value, short int ival));
 void          sort_image_subset     PROTO((Image *image, int *subset, int N));
 void          sort_images           PROTO((Image *image, int N));
Index: /trunk/Ohana/src/opihi/include/pantasks.h
===================================================================
--- /trunk/Ohana/src/opihi/include/pantasks.h	(revision 7959)
+++ /trunk/Ohana/src/opihi/include/pantasks.h	(revision 7960)
@@ -217,14 +217,17 @@
 void CheckTasksSetState (int state);
 int CheckTasksGetState ();
-void CheckTasksThread ();
+void CheckTasksThread (void *data);
+
 void CheckJobsSetState (int state);
 int CheckJobsGetState ();
-void CheckJobsThread ();
+void CheckJobsThread (void *data);
+
 void CheckControllerSetState (int state);
 int CheckControllerGetState ();
-void CheckControllerThread ();
+void CheckControllerThread (void *data);
+
 void CheckInputsSetState (int state);
 int CheckInputsGetState ();
-void CheckInputsThread ();
+void CheckInputsThread (void *data);
 
 // functions related to the queue of input files
Index: /trunk/Ohana/src/opihi/pantasks/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/Makefile	(revision 7959)
+++ /trunk/Ohana/src/opihi/pantasks/Makefile	(revision 7960)
@@ -48,5 +48,4 @@
 $(SDIR)/kill.$(ARCH).o \
 $(SDIR)/delete.$(ARCH).o \
-$(SDIR)/server.$(ARCH).o \
 $(SDIR)/verbose.$(ARCH).o \
 $(SDIR)/controller.$(ARCH).o \
@@ -79,4 +78,7 @@
 $(SDIR)/InputQueue.$(ARCH).o \
 $(SDIR)/ListenClients.$(ARCH).o \
+$(SDIR)/server.$(ARCH).o \
+$(SDIR)/status_server.$(ARCH).o \
+$(SDIR)/init_server.$(ARCH).o \
 $(SDIR)/CheckPassword.$(ARCH).o
 
Index: /trunk/Ohana/src/opihi/pantasks/init.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/init.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pantasks/init.c	(revision 7960)
@@ -38,17 +38,4 @@
 }; 
 
-/* these are functions which duplicate actions on the 
-   controller.  these could simply pass the command along 
-   to the controller (and should then be in 'controller'),
-   or they could add / modify the jobs in the scheduler
-   job stack 
-
-  {"job",        job,          "add job"},
-  {"kill",       kill_sh,      "kill job"},
-  {"delete",     delete,       "delete job"},
-  {"stdout",     stdout_sh,    "get stdout buffer for job"},
-  {"stderr",     stderr_sh,    "get stderr buffer for job"},
-*/
-
 void InitPantasks () {
   
@@ -62,27 +49,3 @@
     AddCommand (&cmds[i]);
   }
-
 }
-
-int server         PROTO((int, char **));
-
-static Command server_cmds[] = {  
-  {"server",  server,   "server-specific commands"},
-}; 
-
-void InitPantasksServer () {
-  
-  int i;
-
-  InitTasks ();
-  InitJobs ();
-  InitJobIDs ();
-
-  for (i = 0; i < sizeof (cmds) / sizeof (Command); i++) {
-    AddCommand (&cmds[i]);
-  }
-  for (i = 0; i < sizeof (server_cmds) / sizeof (Command); i++) {
-    AddCommand (&server_cmds[i]);
-  }
-
-}
Index: /trunk/Ohana/src/opihi/pantasks/init_server.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/init_server.c	(revision 7960)
+++ /trunk/Ohana/src/opihi/pantasks/init_server.c	(revision 7960)
@@ -0,0 +1,53 @@
+# include "pantasks.h"
+
+int controller      PROTO((int, char **));
+int task	    PROTO((int, char **));
+int task_host	    PROTO((int, char **));
+int task_nmax	    PROTO((int, char **));
+int task_trange	    PROTO((int, char **));
+int task_macros	    PROTO((int, char **));
+int task_command    PROTO((int, char **));
+int task_periods    PROTO((int, char **));
+int run             PROTO((int, char **));
+int stop            PROTO((int, char **));
+int pulse           PROTO((int, char **));
+int status_server   PROTO((int, char **));
+int kill_job        PROTO((int, char **));
+int delete_job      PROTO((int, char **));
+int verbose         PROTO((int, char **));
+int version         PROTO((int, char **));
+int server         PROTO((int, char **));
+
+static Command cmds[] = {  
+  {"controller", controller,   "controller commands"},
+  {"task",       task,         "define a schedulable task"},
+  {"host",       task_host,    "define host machine for a task"},
+  {"nmax",       task_nmax,    "define maximum number of jobs for a task"},
+  {"trange",     task_trange,  "define valid/invalid time periods for a task"},
+  {"task.exit",  task_macros,  "define exit macros for a task"},
+  {"task.exec",  task_macros,  "define pre-exec macro for a task"},
+  {"command",    task_command, "define executed command for a task"},
+  {"periods",    task_periods, "define time scales for a task"},
+  {"run",        run,          "run the scheduler"},
+  {"stop",       stop,         "stop the scheduler"},
+  {"pulse",      pulse,        "set the scheduler update period"},
+  {"server",     server,       "server-specific commands"},
+  {"status",     status_server, "get system status"},
+  {"kill",       kill_job,     "kill job"},
+  {"delete",     delete_job,   "delete job"},
+  {"version",    version,      "show version information"},
+  {"verbose",    verbose,      "set/toggle verbose mode"},
+}; 
+
+void InitPantasksServer () {
+  
+  int i;
+
+  InitTasks ();
+  InitJobs ();
+  InitJobIDs ();
+
+  for (i = 0; i < sizeof (cmds) / sizeof (Command); i++) {
+    AddCommand (&cmds[i]);
+  }
+}
Index: /trunk/Ohana/src/opihi/pantasks/pantasks.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/pantasks.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pantasks/pantasks.c	(revision 7960)
@@ -16,4 +16,6 @@
   InitData ();
   InitPantasks ();
+
+  gprintInit ();
 
   rl_readline_name = opihi_name;
@@ -54,2 +56,9 @@
   return;
 }
+
+/* call to opihi shell */
+int main (int argc, char **argv) {
+  int status;
+  status = opihi (argc, argv);
+  exit (status);
+}
Index: /trunk/Ohana/src/opihi/pantasks/server_threads.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/server_threads.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pantasks/server_threads.c	(revision 7960)
@@ -24,5 +24,5 @@
 }
 
-void CheckTasksThread () {
+void CheckTasksThread (void *data) {
 
   gprintInit ();  // each thread needs to init the printing system
@@ -55,5 +55,5 @@
 }
 
-void CheckJobsThread () {
+void CheckJobsThread (void *data) {
 
   gprintInit ();  // each thread needs to init the printing system
@@ -86,5 +86,5 @@
 }
 
-void CheckControllerThread () {
+void CheckControllerThread (void *data) {
 
   gprintInit ();  // each thread needs to init the printing system
@@ -118,5 +118,5 @@
 }
 
-void CheckInputsThread () {
+void CheckInputsThread (void *data) {
 
   gprintInit ();  // each thread needs to init the printing system
Index: /trunk/Ohana/src/opihi/pantasks/status.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/status.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pantasks/status.c	(revision 7960)
@@ -14,17 +14,6 @@
     gprint (GP_LOG, " Controller is stopped\n");
   }
-  if (CheckTasksGetState()) {
-    gprint (GP_LOG, " Scheduler is running\n");
-  } else {
-    gprint (GP_LOG, " Scheduler is stopped\n");
-  }
-  if (CheckControllerGetState()) {
-    gprint (GP_LOG, " Controller is running\n");
-  } else {
-    gprint (GP_LOG, " Controller is stopped\n");
-  }
   ListTasks (FALSE);
   ListJobs ();
   return (TRUE);
 }
-
Index: /trunk/Ohana/src/opihi/pantasks/status_server.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/status_server.c	(revision 7960)
+++ /trunk/Ohana/src/opihi/pantasks/status_server.c	(revision 7960)
@@ -0,0 +1,19 @@
+# include "pantasks.h"
+
+int status_server (int argc, char **argv) {
+
+  gprint (GP_LOG, "\n");
+  if (CheckTasksGetState()) {
+    gprint (GP_LOG, " Scheduler is running\n");
+  } else {
+    gprint (GP_LOG, " Scheduler is stopped\n");
+  }
+  if (CheckControllerGetState()) {
+    gprint (GP_LOG, " Controller is running\n");
+  } else {
+    gprint (GP_LOG, " Controller is stopped\n");
+  }
+  ListTasks (FALSE);
+  ListJobs ();
+  return (TRUE);
+}
Index: /trunk/Ohana/src/opihi/pantasks/task.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/task.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pantasks/task.c	(revision 7960)
@@ -96,5 +96,5 @@
       case TASK_COMMAND:
       case TASK_PERIODS:
-	status = command (input, &outline);
+	status = command (input, &outline, TRUE);
 	if (outline != NULL) free (outline);
 	/* what to do if command is invalid?
Index: /trunk/Ohana/src/opihi/pclient/pclient.c
===================================================================
--- /trunk/Ohana/src/opihi/pclient/pclient.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pclient/pclient.c	(revision 7960)
@@ -53,2 +53,8 @@
 }
 
+/* call to opihi shell */
+int main (int argc, char **argv) {
+  int status;
+  status = opihi (argc, argv);
+  exit (status);
+}
Index: /trunk/Ohana/src/opihi/pcontrol/pcontrol.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/pcontrol.c	(revision 7959)
+++ /trunk/Ohana/src/opihi/pcontrol/pcontrol.c	(revision 7960)
@@ -52,2 +52,9 @@
   return;
 }
+
+/* call to opihi shell */
+int main (int argc, char **argv) {
+  int status;
+  status = opihi (argc, argv);
+  exit (status);
+}
