From 009b55edc4bad5b46ace88f3c255bbff8671d137 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 26 Aug 2018 14:16:49 -0500 Subject: Convert more commands to the new option/GLOBALS code style. --- toys/posix/iconv.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'toys/posix/iconv.c') diff --git a/toys/posix/iconv.c b/toys/posix/iconv.c index a31d713b..e3cf7bae 100644 --- a/toys/posix/iconv.c +++ b/toys/posix/iconv.c @@ -27,8 +27,7 @@ config ICONV #include GLOBALS( - char *from; - char *to; + char *f, *t; void *ic; ) @@ -64,11 +63,11 @@ static void do_iconv(int fd, char *name) void iconv_main(void) { - if (!TT.to) TT.to = "utf8"; - if (!TT.from) TT.from = "utf8"; + if (!TT.t) TT.t = "utf8"; + if (!TT.f) TT.f = "utf8"; - if ((iconv_t)-1 == (TT.ic = iconv_open(TT.to, TT.from))) - perror_exit("%s/%s", TT.to, TT.from); + if ((iconv_t)-1 == (TT.ic = iconv_open(TT.t, TT.f))) + perror_exit("%s/%s", TT.t, TT.f); loopfiles(toys.optargs, do_iconv); if (CFG_TOYBOX_FREE) iconv_close(TT.ic); } -- cgit v1.2.3