# HG changeset patch # User jwe # Date 793857527 0 # Node ID ce76086a39549525214358bd992b52f3bde0e0bf # Parent 8cb9792efbf42b2a2186cc4bccb3da0f9d692aab [project @ 1995-02-27 03:58:47 by jwe] diff -r 8cb9792efbf4 -r ce76086a3954 src/octave.cc --- a/src/octave.cc Mon Feb 27 00:08:00 1995 +0000 +++ b/src/octave.cc Mon Feb 27 03:58:47 1995 +0000 @@ -237,6 +237,28 @@ putenv (putenv_cmd); +// This may seem odd, but doing it this way means that we don't have +// to modify the kpathsea library... + + char *odb = getenv ("OCTAVE_DB_DIR"); + + if (odb) + putenv (strconcat ("TEXMF=", odb)); + else + { + char *oh = getenv ("OCTAVE_HOME"); + + if (oh) + { + len = strlen (oh) + 18; + putenv_cmd = new char [len]; + sprintf (putenv_cmd, "TEXMF=%s/lib/octave", oh); + putenv (putenv_cmd); + } + else + putenv (strsave ("TEXMF=" OCTAVE_DATADIR "/octave")); + } + raw_prog_name = strsave (name); prog_name = strsave ("octave");