summaryrefslogtreecommitdiff
path: root/src/touch.c
AgeCommit message (Collapse)Author
2008-06-03use gnulib's progname moduleJim Meyering
* bootstrap.conf (gnulib_modules): Add progname. * src/*.c (program_name): Remove declaration. * (main): Call set_program_name rather than setting program_name. * src/nice.c (main): Cast program_name to "(char *)". * src/prog-fprintf.c: Include "system.h" * src/system.h: Include "progname.h". * maint.mk (sc_program_name): Adjust rule. Suggestion from Eric Blake.
2008-06-02declare program_name consistentlyJim Meyering
* src/base64.c: Likewise. * src/basename.c: Likewise. * src/cat.c: Likewise. * src/chcon.c: Likewise. * src/chgrp.c: Likewise. * src/chmod.c: Likewise. * src/chown.c: Likewise. * src/chroot.c: Likewise. * src/cksum.c: Likewise. * src/comm.c: Likewise. * src/cp.c: Likewise. * src/csplit.c: Likewise. * src/cut.c: Likewise. * src/date.c: Likewise. * src/dd.c: Likewise. * src/df.c: Likewise. * src/dircolors.c: Likewise. * src/dirname.c: Likewise. * src/du.c: Likewise. * src/echo.c: Likewise. * src/env.c: Likewise. * src/expand.c: Likewise. * src/expr.c: Likewise. * src/factor.c: Likewise. * src/fmt.c: Likewise. * src/fold.c: Likewise. * src/groups.c: Likewise. * src/head.c: Likewise. * src/hostid.c: Likewise. * src/hostname.c: Likewise. * src/id.c: Likewise. * src/install.c: Likewise. * src/join.c: Likewise. * src/kill.c: Likewise. * src/link.c: Likewise. * src/ln.c: Likewise. * src/logname.c: Likewise. * src/ls.c: Likewise. * src/md5sum.c: Likewise. * src/mkdir.c: Likewise. * src/mkfifo.c: Likewise. * src/mknod.c: Likewise. * src/mktemp.c: Likewise. * src/mv.c: Likewise. * src/nice.c: Likewise. * src/nl.c: Likewise. * src/nohup.c: Likewise. * src/od.c: Likewise. * src/paste.c: Likewise. * src/pathchk.c: Likewise. * src/pinky.c: Likewise. * src/pr.c: Likewise. * src/printenv.c: Likewise. * src/printf.c: Likewise. * src/ptx.c: Likewise. * src/pwd.c: Likewise. * src/readlink.c: Likewise. * src/rm.c: Likewise. * src/rmdir.c: Likewise. * src/runcon.c: Likewise. * src/seq.c: Likewise. * src/setuidgid.c: Likewise. * src/shuf.c: Likewise. * src/sleep.c: Likewise. * src/sort.c: Likewise. * src/split.c: Likewise. * src/stat.c: Likewise. * src/stty.c: Likewise. * src/su.c: Likewise. * src/sum.c: Likewise. * src/sync.c: Likewise. * src/tac.c: Likewise. * src/tail.c: Likewise. * src/tee.c: Likewise. * src/test.c: Likewise. * src/timeout.c: Likewise. * src/touch.c: Likewise. * src/tr.c: Likewise. * src/true.c: Likewise. * src/tsort.c: Likewise. * src/tty.c: Likewise. * src/uname.c: Likewise. * src/unexpand.c: Likewise. * src/uniq.c: Likewise. * src/unlink.c: Likewise. * src/uptime.c: Likewise. * src/users.c: Likewise. * src/wc.c: Likewise. * src/who.c: Likewise. * src/whoami.c: Likewise. * src/yes.c: Likewise.
2008-05-26convert the rest to use proper_name -- manuallyJim Meyering
* src/base64.c (AUTHORS): Rename from AUTHOR, for consistency.
2008-03-19Check for -- and remove -- some unnecessarily included header files.Jim Meyering
* Makefile.maint: Add checks for a handful of additional header files. * src/mktemp.c: Don't include "long-options.h". Not used. * src/pr.c: Don't include "inttostr.h". Not used. * src/printenv.c: Don't include "error.h". Not used. * src/test.c: Don't include "error.h". Not used. * src/touch.c: Don't include "safe-read.h". Not used.
2008-01-06touch: ignore "-d now" option, when appropriatePaul Eggert
* src/touch.c (main): Treat "-d now" as if it were absent, if neither -a nor -m is specified. Problem reported by Dan Jacobson in: http://lists.gnu.org/archive/html/bug-coreutils/2008-01/msg00010.html
2007-08-21Clarify touch documentation of file arguments.Bob Proulx
* src/touch.c (usage): Improve wording of documentation regarding file argument handling and special handling of - argument. * doc/coreutils.texi (touch invocation): Likewise. Documentation problem reported by Vincent Lefevre.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-05-19Rename uses of futimens -> gl_futimens; glibc now declares the former.Jim Meyering
* src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens. * src/touch.c (touch): Likewise.
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2005-11-01(main): Pass PDS_PRE_2000 to posixtime.Paul Eggert
2005-09-26(touch): Handle "touch -c - >&-" by checking for EBADFPaul Eggert
and ENOSYS. Do not pass "-" to futimens; pass NULL instead. If close (STDIN_FILENO) fails, report the error separately instead of letting the 'close' pollute errno.
2005-09-25(touch): "touch -" now touches standard output.Paul Eggert
(usage): Document this.
2005-09-16Include stat-time.h, and use its functions instead of the obsoletePaul Eggert
TIMESPEC_NS macro.
2005-08-14Use one fewer file descriptor in a common case.Jim Meyering
Include "fd-reopen.h", rather than "fcntl--.h". Use fd_reopen rather than open.
2005-07-03Include fcntl--.h, not unistd-safer.h.Paul Eggert
(touch): Don't call fd_safer; no longer needed now that we include fcntl--.h.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-11Include unistd-safer.h.Paul Eggert
(touch): Use fd_safer.
2005-03-28(longopts, time_args): Use NULL, not `0'.Jim Meyering
2005-02-21(time): Remove obsolete decl.Paul Eggert
(main): Gettime now returns void.
2004-11-23(posix_date): Remove; not needed as a static var.Paul Eggert
All uses rewritten. (touch): Use new futimens function to operate more efficiently in some cases. Don't stat/fstat existing file when (!amtime_now && change_times == (CH_ATIME | CH_MTIME)); the old time stamps aren't needed in that case. (main): change_times is int, not bool. Simplify test for change_times.
2004-09-21Remove unused "case 0".Paul Eggert
2004-09-07(main): Fix POSIX-conformance bug: "touch --Paul Eggert
MMDDhhmm file" must be treated like "touch MMDDhhmm file" when conforming to pre-2001 POSIX.
2004-08-03(no_create, use_ref, posix_date, amtime_now,Paul Eggert
touch, main): Use bool for booleans. (main): Avoid integer overflow when given more than INT_MAX options.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-09(usage): Improve wording in description of the --time=WORD option.Jim Meyering
2004-03-17(newtime): Now an array of two timespecs, oneJim Meyering
for access and one for modification. (ref_stats): Remove. (get_reldate): Use get_date's parameter profile. (touch, main): Adjust to above changes. (main): Work even if tm_year == INT_MAX (so long as long int is wider). Use gettime instead of gettimeofday, for new get_date signature.
2004-01-22(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(err): Now a boolean int, not a counter, so that we don't have to worry about int overflow. All uses changed.
2004-01-15(flexible_date): Remove static var.Jim Meyering
(get_reldate): New function. (main): Use it, to implement this new behavior.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-08-09Include utimens.h.Jim Meyering
Set file timestamps with utimens, not utime.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-06-16(O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove definitions.Jim Meyering
Moved to system.h.
2003-06-12(touch): Call close only if necessary.Jim Meyering
2002-12-20(touch): Change the wording of a diagnostic soJim Meyering
that it makes sense both when the file exists and when it doesn't.
2002-10-03Mark translatable string with `N_ (...)'.Jim Meyering
2002-09-29(main): Split a long line.Jim Meyering
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-08-07(main): Adjust to posixtime signature change.Jim Meyering
Remove unnecessary initialization. Use localtime, not posixtm, to warn about obsolete "touch".
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-04-17(touch): Don't report errors for nonexistent filesJim Meyering
when --no-create is in effect. Based on a patch from TAKAI Kousuke.
2002-02-20Include posixver.h.Jim Meyering
(usage): Document only the intersection of the old and new behaviors, to encourage portability. (main): Use `posix2_version ()' in place of POSIX2_VERSION.
2002-01-18(main): Issue a warning for obsolete usage, unless POSIXLY_CORRECT.Jim Meyering
2002-01-16Add support for POSIX 1003.1-2001, which requires removal forJim Meyering
support of the obsolete `touch [-acm] MMDDhhmm[YY] FILE...' syntax. (usage, main): Implement this.
2001-12-11Include the word `fail' in some diagnostics to make it clearerJim Meyering
that they indicate a failure. s/getting attributes/failed to get attributes/