Mercurial > hg > octave-lojdl
changeset 1153:ce76086a3954
[project @ 1995-02-27 03:58:47 by jwe]
author | jwe |
---|---|
date | Mon, 27 Feb 1995 03:58:47 +0000 |
parents | 8cb9792efbf4 |
children | cdfbe8141ef6 |
files | src/octave.cc |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -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");