PIStringAsciixes
git-svn-id: svn://db.shs.com.ru/pip@101 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
extern clock_serv_t __pi_mac_clock;
|
||||
#endif
|
||||
#ifdef PIP_ICU
|
||||
# include <unicode/uclean.h>
|
||||
# include <unicode/ucnv.h>
|
||||
#endif
|
||||
/*
|
||||
@@ -66,7 +67,7 @@ void __sighandler__(PISignals::Signal s) {
|
||||
if (s == PISignals::StopTTYInput || s == PISignals::StopTTYOutput)
|
||||
piMSleep(10);
|
||||
if (s == PISignals::UserDefined1)
|
||||
dumpApplicationToFile(PIDir::home().path() + PIDir::separator + "_PIP_DUMP_" + PIString::fromNumber(PIProcess::currentPID()));
|
||||
dumpApplicationToFile(PIDir::home().path() + PIDir::separator + PIStringAscii("_PIP_DUMP_") + PIString::fromNumber(PIProcess::currentPID()));
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +86,8 @@ PIInit::PIInit() {
|
||||
pthread_sigmask(SIG_BLOCK, &ss, 0);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
PIStringList ifpathes;
|
||||
ifpathes << "/bin/ifconfig" << "/sbin/ifconfig" << "/usr/bin/ifconfig" << "/usr/sbin/ifconfig";
|
||||
ifpathes << PIStringAscii("/bin/ifconfig") << PIStringAscii("/sbin/ifconfig")
|
||||
<< PIStringAscii("/usr/bin/ifconfig") << PIStringAscii("/usr/sbin/ifconfig");
|
||||
piForeachC (PIString & i, ifpathes)
|
||||
if (fileExists(i)) {
|
||||
sinfo->ifconfigPath = i;
|
||||
@@ -132,6 +134,8 @@ PIInit::PIInit() {
|
||||
__syslocname__ = __sysoemname__ = 0;
|
||||
//__syslocname__ = new char[256];
|
||||
//memset(__syslocname__, 0, 256);
|
||||
UErrorCode e((UErrorCode)0);
|
||||
u_init(&e);
|
||||
# ifdef WINDOWS
|
||||
CPINFOEX cpinfo;
|
||||
int l = 0;
|
||||
@@ -172,12 +176,12 @@ PIInit::PIInit() {
|
||||
GetSystemInfo(&sysinfo);
|
||||
sinfo->processorsCount = sysinfo.dwNumberOfProcessors;
|
||||
switch (sysinfo.wProcessorArchitecture) {
|
||||
case PROCESSOR_ARCHITECTURE_AMD64: sinfo->architecture = "x64"; break;
|
||||
case PROCESSOR_ARCHITECTURE_ARM: sinfo->architecture = "ARM"; break;
|
||||
case PROCESSOR_ARCHITECTURE_IA64: sinfo->architecture = "Intel Itanium-based"; break;
|
||||
case PROCESSOR_ARCHITECTURE_INTEL: sinfo->architecture = "x86"; break;
|
||||
case PROCESSOR_ARCHITECTURE_AMD64: sinfo->architecture = PIStringAscii("x64"); break;
|
||||
case PROCESSOR_ARCHITECTURE_ARM: sinfo->architecture = PIStringAscii("ARM"); break;
|
||||
case PROCESSOR_ARCHITECTURE_IA64: sinfo->architecture = PIStringAscii("Intel Itanium-based"); break;
|
||||
case PROCESSOR_ARCHITECTURE_INTEL: sinfo->architecture = PIStringAscii("x86"); break;
|
||||
case PROCESSOR_ARCHITECTURE_UNKNOWN:
|
||||
default: sinfo->architecture = "unknown"; break;
|
||||
default: sinfo->architecture = PIStringAscii("unknown"); break;
|
||||
}
|
||||
int argc_(0);
|
||||
wchar_t ** argv_ = CommandLineToArgvW(GetCommandLineW(), &argc_);
|
||||
@@ -207,16 +211,16 @@ PIInit::PIInit() {
|
||||
#endif
|
||||
sinfo->OS_name =
|
||||
#ifdef WINDOWS
|
||||
"Windows";
|
||||
PIStringAscii("Windows");
|
||||
#else
|
||||
# ifdef QNX
|
||||
"QNX";
|
||||
PIStringAscii("QNX");
|
||||
# else
|
||||
# ifdef MAC_OS
|
||||
"MacOS";
|
||||
PIStringAscii("MacOS");
|
||||
# else
|
||||
# ifdef ANDROID
|
||||
"Android";
|
||||
PIStringAscii("Android");
|
||||
# else
|
||||
uns.sysname;
|
||||
# endif
|
||||
@@ -239,6 +243,7 @@ PIInit::~PIInit() {
|
||||
#ifdef PIP_ICU
|
||||
if (__syslocname__) delete __syslocname__;
|
||||
if (__sysoemname__) delete __sysoemname__;
|
||||
u_cleanup();
|
||||
#endif
|
||||
//if (currentLocale_t != 0) freelocale(currentLocale_t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user