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
Rolf Eike Beer
KWSys
Commits
7201863e
Commit
7201863e
authored
19 years ago
by
Andy Cedilnik
Browse files
Options
Downloads
Patches
Plain Diff
COMP: Fix namespace. This way kwsys can be built outside cmake
parent
7f3e56b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Glob.cxx
+17
-17
17 additions, 17 deletions
Glob.cxx
with
17 additions
and
17 deletions
Glob.cxx
+
17
−
17
View file @
7201863e
...
...
@@ -40,12 +40,12 @@ namespace KWSYS_NAMESPACE
{
#if defined( _WIN32 ) || defined( APPLE ) || defined( __CYGWIN__ )
// On Windows and apple, no difference between lower and upper case
#define
CM
_GLOB_CASE_INDEPENDENT
#define
KWSYS
_GLOB_CASE_INDEPENDENT
#endif
#if defined( _WIN32 ) || defined( __CYGWIN__ )
// Handle network paths
#define
CM
_GLOB_SUPPORT_NETWORK_PATHS
#define
KWSYS
_GLOB_SUPPORT_NETWORK_PATHS
#endif
//----------------------------------------------------------------------------
...
...
@@ -53,7 +53,7 @@ class GlobInternals
{
public:
std
::
vector
<
std
::
string
>
Files
;
std
::
vector
<
cm
sys
::
RegularExpression
>
Expressions
;
std
::
vector
<
kw
sys
::
RegularExpression
>
Expressions
;
std
::
vector
<
std
::
string
>
TextExpressions
;
};
...
...
@@ -82,7 +82,7 @@ void Glob::Escape(int ch, char* buffer)
}
else
{
#if defined(
CM
_GLOB_CASE_INDEPENDENT )
#if defined(
KWSYS
_GLOB_CASE_INDEPENDENT )
// On Windows and apple, no difference between lower and upper case
sprintf
(
buffer
,
"%c"
,
tolower
(
ch
));
#else
...
...
@@ -180,7 +180,7 @@ std::string Glob::ConvertExpression(const std::string& expr)
void
Glob
::
RecurseDirectory
(
std
::
string
::
size_type
start
,
const
std
::
string
&
dir
,
bool
dir_only
)
{
cm
sys
::
Directory
d
;
kw
sys
::
Directory
d
;
if
(
!
d
.
Load
(
dir
.
c_str
())
)
{
return
;
...
...
@@ -207,9 +207,9 @@ void Glob::RecurseDirectory(std::string::size_type start,
realname
=
dir
+
"/"
+
fname
;
}
#if defined(
CM
_GLOB_CASE_INDEPENDENT )
#if defined(
KWSYS
_GLOB_CASE_INDEPENDENT )
// On Windows and apple, no difference between lower and upper case
fname
=
cm
sys
::
SystemTools
::
LowerCase
(
fname
);
fname
=
kw
sys
::
SystemTools
::
LowerCase
(
fname
);
#endif
if
(
start
==
0
)
...
...
@@ -221,14 +221,14 @@ void Glob::RecurseDirectory(std::string::size_type start,
fullname
=
dir
+
"/"
+
fname
;
}
if
(
!
dir_only
||
!
cm
sys
::
SystemTools
::
FileIsDirectory
(
realname
.
c_str
())
)
if
(
!
dir_only
||
!
kw
sys
::
SystemTools
::
FileIsDirectory
(
realname
.
c_str
())
)
{
if
(
m_Internals
->
Expressions
[
m_Internals
->
Expressions
.
size
()
-
1
].
find
(
fname
.
c_str
())
)
{
m_Internals
->
Files
.
push_back
(
realname
);
}
}
if
(
cm
sys
::
SystemTools
::
FileIsDirectory
(
realname
.
c_str
())
)
if
(
kw
sys
::
SystemTools
::
FileIsDirectory
(
realname
.
c_str
())
)
{
this
->
RecurseDirectory
(
start
+
1
,
realname
,
dir_only
);
}
...
...
@@ -246,7 +246,7 @@ void Glob::ProcessDirectory(std::string::size_type start,
this
->
RecurseDirectory
(
start
,
dir
,
dir_only
);
return
;
}
cm
sys
::
Directory
d
;
kw
sys
::
Directory
d
;
if
(
!
d
.
Load
(
dir
.
c_str
())
)
{
return
;
...
...
@@ -273,9 +273,9 @@ void Glob::ProcessDirectory(std::string::size_type start,
realname
=
dir
+
"/"
+
fname
;
}
#if defined(
CM
_GLOB_CASE_INDEPENDENT )
#if defined(
KWSYS
_GLOB_CASE_INDEPENDENT )
// On Windows and apple, no difference between lower and upper case
fname
=
cm
sys
::
SystemTools
::
LowerCase
(
fname
);
fname
=
kw
sys
::
SystemTools
::
LowerCase
(
fname
);
#endif
if
(
start
==
0
)
...
...
@@ -291,7 +291,7 @@ void Glob::ProcessDirectory(std::string::size_type start,
//std::cout << "Match: " << m_Internals->TextExpressions[start].c_str() << std::endl;
//std::cout << "Full name: " << fullname << std::endl;
if
(
(
!
dir_only
||
!
last
)
&&
!
cm
sys
::
SystemTools
::
FileIsDirectory
(
realname
.
c_str
())
)
if
(
(
!
dir_only
||
!
last
)
&&
!
kw
sys
::
SystemTools
::
FileIsDirectory
(
realname
.
c_str
())
)
{
continue
;
}
...
...
@@ -320,9 +320,9 @@ bool Glob::FindFiles(const std::string& inexpr)
m_Internals
->
Expressions
.
clear
();
m_Internals
->
Files
.
clear
();
if
(
!
cm
sys
::
SystemTools
::
FileIsFullPath
(
expr
.
c_str
())
)
if
(
!
kw
sys
::
SystemTools
::
FileIsFullPath
(
expr
.
c_str
())
)
{
expr
=
cm
sys
::
SystemTools
::
GetCurrentWorkingDirectory
();
expr
=
kw
sys
::
SystemTools
::
GetCurrentWorkingDirectory
();
expr
+=
"/"
+
inexpr
;
}
std
::
string
fexpr
=
expr
;
...
...
@@ -349,7 +349,7 @@ bool Glob::FindFiles(const std::string& inexpr)
}
if
(
skip
==
0
)
{
#if defined(
CM
_GLOB_SUPPORT_NETWORK_PATHS )
#if defined(
KWSYS
_GLOB_SUPPORT_NETWORK_PATHS )
// Handle network paths
if
(
expr
[
0
]
==
'/'
&&
expr
[
1
]
==
'/'
)
{
...
...
@@ -419,7 +419,7 @@ bool Glob::FindFiles(const std::string& inexpr)
void
Glob
::
AddExpression
(
const
char
*
expr
)
{
m_Internals
->
Expressions
.
push_back
(
cm
sys
::
RegularExpression
(
kw
sys
::
RegularExpression
(
this
->
ConvertExpression
(
expr
).
c_str
()));
m_Internals
->
TextExpressions
.
push_back
(
this
->
ConvertExpression
(
expr
));
}
...
...
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