mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +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
|
install_target = /usr/dt/man
|
||||||
type = sym_link
|
type = sym_link
|
||||||
}
|
}
|
||||||
|
{ freebsd
|
||||||
|
install_target = /usr/dt/man
|
||||||
|
type = sym_link
|
||||||
|
}
|
||||||
|
{ linux
|
||||||
|
install_target = /usr/dt/man
|
||||||
|
type = sym_link
|
||||||
|
}
|
||||||
#
|
#
|
||||||
./share/catman
|
./share/catman
|
||||||
{ uxp
|
{ uxp
|
||||||
|
|
|
@ -42,12 +42,6 @@ ManSearchPath::ManSearchPath
|
||||||
const char * sep
|
const char * sep
|
||||||
) : SearchPath(user, envvar, 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())
|
if (user->DTMANPATH())
|
||||||
search_path = user->FactoryManPath() + "," + *user->DTMANPATH();
|
search_path = user->FactoryManPath() + "," + *user->DTMANPATH();
|
||||||
else
|
else
|
||||||
|
@ -61,9 +55,6 @@ ManSearchPath::ManSearchPath
|
||||||
|
|
||||||
NormalizePath();
|
NormalizePath();
|
||||||
TraversePath();
|
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()
|
* ExportPath()
|
||||||
|
@ -106,9 +113,11 @@ void ManSearchPath::MakePath
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
void ManSearchPath::ExportPath()
|
void ManSearchPath::ExportPath()
|
||||||
{
|
{
|
||||||
|
if (!useSystemPath()) {
|
||||||
CString env(GetEnvVar());
|
CString env(GetEnvVar());
|
||||||
user->OS()->shell()->putToEnv(env,
|
user->OS()->shell()->putToEnv(env,
|
||||||
final_search_path.data());
|
final_search_path.data());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,7 +125,7 @@ void ManSearchPath::Print()
|
||||||
{
|
{
|
||||||
printf("%s:\n", GetEnvVar());
|
printf("%s:\n", GetEnvVar());
|
||||||
CString sp(GetSearchPath());
|
CString sp(GetSearchPath());
|
||||||
if (!sp.isNull()) {
|
if (!useSystemPath() && !sp.isNull()) {
|
||||||
CTokenizedString path (sp,Separator().data());
|
CTokenizedString path (sp,Separator().data());
|
||||||
CString subpath = path.next();
|
CString subpath = path.next();
|
||||||
while (!subpath.isNull()) {
|
while (!subpath.isNull()) {
|
||||||
|
|
|
@ -329,6 +329,19 @@ int SearchPath::validSearchPath
|
||||||
return 0;
|
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()
|
* ExportPath()
|
||||||
*
|
*
|
||||||
|
@ -340,7 +353,9 @@ void SearchPath::ExportPath()
|
||||||
CString env(environment_var);
|
CString env(environment_var);
|
||||||
env += "SEARCHPATH";
|
env += "SEARCHPATH";
|
||||||
|
|
||||||
|
if (!useSystemPath()) {
|
||||||
user->OS()->shell()->putToEnv(env, final_search_path.data());
|
user->OS()->shell()->putToEnv(env, final_search_path.data());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -354,7 +369,7 @@ void SearchPath::Print()
|
||||||
{
|
{
|
||||||
printf("%sSEARCHPATH:\n", GetEnvVar());
|
printf("%sSEARCHPATH:\n", GetEnvVar());
|
||||||
CString sp(GetSearchPath());
|
CString sp(GetSearchPath());
|
||||||
if (!sp.isNull()) {
|
if (!useSystemPath() && !sp.isNull()) {
|
||||||
CTokenizedString path (sp,Separator().data());
|
CTokenizedString path (sp,Separator().data());
|
||||||
CString subpath = path.next();
|
CString subpath = path.next();
|
||||||
while (!subpath.isNull()) {
|
while (!subpath.isNull()) {
|
||||||
|
|
|
@ -78,6 +78,7 @@ class SearchPath {
|
||||||
CString Separator() const { return separator; }
|
CString Separator() const { return separator; }
|
||||||
|
|
||||||
virtual int validSearchPath (const CString &) const;
|
virtual int validSearchPath (const CString &) const;
|
||||||
|
virtual int useSystemPath();
|
||||||
|
|
||||||
void setSeparator (const char * sep) { separator = sep; }
|
void setSeparator (const char * sep) { separator = sep; }
|
||||||
|
|
||||||
|
@ -193,6 +194,9 @@ class ManSearchPath : public SearchPath {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MakePath (const CString &);
|
virtual void MakePath (const CString &);
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
virtual int useSystemPath();
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
|
@ -83,7 +83,7 @@ UnixEnvironment::UnixEnvironment()
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man";
|
manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man";
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
manpath = temp;
|
manpath = "/usr/share/man:/usr/local/man";
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
manpath = temp;
|
manpath = temp;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue