From 75b89012c90470a27d66b54ad89901b94fcfd169 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 6 Dec 2020 00:02:46 -0600 Subject: Remove CONFIG_TOYBOX_I18N and just always support utf8. --- toys/posix/expand.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'toys/posix') diff --git a/toys/posix/expand.c b/toys/posix/expand.c index f1fd8d33..f3cd44d0 100644 --- a/toys/posix/expand.c +++ b/toys/posix/expand.c @@ -43,22 +43,18 @@ static void do_expand(int fd, char *name) } if (!len) break; for (i=0; i 1) { - if (width != fwrite(toybuf+i, width, 1, stdout)) - perror_exit("stdout"); - i += width-1; - x++; - continue; - } else if (width == -2) break; - else if (width == -1) continue; - } + if (width > 1) { + if (width != fwrite(toybuf+i, width, 1, stdout)) + perror_exit("stdout"); + i += width-1; + x++; + continue; + } else if (width == -2) break; + else if (width == -1) continue; c = toybuf[i]; if (c != '\t') { -- cgit v1.2.3