Revert "start using wcs"

This reverts commit 731ef331f5.
This commit is contained in:
Jeffrey Crowell 2015-06-26 23:54:01 -04:00
parent 584a0da932
commit eb1f379d14

View File

@ -1045,7 +1045,11 @@ R_API int r_str_nlen(const char *str, int n) {
// Length in chars of a wide string (find better name?)
R_API int r_wstr_clen (const char *s) {
return wcslen((wchar_t*) s);
int len = 0;
if (*s++ == 0) return 0;
while (*s++ || *s++)
len++;
return len+1;
}
R_API const char *r_str_ansi_chrn(const char *str, int n) {