Index: /trunk/Ohana/src/opihi/include/psched.h
===================================================================
--- /trunk/Ohana/src/opihi/include/psched.h	(revision 4692)
+++ /trunk/Ohana/src/opihi/include/psched.h	(revision 4692)
@@ -0,0 +1,172 @@
+# include "data.h"
+# include "basic.h"
+
+typedef enum {
+  JOB_NONE,
+  JOB_BUSY, 
+  JOB_EXIT, 
+  JOB_HUNG,
+  JOB_CRASH,
+  JOB_PENDING,
+} JobStat;
+
+typedef enum {
+  JOB_LOCAL, 
+  JOB_CONTROLLER, 
+} JobMode;
+
+typedef enum {
+  CONTROLLER_HUNG = -1,
+  CONTROLLER_DOWN = 0,
+  CONTROLLER_GOOD = 1,
+} ControllerStat;
+
+enum {RANGE_ABS, RANGE_DAY, RANGE_WEEK};
+
+/* socket / pipe communication buffer */
+typedef struct {
+  char *buffer;
+  int   Nalloc;
+  int   Nreset;
+  int   Nblock;
+  int   Nbuffer;
+} IOBuffer;
+
+typedef struct {
+  time_t start;
+  time_t stop;
+  char type;
+  char keep;
+} TimeRange;
+
+/* a task is a description of the wrapping of a job */
+typedef struct {
+  Macro  *exec;				/* name is 'exec' */
+  Macro  *crash;			/* name is 'crash' */
+  Macro  *timeout;
+  Macro  *def;
+
+  int     NEXIT;
+  int     Nexit;
+  Macro **exit;				/* name is exit status */
+
+  int     argc;
+  char  **argv;
+  char   *host;
+  int     host_required;
+
+  char   *name;
+
+  int       Nranges;
+  TimeRange *ranges;
+
+  int     Nmax;  // only construct Ntotal jobs for this task
+  int     Njobs;
+
+  float   poll_period;
+  float   exec_period;
+  float   timeout_period;
+
+  struct timeval last;
+} Task;
+
+// time period include/exclude periods: 
+// date ranges (e_time - e_time) 
+// time ranges (e_time - e_time) (use e_time % 86400)
+// time-of-week ranges  (e_time - e_time
+// -trange Mon Fri (inclusive on days -- end defaults to Fri@23:59:59)
+// -trange 08:00 - 17:00
+// -trange 2005/12/24 2005/12/31
+// be careful of HST!
+// type: day, week, date
+// keep: TRUE: perform action within this time period
+// keep: FALSE: do not perform action within this time period
+  
+typedef struct {
+  int JobID;				/* internal ID for job */
+  int pid;				/* external ID for job */
+
+  struct timeval last;
+  struct timeval start;
+  int state;
+  int exit_status;
+
+  int     argc;
+  char  **argv;
+  Task   *task;
+
+  IOBuffer    stdout;			/* stdout storage buffer */
+  IOBuffer    stderr;			/* stderr storage buffer */
+  JobMode     mode;			/* local or controller? */
+
+  int         stdout_size;		/* stdout pipe (local only) */
+  int         stderr_size;		/* stderr pipe (local only) */
+  int         stdout_fd;		/* stdout pipe (local only) */
+  int         stderr_fd;		/* stderr pipe (local only) */
+} Job;
+
+# define CONTROLLER_PROMPT "pcontrol:"
+
+/* scheduler prototypes */
+
+void InitSched ();
+
+char *memstr (char *m1, char *m2, int n);
+
+void InitTasks ();
+Task *NextTask ();
+Task *FindTask (char *name);
+void ListTasks (int verbose);
+int ShowTask (char *name);
+int FreeTask (Task *task);
+Task *CreateTask (char *name);
+int ValidateTask (Task *task);
+int RegisterNewTask ();
+int DeleteNewTask ();
+Task *GetNewTask ();
+void SetTaskTimer (struct timeval *timer);
+double GetTaskTimer (struct timeval start);
+void InitTaskTimers ();
+int TaskHash (char *input);
+
+int NextJobID ();
+int InitJobIDs ();
+int FreeJobID (int ID);
+
+void InitJobs ();
+Job *NextJob ();
+Job *FindJob (int JobID);
+void ListJobs ();
+Job *CreateJob (Task *task);
+int SubmitJob (Job *job);
+int CheckJob (Job *job);
+int DeleteJob (Job *job);
+void FreeJob (Job *job);
+
+int CheckJobs ();
+int CheckTasks ();
+int CheckSystem ();
+int CheckTimeRanges (TimeRange *ranges, int Nranges);
+int GetJobOutput (char *channel, int pid, IOBuffer *buffer, int Nbytes);
+int CheckControllerJob (Job *job);
+int CheckControllerJobStatus (Job *job);
+int SubmitControllerJob (Job *job);
+int StartController ();
+int ControllerCommand (char *command, char *response, IOBuffer *buffer);
+int SubmitLocalJob (Job *job);
+int CheckLocalJob (Job *job);
+int CheckLocalJobStatus (Job *job);
+void InitTaskTimers ();
+CommandF *FindControllerCommand (char *cmd);
+int QuitController ();
+int VerboseMode ();
+int KillLocalJob (Job *job);
+int CheckControllerOutput ();
+int PrintControllerOutput ();
+
+int InitIOBuffer (IOBuffer *buffer, int Nalloc);
+int FlushIOBuffer (IOBuffer *buffer);
+int ReadtoIOBuffer (IOBuffer *buffer, int fd);
+void FreeIOBuffer (IOBuffer *buffer);
+int KillControllerJob (Job *job);
+int CheckControllerStatus ();
Index: unk/Ohana/src/opihi/include/scheduler.h
===================================================================
--- /trunk/Ohana/src/opihi/include/scheduler.h	(revision 4691)
+++ 	(revision )
@@ -1,172 +1,0 @@
-# include "data.h"
-# include "basic.h"
-
-typedef enum {
-  JOB_NONE,
-  JOB_BUSY, 
-  JOB_EXIT, 
-  JOB_HUNG,
-  JOB_CRASH,
-  JOB_PENDING,
-} JobStat;
-
-typedef enum {
-  JOB_LOCAL, 
-  JOB_CONTROLLER, 
-} JobMode;
-
-typedef enum {
-  CONTROLLER_HUNG = -1,
-  CONTROLLER_DOWN = 0,
-  CONTROLLER_GOOD = 1,
-} ControllerStat;
-
-enum {RANGE_ABS, RANGE_DAY, RANGE_WEEK};
-
-/* socket / pipe communication buffer */
-typedef struct {
-  char *buffer;
-  int   Nalloc;
-  int   Nreset;
-  int   Nblock;
-  int   Nbuffer;
-} IOBuffer;
-
-typedef struct {
-  time_t start;
-  time_t stop;
-  char type;
-  char keep;
-} TimeRange;
-
-/* a task is a description of the wrapping of a job */
-typedef struct {
-  Macro  *exec;				/* name is 'exec' */
-  Macro  *crash;			/* name is 'crash' */
-  Macro  *timeout;
-  Macro  *def;
-
-  int     NEXIT;
-  int     Nexit;
-  Macro **exit;				/* name is exit status */
-
-  int     argc;
-  char  **argv;
-  char   *host;
-  int     host_required;
-
-  char   *name;
-
-  int       Nranges;
-  TimeRange *ranges;
-
-  int     Nmax;  // only construct Ntotal jobs for this task
-  int     Njobs;
-
-  float   poll_period;
-  float   exec_period;
-  float   timeout_period;
-
-  struct timeval last;
-} Task;
-
-// time period include/exclude periods: 
-// date ranges (e_time - e_time) 
-// time ranges (e_time - e_time) (use e_time % 86400)
-// time-of-week ranges  (e_time - e_time
-// -trange Mon Fri (inclusive on days -- end defaults to Fri@23:59:59)
-// -trange 08:00 - 17:00
-// -trange 2005/12/24 2005/12/31
-// be careful of HST!
-// type: day, week, date
-// keep: TRUE: perform action within this time period
-// keep: FALSE: do not perform action within this time period
-  
-typedef struct {
-  int JobID;				/* internal ID for job */
-  int pid;				/* external ID for job */
-
-  struct timeval last;
-  struct timeval start;
-  int state;
-  int exit_status;
-
-  int     argc;
-  char  **argv;
-  Task   *task;
-
-  IOBuffer    stdout;			/* stdout storage buffer */
-  IOBuffer    stderr;			/* stderr storage buffer */
-  JobMode     mode;			/* local or controller? */
-
-  int         stdout_size;		/* stdout pipe (local only) */
-  int         stderr_size;		/* stderr pipe (local only) */
-  int         stdout_fd;		/* stdout pipe (local only) */
-  int         stderr_fd;		/* stderr pipe (local only) */
-} Job;
-
-# define CONTROLLER_PROMPT "pcontrol:"
-
-/* scheduler prototypes */
-
-void InitSched ();
-
-char *memstr (char *m1, char *m2, int n);
-
-void InitTasks ();
-Task *NextTask ();
-Task *FindTask (char *name);
-void ListTasks (int verbose);
-int ShowTask (char *name);
-int FreeTask (Task *task);
-Task *CreateTask (char *name);
-int ValidateTask (Task *task);
-int RegisterNewTask ();
-int DeleteNewTask ();
-Task *GetNewTask ();
-void SetTaskTimer (struct timeval *timer);
-double GetTaskTimer (struct timeval start);
-void InitTaskTimers ();
-int TaskHash (char *input);
-
-int NextJobID ();
-int InitJobIDs ();
-int FreeJobID (int ID);
-
-void InitJobs ();
-Job *NextJob ();
-Job *FindJob (int JobID);
-void ListJobs ();
-Job *CreateJob (Task *task);
-int SubmitJob (Job *job);
-int CheckJob (Job *job);
-int DeleteJob (Job *job);
-void FreeJob (Job *job);
-
-int CheckJobs ();
-int CheckTasks ();
-int CheckSystem ();
-int CheckTimeRanges (TimeRange *ranges, int Nranges);
-int GetJobOutput (char *channel, int pid, IOBuffer *buffer, int Nbytes);
-int CheckControllerJob (Job *job);
-int CheckControllerJobStatus (Job *job);
-int SubmitControllerJob (Job *job);
-int StartController ();
-int ControllerCommand (char *command, char *response, IOBuffer *buffer);
-int SubmitLocalJob (Job *job);
-int CheckLocalJob (Job *job);
-int CheckLocalJobStatus (Job *job);
-void InitTaskTimers ();
-CommandF *FindControllerCommand (char *cmd);
-int QuitController ();
-int VerboseMode ();
-int KillLocalJob (Job *job);
-int CheckControllerOutput ();
-int PrintControllerOutput ();
-
-int InitIOBuffer (IOBuffer *buffer, int Nalloc);
-int FlushIOBuffer (IOBuffer *buffer);
-int ReadtoIOBuffer (IOBuffer *buffer, int fd);
-void FreeIOBuffer (IOBuffer *buffer);
-int KillControllerJob (Job *job);
-int CheckControllerStatus ();
