fatfs/src/ff.c
static int dbc_2nd (BYTE c)
{
#if FF_CODE_PAGE == 0		/* Variable code page */
	if (DbcTbl && c >= DbcTbl[4]) {
		if (c <= DbcTbl[5]) return 1;					/* 2nd byte range 1 */
		if (c >= DbcTbl[6] && c <= DbcTbl[7]) return 1;	/* 2nd byte range 2 */
		if (c >= DbcTbl[8] && c <= DbcTbl[9]) return 1;	/* 2nd byte range 3 */
	}
#elif FF_CODE_PAGE >= 900	/* DBCS fixed code page */
	if (c >= DbcTbl[4]) {
		if (c <= DbcTbl[5]) return 1;
		if (c >= DbcTbl[6] && c <= DbcTbl[7]) return 1;
		if (c >= DbcTbl[8] && c <= DbcTbl[9]) return 1;
	}
#else						/* SBCS fixed code page */
	if (c != 0) return 0;	/* Always false */
#endif
	return 0;
}
/* Test if the character is DBC 2nd byte */
Test if the character is DBC 2nd byte
Test if the character is DBC 2nd byte
static int dbc_2nd (BYTE c)
{
#if FF_CODE_PAGE == 0		
	if (DbcTbl && c >= DbcTbl[4]) {
		if (c <= DbcTbl[5]) return 1;					
		if (c >= DbcTbl[6] && c <= DbcTbl[7]) return 1;	
		if (c >= DbcTbl[8] && c <= DbcTbl[9]) return 1;	
	}
#elif FF_CODE_PAGE >= 900	
	if (c >= DbcTbl[4]) {
		if (c <= DbcTbl[5]) return 1;
		if (c >= DbcTbl[6] && c <= DbcTbl[7]) return 1;
		if (c >= DbcTbl[8] && c <= DbcTbl[9]) return 1;
	}
#else						
	if (c != 0) return 0;	
#endif
	return 0;
}
static int dbc_2nd ( BYTE c ) { #if FF_CODE_PAGE == 0 if ( DbcTbl && c >= DbcTbl [ 4 ] ) { if ( c <= DbcTbl [ 5 ] ) return 1 ; if ( c >= DbcTbl [ 6 ] && c <= DbcTbl [ 7 ] ) return 1 ; if ( c >= DbcTbl [ 8 ] && c <= DbcTbl [ 9 ] ) return 1 ; } #elif FF_CODE_PAGE >= 900 if ( c >= DbcTbl [ 4 ] ) { if ( c <= DbcTbl [ 5 ] ) return 1 ; if ( c >= DbcTbl [ 6 ] && c <= DbcTbl [ 7 ] ) return 1 ; if ( c >= DbcTbl [ 8 ] && c <= DbcTbl [ 9 ] ) return 1 ; } #else if ( c != 0 ) return 0 ; #endif return 0 ; }
Test if the character is DBC 2nd byte
Test if the character is DBC 2nd byte
/* Variable code page */ /* 2nd byte range 1 */ /* 2nd byte range 2 */ /* 2nd byte range 3 */ /* DBCS fixed code page */ /* SBCS fixed code page */ /* Always false */