Lines Matching refs:status

54 void testWin(StrengthProbe &probe, UErrorCode &status) ;
198 UErrorCode status = U_ZERO_ERROR;
201 compALen = unorm_normalize((*(Line **)a)->name, (*(Line **)a)->len, UNORM_NFC, 0, compA, 256, &status);
202 compBLen = unorm_normalize((*(Line **)b)->name, (*(Line **)b)->len, UNORM_NFC, 0, compB, 256, &status);
203 compUTF8ALen = ucnv_fromUChars(utf8cnv, compUTF8A, 256, compA, compALen, &status);
205 compUTF8BLen = ucnv_fromUChars(utf8cnv, compUTF8B, 256, compB, compBLen, &status);
212 UErrorCode status = U_ZERO_ERROR;
213 compALen = unorm_normalize(string, len, UNORM_NFC, 0, compA, 256, &status);
214 compUTF8ALen = ucnv_fromUChars(utf8cnv, compUTF8A, 256, compA, compALen, &status);
221 UErrorCode status = U_ZERO_ERROR;
224 //compALen = unorm_compose(compA, 256, (*(Line **)a)->name, (*(Line **)a)->len, false, 0, &status);
225 //compBLen = unorm_compose(compB, 256, (*(Line **)b)->name, (*(Line **)b)->len, false, 0, &status);
226 compALen = unorm_normalize((*(Line **)a)->name, (*(Line **)a)->len, UNORM_NFC, 0, compA, 256, &status);
227 compBLen = unorm_normalize((*(Line **)b)->name, (*(Line **)b)->len, UNORM_NFC, 0, compB, 256, &status);
241 UErrorCode status = U_ZERO_ERROR;
242 compALen = unorm_normalize(string, len, UNORM_NFC, 0, compA, 256, &status);
248 UErrorCode status = U_ZERO_ERROR;
334 void processArgs(int argc, char* argv[], UErrorCode &status)
400 status = U_ILLEGAL_ARGUMENT_ERROR;
408 gExcludeSet.applyPattern(UnicodeString(options[EXCLUDESET].value), status);
409 if(U_FAILURE(status)) {
410 logger->log("Cannot construct exclude set from argument %s. Error %s\n", options[EXCLUDESET].value, u_errorName(status));
419 gRepertoire.applyPattern(UnicodeString(options[REPERTOIRE].value), status);
420 if(U_FAILURE(status)) {
421 logger->log("Cannot construct repertoire from argument %s. Error %s\n", options[REPERTOIRE].value, u_errorName(status));
483 getExemplars(const char *locale, UnicodeSet &exemplars, UErrorCode &status) {
485 UResourceBundle *res = ures_open(NULL, locale, &status);
486 UnicodeString exemplarString = ures_getUnicodeStringByKey(res, "ExemplarCharacters", &status);
488 exemplars.applyPattern(exemplarString, status);
534 setFiles(const char *name, UErrorCode &status) {
535 if(U_FAILURE(status)) {
551 status = U_FILE_ACCESS_ERROR;
561 status = U_FILE_ACCESS_ERROR;
578 UErrorCode status = U_ZERO_ERROR;
579 static UnicodeSet UNASSIGNED(UnicodeString("[:Cn:]"), status);
580 static UnicodeSet GENERAL_ACCENTS(UnicodeString("[[:block=Combining Diacritical Marks:]-[:Cn:]]"), status);
581 //static UnicodeSet ASCII_BASE(UnicodeString("[[:ASCII:]-[:L:]-[:N:]]"), status);
582 static UnicodeSet ASCII_BASE(UnicodeString("[[:ASCII:]]"), status);
583 static UnicodeSet ALPHABETIC(UnicodeString("[:alphabetic:]"), status);
584 //static UnicodeSet CONTROL(UnicodeString("[[:control:][\\u0000-\\u002F]]"), status);
585 static UnicodeSet BMP(UnicodeString("[\\u0000-\\uFFFF]"), status);
587 static UnicodeSet CONTROL(UnicodeString("[:control:]"), status);
590 setLocale(const char* locale, UErrorCode &status)
598 gCol = ucol_open(locale, &status);
599 ucol_setAttribute(gCol, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
600 //ucol_setAttribute(col, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
601 //ucol_setAttribute(col, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
609 setReference(UErrorCode &status)
616 gCol = ucol_open("root", &status);
617 ucol_setAttribute(gCol, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
641 processCollator(UCollator *col, UErrorCode &status) {
650 const char *locale = ucol_getLocale(gCol, ULOC_REQUESTED_LOCALE, &status);
660 tailored = *((UnicodeSet *)ucol_getTailoredSet(gCol, &status));
691 generateRepertoire(locale, exemplarUSet, hanAppears, status);
694 hanSet.applyIntPropertyValue(UCHAR_SCRIPT, USCRIPT_HAN, status);
699 exemplarUSet = flatten(exemplarUSet, status);
708 lines.analyse(status);
712 lines.toFile(fTailoringDump, true, status);
717 status = U_ZERO_ERROR;
719 setReference(status);
727 RefLines.analyse(status);
729 RefLines.toFile(fDefaultDump, true, status);
737 setReference(status);
741 RefLines.analyse(status);
750 setLocale(gLocale, status);
752 exemplarUSet.applyIntPropertyValue(UCHAR_SCRIPT, USCRIPT_HAN, status);
753 exemplarUSet = flatten(exemplarUSet, status);
757 han.getBounds(status);
766 processLocale(const char *locale, UErrorCode &status) {
767 setLocale(locale, status);
768 setFiles(locale, status);
769 if(U_FAILURE(status)) {
784 processCollator(gCol, status);
792 UErrorCode status = U_ZERO_ERROR;
795 UResourceBundle *loc = ures_open(NULL, locName, &status);;
797 if(U_SUCCESS(status)) {
798 status = U_ZERO_ERROR;
799 ColEl = ures_getByKey(loc, "CollationElements", ColEl, &status);
800 if(status == U_ZERO_ERROR) { /* do the test - there are real elements */
815 UErrorCode status = U_ZERO_ERROR;
820 USet *wsp = uprv_openRuleWhiteSpaceSet(&status);
830 processArgs(argc, argv, status);
835 if(U_FAILURE(status) || gPlatformNo == 0) {
839 utf8cnv = ucnv_open("utf-8", &status); // we are just doing UTF-8 locales for now.
840 gUCA = ucol_open("root", &status);
862 UCollator *col = ucol_openRules(ruleBuffer, rules-ruleBuffer, UCOL_DEFAULT, UCOL_DEFAULT, &parseError, &status);
863 if(U_SUCCESS(status)) {
864 setFiles("stdinRules", status);
865 processCollator(col, status);
867 logger->log("Error %s\n", u_errorName(status));
873 setFiles(gLocale, status);
876 SortedLines tailoring(fTailoringDump, logger, debug, status);
878 SortedLines reference(fDefaultDump, logger, debug, status);
889 processLocale(gLocale, status);
892 processLocale(gLocales[i], status);
898 status = U_ZERO_ERROR;
901 processLocale(locName, status);
944 void generateRepertoire(const char *locale, UnicodeSet &rep, UBool &hanAppears, UErrorCode &status) {
958 int32_t scriptLength = uscript_getCode(locale, script, 256, &status);
965 delta.applyIntPropertyValue(prop, script[i], status);
977 delta.applyIntPropertyValue(UCHAR_SCRIPT, USCRIPT_LATIN, status);
994 delta.applyIntPropertyValue(prop, i, status).removeAll(UNASSIGNED);
1011 //delta.applyIntPropertyValue(UCHAR_SCRIPT, USCRIPT_HAN, status);
1022 UnicodeSet flatten(const UnicodeSet &source, UErrorCode &status) {
1029 Normalizer::normalize(it.getString(), UNORM_NFD, 0, item, status);
1030 Normalizer::normalize(it.getString(), UNORM_NFKD, 0, itemNFKD, status);
1033 Normalizer::normalize(toNormalize, UNORM_NFD, 0, item, status);
1034 Normalizer::normalize(toNormalize, UNORM_NFKD, 0, itemNFKD, status);
1043 void testWin(StrengthProbe &probe, UErrorCode &status)
1045 UnicodeSet trailings(UnicodeString("[\\uFE7D\\uFE7C\\u30FD\\uFF70\\u30FC\\u309D\\u3032\\u3031\\u3005\\u0651]"), status);