Index: trunk/Ohana/src/opihi/pantasks/scheduler.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/scheduler.c	(revision 4686)
+++ trunk/Ohana/src/opihi/pantasks/scheduler.c	(revision 4689)
@@ -7,18 +7,7 @@
 # define opihi_rcfile ".schedrc"
 
-void InitBasic ();
-void InitData ();
-void InitSched ();
-
-void welcome () {
-  fprintf (stderr, "\n");
-  fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description);
-}
-
 /* program-dependent initialization */
 void initialize (int argc, char **argv) {
   
-  FILE *f;
-
   auto_break = TRUE;
 
@@ -55,24 +44,18 @@
   set_str_variable ("PROMPT", opihi_prompt);
   set_str_variable ("RCFILE", opihi_rcfile);
-# define xstr(s) str(s)
-# define str(s) #s
 # ifdef HELPDIR_DEFAULT
-  set_str_variable ("HELPDIR", xstr(HELPDIR_DEFAULT));
+  set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
 # endif
 
-  /* here we open the history file for append.  it this fails, we
-     won't be able to write to it, warn the user.  otherwise, this
-     creates the file readline will write to, if it did not exist */  
-
-  /* check history file */
-  /* rewrite with fstat or stat */
-  f = fopen (opihi_history, "a");
-  if (f == NULL) /* no current history file here */
-    fprintf (stderr, "can't save history.\n");
-  else
-    fclose (f);
-  
-  stifle_history (200);
-  read_history (opihi_history);
+  { /* check history file permission */
+    FILE *f;
+    f = fopen (opihi_history, "a");
+    if (f == NULL) /* no current history file here */
+      fprintf (stderr, "can't save history.\n");
+    else
+      fclose (f);
+    stifle_history (200);
+    read_history (opihi_history);
+  }
 
   signal (SIGINT, SIG_IGN);
@@ -80,9 +63,15 @@
 }
 
+/* standard welcome message */
+void welcome () {
+  fprintf (stderr, "\n");
+  fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description);
+}
+
 /* add program-dependent exit functions here */
 void cleanup () {
-  /* -libdisplay
   QuitImage ();
-  QuitGraph (); */
+  QuitGraph ();
+  QuitController ();
   return;
 }
