The R Project SVN R

Rev

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

Rev 72707 Rev 74969
Line 159... Line 159...
159
 
159
 
160
    static char *lc_cache = "";
160
    static char *lc_cache = "";
161
    static int lc = 0;
161
    static int lc = 0;
162
 
162
 
163
    if (0 != strcmp(setlocale(LC_CTYPE, NULL), lc_cache)) {
163
    if (0 != strcmp(setlocale(LC_CTYPE, NULL), lc_cache)) {
164
	strncpy(lc_str, setlocale(LC_CTYPE, NULL), sizeof(lc_str));
164
	strncpy(lc_str, setlocale(LC_CTYPE, NULL), sizeof(lc_str) - 1);
165
        lc_str[sizeof(lc_str) - 1] = '\0';
165
        lc_str[sizeof(lc_str) - 1] = '\0';
166
	for (i = 0, j = (int) strlen(lc_str); i < j && i < sizeof(lc_str); i++)
166
	for (i = 0, j = (int) strlen(lc_str); i < j && i < sizeof(lc_str); i++)
167
	    lc_str[i] = (char) toupper(lc_str[i]);
167
	    lc_str[i] = (char) toupper(lc_str[i]);
168
	for (i = 0; i < (sizeof(cjk_locale_name)/sizeof(cjk_locale_name_t));
168
	for (i = 0; i < (sizeof(cjk_locale_name)/sizeof(cjk_locale_name_t));
169
	     i++) {
169
	     i++) {