platform/upstream/coreutils.git
20 years agoDocument recent changes to "pr".
Paul Eggert [Fri, 12 Nov 2004 19:36:18 +0000 (19:36 +0000)]
Document recent changes to "pr".

20 years ago(strtoumax): Declare if not declared.
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.

20 years agoSync from gnulib and regenerate.
Paul Eggert [Fri, 12 Nov 2004 06:00:01 +0000 (06:00 +0000)]
Sync from gnulib and regenerate.

20 years agoremove trailing blanks
Jim Meyering [Thu, 11 Nov 2004 09:19:42 +0000 (09:19 +0000)]
remove trailing blanks

20 years agoSync from gnulib.
Paul Eggert [Thu, 11 Nov 2004 06:07:57 +0000 (06:07 +0000)]
Sync from gnulib.

20 years agoSync from gnulib.
Paul Eggert [Thu, 11 Nov 2004 05:02:14 +0000 (05:02 +0000)]
Sync from gnulib.

20 years ago*** empty log message ***
Jim Meyering [Wed, 10 Nov 2004 08:24:58 +0000 (08:24 +0000)]
*** empty log message ***

20 years agoSync from gnulib.
Paul Eggert [Tue, 9 Nov 2004 20:54:43 +0000 (20:54 +0000)]
Sync from gnulib.

20 years ago*** empty log message ***
Jim Meyering [Tue, 9 Nov 2004 20:31:46 +0000 (20:31 +0000)]
*** empty log message ***

20 years ago[__APPLE__]: Include <mach/machine.h> and <mach-o/arch.h>.
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.

20 years ago*** empty log message ***
Jim Meyering [Sun, 7 Nov 2004 07:05:43 +0000 (07:05 +0000)]
*** empty log message ***

20 years ago(merge): Remove declarations of now-unused variables.
Jim Meyering [Sun, 7 Nov 2004 07:05:38 +0000 (07:05 +0000)]
(merge): Remove declarations of now-unused variables.

20 years ago* src/sort.c: Avoid some silly merges.
Paul Eggert [Sat, 6 Nov 2004 23:47:13 +0000 (23:47 +0000)]
* src/sort.c: Avoid some silly merges.

20 years ago(first_same_file): Remove. Move most of the code to....
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.

20 years ago.
Jim Meyering [Sat, 6 Nov 2004 22:46:44 +0000 (22:46 +0000)]
.

20 years agoremove now-unused files
Jim Meyering [Sat, 6 Nov 2004 22:46:21 +0000 (22:46 +0000)]
remove now-unused files

20 years ago.
Jim Meyering [Sat, 6 Nov 2004 22:45:58 +0000 (22:45 +0000)]
.

20 years ago(libfetish_a_SOURCES): Remove __fpending.h, now that it's no longer used.
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.

20 years ago.
Jim Meyering [Sat, 6 Nov 2004 22:44:56 +0000 (22:44 +0000)]
.

20 years agoremove now-unused file
Jim Meyering [Sat, 6 Nov 2004 22:44:48 +0000 (22:44 +0000)]
remove now-unused file

20 years agoDon't require gl_FUNC_FPENDING.
Jim Meyering [Sat, 6 Nov 2004 22:44:14 +0000 (22:44 +0000)]
Don't require gl_FUNC_FPENDING.

20 years ago*** empty log message ***
Jim Meyering [Sat, 6 Nov 2004 22:37:28 +0000 (22:37 +0000)]
*** empty log message ***

20 years agoEnsure that no close failure goes unreported.
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.

20 years ago(xfclose): Don't close stdout here (just flush it),
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.

20 years ago* src/sort.c: Fixx size_t and alloca bugs.
Paul Eggert [Fri, 5 Nov 2004 23:02:46 +0000 (23:02 +0000)]
* src/sort.c: Fixx size_t and alloca bugs.

