Lines Matching refs:c

48 #define IsUpper(c)		((c) >= 'A' && (c) <= 'Z')  argument
49 #define IsLower(c) ((c) >= 'a' && (c) <= 'z') argument
50 #define IsDigit(c) ((c) >= '0' && (c) <= '9') argument
51 #define IsSeparator(c) ((c) == '/' || (c) == '\\') argument
52 #define IsTerminator(c) ((UINT)(c) < (FF_USE_LFN ? ' ' : '!')) argument
53 #define IsSurrogate(c) ((c) >= 0xD800 && (c) <= 0xDFFF) argument
54 #define IsSurrogateH(c) ((c) >= 0xD800 && (c) <= 0xDBFF) argument
55 #define IsSurrogateL(c) ((c) >= 0xDC00 && (c) <= 0xDFFF) argument
694 static int dbc_1st (BYTE c) in dbc_1st() argument
697 if (DbcTbl && c >= DbcTbl[0]) { in dbc_1st()
698 if (c <= DbcTbl[1]) return 1; /* 1st byte range 1 */ in dbc_1st()
699 if (c >= DbcTbl[2] && c <= DbcTbl[3]) return 1; /* 1st byte range 2 */ in dbc_1st()
702 if (c >= DbcTbl[0]) { in dbc_1st()
703 if (c <= DbcTbl[1]) return 1; in dbc_1st()
704 if (c >= DbcTbl[2] && c <= DbcTbl[3]) return 1; in dbc_1st()
707 if (c != 0) return 0; /* Always false */ in dbc_1st()
714 static int dbc_2nd (BYTE c) in dbc_2nd() argument
717 if (DbcTbl && c >= DbcTbl[4]) { in dbc_2nd()
718 if (c <= DbcTbl[5]) return 1; /* 2nd byte range 1 */ in dbc_2nd()
719 if (c >= DbcTbl[6] && c <= DbcTbl[7]) return 1; /* 2nd byte range 2 */ in dbc_2nd()
720 if (c >= DbcTbl[8] && c <= DbcTbl[9]) return 1; /* 2nd byte range 3 */ in dbc_2nd()
723 if (c >= DbcTbl[4]) { in dbc_2nd()
724 if (c <= DbcTbl[5]) return 1; in dbc_2nd()
725 if (c >= DbcTbl[6] && c <= DbcTbl[7]) return 1; in dbc_2nd()
726 if (c >= DbcTbl[8] && c <= DbcTbl[9]) return 1; in dbc_2nd()
729 if (c != 0) return 0; /* Always false */ in dbc_2nd()
2021 BYTE ns[8], c; local
2045 c = (BYTE)((seq % 16) + '0'); seq /= 16;
2046 if (c > '9') c += 7;
2047 ns[i--] = c;
2411 BYTE c; local
2445 c = dp->dir[DIR_Name];
2446 if (c == 0) { res = FR_NO_FILE; break; } /* Reached end of directory table */
2449 if (c == DDEM || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
2454 if (c & LLEF) { /* Is it start of an entry set? */
2455 c &= (BYTE)~LLEF;
2456 ord = c; /* Number of LFN entries */
2461 … ord = (c == ord && sum == dp->dir[LDIR_Chksum] && cmp_lfn(fs->lfnbuf, dp->dir)) ? ord - 1 : 0xFF;
2651 TCHAR c; local
2757 c = (TCHAR)dp->dir[si++];
2758 if (c == ' ') continue; /* Skip padding spaces */
2759 if (c == RDDEM) c = DDEM; /* Restore replaced DDEM character */
2761 fno->fname[di++] = c;
3002 BYTE c, d;
3014 c = (BYTE)p[si++];
3015 if (c != '.' || si >= 3) break;
3016 sfn[i++] = c;
3018 if (!IsSeparator(c) && c > ' ') return FR_INVALID_NAME;
3020 …sfn[NSFLAG] = (c <= ' ') ? NS_LAST | NS_DOT : NS_DOT; /* Set last segment flag if end of the path …
3025 c = (BYTE)p[si++]; /* Get a byte */
3026 if (c <= ' ') break; /* Break if end of the path name */
3027 if (IsSeparator(c)) { /* Break if a separator is found */
3031 if (c == '.' || i >= ni) { /* End of body or field overflow? */
3032 if (ni == 11 || c != '.') return FR_INVALID_NAME; /* Field overflow or invalid dot? */
3037 if (ExCvt && c >= 0x80) { /* Is SBC extended character? */
3038 c = ExCvt[c & 0x7F]; /* To upper SBC extended character */
3041 if (c >= 0x80) { /* Is SBC extended character? */
3042 c = ExCvt[c & 0x7F]; /* To upper SBC extended character */
3045 if (dbc_1st(c)) { /* Check if it is a DBC 1st byte */
3048 sfn[i++] = c;
3051 …if (strchr("*+,:;<=>[]|\"\?\x7F", (int)c)) return FR_INVALID_NAME; /* Reject illegal chrs for SFN …
3052 if (IsLower(c)) c -= 0x20; /* To upper */
3053 sfn[i++] = c;
3060 …sfn[NSFLAG] = (c <= ' ' || p[si] <= ' ') ? NS_LAST : 0; /* Set last segment flag if end of the pat…
6597 static void putc_bfd (putbuff* pb, TCHAR c) argument
6609 if (FF_USE_STRFUNC == 2 && c == '\n') { /* LF -> CRLF conversion */
6619 if (IsSurrogateH(c)) { /* Is this a high-surrogate? */
6620 pb->hs = c; return; /* Save it for next */
6624 if (!IsSurrogateL(c)) hs = 0; /* Discard high-surrogate if a stray high-surrogate */
6626 if (IsSurrogateL(c)) return; /* Discard stray low-surrogate */
6628 wc = c;
6632 pb->bs[pb->wi = 0] = (BYTE)c; /* Save 1st byte */
6633 if ((BYTE)c < 0x80) break; /* Single byte code? */
6634 if (((BYTE)c & 0xE0) == 0xC0) pb->ct = 1; /* 2-byte sequence? */
6635 if (((BYTE)c & 0xF0) == 0xE0) pb->ct = 2; /* 3-byte sequence? */
6636 if (((BYTE)c & 0xF8) == 0xF0) pb->ct = 3; /* 4-byte sequence? */
6639 if (((BYTE)c & 0xC0) != 0x80) { /* Broken sequence? */
6642 pb->bs[++pb->wi] = (BYTE)c; /* Save the trailing byte */
6653 if (IsSurrogate(c) || c >= 0x110000) return; /* Discard invalid code */
6654 if (c >= 0x10000) { /* Out of BMP? */
6655 hs = (WCHAR)(0xD800 | ((c >> 10) - 0x40)); /* Make high surrogate */
6656 wc = 0xDC00 | (c & 0x3FF); /* Make low surrogate */
6659 wc = (WCHAR)c;
6714 pb->buf[i++] = (BYTE)c;
6752 TCHAR c, /* A character to be output */ argument
6760 putc_bfd(&pb, c); /* Put the character */