The R Project SVN R

Rev

Rev 36214 | Rev 36489 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36214 Rev 36356
Line 864... Line 864...
864
	if (NameMatch(expr, SymbolTable[i].name))
864
	if (NameMatch(expr, SymbolTable[i].name))
865
	    return SymbolTable[i].code;
865
	    return SymbolTable[i].code;
866
    return 0;
866
    return 0;
867
}
867
}
868
 
868
 
-
 
869
/* this is the one really used: */
869
static int TranslatedSymbol(SEXP expr)
870
static int TranslatedSymbol(SEXP expr)
870
{
871
{
871
    int code = SymbolCode(expr);
872
    int code = SymbolCode(expr);
872
    if ((0101 <= code && code <= 0132)	||   /* Greek */
873
    if ((0101 <= code && code <= 0132)	||   /* Greek */
873
	(0141 <= code && code <= 0172)	||   /* Greek */
874
	(0141 <= code && code <= 0172)	||   /* Greek */
Line 1034... Line 1035...
1034
#ifdef SUPPORT_MBCS
1035
#ifdef SUPPORT_MBCS
1035
	if(mbcslocale) {  /* need to advance by character, not byte */
1036
	if(mbcslocale) {  /* need to advance by character, not byte */
1036
	    wchar_t wc;
1037
	    wchar_t wc;
1037
	    mbstate_t mb_st;
1038
	    mbstate_t mb_st;
1038
	    size_t res;
1039
	    size_t res;
1039
	    
1040
 
1040
	    memset(&mb_st, 0, sizeof(mb_st));
1041
	    memset(&mb_st, 0, sizeof(mb_st));
1041
	    while (*s) {
1042
	    while (*s) {
1042
		wc = 0;
1043
		wc = 0;
1043
		res = mbrtowc(&wc, s, MB_LEN_MAX, &mb_st);
1044
		res = mbrtowc(&wc, s, MB_LEN_MAX, &mb_st);
1044
		if (iswdigit(wc) && font != PlainFont) {
1045
		if (iswdigit(wc) && font != PlainFont) {