Lines Matching refs:wc
740 WCHAR wc; in tchar2uni() local
744 wc = *p++; /* Get low surrogate */ in tchar2uni()
745 if (!IsSurrogateH(uc) || !IsSurrogateL(wc)) return 0xFFFFFFFF; /* Wrong surrogate? */ in tchar2uni()
746 uc = uc << 16 | wc; in tchar2uni()
780 WCHAR wc; in tchar2uni() local
782 wc = (BYTE)*p++; /* Get a byte */ in tchar2uni()
783 if (dbc_1st((BYTE)wc)) { /* Is it a DBC 1st byte? */ in tchar2uni()
786 wc = (wc << 8) + b; /* Make a DBC */ in tchar2uni()
788 if (wc != 0) { in tchar2uni()
789 wc = ff_oem2uni(wc, CODEPAGE); /* ANSI/OEM ==> Unicode */ in tchar2uni()
790 if (wc == 0) return 0xFFFFFFFF; /* Invalid code? */ in tchar2uni()
792 uc = wc; in tchar2uni()
808 WCHAR hs, wc; in put_utf() local
811 wc = (WCHAR)chr; in put_utf()
813 if (szb < 1 || IsSurrogate(wc)) return 0; /* Buffer overflow or wrong code? */ in put_utf()
814 *buf = wc; in put_utf()
817 …if (szb < 2 || !IsSurrogateH(hs) || !IsSurrogateL(wc)) return 0; /* Buffer overflow or wrong surro… in put_utf()
819 *buf++ = wc; in put_utf()
869 WCHAR wc; in put_utf()
871 wc = ff_uni2oem(chr, CODEPAGE); in put_utf()
872 if (wc >= 0x100) { /* Is this a DBC? */ in put_utf()
874 *buf++ = (char)(wc >> 8); /* Store DBC 1st byte */ in put_utf()
875 *buf++ = (TCHAR)wc; /* Store DBC 2nd byte */ in put_utf()
878 if (wc == 0 || szb < 1) return 0; /* Invalid char or buffer overflow? */ in put_utf()
879 *buf++ = (TCHAR)wc; /* Store the character */ in put_utf()
1136 UINT wc, bc; in get_fat() local
1151 wc = fs->win[bc++ % SS(fs)]; /* Get 1st byte of the entry */ in get_fat()
1153 wc |= fs->win[bc % SS(fs)] << 8; /* Merge 2nd byte of the entry */ in get_fat()
1154 val = (clst & 1) ? (wc >> 4) : (wc & 0xFFF); /* Adjust bit position */ in get_fat()
1860 WCHAR wc, uc; local
1867 for (wc = 1, s = 0; s < 13; s++) { /* Process all characters in the entry */
1869 if (wc != 0) {
1873 wc = uc;
1879 …if ((dir[LDIR_Ord] & LLEF) && wc && lfnbuf[i]) return 0; /* Last segment matched but different len…
1896 WCHAR wc, uc; local
1903 for (wc = 1, s = 0; s < 13; s++) { /* Process all characters in the entry */
1905 if (wc != 0) {
1907 lfnbuf[i++] = wc = uc; /* Store it */
1913 …if (dir[LDIR_Ord] & LLEF && wc != 0) { /* Put terminator if it is the last LFN part and not termin…
1936 WCHAR wc; local
1945 s = wc = 0;
1947 if (wc != 0xFFFF) wc = lfn[i++]; /* Get an effective character */
1948 st_word(dir + LfnOfs[s], wc); /* Put it */
1949 if (wc == 0) wc = 0xFFFF; /* Padding characters for following items */
1951 if (wc == 0xFFFF || !lfn[i]) ord |= LLEF; /* Last LFN part is the start of LFN sequence */
1974 WCHAR wc; local
1983 wc = *lfn++;
1985 sreg = (sreg << 1) + (wc & 1);
1986 wc >>= 1;
2236 WCHAR wc; local
2246 nlen = nc1 = 0; wc = 1;
2250 if (wc != 0 && (wc = lfn[nlen]) != 0) nlen++; /* Get a character if exist */
2251 st_word(dirb + i, wc); /* Store it */
2594 WCHAR wc, hs; local
2615 wc = ld_word(fs->dirbuf + si); si += 2; nc++; /* Get a character */
2616 if (hs == 0 && IsSurrogate(wc)) { /* Is it a surrogate? */
2617 hs = wc; continue; /* Get low surrogate */
2619 …nw = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2641 wc = fs->lfnbuf[si++]; /* Get an LFN character (UTF-16) */
2642 if (hs == 0 && IsSurrogate(wc)) { /* Is it a surrogate? */
2643 hs = wc; continue; /* Get low surrogate */
2645 …nw = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2657 wc = dp->dir[si++]; /* Get a char */
2658 if (wc == ' ') continue; /* Skip padding spaces */
2659 if (wc == RDDEM) wc = DDEM; /* Restore replaced DDEM character */
2662 if (dbc_1st((BYTE)wc) && si != 8 && si != 11 && dbc_2nd(dp->dir[si])) { /* Make a DBC if needed */
2663 wc = wc << 8 | dp->dir[si++];
2665 wc = ff_oem2uni(wc, CODEPAGE); /* ANSI/OEM -> Unicode */
2666 if (wc == 0) { di = 0; break; } /* Wrong char in the current code page? */
2667 nw = put_utf(wc, &fno->altname[di], FF_SFN_BUF - di); /* Store it in API encoding */
2671 fno->altname[di++] = (TCHAR)wc; /* Store it without any conversion */
2681 wc = (WCHAR)fno->altname[si];
2682 if (wc == '.') lcf = NS_EXT;
2683 if (IsUpper(wc) && (dp->dir[DIR_NTres] & lcf)) wc += 0x20;
2684 fno->fname[di] = (TCHAR)wc;
2808 WCHAR wc, *lfn; local
2820 wc = (WCHAR)uc;
2821 if (wc < ' ' || IsSeparator(wc)) break; /* Break if end of the path or a separator is found */
2822 …if (wc < 0x80 && strchr("*:<>|\"\?\x7F", (int)wc)) return FR_INVALID_NAME; /* Reject illegal chara…
2824 lfn[di++] = wc; /* Store the Unicode character */
2826 if (wc < ' ') { /* Stopped at end of the path? */
2847 wc = lfn[di - 1];
2848 if (wc != ' ' && wc != '.') break;
2862 wc = lfn[si++]; /* Get an LFN character */
2863 if (wc == 0) break; /* Break on end of the LFN */
2864 if (wc == ' ' || (wc == '.' && si != di)) { /* Remove embedded spaces and dots */
2880 if (wc >= 0x80) { /* Is this an extended character? */
2884 wc = ff_uni2oem(wc, CODEPAGE); /* Unicode ==> ANSI/OEM code */
2885 if (wc & 0x80) wc = ExCvt[wc & 0x7F]; /* Convert extended character to upper (SBCS) */
2887 wc = ff_uni2oem(ff_wtoupper(wc), CODEPAGE); /* Unicode ==> Up-convert ==> ANSI/OEM code */
2890 wc = ff_uni2oem(wc, CODEPAGE); /* Unicode ==> ANSI/OEM code */
2891 if (wc & 0x80) wc = ExCvt[wc & 0x7F]; /* Convert extended character to upper (SBCS) */
2893 wc = ff_uni2oem(ff_wtoupper(wc), CODEPAGE); /* Unicode ==> Up-convert ==> ANSI/OEM code */
2897 if (wc >= 0x100) { /* Is this a DBC? */
2902 dp->fn[i++] = (BYTE)(wc >> 8); /* Put 1st byte */
2904 if (wc == 0 || strchr("+,;=[]", (int)wc)) { /* Replace illegal characters for SFN */
2905 wc = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
2907 if (IsUpper(wc)) { /* ASCII upper case? */
2910 if (IsLower(wc)) { /* ASCII lower case? */
2911 b |= 1; wc -= 0x20;
2915 dp->fn[i++] = (BYTE)wc;
5284 WCHAR wc; local
5302 wc = ld_word(dj.dir + XDIR_Label + si * 2);
5303 if (hs == 0 && IsSurrogate(wc)) { /* Is the code a surrogate? */
5304 hs = wc; continue;
5306 nw = put_utf((DWORD)hs << 16 | wc, &label[di], 4); /* Store it in API encoding */
5318 wc = dj.dir[si++];
5320 if (dbc_1st((BYTE)wc) && si < 11) wc = wc << 8 | dj.dir[si++]; /* Is it a DBC? */
5321 wc = ff_oem2uni(wc, CODEPAGE); /* Convert it into Unicode */
5322 if (wc == 0) { di = 0; break; } /* Invalid char in current code page? */
5323 di += put_utf(wc, &label[di], 4); /* Store it in Unicode */
5325 label[di++] = (TCHAR)wc;
5380 WCHAR wc; local
5416 wc = (dc < 0x10000) ? ff_uni2oem(ff_wtoupper(dc), CODEPAGE) : 0;
5418 wc = (BYTE)*label++;
5419 if (dbc_1st((BYTE)wc)) wc = dbc_2nd((BYTE)*label) ? wc << 8 | (BYTE)*label++ : 0;
5420 if (IsLower(wc)) wc -= 0x20; /* To upper ASCII characters */
5422 if (ExCvt && wc >= 0x80) wc = ExCvt[wc - 0x80]; /* To upper extended characters (SBCS cfg) */
5424 if (wc >= 0x80) wc = ExCvt[wc - 0x80]; /* To upper extended characters (SBCS cfg) */
5427 …if (wc == 0 || strchr(&badchr[0], (int)wc) || di >= (UINT)((wc >= 0x100) ? 10 : 11)) { /* Reject i…
5430 if (wc >= 0x100) dirvn[di++] = (BYTE)(wc >> 8);
5431 dirvn[di++] = (BYTE)wc;
6350 WCHAR wc; local
6365 wc = s[0];
6366 if (dbc_1st((BYTE)wc)) { /* DBC 1st byte? */
6369 wc = wc << 8 | s[0];
6371 dc = ff_oem2uni(wc, CODEPAGE); /* Convert ANSI/OEM into Unicode */
6381 wc = (FF_STRF_ENCODE == 1) ? ld_word(s) : s[0] << 8 | s[1];
6382 if (!IsSurrogateL(wc)) continue; /* Broken surrogate pair? */
6383 dc = ((dc & 0x3FF) + 0x40) << 10 | (wc & 0x3FF); /* Merge surrogate pair */
6493 WCHAR hs, wc; local
6519 wc = c;
6541 wc = (WCHAR)dc;
6547 wc = 0xDC00 | (c & 0x3FF); /* Make low surrogate */
6550 wc = (WCHAR)c;
6561 st_word(&pb->buf[i], wc);
6569 pb->buf[i++] = (BYTE)(wc >> 8);
6570 pb->buf[i++] = (BYTE)wc;
6577 pb->buf[i++] = (BYTE)(0x80 | (hs & 3) << 4 | (wc >> 6 & 0x0F));
6578 pb->buf[i++] = (BYTE)(0x80 | (wc & 0x3F));
6580 if (wc < 0x80) { /* Single byte? */
6581 pb->buf[i++] = (BYTE)wc;
6583 if (wc < 0x800) { /* 2-byte sequence? */
6585 pb->buf[i++] = (BYTE)(0xC0 | wc >> 6);
6588 pb->buf[i++] = (BYTE)(0xE0 | wc >> 12);
6589 pb->buf[i++] = (BYTE)(0x80 | (wc >> 6 & 0x3F));
6591 pb->buf[i++] = (BYTE)(0x80 | (wc & 0x3F));
6596 wc = ff_uni2oem(wc, CODEPAGE); /* UTF-16 ==> ANSI/OEM */
6597 if (wc == 0) return;
6598 if (wc >= 0x100) {
6599 pb->buf[i++] = (BYTE)(wc >> 8); nc++;
6601 pb->buf[i++] = (BYTE)wc;