Lines Matching +full:dlclose +full:- +full:skip
6 * Copyright (C) 1997-2016, International Business Machines
18 * for assumed case. Non-UNIX platforms must be
19 * special-cased. Rewrote numeric methods dealing
84 #error U_COMMON_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see http…
110 # include <qliept.h> /* EPT_CALL macro - this include must be after all other "QSYSINCs" */
173 /* floating point implementations ------------------------------------------- */
186 /*---------------------------------------------------------------------------
189 are non-POSIX must declare themselves so. The default POSIX implementation
190 will sometimes work for non-POSIX platforms as well (e.g., the NaN-related
192 ---------------------------------------------------------------------------*/
211 return (char*)(d + 1) - n; in u_topNBytesOfDouble()
219 return (char*)(d + 1) - n; in u_bottomNBytesOfDouble()
233 hiByte = *(((uint8_t *)&d) + sizeof(double) - 1); in u_signBit()
246 UDate fakeClock_dt = 0; /** Offset (fake time - real time) **/
263 fakeClock_dt = fakeClock_t0 - real; in getUTCtime_fake()
292 /*---------------------------------------------------------------------------
297 ---------------------------------------------------------------------------*/
317 return (UDate)((winTime.int64 - EPOCH_BIAS) / HECTONANOSECOND_PER_MILLISECOND); in uprv_getRawUTCtime()
333 /*-----------------------------------------------------------------------------
338 If this doesn't work on your platform, you have non-IEEE floating-point, and
341 ---------------------------------------------------------------------------*/
500 /* check for -0 and 0*/ in uprv_fmax()
518 /* check for -0 and 0*/ in uprv_fmin()
552 * trunc(3.3) = 3.0, trunc (-3.3) = -3.0
554 * floor(3.3) = 3, floor(-3.3) = -4
555 * ceil(3.3) = 4, ceil(-3.3) = -3
567 if(u_signBit(d)) /* Signbit() picks up -0.0; d<0 does not. */ in uprv_trunc()
585 return pow(2.0, DBL_MANT_DIG + 1.0) - 1.0; in uprv_maxMantissa()
607 * non-TERASPACE. If it is TERASPACE it is 2GB - 4k(header information). in uprv_maximumPtr()
610 * each pointer type (TERASPACE and non-TERASPACE) in uprv_maximumPtr()
616 /* if it is a TERASPACE pointer the max is 2GB - 4k */ in uprv_maximumPtr()
617 return ((void *)(((char *)base)-((uint32_t)(base))+((uint32_t)0x7fffefff))); in uprv_maximumPtr()
620 return ((void *)(((char *)base)-((uint32_t)(base))+((uint32_t)0xffefff))); in uprv_maximumPtr()
627 /*---------------------------------------------------------------------------
628 Platform-specific Implementations
631 ---------------------------------------------------------------------------*/
633 /* Generic time zone layer -------------------------------------------------- */
664 tdiff = t2 - t1; in uprv_timezone()
716 #define TZFILE_SKIP "posixrules" /* tz file to skip when searching. */
736 or AST4ADT (non-Olson ID) */ in isValidOlsonID()
749 The timezone is sometimes set to "CST-7CDT", "CST6CDT5,J129,J131/19:30", in isValidOlsonID()
759 /* On some Unix-like OS, 'posix' subdirectory in
760 /usr/share/zoneinfo replicates the top-level contents. 'right'
762 are different from those in the top-level directory or 'posix'
769 timezone id ('America/New_York' is). So, we have to skip
785 …int32_t daylightType; /* 0=U_DAYLIGHT_NONE, 1=daylight in June-U_DAYLIGHT_JUNE, 2=daylight in Dece…
803 {-45900, 2, "CHAST", "CHADT", "Pacific/Chatham"},
804 {-43200, 1, "PETT", "PETST", "Asia/Kamchatka"},
805 {-43200, 2, "NZST", "NZDT", "Pacific/Auckland"},
806 {-43200, 1, "ANAT", "ANAST", "Asia/Anadyr"},
807 {-39600, 1, "MAGT", "MAGST", "Asia/Magadan"},
808 {-37800, 2, "LHST", "LHST", "Australia/Lord_Howe"},
809 {-36000, 2, "EST", "EST", "Australia/Sydney"},
810 {-36000, 1, "SAKT", "SAKST", "Asia/Sakhalin"},
811 {-36000, 1, "VLAT", "VLAST", "Asia/Vladivostok"},
812 {-34200, 2, "CST", "CST", "Australia/South"},
813 {-32400, 1, "YAKT", "YAKST", "Asia/Yakutsk"},
814 {-32400, 1, "CHOT", "CHOST", "Asia/Choibalsan"},
815 {-31500, 2, "CWST", "CWST", "Australia/Eucla"},
816 {-28800, 1, "IRKT", "IRKST", "Asia/Irkutsk"},
817 {-28800, 1, "ULAT", "ULAST", "Asia/Ulaanbaatar"},
818 {-28800, 2, "WST", "WST", "Australia/West"},
819 {-25200, 1, "HOVT", "HOVST", "Asia/Hovd"},
820 {-25200, 1, "KRAT", "KRAST", "Asia/Krasnoyarsk"},
821 {-21600, 1, "NOVT", "NOVST", "Asia/Novosibirsk"},
822 {-21600, 1, "OMST", "OMSST", "Asia/Omsk"},
823 {-18000, 1, "YEKT", "YEKST", "Asia/Yekaterinburg"},
824 {-14400, 1, "SAMT", "SAMST", "Europe/Samara"},
825 {-14400, 1, "AMT", "AMST", "Asia/Yerevan"},
826 {-14400, 1, "AZT", "AZST", "Asia/Baku"},
827 {-10800, 1, "AST", "ADT", "Asia/Baghdad"},
828 {-10800, 1, "MSK", "MSD", "Europe/Moscow"},
829 {-10800, 1, "VOLT", "VOLST", "Europe/Volgograd"},
830 {-7200, 0, "EET", "CEST", "Africa/Tripoli"},
831 {-7200, 1, "EET", "EEST", "Europe/Athens"}, /* Conflicts with Africa/Cairo */
832 {-7200, 1, "IST", "IDT", "Asia/Jerusalem"},
833 {-3600, 0, "CET", "WEST", "Africa/Algiers"},
834 {-3600, 2, "WAT", "WAST", "Africa/Windhoek"},
910 if (tzInfo->defaultTZFilePtr == nullptr) { in compareBinaryFiles()
911 tzInfo->defaultTZFilePtr = fopen(defaultTZFileName, "r"); in compareBinaryFiles()
915 tzInfo->defaultTZPosition = 0; /* reset position to begin search */ in compareBinaryFiles()
917 if (file != nullptr && tzInfo->defaultTZFilePtr != nullptr) { in compareBinaryFiles()
919 if (tzInfo->defaultTZFileSize == 0) { in compareBinaryFiles()
920 fseek(tzInfo->defaultTZFilePtr, 0, SEEK_END); in compareBinaryFiles()
921 tzInfo->defaultTZFileSize = ftell(tzInfo->defaultTZFilePtr); in compareBinaryFiles()
927 if (sizeFile != tzInfo->defaultTZFileSize) { in compareBinaryFiles()
933 if (tzInfo->defaultTZBuffer == nullptr) { in compareBinaryFiles()
934 rewind(tzInfo->defaultTZFilePtr); in compareBinaryFiles()
935 … tzInfo->defaultTZBuffer = (char*)uprv_malloc(sizeof(char) * tzInfo->defaultTZFileSize); in compareBinaryFiles()
936 …sizeFileRead = fread(tzInfo->defaultTZBuffer, 1, tzInfo->defaultTZFileSize, tzInfo->defaultTZFileP… in compareBinaryFiles()
944 … if (memcmp(tzInfo->defaultTZBuffer + tzInfo->defaultTZPosition, bufferFile, sizeFileRead) != 0) { in compareBinaryFiles()
948 sizeFileLeft -= sizeFileRead; in compareBinaryFiles()
949 tzInfo->defaultTZPosition += sizeFileRead; in compareBinaryFiles()
972 * This function is not thread safe - it uses a global, gSearchTZFileResult, to hold its results.
981 CharString curpath(path, -1, status); in searchForTZFile()
1001 const char* dirName = dirEntry->d_name; in searchForTZFile()
1006 newpath.append(dirName, -1, status); in searchForTZFile()
1022 and return the first match in the top-level directory in searchForTZFile()
1023 if there's a match in the top-level. If not, this function in searchForTZFile()
1032 int32_t amountToSkip = sizeof(TZZONEINFO) - 1; in searchForTZFile()
1038 gSearchTZFileResult->clear(); in searchForTZFile()
1039 gSearchTZFileResult->append(zoneid, -1, status); in searchForTZFile()
1043 result = gSearchTZFileResult->data(); in searchForTZFile()
1102 dlclose(libc); in uprv_tzname_clear_cache()
1187 ssize_t size = readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1); in uprv_tzname()
1204 tzInfo->defaultTZBuffer = nullptr; in uprv_tzname()
1205 tzInfo->defaultTZFileSize = 0; in uprv_tzname()
1206 tzInfo->defaultTZFilePtr = nullptr; in uprv_tzname()
1207 tzInfo->defaultTZstatus = false; in uprv_tzname()
1208 tzInfo->defaultTZPosition = 0; in uprv_tzname()
1213 if (tzInfo->defaultTZBuffer != nullptr) { in uprv_tzname()
1214 uprv_free(tzInfo->defaultTZBuffer); in uprv_tzname()
1216 if (tzInfo->defaultTZFilePtr != nullptr) { in uprv_tzname()
1217 fclose(tzInfo->defaultTZFilePtr); in uprv_tzname()
1241 U_TZNAME is usually a non-unique abbreviation, which isn't normally usable. in uprv_tzname()
1251 static const time_t juneSolstice=1182478260; /*2007-06-21 18:11 UT*/ in uprv_tzname()
1252 static const time_t decemberSolstice=1198332540; /*2007-12-22 06:09 UT*/ in uprv_tzname()
1276 /* Get and set the ICU data directory --------------------------------------- */
1402 if ((length > 0) && (length < (UPRV_LENGTHOF(windowsPath) - 1))) { in getIcuDataDirectoryUnderWindowsDirectory()
1403 // Convert UTF-16 to a UTF-8 string. in getIcuDataDirectoryUnderWindowsDirectory()
1407 &windowsPathUtf8Len, reinterpret_cast<const char16_t*>(windowsPath), -1, &status); in getIcuDataDirectoryUnderWindowsDirectory()
1410 (windowsPathUtf8Len < (UPRV_LENGTHOF(windowsPathUtf8) - 1))) { in getIcuDataDirectoryUnderWindowsDirectory()
1412 if (windowsPathUtf8[windowsPathUtf8Len - 1] != U_FILE_SEP_CHAR) { in getIcuDataDirectoryUnderWindowsDirectory()
1514 gTimeZoneFilesDirectory->clear(); in setTimeZoneFilesDir()
1515 gTimeZoneFilesDirectory->append(path, status); in setTimeZoneFilesDir()
1517 char *p = gTimeZoneFilesDirectory->data(); in setTimeZoneFilesDir()
1583 return U_SUCCESS(*status) ? gTimeZoneFilesDirectory->data() : ""; in u_getTimeZoneFilesDirectory()
1631 /* Solaris speaks POSIX - See IEEE Std 1003.1-2008
1654 // Note: this test will not catch 'C.UTF-8',
1696 LC_ALL ----> default_loc codepage
1697 --------------------------------------------------------
1699 ab@CD ab__CD -
1709 _CD@GH _CD_GH -
1729 // Over-allocate in case we replace "C" with "en_US_POSIX" (+10), + null termination
1763 …uprv_strcat(correctedPOSIXLocale, "__"); /* aa@b -> aa__b (note this can make the new locale 1 cha…
1766 uprv_strcat(correctedPOSIXLocale, "_"); /* aa_CC@b -> aa_CC_b */
1772 int32_t len = (int32_t)(uprv_strlen(correctedPOSIXLocale) + (q-p));
1773 uprv_strncat(correctedPOSIXLocale, p, q-p); // do not include charset
1781 /* Should there be a map from 'no@nynorsk' -> no_NO_NY here?
1782 * How about 'russian' -> 'ru'?
1796 if (correctedPOSIXLocale != nullptr) { /* Was already set - clean up. */
1819 // First we need to go from UTF-16 to char (and also convert from _ to - while we're at it.)
1827 modifiedWindowsLocale[i] = '-';
1844 modifiedWindowsLocale[UPRV_LENGTHOF(modifiedWindowsLocale) - 1] = '\0';
1867 // If unable to find a locale we can agree upon, use en-US by default
1910 * QLGPGCMA_4 means UTF-32
1911 * QLGPGCMA_8 means UTF-8
1931 if (correctedLocale[LocaleLen - 2] == '_' &&
1932 correctedLocale[LocaleLen - 1] == 'E')
1937 /* If using Lotus-based locale then convert to
1940 else if (correctedLocale[LocaleLen - 2] == '_' &&
1941 correctedLocale[LocaleLen - 1] == 'L')
1943 correctedLocale[LocaleLen - 2] = 0;
1987 if (uprv_strcmp(name, "IBM-943") == 0) {
1988 /* Use the ASCII compatible ibm-943 */
1989 name = "Shift-JIS";
1991 else if (uprv_strcmp(name, "IBM-1252") == 0) {
1992 /* Use the windows-1252 that contains the Euro */
1993 name = "IBM-5348";
1999 name = "EUC-CN";
2002 name = "EUC-TW";
2005 name = "EUC-KR";
2010 ibm-954 is the best match.
2011 ibm-33722 is the default for eucJP (similar to Windows).
2018 * ISO-8859-1 instead of US-ASCII(646).
2020 name = "ISO-8859-1";
2027 Mac OS X uses UTF-8 by default (especially the locale data and console).
2029 name = "UTF-8";
2033 name = "EUC-KR";
2035 …else if (locale != nullptr && uprv_strcmp(locale, "en_US_POSIX") != 0 && uprv_strcmp(name, "US-ASC…
2037 * For non C/POSIX locale, default the code page to UTF-8 instead of US-ASCII.
2039 name = "UTF-8";
2044 name = "EUC-KR";
2048 /* HP decided to extend big5 as hkbig5 even though it's not compatible :-( */
2054 ibm-1350 is the best match, but unavailable.
2055 ibm-954 is mostly a superset of ibm-1350.
2056 ibm-33722 is the default for eucJP (similar to Windows).
2064 name = "EUC-KR";
2073 ibm-1350 is the best match, but unavailable.
2074 ibm-954 is mostly a superset of ibm-1350.
2075 ibm-33722 is the default for eucJP (similar to Windows).
2080 (uprv_strcmp(name, "ANSI_X3.4-1968") == 0 || uprv_strcmp(name, "US-ASCII") == 0)) {
2082 * For non C/POSIX locale, default the code page to UTF-8 instead of US-ASCII.
2084 name = "UTF-8";
2087 * Linux returns ANSI_X3.4-1968 for C/POSIX, but the call site takes care of
2088 * it by falling back to 'US-ASCII' when nullptr is returned from this
2107 size_t localeCapacity = uprv_min(sizeof(localeBuf), (name-localeName)+1);
2109 localeBuf[localeCapacity-1] = 0; /* ensure NUL termination */
2111 buffer[buffCapacity-1] = 0; /* ensure NUL termination */
2125 uint32_t ccsid = 37; /* Default to ibm-37 */
2142 snprintf(codepage, sizeof(codepage), "ibm-%d", ccsid);
2148 strncpy(codepage, nl_langinfo(CODESET),63-strlen(UCNV_SWAP_LFNL_OPTION_STRING));
2169 // Special case for UTF-8
2172 return "UTF-8";
2174 // Windows codepages can look like windows-1252, so format the found number
2175 // the numbers are eclectic, however all valid system code pages, besides UTF-8
2179 snprintf(codepage, sizeof(codepage), "windows-%ld", codepageNumber);
2182 // If the codepage number call failed then return UTF-8
2183 return "UTF-8";
2203 * On Linux and MacOSX, ensure that default codepage for non C/POSIX locale is UTF-8
2216 codesetName[sizeof(codesetName)-1] = 0;
2235 (void)uprv_strcpy(codesetName, "US-ASCII");
2239 return "US-ASCII";
2258 /* end of platform-specific implementation -------------- */
2260 /* version handling --------------------------------------------------------- */
2315 for(count=4; count>0 && versionArray[count-1]==0; --count) {
2353 /* NUL-terminate */
2395 dlclose(lib);
2503 * indent-tabs-mode: nil