[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Use of ls-R kpathsea database
From: |
John W. Eaton |
Subject: |
Use of ls-R kpathsea database |
Date: |
Sun, 8 Feb 2009 23:10:59 -0500 |
On 8-Feb-2009, Rafael Laboissiere wrote:
| There is a function in octave.cc that seems totally useless (it is called in
| octave_main):
|
| ////////////////////////////////////////////////////////////////////////
| static void
| initialize_pathsearch (void)
| {
| // This may seem odd, but doing it this way means that we don't have
| // to modify the kpathsea library...
|
| std::string odb = octave_env::getenv ("OCTAVE_DB_PATH");
|
| // For backward compatibility.
|
| if (odb.empty ())
| odb = octave_env::getenv ("OCTAVE_DB_DIR");
|
| if (odb.empty ())
| odb = Vdata_dir + file_ops::dir_sep_str + "octave:"
| + Vlibexec_dir + file_ops::dir_sep_str + "octave";
| }
| ////////////////////////////////////////////////////////////////////////
|
| The lines that seem to do something useful have been removed in changeset
| 286a3345aa8e [1]. This means that the kpathsea ls-R database is not
| searched at all. Is this correct?
Yes. I'm not sure it is all that helpful to us now to even use the
kpathsearch library. It's no longer used for searching Octave's load
path for .m or .oct files. I think it is only used to implement the
file_in_path function. So maybe we should just eliminate it in favor
of some simple path searching code.
Anyway, I deleted the initialize_pathsearch function and removed the
commands to create the ls-R files from the scripts/Makefile.in file.
Thanks,
jwe