The R Project SVN R

Rev

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

Rev 62314 Rev 62627
Line 2598... Line 2598...
2598
    mbs = (str == NULL) ? buf : str;
2598
    mbs = (str == NULL) ? buf : str;
2599
 
2599
 
2600
    memset(wcs, 0 ,sizeof(wcs));
2600
    memset(wcs, 0 ,sizeof(wcs));
2601
    memset(&mb_st,0, sizeof(mbstate_t));
2601
    memset(&mb_st,0, sizeof(mbstate_t));
2602
 
2602
 
2603
    if((size_t)-1 == (cnt = (int)mbsrtowcs(wcs, (const char **)&mbs,
2603
    if((int)-1 == (cnt = (int)mbsrtowcs(wcs, (const char **)&mbs,
2604
					   (int) strlen(mbs), &mb_st))) {
2604
					(int) strlen(mbs), &mb_st))) {
2605
	return 0;
2605
	return 0;
2606
    }
2606
    }
2607
    if(wcs[0] == L'\0') return 0;
2607
    if(wcs[0] == L'\0') return 0;
2608
 
2608
 
2609
    memset(last_mbs, 0, sizeof(last_mbs));
2609
    memset(last_mbs, 0, sizeof(last_mbs));