mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Merge branch 'master' of ssh://localhost:3333/p/cdesktopenv/code
This commit is contained in:
commit
e2432556b8
5 changed files with 51 additions and 15 deletions
|
@ -1288,6 +1288,14 @@ doc/C/man/man4/mwmrc.4
|
|||
install_target = /usr/dt/man
|
||||
type = sym_link
|
||||
}
|
||||
{ freebsd
|
||||
install_target = /usr/dt/man
|
||||
type = sym_link
|
||||
}
|
||||
{ linux
|
||||
install_target = /usr/dt/man
|
||||
type = sym_link
|
||||
}
|
||||
#
|
||||
./share/catman
|
||||
{ uxp
|
||||
|
|
|
@ -42,12 +42,6 @@ ManSearchPath::ManSearchPath
|
|||
const char * sep
|
||||
) : SearchPath(user, envvar, sep)
|
||||
{
|
||||
#if defined(__FreeBSD__)
|
||||
/* Installer on FreeBSD sets up man configuration so that
|
||||
* setting MANPATH is not necessary
|
||||
*/
|
||||
if (!user->OS()->MANPATH().isNull()) {
|
||||
#endif
|
||||
if (user->DTMANPATH())
|
||||
search_path = user->FactoryManPath() + "," + *user->DTMANPATH();
|
||||
else
|
||||
|
@ -61,9 +55,6 @@ ManSearchPath::ManSearchPath
|
|||
|
||||
NormalizePath();
|
||||
TraversePath();
|
||||
#if defined(__FreeBSD__)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,6 +88,22 @@ void ManSearchPath::MakePath
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
/*****************************************************************
|
||||
* useSystemPath()
|
||||
*
|
||||
* Check whether to leave MANPATH unmodified (or unset)
|
||||
*
|
||||
*/
|
||||
int ManSearchPath::useSystemPath()
|
||||
{
|
||||
if (user->OS()->getEnvironmentVariable("MANPATH").isNull()) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************
|
||||
* ExportPath()
|
||||
|
@ -106,9 +113,11 @@ void ManSearchPath::MakePath
|
|||
*****************************************************************/
|
||||
void ManSearchPath::ExportPath()
|
||||
{
|
||||
CString env(GetEnvVar());
|
||||
user->OS()->shell()->putToEnv(env,
|
||||
if (!useSystemPath()) {
|
||||
CString env(GetEnvVar());
|
||||
user->OS()->shell()->putToEnv(env,
|
||||
final_search_path.data());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -116,7 +125,7 @@ void ManSearchPath::Print()
|
|||
{
|
||||
printf("%s:\n", GetEnvVar());
|
||||
CString sp(GetSearchPath());
|
||||
if (!sp.isNull()) {
|
||||
if (!useSystemPath() && !sp.isNull()) {
|
||||
CTokenizedString path (sp,Separator().data());
|
||||
CString subpath = path.next();
|
||||
while (!subpath.isNull()) {
|
||||
|
|
|
@ -329,6 +329,19 @@ int SearchPath::validSearchPath
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* useSystemPath()
|
||||
*
|
||||
* This member function verifies whether system environment variable
|
||||
* should be left unmodified, since some other configuraton mechanism
|
||||
* is in effect.
|
||||
*
|
||||
*/
|
||||
int SearchPath::useSystemPath()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* ExportPath()
|
||||
*
|
||||
|
@ -340,7 +353,9 @@ void SearchPath::ExportPath()
|
|||
CString env(environment_var);
|
||||
env += "SEARCHPATH";
|
||||
|
||||
user->OS()->shell()->putToEnv(env, final_search_path.data());
|
||||
if (!useSystemPath()) {
|
||||
user->OS()->shell()->putToEnv(env, final_search_path.data());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -354,7 +369,7 @@ void SearchPath::Print()
|
|||
{
|
||||
printf("%sSEARCHPATH:\n", GetEnvVar());
|
||||
CString sp(GetSearchPath());
|
||||
if (!sp.isNull()) {
|
||||
if (!useSystemPath() && !sp.isNull()) {
|
||||
CTokenizedString path (sp,Separator().data());
|
||||
CString subpath = path.next();
|
||||
while (!subpath.isNull()) {
|
||||
|
|
|
@ -78,6 +78,7 @@ class SearchPath {
|
|||
CString Separator() const { return separator; }
|
||||
|
||||
virtual int validSearchPath (const CString &) const;
|
||||
virtual int useSystemPath();
|
||||
|
||||
void setSeparator (const char * sep) { separator = sep; }
|
||||
|
||||
|
@ -193,6 +194,9 @@ class ManSearchPath : public SearchPath {
|
|||
|
||||
protected:
|
||||
virtual void MakePath (const CString &);
|
||||
#if defined(__FreeBSD__)
|
||||
virtual int useSystemPath();
|
||||
#endif
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ UnixEnvironment::UnixEnvironment()
|
|||
#elif defined(__OpenBSD__)
|
||||
manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man";
|
||||
#elif defined(__FreeBSD__)
|
||||
manpath = temp;
|
||||
manpath = "/usr/share/man:/usr/local/man";
|
||||
#endif
|
||||
else
|
||||
manpath = temp;
|
||||
|
|
Loading…
Reference in a new issue