Paul Eggert [Tue, 16 Nov 2004 07:45:15 +0000 (07:45 +0000)]
New dd operand "status=noxfer".
Paul Eggert [Mon, 15 Nov 2004 06:50:44 +0000 (06:50 +0000)]
dd now outputs total bytes, seconds, and bytes per second.
Paul Eggert [Mon, 15 Nov 2004 06:50:23 +0000 (06:50 +0000)]
(dd invocation): dd now outputs total bytes,
seconds, and bytes per second.
Paul Eggert [Mon, 15 Nov 2004 06:49:59 +0000 (06:49 +0000)]
Include "human.h".
(w_bytes, start_time): New vars.
(usage): Document new I/O statistics output
(print_stats): Output new I/O statistics.
(cleanup): Do statistics after closing stdin and stdout, so that
the times are more accurate.
(write_output, dd_copy): Count output bytes.
(main): Get initial value of clock.
Paul Eggert [Mon, 15 Nov 2004 06:49:36 +0000 (06:49 +0000)]
(dd_LDADD): Add $(LIB_CLOCK_GETTIME).
Paul Eggert [Mon, 15 Nov 2004 06:49:08 +0000 (06:49 +0000)]
dd now outputs total bytes, seconds, and bytes per second.
Jim Meyering [Sun, 14 Nov 2004 13:55:17 +0000 (13:55 +0000)]
*** empty log message ***
Jim Meyering [Sun, 14 Nov 2004 11:08:22 +0000 (11:08 +0000)]
*** empty log message ***
Jim Meyering [Sun, 14 Nov 2004 09:58:19 +0000 (09:58 +0000)]
*** empty log message ***
Jim Meyering [Sun, 14 Nov 2004 09:48:05 +0000 (09:48 +0000)]
Backslash-escape `-'s in email addresses, so that they are
rendered properly in UTF-locales.
(escape_hyphens): New function.
(main): Call it on email addresses.
Jim Meyering [Sun, 14 Nov 2004 08:56:53 +0000 (08:56 +0000)]
(usage): Put the description of `[-n] STRING'
on two lines, one for `-n STRING' and one for `STRING' so that
help2man properly escapes the `-'. Otherwise, the hyphen is
rendered inappropriately in UTF-8 locales.
Jim Meyering [Sun, 14 Nov 2004 08:49:46 +0000 (08:49 +0000)]
restore file, now that closeout needs the function again
Jim Meyering [Sun, 14 Nov 2004 08:36:43 +0000 (08:36 +0000)]
*** empty log message ***
Jim Meyering [Sun, 14 Nov 2004 08:36:30 +0000 (08:36 +0000)]
(zaptemp): Mark new diagnostic for translation.
Jim Meyering [Sun, 14 Nov 2004 00:40:03 +0000 (00:40 +0000)]
*** empty log message ***
Jim Meyering [Sun, 14 Nov 2004 00:34:04 +0000 (00:34 +0000)]
Do require gl_FUNC_FPENDING.
Jim Meyering [Sun, 14 Nov 2004 00:33:27 +0000 (00:33 +0000)]
.
Jim Meyering [Sun, 14 Nov 2004 00:32:50 +0000 (00:32 +0000)]
.
Jim Meyering [Sun, 14 Nov 2004 00:29:36 +0000 (00:29 +0000)]
.
Jim Meyering [Sun, 14 Nov 2004 00:20:33 +0000 (00:20 +0000)]
.
Jim Meyering [Sun, 14 Nov 2004 00:20:01 +0000 (00:20 +0000)]
(close_stdout): Don't fail just because stdout was
closed initially, since some programs don't write to stdout in the
normal course of operation (other than --version and --help), and
we don't want this function to make e.g. `cp 1 2 >&-' fail.
But do fail if it was closed and someone has tried to write to it.
E.g., printf 'foo' >&-
Jim Meyering [Sun, 14 Nov 2004 00:19:28 +0000 (00:19 +0000)]
(libfetish_a_SOURCES): Add __fpending.h.
Jim Meyering [Sun, 14 Nov 2004 00:19:01 +0000 (00:19 +0000)]
Restore these files. They're useful after all.
Jim Meyering [Sun, 14 Nov 2004 00:17:24 +0000 (00:17 +0000)]
New file. Test today's closeout.c change.
Jim Meyering [Sun, 14 Nov 2004 00:17:10 +0000 (00:17 +0000)]
(TESTS): Add close-stdout.
Paul Eggert [Sat, 13 Nov 2004 04:49:14 +0000 (04:49 +0000)]
* src/sort.c (zaptemp): Warn if a temporary file is not removed.
Paul Eggert [Sat, 13 Nov 2004 04:45:58 +0000 (04:45 +0000)]
(zaptemp): Warn if a temporary file is not removed.
Prune unnecessary accesses to volatile locations, and take some
code out of the critical section that didn't need to be in it.
Paul Eggert [Sat, 13 Nov 2004 01:02:48 +0000 (01:02 +0000)]
Make the newly-introduced critical section a bit smaller.
Paul Eggert [Sat, 13 Nov 2004 00:53:23 +0000 (00:53 +0000)]
* src/sort.c: Avoid O(N**2) behavior when there are many temporary files.
Fix a race condition.
Paul Eggert [Sat, 13 Nov 2004 00:52:32 +0000 (00:52 +0000)]
Document today's changes to "sort".
Paul Eggert [Sat, 13 Nov 2004 00:50:56 +0000 (00:50 +0000)]
Avoid O(N**2) behavior when there are many temporary files.
(temptail): New variable, so that we can easily append to list.
(create_temp_file): Create new files at end of list, so that
searching the list has O(N**NMERGE) behavior instead of O(N**2).
(zaptemp): Update temptail if needed.
(mergefps, merge): Accept new arg that counts temp files, and keep it
up to date as we create and remove temporaries. This is for
efficiency, so that we don't call zaptemp so often.
All callers changed.
(sort): Don't create array in reverse order, since the list of
temporaries is now in the correct order.
(zaptemp): Protect against race condition: if 'sort' is
interrupted in the middle of zaptemp, it might unlink the
temporary file twice, and the second time this happens the file
might already have been created by some other process.
(create_temp_file): Use offsetof for clarity.
(die): Move it up earlier, to clean up the code a bit.
Paul Eggert [Fri, 12 Nov 2004 19:37:10 +0000 (19:37 +0000)]
Move "Version" to top.
Paul Eggert [Fri, 12 Nov 2004 19:36:51 +0000 (19:36 +0000)]
Support longer page numbers in "pr", and allow most file names starting
with "+".
Paul Eggert [Fri, 12 Nov 2004 19:36:18 +0000 (19:36 +0000)]
Document recent changes to "pr".
Paul Eggert [Fri, 12 Nov 2004 19:35:54 +0000 (19:35 +0000)]
(strtoumax): Declare if not declared.
(skip_to_page, first_page_number, last_page_number, page_number,
first_last_page, print_header):
Use uintmax_t for page numbers.
(first_last_page): Remove unnecessary forward declaration.
Do not modify arg (it is now a const pointer).
Return a true if successful, false (without print a diagnostic)
otherwise.
(main): If +XXX does not specify a valid page range, treat it
as a file name. This follows the response to Open Group XCU ERN 41
<http://www.opengroup.org/sophocles/show_mail.tpl?source=L&listname=austin-group-l&id=7717>,
which says the behavior is allowed.
(skip_to_page): When starting page number exceeds page count,
print both numbers in the diagnostic.
(print_header): Detect page number overflow.
Paul Eggert [Fri, 12 Nov 2004 06:00:01 +0000 (06:00 +0000)]
Sync from gnulib and regenerate.
Jim Meyering [Thu, 11 Nov 2004 09:19:42 +0000 (09:19 +0000)]
remove trailing blanks
Paul Eggert [Thu, 11 Nov 2004 06:07:57 +0000 (06:07 +0000)]
Sync from gnulib.
Paul Eggert [Thu, 11 Nov 2004 05:02:14 +0000 (05:02 +0000)]
Sync from gnulib.
Jim Meyering [Wed, 10 Nov 2004 08:24:58 +0000 (08:24 +0000)]
*** empty log message ***
Paul Eggert [Tue, 9 Nov 2004 20:54:43 +0000 (20:54 +0000)]
Sync from gnulib.
Jim Meyering [Tue, 9 Nov 2004 20:31:46 +0000 (20:31 +0000)]
*** empty log message ***
Jim Meyering [Tue, 9 Nov 2004 20:31:39 +0000 (20:31 +0000)]
[__APPLE__]: Include <mach/machine.h> and <mach-o/arch.h>.
(main) [__APPLE__]: Get the processor type via syscall rather than
hard-coding "powerpc". From toby@opendarwin.org.
Jim Meyering [Sun, 7 Nov 2004 07:05:43 +0000 (07:05 +0000)]
*** empty log message ***
Jim Meyering [Sun, 7 Nov 2004 07:05:38 +0000 (07:05 +0000)]
(merge): Remove declarations of now-unused variables.
Paul Eggert [Sat, 6 Nov 2004 23:47:13 +0000 (23:47 +0000)]
* src/sort.c: Avoid some silly merges.
Paul Eggert [Sat, 6 Nov 2004 23:46:47 +0000 (23:46 +0000)]
(first_same_file): Remove. Move most of the code to....
(avoid_trashing_input): New function.
(merge): Avoid some silly merges, e.g., copying a single file to
a temporary file when there are exactly 17 input files to merge.
Take a count of temporary files rather than a max_merge arg.
All uses changed.
Jim Meyering [Sat, 6 Nov 2004 22:46:44 +0000 (22:46 +0000)]
.
Jim Meyering [Sat, 6 Nov 2004 22:46:21 +0000 (22:46 +0000)]
remove now-unused files
Jim Meyering [Sat, 6 Nov 2004 22:45:58 +0000 (22:45 +0000)]
.
Jim Meyering [Sat, 6 Nov 2004 22:45:47 +0000 (22:45 +0000)]
(libfetish_a_SOURCES): Remove __fpending.h, now that it's no longer used.
Jim Meyering [Sat, 6 Nov 2004 22:44:56 +0000 (22:44 +0000)]
.
Jim Meyering [Sat, 6 Nov 2004 22:44:48 +0000 (22:44 +0000)]
remove now-unused file
Jim Meyering [Sat, 6 Nov 2004 22:44:14 +0000 (22:44 +0000)]
Don't require gl_FUNC_FPENDING.
Jim Meyering [Sat, 6 Nov 2004 22:37:28 +0000 (22:37 +0000)]
*** empty log message ***
Jim Meyering [Sat, 6 Nov 2004 22:37:23 +0000 (22:37 +0000)]
Ensure that no close failure goes unreported.
(close_stdout): Always close stdout. I.e., don't
return early when it seems there's nothing to flush.
Don't include __fpending.h.
Jim Meyering [Sat, 6 Nov 2004 22:37:02 +0000 (22:37 +0000)]
(xfclose): Don't close stdout here (just flush it),
since close_stdout now closes stdout unconditionally.
Paul Eggert [Fri, 5 Nov 2004 23:02:46 +0000 (23:02 +0000)]
* src/sort.c: Fixx size_t and alloca bugs.
Paul Eggert [Fri, 5 Nov 2004 23:02:09 +0000 (23:02 +0000)]
(inittables, sort_buffer_size, getmonth, mergefps,
first_same_file, merge, sort, main): Use size_t for indexes into arrays.
This fixes some unlikely havoc-wreaking bugs (e.g., more than INT_MAX
temporary files).
(getmonth, keycompare, compare): Rewrite to avoid need for alloca,
thus avoiding unchecked stack overflow in some cases. As a side
effect this improve the performance of "sort -M" by a factor of 4
on my benchmarks.
Paul Eggert [Thu, 4 Nov 2004 00:02:19 +0000 (00:02 +0000)]
Regenerate.
Jim Meyering [Wed, 3 Nov 2004 23:31:20 +0000 (23:31 +0000)]
remove trailing spaces
Paul Eggert [Wed, 3 Nov 2004 23:25:32 +0000 (23:25 +0000)]
Log recent getdate-etc. related changes.
Paul Eggert [Wed, 3 Nov 2004 23:24:07 +0000 (23:24 +0000)]
Sync from gnulib.
Paul Eggert [Wed, 3 Nov 2004 23:17:29 +0000 (23:17 +0000)]
Include "vasprintf.h" since we use vasprintf now.
Paul Eggert [Wed, 3 Nov 2004 23:15:44 +0000 (23:15 +0000)]
Sync from gnulib.
Paul Eggert [Wed, 3 Nov 2004 23:12:55 +0000 (23:12 +0000)]
(check-AUTHORS): Don't assume \? works in a sed
expression; it's not portable. Problem reported by Albert Chin.
Don't invoke a program more than once.
Paul Eggert [Wed, 3 Nov 2004 23:11:45 +0000 (23:11 +0000)]
(version): New variable, containing author info,
for benefit of AUTHORS check. Use it when acting on --version option.
Paul Eggert [Wed, 3 Nov 2004 23:10:50 +0000 (23:10 +0000)]
Remove duplicate lines. Remove bogus "chroot:" in groups line.
Paul Eggert [Wed, 3 Nov 2004 23:05:47 +0000 (23:05 +0000)]
(libfetish_a_SOURCES): Remove setenv.c.
Paul Eggert [Wed, 3 Nov 2004 23:04:03 +0000 (23:04 +0000)]
New file, from gnulib.
Paul Eggert [Wed, 3 Nov 2004 23:03:17 +0000 (23:03 +0000)]
(gl_PREREQ): Require gt_FUNC_SETENV.
Jim Meyering [Wed, 3 Nov 2004 20:54:10 +0000 (20:54 +0000)]
.
Jim Meyering [Wed, 3 Nov 2004 20:53:32 +0000 (20:53 +0000)]
.
Paul Eggert [Wed, 3 Nov 2004 18:44:33 +0000 (18:44 +0000)]
Don't #define and #undef getopt around <stdlib.h>,
as this breaks the new regime that does "#define getopt rpl_getopt".
Paul Eggert [Wed, 3 Nov 2004 17:39:23 +0000 (17:39 +0000)]
* Makefile.am (_W, W_): New macros.
Paul Eggert [Wed, 3 Nov 2004 17:39:00 +0000 (17:39 +0000)]
(_W, W_): New macros.
(check-texinfo): Use them instead of assuming grep -w (which is not portable).
Problem reported by Albert Chin.
Jim Meyering [Wed, 3 Nov 2004 09:20:23 +0000 (09:20 +0000)]
(libfetish_a_SOURCES): Add setenv.c and setenv.h.
Jim Meyering [Wed, 3 Nov 2004 08:54:51 +0000 (08:54 +0000)]
remove trailing blanks
Jim Meyering [Wed, 3 Nov 2004 08:50:38 +0000 (08:50 +0000)]
*** empty log message ***
Jim Meyering [Wed, 3 Nov 2004 08:50:11 +0000 (08:50 +0000)]
quote(...) file names in diagnostics.
Paul Eggert [Wed, 3 Nov 2004 08:04:49 +0000 (08:04 +0000)]
Import from gnulib.
Paul Eggert [Wed, 3 Nov 2004 07:47:08 +0000 (07:47 +0000)]
Regenerate.
Paul Eggert [Wed, 3 Nov 2004 07:44:15 +0000 (07:44 +0000)]
Sync from gnulib.
Paul Eggert [Sat, 30 Oct 2004 00:06:22 +0000 (00:06 +0000)]
* NEWS: Document getdate changes.
Paul Eggert [Sat, 30 Oct 2004 00:05:00 +0000 (00:05 +0000)]
Document getdate changes.
Paul Eggert [Fri, 29 Oct 2004 23:46:23 +0000 (23:46 +0000)]
Sync from gnulib (for getdate changes).
Paul Eggert [Fri, 29 Oct 2004 23:43:34 +0000 (23:43 +0000)]
Sync from gnulib.
Paul Eggert [Fri, 29 Oct 2004 23:22:09 +0000 (23:22 +0000)]
Document TZ better, and adjust to new getdate.texi.
(Top): Update menu.
(pr invocation, Formatting file timestamps, touch invocation,
stat invocation, who invocation, date invocation, Options for date):
Mention TZ.
Jim Meyering [Fri, 29 Oct 2004 22:10:36 +0000 (22:10 +0000)]
`tac /proc/modules' would print nothing
Jim Meyering [Fri, 29 Oct 2004 22:05:04 +0000 (22:05 +0000)]
*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 21:59:39 +0000 (21:59 +0000)]
*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 21:59:33 +0000 (21:59 +0000)]
* src/tac.c (tac_file): Remove temporary prototype and move this
function `down' so that it precedes definition of tac_nonseekable.
Jim Meyering [Fri, 29 Oct 2004 21:55:21 +0000 (21:55 +0000)]
*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 21:55:15 +0000 (21:55 +0000)]
`tac /proc/modules' would print nothing
(copy_to_temp): Renamed from save_stdin, since
now it copies a general file descriptor, not just stdin.
(tac_nonseekable): Renamed/adapted from tac_stdin.
(tac_file): Get fd via `open' directly rather than via fopen/fileno,
since we never used the stream. Perform "-" to stdin mapping here
rather than in main. Determine whether a file is seekable,
by trying to `lseek' to its end, and dispatch to tac_seekable or
tac_nonseekable accordingly.
(main): Rewrite argument handling now that it uses only tac_file.
Reported by Harald Dunkel in http://bugs.debian.org/278604.
Jim Meyering [Fri, 29 Oct 2004 21:50:15 +0000 (21:50 +0000)]
*** empty log message ***
Paul Eggert [Thu, 28 Oct 2004 07:51:25 +0000 (07:51 +0000)]
* coreutils.texi (Standards conformance): Use "head -10" rather
than "head -1".
Paul Eggert [Thu, 28 Oct 2004 07:50:51 +0000 (07:50 +0000)]
(Standards conformance): Use "head -10" rather than "head -1" as
example of obsolete usage, since the POSIX consensus is that "head -1"
could be supported even if we don't yet have clear consensus on "head
-10". See today's revision to the SUS FAQ
<http://www.opengroup.org/austin/papers/single_unix_faq.html>.
Paul Eggert [Mon, 25 Oct 2004 03:20:29 +0000 (03:20 +0000)]
* coreutils.texi (pathchk invocation): Options must precede operands.
Paul Eggert [Mon, 25 Oct 2004 03:20:02 +0000 (03:20 +0000)]
(pathchk invocation): Options must precede operands.
Paul Eggert [Sun, 24 Oct 2004 23:25:18 +0000 (23:25 +0000)]
* mktime.c (leapyear): Arg is long int, not int.