Lines Matching refs:wc

746 	WCHAR wc;  in tchar2uni()  local
750 wc = *p++; /* Get low surrogate */ in tchar2uni()
751 if (!IsSurrogateH(uc) || !IsSurrogateL(wc)) return 0xFFFFFFFF; /* Wrong surrogate? */ in tchar2uni()
752 uc = uc << 16 | wc; in tchar2uni()
786 WCHAR wc; in tchar2uni() local
788 wc = (BYTE)*p++; /* Get a byte */ in tchar2uni()
789 if (dbc_1st((BYTE)wc)) { /* Is it a DBC 1st byte? */ in tchar2uni()
792 wc = (wc << 8) + sb; /* Make a DBC */ in tchar2uni()
794 if (wc != 0) { in tchar2uni()
795 wc = ff_oem2uni(wc, CODEPAGE); /* ANSI/OEM ==> Unicode */ in tchar2uni()
796 if (wc == 0) return 0xFFFFFFFF; /* Invalid code? */ in tchar2uni()
798 uc = wc; in tchar2uni()
814 WCHAR hs, wc; in put_utf() local
817 wc = (WCHAR)chr; in put_utf()
819 if (szb < 1 || IsSurrogate(wc)) return 0; /* Buffer overflow or wrong code? */ in put_utf()
820 *buf = wc; in put_utf()
823 …if (szb < 2 || !IsSurrogateH(hs) || !IsSurrogateL(wc)) return 0; /* Buffer overflow or wrong surro… in put_utf()
825 *buf++ = wc; in put_utf()
875 WCHAR wc; in put_utf()
877 wc = ff_uni2oem(chr, CODEPAGE); in put_utf()
878 if (wc >= 0x100) { /* Is this a DBC? */ in put_utf()
880 *buf++ = (char)(wc >> 8); /* Store DBC 1st byte */ in put_utf()
881 *buf++ = (TCHAR)wc; /* Store DBC 2nd byte */ in put_utf()
884 if (wc == 0 || szb < 1) return 0; /* Invalid character or buffer overflow? */ in put_utf()
885 *buf++ = (TCHAR)wc; /* Store the character */ in put_utf()
1182 UINT wc, bc; in get_fat() local
1197 wc = fs->win[bc++ % SS(fs)]; /* Get 1st byte of the entry */ in get_fat()
1199 wc |= fs->win[bc % SS(fs)] << 8; /* Merge 2nd byte of the entry */ in get_fat()
1200 val = (clst & 1) ? (wc >> 4) : (wc & 0xFFF); /* Adjust bit position */ in get_fat()
2023 WCHAR wc; local
2032 wc = *lfn++;
2034 crc_sreg = (crc_sreg << 1) + (wc & 1);
2035 wc >>= 1;
2647 WCHAR wc, hs; local
2670 wc = ld_word(fs->dirbuf + si); si += 2; nc++; /* Get a character */
2671 if (hs == 0 && IsSurrogate(wc)) { /* Is it a surrogate? */
2672 hs = wc; continue; /* Get low surrogate */
2674 …nw = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2698 wc = fs->lfnbuf[si++]; /* Get an LFN character (UTF-16) */
2699 if (hs == 0 && IsSurrogate(wc)) { /* Is it a surrogate? */
2700 hs = wc; continue; /* Get low surrogate */
2702 …nw = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2716 wc = dp->dir[si++]; /* Get a char */
2717 if (wc == ' ') continue; /* Skip padding spaces */
2718 if (wc == RDDEM) wc = DDEM; /* Restore replaced DDEM character */
2721 if (dbc_1st((BYTE)wc) && si != 8 && si != 11 && dbc_2nd(dp->dir[si])) { /* Make a DBC if needed */
2722 wc = wc << 8 | dp->dir[si++];
2724 wc = ff_oem2uni(wc, CODEPAGE); /* ANSI/OEM -> Unicode */
2725 if (wc == 0) { /* Wrong char in the current code page? */
2728 nw = put_utf(wc, &fno->altname[di], FF_SFN_BUF - di); /* Store it in API encoding */
2734 fno->altname[di++] = (TCHAR)wc; /* Store it without any conversion */
2744 wc = (WCHAR)fno->altname[si];
2745 if (wc == '.') lcf = NS_EXT;
2746 if (IsUpper(wc) && (dp->dir[DIR_NTres] & lcf)) wc += 0x20;
2747 fno->fname[di] = (TCHAR)wc;
2876 WCHAR wc; local
2889 wc = (WCHAR)uc;
2890 if (wc < ' ' || IsSeparator(wc)) break; /* Break if end of the path or a separator is found */
2891 …if (wc < 0x80 && strchr("*:<>|\"\?\x7F", (int)wc)) return FR_INVALID_NAME; /* Reject illegal chara…
2893 lfn[di++] = wc; /* Store the Unicode character */
2895 if (wc < ' ') { /* Stopped at end of the path? */
2916 wc = lfn[di - 1];
2917 if (wc != ' ' && wc != '.') break;
2931 wc = lfn[si++]; /* Get an LFN character */
2932 if (wc == 0) break; /* Break on end of the LFN */
2933 if (wc == ' ' || (wc == '.' && si != di)) { /* Remove embedded spaces and dots */
2949 if (wc >= 0x80) { /* Is this an extended character? */
2953 wc = ff_uni2oem(wc, CODEPAGE); /* Unicode ==> ANSI/OEM code */
2954 if (wc & 0x80) wc = ExCvt[wc & 0x7F]; /* Convert extended character to upper (SBCS) */
2956 wc = ff_uni2oem(ff_wtoupper(wc), CODEPAGE); /* Unicode ==> Up-convert ==> ANSI/OEM code */
2959 wc = ff_uni2oem(wc, CODEPAGE); /* Unicode ==> ANSI/OEM code */
2960 if (wc & 0x80) wc = ExCvt[wc & 0x7F]; /* Convert extended character to upper (SBCS) */
2962 wc = ff_uni2oem(ff_wtoupper(wc), CODEPAGE); /* Unicode ==> Up-convert ==> ANSI/OEM code */
2966 if (wc >= 0x100) { /* Is this a DBC? */
2971 dp->fn[i++] = (BYTE)(wc >> 8); /* Put 1st byte */
2973 if (wc == 0 || strchr("+,;=[]", (int)wc)) { /* Replace illegal characters for SFN */
2974 wc = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
2976 if (IsUpper(wc)) { /* ASCII upper case? */
2979 if (IsLower(wc)) { /* ASCII lower case? */
2980 b |= 1; wc -= 0x20;
2984 dp->fn[i++] = (BYTE)wc;
5369 WCHAR wc; local
5387 wc = ld_word(dj.dir + XDIR_Label + si * 2);
5388 if (hs == 0 && IsSurrogate(wc)) { /* Is the code a surrogate? */
5389 hs = wc; continue;
5391 nw = put_utf((DWORD)hs << 16 | wc, &label[di], 4); /* Store it in API encoding */
5405 wc = dj.dir[si++];
5407 if (dbc_1st((BYTE)wc) && si < 11) wc = wc << 8 | dj.dir[si++]; /* Is it a DBC? */
5408 wc = ff_oem2uni(wc, CODEPAGE); /* Convert it into Unicode */
5409 if (wc == 0) { /* Invalid char in current code page? */
5412 di += put_utf(wc, &label[di], 4); /* Store it in Unicode */
5414 label[di++] = (TCHAR)wc;
5469 WCHAR wc; local
5508 wc = (dc < 0x10000) ? ff_uni2oem(ff_wtoupper(dc), CODEPAGE) : 0;
5510 wc = (BYTE)*label++;
5511 if (dbc_1st((BYTE)wc)) wc = dbc_2nd((BYTE)*label) ? wc << 8 | (BYTE)*label++ : 0;
5512 if (IsLower(wc)) wc -= 0x20; /* To upper ASCII characters */
5514 if (ExCvt && wc >= 0x80) wc = ExCvt[wc - 0x80]; /* To upper extended characters (SBCS cfg) */
5516 if (wc >= 0x80) wc = ExCvt[wc - 0x80]; /* To upper extended characters (SBCS cfg) */
5519 …if (wc == 0 || strchr(&badchr[0], (int)wc) || di >= (UINT)((wc >= 0x100) ? 10 : 11)) { /* Reject i…
5522 if (wc >= 0x100) dirvn[di++] = (BYTE)(wc >> 8);
5523 dirvn[di++] = (BYTE)wc;
6457 WCHAR wc; local
6472 wc = s[0];
6473 if (dbc_1st((BYTE)wc)) { /* DBC 1st byte? */
6476 wc = wc << 8 | s[0];
6478 dc = ff_oem2uni(wc, CODEPAGE); /* Convert ANSI/OEM into Unicode */
6488 wc = (FF_STRF_ENCODE == 1) ? ld_word(s) : s[0] << 8 | s[1];
6489 if (!IsSurrogateL(wc)) continue; /* Broken surrogate pair? */
6490 dc = ((dc & 0x3FF) + 0x40) << 10 | (wc & 0x3FF); /* Merge surrogate pair */
6602 WCHAR hs, wc; local
6628 wc = c;
6651 wc = (WCHAR)dc;
6656 wc = 0xDC00 | (c & 0x3FF); /* Make low surrogate */
6659 wc = (WCHAR)c;
6670 st_word(&pb->buf[i], wc);
6678 pb->buf[i++] = (BYTE)(wc >> 8);
6679 pb->buf[i++] = (BYTE)wc;
6686 pb->buf[i++] = (BYTE)(0x80 | (hs & 3) << 4 | (wc >> 6 & 0x0F));
6687 pb->buf[i++] = (BYTE)(0x80 | (wc & 0x3F));
6689 if (wc < 0x80) { /* Single byte? */
6690 pb->buf[i++] = (BYTE)wc;
6692 if (wc < 0x800) { /* 2-byte sequence? */
6694 pb->buf[i++] = (BYTE)(0xC0 | wc >> 6);
6697 pb->buf[i++] = (BYTE)(0xE0 | wc >> 12);
6698 pb->buf[i++] = (BYTE)(0x80 | (wc >> 6 & 0x3F));
6700 pb->buf[i++] = (BYTE)(0x80 | (wc & 0x3F));
6705 wc = ff_uni2oem(wc, CODEPAGE); /* UTF-16 ==> ANSI/OEM */
6706 if (wc == 0) return;
6707 if (wc >= 0x100) {
6708 pb->buf[i++] = (BYTE)(wc >> 8); nc++;
6710 pb->buf[i++] = (BYTE)wc;