diff options
author | Rob Landley <rob@landley.net> | 2017-09-05 21:04:43 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2017-09-05 21:04:43 -0500 |
commit | b9613842c3ac1a874b56dff4d1f8ce80c2dbab9d (patch) | |
tree | 8aca598bae078a1fa8c3fbe66884a640c05bd6e7 /toys/posix/paste.c | |
parent | b3e70932b6534e603b03d28c45133b8f991f48fe (diff) | |
download | toybox-b9613842c3ac1a874b56dff4d1f8ce80c2dbab9d.tar.gz |
Replace remaining mb*towc() calls with utf8towc().
Diffstat (limited to 'toys/posix/paste.c')
-rw-r--r-- | toys/posix/paste.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/posix/paste.c b/toys/posix/paste.c index 42e6a287..ea04f02e 100644 --- a/toys/posix/paste.c +++ b/toys/posix/paste.c @@ -42,7 +42,6 @@ static void paste_files(void) // Start of each line/file resets delimiter cycle dpos = TT.d; - mbtowc(0, 0, 0); for (i = any = dcount = dlen = 0; seq || i<TT.files; i++) { size_t blen; @@ -84,7 +83,7 @@ static void paste_files(void) } } } else { - while (0<(dlen = mbtowc(&wc, dpos, 99))) { + while (0<(dlen = utf8towc(&wc, dpos, 99))) { dpos += dlen; if (!(dlen = wcwidth(wc))) continue; if (dlen<0) dpos = dstr+1; |