diff src/utils.cc @ 186:7a647cf4850c

[project @ 1993-10-25 23:15:50 by jwe]
author jwe
date Mon, 25 Oct 1993 23:15:50 +0000
parents 8a750c9ad116
children de0e58f9b064
line wrap: on
line diff
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -410,6 +410,16 @@
   return ol;
 }
 
+static char *
+octave_info_dir (void)
+{
+  static char *oi = (char *) NULL;
+  delete [] oi;
+  char *oh = octave_home ();
+  oi = strconcat (oh, "/info/");
+  return oi;
+}
+
 char *
 default_path (void)
 {
@@ -427,6 +437,22 @@
 }
 
 char *
+default_info_file (void)
+{
+  static char *info_file_string = (char *) NULL;
+  delete [] info_file_string;
+  char *oct_info_file = getenv ("OCTAVE_INFO_FILE");
+  if (oct_info_file != (char *) NULL)
+    info_file_string = strsave (oct_info_file);
+  else
+    {
+      char *infodir = octave_info_dir ();
+      info_file_string = strconcat (infodir, "octave.info");
+    }
+  return info_file_string;
+}
+
+char *
 get_site_defaults (void)
 {
   static char *sd = (char *) NULL;