# include <ohana.h>
# include <signal.h>
# include <errno.h>

FILE *LogFile;
char *Program;

char logfile[256];
char **MainCommand;
char **InitCommand;
char **DoneCommand;

char TestCommand[256];

char DateStr[256];
char TimeStr[256];

char PIDFile[256];

float NightStart;
float NightStop;

int SuspendAction;

int ConfigInit (int *argc, char **argv);
void LoadConfig (int sig);
int dms_to_ddd (double *Value, char *string);
int SetPID (pid_t *Xpid, char *Xuser, char *Xmachine);
int GetDateTime (char *datestr, char *timestr, float *time);
int WaitForMinute ();
int GetStatus ();
int ResetConfig ();
int SendShutdown ();
int StartUp ();
int SetSignals ();
void ToggleSuspend (int sig);
void Shutdown (int sig);
int Expose (char *filename);
int vsystem (char *line);
char *ExpandWords (char *line);
int pcommand (char *line, int timeout);
int WaitForPeriod ();
int DoCommand (char *command, char *name);
int freeargs (char **arglist);

int PERIOD;
int TIMEOUT;
