Lines Matching refs:wc

723     WCHAR wc;  in tchar2uni()  local
727 wc = *p++; /* Get low surrogate */ in tchar2uni()
728 if (!IsSurrogateH(uc) || !IsSurrogateL(wc)) return 0xFFFFFFFF; /* Wrong surrogate? */ in tchar2uni()
729 uc = uc << 16 | wc; in tchar2uni()
767 WCHAR wc; in tchar2uni() local
769 wc = (BYTE)*p++; /* Get a byte */ in tchar2uni()
770 if (dbc_1st((BYTE)wc)) { /* Is it a DBC 1st byte? */ in tchar2uni()
773 wc = (wc << 8) + b; /* Make a DBC */ in tchar2uni()
775 if (wc != 0) { in tchar2uni()
776 wc = ff_oem2uni(wc, CODEPAGE); /* ANSI/OEM ==> Unicode */ in tchar2uni()
777 if (wc == 0) return 0xFFFFFFFF; /* Invalid code? */ in tchar2uni()
779 uc = wc; in tchar2uni()
795 WCHAR hs, wc; in put_utf() local
798 wc = (WCHAR)chr; in put_utf()
800 if (szb < 1 || IsSurrogate(wc)) return 0; /* Buffer overflow or wrong code? */ in put_utf()
801 *buf = wc; in put_utf()
804 …if (szb < 2 || !IsSurrogateH(hs) || !IsSurrogateL(wc)) return 0; /* Buffer overflow or wrong su… in put_utf()
806 *buf++ = wc; in put_utf()
856 WCHAR wc; in put_utf()
858 wc = ff_uni2oem(chr, CODEPAGE); in put_utf()
859 if (wc >= 0x100) { /* Is this a DBC? */ in put_utf()
861 *buf++ = (char)(wc >> 8); /* Store DBC 1st byte */ in put_utf()
862 *buf++ = (TCHAR)wc; /* Store DBC 2nd byte */ in put_utf()
865 if (wc == 0 || szb < 1) return 0; /* Invalid char or buffer overflow? */ in put_utf()
866 *buf++ = (TCHAR)wc; /* Store the character */ in put_utf()
1124 UINT wc, bc; in get_fat() local
1139 wc = fs->win[bc++ % SS(fs)]; /* Get 1st byte of the entry */ in get_fat()
1141 wc |= fs->win[bc % SS(fs)] << 8; /* Merge 2nd byte of the entry */ in get_fat()
1142 val = (clst & 1) ? (wc >> 4) : (wc & 0xFFF); /* Adjust bit position */ in get_fat()
1847 WCHAR wc, uc; local
1854 for (wc = 1, s = 0; s < 13; s++) { /* Process all characters in the entry */
1856 if (wc != 0) {
1860 wc = uc;
1866 …if ((dir[LDIR_Ord] & LLEF) && wc && lfnbuf[i]) return 0; /* Last segment matched but different …
1883 WCHAR wc, uc; local
1890 for (wc = 1, s = 0; s < 13; s++) { /* Process all characters in the entry */
1892 if (wc != 0) {
1894 lfnbuf[i++] = wc = uc; /* Store it */
1900 …if (dir[LDIR_Ord] & LLEF && wc != 0) { /* Put terminator if it is the last LFN part and not termi…
1923 WCHAR wc; local
1932 s = wc = 0;
1934 if (wc != 0xFFFF) wc = lfn[i++]; /* Get an effective character */
1935 st_word(dir + LfnOfs[s], wc); /* Put it */
1936 if (wc == 0) wc = 0xFFFF; /* Padding characters for left locations */
1938 if (wc == 0xFFFF || !lfn[i]) ord |= LLEF; /* Last LFN part is the start of LFN sequence */
1961 WCHAR wc; local
1970 wc = *lfn++;
1972 sr = (sr << 1) + (wc & 1);
1973 wc >>= 1;
2092 WCHAR wc, hs; local
2101 wc = ld_word(dirb + si); si += 2; nc++; /* Get a character */
2102 if (hs == 0 && IsSurrogate(wc)) { /* Is it a surrogate? */
2103 hs = wc; continue; /* Get low surrogate */
2105wc = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encodin…
2106 if (wc == 0) { di = 0; break; } /* Buffer overflow or wrong encoding? */
2107 di += wc;
2265 WCHAR wc; local
2275 nlen = nc1 = 0; wc = 1;
2279 if (wc != 0 && (wc = lfn[nlen]) != 0) nlen++; /* Get a character if exist */
2280 st_word(dirb + i, wc); /* Store it */
2623 WCHAR wc, hs; local
2644 wc = fs->lfnbuf[si++]; /* Get an LFN character (UTF-16) */
2645 if (hs == 0 && IsSurrogate(wc)) { /* Is it a surrogate? */
2646 hs = wc; continue; /* Get low surrogate */
2648wc = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in UTF-16 or U…
2649 if (wc == 0) { di = 0; break; } /* Invalid char or buffer overflow? */
2650 di += wc;
2660 wc = dp->dir[si++]; /* Get a char */
2661 if (wc == ' ') continue; /* Skip padding spaces */
2662 if (wc == RDDEM) wc = DDEM; /* Restore replaced DDEM character */
2665 … if (dbc_1st((BYTE)wc) && si != 8 && si != 11 && dbc_2nd(dp->dir[si])) { /* Make a DBC if needed */
2666 wc = wc << 8 | dp->dir[si++];
2668 wc = ff_oem2uni(wc, CODEPAGE); /* ANSI/OEM -> Unicode */
2669 if (wc == 0) { di = 0; break; } /* Wrong char in the current code page? */
2670 wc = put_utf(wc, &fno->altname[di], FF_SFN_BUF - di); /* Store it in Unicode */
2671 if (wc == 0) { di = 0; break; } /* Buffer overflow? */
2672 di += wc;
2674 fno->altname[di++] = (TCHAR)wc; /* Store it without any conversion */
2684 wc = (WCHAR)fno->altname[si];
2685 if (wc == '.') lcf = NS_EXT;
2686 if (IsUpper(wc) && (dp->dir[DIR_NTres] & lcf)) wc += 0x20;
2687 fno->fname[di] = (TCHAR)wc;
2806 WCHAR wc, *lfn; local
2818 wc = (WCHAR)uc;
2819 …if (wc < ' ' || wc == '/' || wc == '\\') break; /* Break if end of the path or a separator is foun…
2820 …if (wc < 0x80 && chk_chr("\"*:<>\?|\x7F", wc)) return FR_INVALID_NAME; /* Reject illegal characte…
2822 lfn[di++] = wc; /* Store the Unicode character */
2826 cf = (wc < ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */
2840 wc = lfn[di - 1];
2841 if (wc != ' ' && wc != '.') break;
2855 wc = lfn[si++]; /* Get an LFN character */
2856 if (wc == 0) break; /* Break on end of the LFN */
2857 if (wc == ' ' || (wc == '.' && si != di)) { /* Remove embedded spaces and dots */
2873 if (wc >= 0x80) { /* Is this a non-ASCII character? */
2877 wc = ff_uni2oem(wc, CODEPAGE); /* Unicode ==> ANSI/OEM code */
2878 … if (wc & 0x80) wc = ExCvt[wc & 0x7F]; /* Convert extended character to upper (SBCS) */
2880wc = ff_uni2oem(ff_wtoupper(wc), CODEPAGE); /* Unicode ==> Upper convert ==> ANSI/OEM code */
2883 wc = ff_uni2oem(wc, CODEPAGE); /* Unicode ==> ANSI/OEM code */
2884 if (wc & 0x80) wc = ExCvt[wc & 0x7F]; /* Convert extended character to upper (SBCS) */
2886wc = ff_uni2oem(ff_wtoupper(wc), CODEPAGE); /* Unicode ==> Upper convert ==> ANSI/OEM code */
2890 if (wc >= 0x100) { /* Is this a DBC? */
2895 dp->fn[i++] = (BYTE)(wc >> 8); /* Put 1st byte */
2897 … if (wc == 0 || chk_chr("+,;=[]", wc)) { /* Replace illegal characters for SFN if needed */
2898 wc = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
2900 if (IsUpper(wc)) { /* ASCII upper case? */
2903 if (IsLower(wc)) { /* ASCII lower case? */
2904 b |= 1; wc -= 0x20;
2908 dp->fn[i++] = (BYTE)wc;
5017 WCHAR wc; local
5034 wc = ld_word(dj.dir + XDIR_Label + si * 2);
5035 if (hs == 0 && IsSurrogate(wc)) { /* Is the code a surrogate? */
5036 hs = wc; continue;
5038 wc = put_utf((DWORD)hs << 16 | wc, &label[di], 4);
5039 if (wc == 0) { di = 0; break; }
5040 di += wc;
5050 wc = dj.dir[si++];
5052 … if (dbc_1st((BYTE)wc) && si < 11) wc = wc << 8 | dj.dir[si++]; /* Is it a DBC? */
5053wc = ff_oem2uni(wc, CODEPAGE); /* Convert it into Unicode */
5054 if (wc != 0) wc = put_utf(wc, &label[di], 4); /* Put it in Unicode */
5055 if (wc == 0) { di = 0; break; }
5056 di += wc;
5058 label[di++] = (TCHAR)wc;
5111 WCHAR wc; local
5147 wc = (dc < 0x10000) ? ff_uni2oem(ff_wtoupper(dc), CODEPAGE) : 0;
5149 wc = (BYTE)*label++;
5150 if (dbc_1st((BYTE)wc)) wc = dbc_2nd((BYTE)*label) ? wc << 8 | (BYTE)*label++ : 0;
5151 if (IsLower(wc)) wc -= 0x20; /* To upper ASCII characters */
5153 … if (ExCvt && wc >= 0x80) wc = ExCvt[wc - 0x80]; /* To upper extended characters (SBCS cfg) */
5155 if (wc >= 0x80) wc = ExCvt[wc - 0x80]; /* To upper extended characters (SBCS cfg) */
5158 …if (wc == 0 || chk_chr(badchr + 0, (int)wc) || di >= (UINT)((wc >= 0x100) ? 10 : 11)) { /* Reject …
5161 if (wc >= 0x100) dirvn[di++] = (BYTE)(wc >> 8);
5162 dirvn[di++] = (BYTE)wc;