smaaaaal clean

This commit is contained in:
2020-06-10 14:35:52 +03:00
parent 4bd54274c9
commit 902a40d622
2 changed files with 15 additions and 47 deletions

View File

@@ -63,7 +63,6 @@ void __PISetTimerResolution() {
# include <mach/mach_traps.h>
# include <mach/mach.h>
# include <mach/clock.h>
//# include <crt_externs.h>
extern clock_serv_t __pi_mac_clock;
#endif
#ifdef PIP_ICU
@@ -179,20 +178,12 @@ PIInit::PIInit() {
__syslocname__ = __sysoemname__ = 0;
__utf8name__ = const_cast<char*>("UTF-8");
#ifdef PIP_ICU
//__syslocname__ = new char[256];
//memset(__syslocname__, 0, 256);
UErrorCode e((UErrorCode)0);
u_init(&e);
# ifdef WINDOWS
PRIVATE->delete_locs = true;
CPINFOEX cpinfo;
int l = 0;
/*GetCPInfoEx(CP_ACP, 0, &cpinfo);
for (l = 0; l < MAX_PATH; ++l)
if (cpinfo.CodePageName[l] == '\0' || cpinfo.CodePageName[l] == ' ')
break;
memcpy(__syslocname__, "windows-", 8);
memcpy(&(__syslocname__[8]), cpinfo.CodePageName, l);*/
GetCPInfoEx(CP_OEMCP, 0, &cpinfo);
for (l = 0; l < MAX_PATH; ++l)
if (cpinfo.CodePageName[l] == '\0' || cpinfo.CodePageName[l] == ' ')
@@ -274,28 +265,18 @@ PIInit::PIInit() {
sinfo->OS_name =
#ifdef WINDOWS
PIStringAscii("Windows");
#else
# ifdef QNX
#elif QNX
PIStringAscii("QNX");
# else
# ifdef MAC_OS
#elif MAC_OS
PIStringAscii("MacOS");
# else
# ifdef ANDROID
#elif ANDROID
PIStringAscii("Android");
# else
# ifdef FREE_BSD
#elif FREE_BSD
PIStringAscii("FreeBSD");
# else
# ifdef FREERTOS
#elif FREERTOS
PIStringAscii("FreeRTOS");
# else
#else
uns.sysname;
# endif
# endif
# endif
# endif
# endif
#endif
}