Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
b83974e6
Commit
b83974e6
authored
Dec 03, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cdh_Low and cdh_OpSysToStr functions
parent
f3408b4d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
src/lib/co/src/co_cdh.c
src/lib/co/src/co_cdh.c
+35
-0
src/lib/co/src/co_cdh.h
src/lib/co/src/co_cdh.h
+4
-0
No files found.
src/lib/co/src/co_cdh.c
View file @
b83974e6
...
...
@@ -2256,6 +2256,15 @@ cdh_ToUpper (
return
rs
;
}
char
*
cdh_Low
(
char
*
in
)
{
static
char
str
[
400
];
cdh_ToLower
(
str
,
in
);
return
str
;
}
/* Compare two strings not regarding their casing.
...
...
@@ -2281,3 +2290,29 @@ cdh_NoCaseStrcmp (
return
((
*
s
)
&
~
(
1
<<
5
))
-
((
*
t
)
&
~
(
1
<<
5
));
}
//! Convert operating system to string
/*!
For example pwr_mOpSys_X86_LINUX will be converted to "x86_linux".
A pointer to a static string is returned.
\param opsys Operating system.
\return String
*/
char
*
cdh_OpSysToStr
(
pwr_mOpSys
opsys
)
{
static
char
str
[
32
];
switch
(
opsys
)
{
case
pwr_mOpSys_VAX_ELN
:
strcpy
(
str
,
"vax_eln"
);
break
;
case
pwr_mOpSys_VAX_VMS
:
strcpy
(
str
,
"vax_vms"
);
break
;
case
pwr_mOpSys_AXP_VMS
:
strcpy
(
str
,
"axp_vms"
);
break
;
case
pwr_mOpSys_PPC_LYNX
:
strcpy
(
str
,
"ppc_lynx"
);
break
;
case
pwr_mOpSys_X86_LYNX
:
strcpy
(
str
,
"x86_lynx"
);
break
;
case
pwr_mOpSys_PPC_LINUX
:
strcpy
(
str
,
"ppc_linux"
);
break
;
case
pwr_mOpSys_X86_LINUX
:
strcpy
(
str
,
"x86_linux"
);
break
;
case
pwr_mOpSys_AXP_LINUX
:
strcpy
(
str
,
"axp_linux"
);
break
;
default:
strcpy
(
str
,
""
);
}
return
str
;
}
src/lib/co/src/co_cdh.h
View file @
b83974e6
...
...
@@ -851,6 +851,8 @@ cdh_ToLower (
const
char
*
s
);
char
*
cdh_Low
(
char
*
in
);
char
*
cdh_ToUpper
(
char
*
t
,
...
...
@@ -863,6 +865,8 @@ cdh_NoCaseStrcmp (
const
char
*
t
);
char
*
cdh_OpSysToStr
(
pwr_mOpSys
opsys
);
#ifdef __cplusplus
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment