Commit b83974e6 authored by claes's avatar claes

cdh_Low and cdh_OpSysToStr functions

parent f3408b4d
......@@ -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;
}
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment