Index: trunk/Ohana/src/opihi/dvo/dvo.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dvo.c	(revision 2598)
+++ trunk/Ohana/src/opihi/dvo/dvo.c	(revision 4689)
@@ -1,3 +1,3 @@
-# include "opihi.h"
+# include "dvo1.h"
 
 # define opihi_name "DVO"
@@ -7,19 +7,7 @@
 # define opihi_rcfile ".dvorc"
 
-void InitBasic ();
-void InitData ();
-void InitAstro ();
-void InitDVO ();
-
-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;
 
@@ -42,7 +30,7 @@
   InitBasic ();
   InitData ();
+  InitOutfile ();
   InitAstro ();
   InitDVO ();
-  InitOutfile ();
 
   rl_readline_name = opihi_name;
@@ -52,19 +40,18 @@
   set_str_variable ("PROMPT", opihi_prompt);
   set_str_variable ("RCFILE", opihi_rcfile);
+# ifdef 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);
@@ -72,7 +59,12 @@
 }
 
+/* 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 ();
