Age | Commit message (Collapse) | Author |
|
(SYSCALL_RESOLUTION): Depend on whether various struct stat
members exist, not on the obsolescent ST_MTIM_NSEC.
(utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
|
|
(MTIME_CMP, TIMESPEC_NS): Remove. Now done by stat-time.h,
in a different way.
(timespec_cmp): New function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't include strftime.h or xanstrftime.h -- no longer needed.
(show_date): Use fprintftime rather than xanstrftime.
|
|
|
|
|
|
size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
int utc, int nanoseconds);
Background:
date should not have to allocate a megabyte of virtual memory to
handle a format argument like +%1048575T. When implemented with
strftime, it must allocate such a buffer, use strftime to fill it
in, print it, then free it.
With fprintftime, it simply prints everything and exits.
With no need for memory allocation, that's one fewer way to fail.
|
|
|
|
|
|
to-upper-case modifier (^) and a conversion specifier that
expands to a string containing lower case characters.
|
|
they are unknown.
|
|
|
|
|
|
to make it a bit faster and (I hope) clearer.
|
|
|
|
|
|
|
|
optional field width, not before, so we accept %9:z, not %:9z.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All uses changed. Remove the old SWAP.
Remove obvious comment about BLOCKSIZE.
(rol): New macro, moved here from md5.h.
(sha1_process_block): Remove an incoherent FIXME comment.
|
|
|
|
Redo comment to minimize changes from libc.
|
|
(__md5_buffer): Renamed from md5_buffer. Add a macro undoing this
if _LIBC is not defined. Add __THROW.
(__md5_finish_ctx, __md5_init_ctx, __md5_process_block):
(__md5_process_bytes, __md5_read_ctx, __md5_stream): Likewise.
(struct md5_ctx): Mark buffer as being aligned.
(rol): Remove; all uses changed to CYCLIC.
|
|
|
|
|
|
(INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP): New macros.
(MAX_BLOCKSIZE): Now accepts an arg. All uses changed.
(page_size): New var.
(scanargs, skip, main): Use more-straightforward way to detect overflow.
(dd_copy): Use page_size rather than invoking getpagesize.
Use INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP.
(main): Set page_size.
Avoid a call to stat in the usual case where ftruncate succeeds.
|
|
|
|
|
|
|
|
|
|
remove the "=1".
(TIME_SOEC_HOURS, TIME_SPEC_MINUTES): Must be at end now, so put
them there.
(time_spec_string, time_spec): Hours and minutes must be at
start now, so put them there.
(rfc_2822_format): Now a string constant, not a boolean. All uses
changed.
(iso_8601_format, rfc_format): Remove.
(RFC_3339_OPTION): New constant.
(long_options): Add --rfc-3339.
(usage): Add --rfc-3339. Don't mention --iso-8601.
Mention %:z, %::z, %:::z.
(main): Simplify calculation of 'format'; it was getting too hairy
to follow. Add --rfc-3339.
(show_date): Assume format arg is not NULL, which is the case
now. The default code is moved to 'main'. This simplifies things
and allows the default to be calculated just once.
|
|
Fix bug in formats like %2N.
|
|
Document date --rfc-3339 and new specifiers %:z, %::z, %:::z. Use
"date and time" consistently; the old version sometimes said "time
and date". Fix a minor bug in the documentation for --rfc-2822:
it claimed day-of-month < 10 had leading space, not leading zero.
Use a consistent format for terms like "RFC".
|
|
option is deprecated. date and ls also have new time format
specifiers %:z, %::z, %:::z.
|
|
|
|
|
|
of X2REALLOC and X2NREALLOC.
|
|
|
|
|