summaryrefslogtreecommitdiff
path: root/src/touch.c
AgeCommit message (Collapse)Author
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/
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-12-02(touch): Extend the change of 2001-09-15 to work onJim Meyering
systems for which errno is set to EPERM in that case. Thus, e.g., `touch /' by non-root gives a better diagnostic on systems like SunOS4.
2001-11-23(usage): Note that ``Mandatory arguments to long options are mandatoryJim Meyering
for short options too.''
2001-11-23(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-10-20*** empty log message ***Jim Meyering
2001-09-15(EISDIR): Define to 0, if not already defined.Jim Meyering
(touch): Give a better diagnostic for e.g., `touch /' by non-root. Based on a patch from Michael Stone. Reported by Jeff Sheinberg as Debian bug #101677.
2001-03-17(usage): Tweak the obsolescent usage line so thatJim Meyering
help2man recognizes it as such.
2000-11-10(main): Interpret a lone numeric argument of 8 or 10Jim Meyering
digits as a file name, rather than as a date/time in the obsolescent `MMDDhhmm[YY]' format. Reported by Wenjun Zheng.
2000-07-30tweak diagnosticJim Meyering
2000-07-25Convert "`%s'" in format strings to "%s", and wrap eachJim Meyering
corresponding argument in a `quote (...)' call. Add more precise diagnostics.
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
2000-04-30(O_NOCTTY): Define if not defined already.Jim Meyering
(touch): Add O_NOCTTY to the flags passed to open.
2000-02-03(O_NDELAY): Define to 0 if not defined.Jim Meyering
(O_NONBLOCK): Define to O_NDELAY if not defined. (touch): Open with O_NONBLOCK, so one can touch a fifo without hanging. Reported by Eric G. Miller via Michael Stone.
1999-12-09(anonymous enum): Define TIME_OPTION, and ...Jim Meyering
(longopts): ...use it here instead of `CHAR_MAX + 1'. (main): Likewise.
1999-12-04Give the right diagnostic when failing to create a file in anJim Meyering
unwritable directory. (touch): Record errno upon failed errno and use that saved value if a subsequent fstat, stat or utime call fails. Reported by Wichert Akkerman via Michael Stone.
1999-11-14(touch): Simplify code a tad, using fd == -1 insteadJim Meyering
of separate valid_fd variable.