From 482c422f8e8ec517de071266d425b425c4628103 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 25 Aug 2018 15:32:22 -0500 Subject: Convert more argument variables in GLOBALS() to new style. --- toys/posix/touch.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'toys/posix/touch.c') diff --git a/toys/posix/touch.c b/toys/posix/touch.c index 214d6cf9..5e5588b1 100644 --- a/toys/posix/touch.c +++ b/toys/posix/touch.c @@ -27,9 +27,7 @@ config TOUCH #include "toys.h" GLOBALS( - char *time; - char *file; - char *date; + char *t, *r, *d; ) void touch_main(void) @@ -52,10 +50,10 @@ void touch_main(void) // List of search types if (toys.optflags & FLAG_d) { format = (char *[]){"%Y-%m-%dT%T", "%Y-%m-%d %T", 0}; - date = TT.date; + date = TT.d; } else { format = (char *[]){"%m%d%H%M", "%y%m%d%H%M", "%C%y%m%d%H%M", 0}; - date = TT.time; + date = TT.t; } // Trailing Z means UTC timezone, don't expect libc to know this. @@ -101,10 +99,10 @@ void touch_main(void) // Set time from -r? - if (TT.file) { + if (TT.r) { struct stat st; - xstat(TT.file, &st); + xstat(TT.r, &st); ts[0] = st.st_atim; ts[1] = st.st_mtim; } -- cgit v1.2.3