20 years ago(inittables, sort_buffer_size, getmonth, mergefps,
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.

20 years agoRegenerate.
Paul Eggert [Thu, 4 Nov 2004 00:02:19 +0000 (00:02 +0000)]
Regenerate.

20 years agoremove trailing spaces
Jim Meyering [Wed, 3 Nov 2004 23:31:20 +0000 (23:31 +0000)]
remove trailing spaces

20 years agoLog recent getdate-etc. related changes.
Paul Eggert [Wed, 3 Nov 2004 23:25:32 +0000 (23:25 +0000)]
Log recent getdate-etc. related changes.

20 years agoSync from gnulib.
Paul Eggert [Wed, 3 Nov 2004 23:24:07 +0000 (23:24 +0000)]
Sync from gnulib.

20 years agoInclude "vasprintf.h" since we use vasprintf now.
Paul Eggert [Wed, 3 Nov 2004 23:17:29 +0000 (23:17 +0000)]
Include "vasprintf.h" since we use vasprintf now.

20 years agoSync from gnulib.
Paul Eggert [Wed, 3 Nov 2004 23:15:44 +0000 (23:15 +0000)]
Sync from gnulib.

20 years ago(check-AUTHORS): Don't assume \? works in a sed
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.

20 years ago(version): New variable, containing author info,
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.

20 years agoRemove duplicate lines. Remove bogus "chroot:" in groups line.
Paul Eggert [Wed, 3 Nov 2004 23:10:50 +0000 (23:10 +0000)]
Remove duplicate lines.  Remove bogus "chroot:" in groups line.

20 years ago(libfetish_a_SOURCES): Remove setenv.c.
Paul Eggert [Wed, 3 Nov 2004 23:05:47 +0000 (23:05 +0000)]
(libfetish_a_SOURCES): Remove setenv.c.

20 years agoNew file, from gnulib.
Paul Eggert [Wed, 3 Nov 2004 23:04:03 +0000 (23:04 +0000)]
New file, from gnulib.

20 years ago(gl_PREREQ): Require gt_FUNC_SETENV.
Paul Eggert [Wed, 3 Nov 2004 23:03:17 +0000 (23:03 +0000)]
(gl_PREREQ): Require gt_FUNC_SETENV.

20 years ago.
Jim Meyering [Wed, 3 Nov 2004 20:54:10 +0000 (20:54 +0000)]
.

20 years ago.
Jim Meyering [Wed, 3 Nov 2004 20:53:32 +0000 (20:53 +0000)]
.

20 years agoDon't #define and #undef getopt around <stdlib.h>,
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".

20 years ago* Makefile.am (_W, W_): New macros.
Paul Eggert [Wed, 3 Nov 2004 17:39:23 +0000 (17:39 +0000)]
* Makefile.am (_W, W_): New macros.

20 years ago(_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.

20 years ago(libfetish_a_SOURCES): Add setenv.c and setenv.h.
Jim Meyering [Wed, 3 Nov 2004 09:20:23 +0000 (09:20 +0000)]
(libfetish_a_SOURCES): Add setenv.c and setenv.h.

20 years agoremove trailing blanks
Jim Meyering [Wed, 3 Nov 2004 08:54:51 +0000 (08:54 +0000)]
remove trailing blanks

20 years ago*** empty log message ***
Jim Meyering [Wed, 3 Nov 2004 08:50:38 +0000 (08:50 +0000)]
*** empty log message ***

20 years agoquote(...) file names in diagnostics.
Jim Meyering [Wed, 3 Nov 2004 08:50:11 +0000 (08:50 +0000)]
quote(...) file names in diagnostics.

20 years agoImport from gnulib.
Paul Eggert [Wed, 3 Nov 2004 08:04:49 +0000 (08:04 +0000)]
Import from gnulib.

20 years agoRegenerate.
Paul Eggert [Wed, 3 Nov 2004 07:47:08 +0000 (07:47 +0000)]
Regenerate.

20 years agoSync from gnulib.
Paul Eggert [Wed, 3 Nov 2004 07:44:15 +0000 (07:44 +0000)]
Sync from gnulib.

20 years ago* NEWS: Document getdate changes.
Paul Eggert [Sat, 30 Oct 2004 00:06:22 +0000 (00:06 +0000)]
* NEWS: Document getdate changes.

20 years agoDocument getdate changes.
Paul Eggert [Sat, 30 Oct 2004 00:05:00 +0000 (00:05 +0000)]
Document getdate changes.

20 years agoSync from gnulib (for getdate changes).
Paul Eggert [Fri, 29 Oct 2004 23:46:23 +0000 (23:46 +0000)]
Sync from gnulib (for getdate changes).

20 years agoSync from gnulib.
Paul Eggert [Fri, 29 Oct 2004 23:43:34 +0000 (23:43 +0000)]
Sync from gnulib.

20 years agoDocument TZ better, and adjust to new getdate.texi.
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.

20 years ago`tac /proc/modules' would print nothing
Jim Meyering [Fri, 29 Oct 2004 22:10:36 +0000 (22:10 +0000)]
`tac /proc/modules' would print nothing

20 years ago*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 22:05:04 +0000 (22:05 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 21:59:39 +0000 (21:59 +0000)]
*** empty log message ***

20 years ago * src/tac.c (tac_file): Remove temporary prototype and move this
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.

20 years ago*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 21:55:21 +0000 (21:55 +0000)]
*** empty log message ***

20 years ago`tac /proc/modules' would print nothing
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.

20 years ago*** empty log message ***
Jim Meyering [Fri, 29 Oct 2004 21:50:15 +0000 (21:50 +0000)]
*** empty log message ***

20 years ago* coreutils.texi (Standards conformance): Use "head -10" rather
Paul Eggert [Thu, 28 Oct 2004 07:51:25 +0000 (07:51 +0000)]
* coreutils.texi (Standards conformance): Use "head -10" rather
than "head -1".

20 years ago(Standards conformance): Use "head -10" rather than "head -1" as
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>.

20 years ago* coreutils.texi (pathchk invocation): Options must precede operands.
Paul Eggert [Mon, 25 Oct 2004 03:20:29 +0000 (03:20 +0000)]
* coreutils.texi (pathchk invocation): Options must precede operands.

20 years ago(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.

20 years ago* mktime.c (leapyear): Arg is long int, not int.
Paul Eggert [Sun, 24 Oct 2004 23:25:18 +0000 (23:25 +0000)]
* mktime.c (leapyear): Arg is long int, not int.

20 years ago(leapyear): Arg is long int, not int. Change imported from gnulib.
Paul Eggert [Sun, 24 Oct 2004 23:24:47 +0000 (23:24 +0000)]
(leapyear): Arg is long int, not int.  Change imported from gnulib.

20 years ago.
Jim Meyering [Thu, 21 Oct 2004 10:39:15 +0000 (10:39 +0000)]
.

20 years ago*** empty log message ***
Jim Meyering [Thu, 21 Oct 2004 10:38:56 +0000 (10:38 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Thu, 21 Oct 2004 10:38:37 +0000 (10:38 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Thu, 21 Oct 2004 10:38:09 +0000 (10:38 +0000)]
*** empty log message ***

20 years agoCorrect my patch of 2004-10-18.
Jim Meyering [Thu, 21 Oct 2004 10:37:18 +0000 (10:37 +0000)]
Correct my patch of 2004-10-18.

(rm): Destroy the saved_cwd here (via cwd_state),
if necessary, not in remove_dir.  Otherwise, removing multiple
`.'-relative nonempty directories no longer worked.

20 years ago*** empty log message ***
Jim Meyering [Thu, 21 Oct 2004 09:19:06 +0000 (09:19 +0000)]
*** empty log message ***

20 years ago(TESTS): Add leak-fd.
Jim Meyering [Thu, 21 Oct 2004 09:17:50 +0000 (09:17 +0000)]
(TESTS): Add leak-fd.

20 years ago*** empty log message ***
Jim Meyering [Thu, 21 Oct 2004 09:16:52 +0000 (09:16 +0000)]
*** empty log message ***

20 years ago(TESTS): Add dot-rel.
Jim Meyering [Thu, 21 Oct 2004 08:07:27 +0000 (08:07 +0000)]
(TESTS): Add dot-rel.

20 years ago*** empty log message ***
Jim Meyering [Thu, 21 Oct 2004 08:06:26 +0000 (08:06 +0000)]
*** empty log message ***

20 years ago* src/fmt.c (usage): Improve description of --prefix.
Paul Eggert [Wed, 20 Oct 2004 21:17:15 +0000 (21:17 +0000)]
* src/fmt.c (usage): Improve description of --prefix.

20 years ago(usage): Improve description of --prefix.
Paul Eggert [Wed, 20 Oct 2004 21:16:56 +0000 (21:16 +0000)]
(usage): Improve description of --prefix.
Problem reported by Edward Welbourne.

20 years ago* man/uniq.x: Change summary.
Paul Eggert [Wed, 20 Oct 2004 20:21:23 +0000 (20:21 +0000)]
* man/uniq.x: Change summary.

20 years agoChange summary so that it doesn't imply that uniq writes to its input file.
Paul Eggert [Wed, 20 Oct 2004 20:19:28 +0000 (20:19 +0000)]
Change summary so that it doesn't imply that uniq writes to its input file.

20 years ago*** empty log message ***
Jim Meyering [Mon, 18 Oct 2004 08:59:17 +0000 (08:59 +0000)]
*** empty log message ***

20 years agoPlug a leak that would cause rm or a cross-device mv to fail when
Jim Meyering [Mon, 18 Oct 2004 08:59:12 +0000 (08:59 +0000)]
Plug a leak that would cause rm or a cross-device mv to fail when
operating on too many command-line-specified nonempty directories.

(remove_dir): Destroy the `struct saved_cwd' on the
top of the stack before returning.  This usually closes the file
descriptor that was used to return to the original working directory.
Reported by Cyril Bouthors in
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/3048

20 years ago rm (and mv when moving between partitions) no longer fails when
Jim Meyering [Mon, 18 Oct 2004 08:58:55 +0000 (08:58 +0000)]
  rm (and mv when moving between partitions) no longer fails when
  operating on too many command-line-specified nonempty directories.

20 years ago*** empty log message ***
Jim Meyering [Mon, 18 Oct 2004 08:56:19 +0000 (08:56 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Mon, 18 Oct 2004 08:26:51 +0000 (08:26 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Mon, 18 Oct 2004 08:19:41 +0000 (08:19 +0000)]
*** empty log message ***

20 years ago(validate_file_name): Give a more descriptive
Jim Meyering [Mon, 18 Oct 2004 08:19:26 +0000 (08:19 +0000)]
(validate_file_name): Give a more descriptive
diagnostic when pathconf fails.  This also avoids an unwarranted
warning from gcc-3.3.5 about a format not being a string literal.

20 years ago*** empty log message ***
Jim Meyering [Mon, 18 Oct 2004 07:56:26 +0000 (07:56 +0000)]
*** empty log message ***

20 years ago(main): Remove declaration of unused local, optc.
Jim Meyering [Mon, 18 Oct 2004 07:54:01 +0000 (07:54 +0000)]
(main): Remove declaration of unused local, optc.

20 years ago(main): Remove declaration of unused local, opt.
Jim Meyering [Mon, 18 Oct 2004 07:53:45 +0000 (07:53 +0000)]
(main): Remove declaration of unused local, opt.

20 years ago(main): Remove declaration of unused local, c.
Jim Meyering [Mon, 18 Oct 2004 07:52:19 +0000 (07:52 +0000)]
(main): Remove declaration of unused local, c.

20 years agoRegenerate.
Paul Eggert [Mon, 18 Oct 2004 06:34:20 +0000 (06:34 +0000)]
Regenerate.

20 years agopathchk cleanups, gnulib merge
Paul Eggert [Mon, 18 Oct 2004 06:33:20 +0000 (06:33 +0000)]
pathchk cleanups, gnulib merge

20 years ago(AUTHORS): Add self.
Paul Eggert [Mon, 18 Oct 2004 06:30:49 +0000 (06:30 +0000)]
(AUTHORS): Add self.
Change "path" to "file name" whenever possible.
Remove usage comment, as it was a duplication of the code or doc.
Include <wchar.h> if available.
(mbrlen, mbstate_t) [! (HAVE_MBRLEN && HAVE_MBSTATE_T)]: Define.
(NEED_PATHCONF_WRAPPER, PATH_MAX, PATH_MAX_FOR, NAME_MAX,
pathconf_wrapper, portable_chars, dir_ok): Remove.
(NAME_MAX_MINIMUM, PATH_MAX_MINIMUM): New macros.
(pathconf, _PC_NAME_MAX, _PC_PATH_MAX): Define if nonexistent.
(portable_chars_only): New arg FILELEN.
Don't assume ASCII; we might be on an EBCDIC host.
Don't assume unibyte locale in diagnostic.
(component_start, component_len): New functions.
(validate_file_name): Renamed from validate_path.  All uses changed.
Pretty much a complete rewrite.
Don't make copy of file arg.  Always append trailing slash to
pathconf arg, just in case it's a symlink (this is pure paranoia;
we don't know of any hosts where the trailing slash is required).
Use size_t instead of long int when possible.
Avoid need to call pathconf in most practical cases.
Don't use euidaccess several times to test searchability;
just use lstat once.  Reword diagnostic to put the (often very long)
file names last.

20 years ago(gl_MACROS): Check for mbrlen, for pathchk.
Paul Eggert [Mon, 18 Oct 2004 06:30:22 +0000 (06:30 +0000)]
(gl_MACROS): Check for mbrlen, for pathchk.
(gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.

20 years ago(pathchk invocation): Overall lengths are
Paul Eggert [Mon, 18 Oct 2004 06:29:51 +0000 (06:29 +0000)]
(pathchk invocation): Overall lengths are
OS limits, not file system limits.  Component length checks
apply to all components, not merely to existing ones.  Say
that nonexistent names are not errors.  For -p, omit all
checks based on the underlying file system, not merely length
checks.  Explain what the portabile file name character set is.

20 years agoAdd self to pathchk.
Paul Eggert [Mon, 18 Oct 2004 06:29:19 +0000 (06:29 +0000)]
Add self to pathchk.

20 years agoSync from gnulib.
Paul Eggert [Mon, 18 Oct 2004 05:06:47 +0000 (05:06 +0000)]
Sync from gnulib.