Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sylvain Joubert
KWSys
Commits
2bcb688a
Commit
2bcb688a
authored
21 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Added GetEnv method.
parent
b0ef7631
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SystemTools.cxx
+18
-0
18 additions, 0 deletions
SystemTools.cxx
SystemTools.hxx.in
+4
-0
4 additions, 0 deletions
SystemTools.hxx.in
with
22 additions
and
0 deletions
SystemTools.cxx
+
18
−
0
View file @
2bcb688a
...
...
@@ -190,6 +190,24 @@ void SystemTools::GetPath(kwsys_std::vector<kwsys_std::string>& path)
}
}
const
char
*
SystemTools
::
GetEnv
(
const
char
*
key
)
{
return
getenv
(
key
);
}
bool
SystemTools
::
GetEnv
(
const
char
*
key
,
kwsys_std
::
string
&
result
)
{
const
char
*
v
=
getenv
(
key
);
if
(
v
)
{
result
=
v
;
return
true
;
}
else
{
return
false
;
}
}
const
char
*
SystemTools
::
GetExecutableExtension
()
{
...
...
This diff is collapsed.
Click to expand it.
SystemTools.hxx.in
+
4
−
0
View file @
2bcb688a
...
...
@@ -124,6 +124,10 @@ public:
*/
static void GetPath(kwsys_std::vector<kwsys_std::string>& path);
/** Read an environment variable. */
static const char* GetEnv(const char* key);
static bool GetEnv(const char* key, std::string& result);
/**
* Get the file extension (including ".") needed for an executable
* on the current platform ("" for unix, ".exe" for Windows).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment