comparison toys/touch.c @ 233:d4176f3f3835

Zap toys/Config.in and instead create generated/Config.in from contents of toys/*.c. Move relevant info into comment at the top of each toys/*.c. Also convert more of Makefile into a thin wrapper around shell scripts that actually do the work. (Makefile is only still there for the user interface.)
author Rob Landley <rob@landley.net>
date Sat, 19 Jan 2008 17:08:39 -0600
parents bc87305c391f
children 163498bf547b
comparison
equal deleted inserted replaced
232:cd4d5630c978 233:d4176f3f3835
1 /* vi: set sw=4 ts=4: */ 1 /* vi: set sw=4 ts=4:
2 /* 2 *
3 * touch.c - Modify a file's timestamps. 3 * touch.c - Modify a file's timestamps.
4 * 4 *
5 * Copyright (C) 2007 Charlie Shepherd <masterdriverz@gentoo.org> 5 * Copyright (C) 2007 Charlie Shepherd <masterdriverz@gentoo.org>
6 * 6 *
7 * See http://www.opengroup.org/onlinepubs/009695399/utilities/touch.html 7 * See http://www.opengroup.org/onlinepubs/009695399/utilities/touch.html
8 */ 8
9 config TOUCH
10 bool "touch"
11 default y
12 help
13 usage: touch [-acm] [-r FILE] [-t MMDDhhmm] [-l bytes] FILE...
14
15 Change file timestamps, ensure file existance and change file length.
16
17 -a Only change the access time.
18 -c Do not create the file if it doesn't exist.
19 -l Length to truncate (or sparsely extend) file to.
20 -m Only change the modification time.
21 -r Reference file to take timestamps from.
22 -t Time to change {a,m}time to.
23 */
9 24
10 #include "toys.h" 25 #include "toys.h"
11 26
12 #define OPT_MTIME 0x01 27 #define OPT_MTIME 0x01
13 #define OPT_NOCREATE 0x02 28 #define OPT_NOCREATE 0x02