platform/upstream/coreutils.git
23 years ago(save_stdin): Use mkstemp to create temporary file.
Jim Meyering [Mon, 12 Mar 2001 10:52:20 +0000 (10:52 +0000)]
(save_stdin): Use mkstemp to create temporary file.

23 years ago.
Jim Meyering [Mon, 12 Mar 2001 10:15:08 +0000 (10:15 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sun, 11 Mar 2001 15:24:38 +0000 (15:24 +0000)]
*** empty log message ***

23 years agoDisable this test for now.
Jim Meyering [Sun, 11 Mar 2001 15:24:28 +0000 (15:24 +0000)]
Disable this test for now.
It would block when run in the background.

23 years agoclean up wording in last change
Jim Meyering [Sat, 10 Mar 2001 07:56:07 +0000 (07:56 +0000)]
clean up wording in last change

23 years ago*** empty log message ***
Jim Meyering [Sat, 10 Mar 2001 07:53:47 +0000 (07:53 +0000)]
*** empty log message ***

23 years ago (date invocation): Correct the description of how
Jim Meyering [Sat, 10 Mar 2001 07:53:35 +0000 (07:53 +0000)]
  (date invocation): Correct the description of how
  date works when given no format.  Reported by Ole Laursen.

23 years ago*** empty log message ***
Jim Meyering [Sat, 10 Mar 2001 07:52:40 +0000 (07:52 +0000)]
*** empty log message ***

23 years ago.
Jim Meyering [Fri, 9 Mar 2001 18:45:59 +0000 (18:45 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Fri, 9 Mar 2001 18:42:11 +0000 (18:42 +0000)]
*** empty log message ***

23 years ago(my_distdir): Define new variable, and use this
Jim Meyering [Fri, 9 Mar 2001 18:41:03 +0000 (18:41 +0000)]
(my_distdir): Define new variable, and use this
in place of most old uses of $(distdir).

23 years ago.
Jim Meyering [Fri, 9 Mar 2001 18:37:57 +0000 (18:37 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Fri, 9 Mar 2001 18:35:13 +0000 (18:35 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Fri, 9 Mar 2001 18:34:28 +0000 (18:34 +0000)]
*** empty log message ***

23 years ago(usage): Describe %C.
Jim Meyering [Fri, 9 Mar 2001 18:28:33 +0000 (18:28 +0000)]
(usage): Describe %C.

23 years ago(Date directives): Likewise.
Jim Meyering [Fri, 9 Mar 2001 18:28:11 +0000 (18:28 +0000)]
(Date directives): Likewise.

23 years ago.
Jim Meyering [Fri, 9 Mar 2001 18:24:22 +0000 (18:24 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Fri, 9 Mar 2001 18:23:45 +0000 (18:23 +0000)]
*** empty log message ***

23 years agoReflect change in location of input-tty.
Jim Meyering [Fri, 9 Mar 2001 18:23:29 +0000 (18:23 +0000)]
Reflect change in location of input-tty.

23 years agomoved from stty/~
Jim Meyering [Fri, 9 Mar 2001 18:21:56 +0000 (18:21 +0000)]
moved from stty/~

23 years agomoved from stty/~
Jim Meyering [Fri, 9 Mar 2001 18:21:29 +0000 (18:21 +0000)]
moved from stty/~

23 years ago(EXTRA_DIST): Remove input-tty.
Jim Meyering [Fri, 9 Mar 2001 18:20:28 +0000 (18:20 +0000)]
(EXTRA_DIST): Remove input-tty.

23 years agoEnsure that /dev/full is a character device
Jim Meyering [Fri, 9 Mar 2001 18:03:22 +0000 (18:03 +0000)]
Ensure that /dev/full is a character device
(using test -c) as well as being writable, before trying to write to it.
Otherwise, the test could mistakenly append a newline to an existing,
regular, writable, /dev/full file.
Suggested by Ulrich Drepper.

23 years ago*** empty log message ***
Jim Meyering [Thu, 8 Mar 2001 07:48:19 +0000 (07:48 +0000)]
*** empty log message ***

23 years agoInsert the `--text' argument for each test.
Jim Meyering [Thu, 8 Mar 2001 07:48:14 +0000 (07:48 +0000)]
Insert the `--text' argument for each test.

23 years ago(locale_charset): Don't use setlocale(LC_CTYPE,NULL).
Jim Meyering [Tue, 6 Mar 2001 18:11:20 +0000 (18:11 +0000)]
(locale_charset): Don't use setlocale(LC_CTYPE,NULL).
Don't return NULL.

23 years ago(print_unicode_char): Simplify accordingly.
Jim Meyering [Tue, 6 Mar 2001 18:11:01 +0000 (18:11 +0000)]
(print_unicode_char): Simplify accordingly.

23 years ago*** empty log message ***
Jim Meyering [Tue, 6 Mar 2001 18:01:26 +0000 (18:01 +0000)]
*** empty log message ***

23 years agoUpdate for FreeBSD 4.2 and OSF/1 5.1. Add support for DOS/DJGPP.
Jim Meyering [Tue, 6 Mar 2001 18:00:47 +0000 (18:00 +0000)]
Update for FreeBSD 4.2 and OSF/1 5.1. Add support for DOS/DJGPP.

23 years ago(S_TYPEISSHM): Rename parameter to reflect its type.
Jim Meyering [Tue, 6 Mar 2001 05:50:10 +0000 (05:50 +0000)]
(S_TYPEISSHM): Rename parameter to reflect its type.
(main): Pass a `struct stat *', not stat.st_mode to S_TYPEISSHM.

23 years ago*** empty log message *** TEXTUTILS-2_0_12
Jim Meyering [Sun, 4 Mar 2001 21:12:06 +0000 (21:12 +0000)]
*** empty log message ***

23 years ago(alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
Jim Meyering [Sun, 4 Mar 2001 21:11:50 +0000 (21:11 +0000)]
(alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
since the latter now has a `$(top_distdir)/' prefix.

23 years ago*** empty log message ***
Jim Meyering [Sun, 4 Mar 2001 20:53:38 +0000 (20:53 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 4 Mar 2001 20:53:01 +0000 (20:53 +0000)]
*** empty log message ***

23 years ago.
Jim Meyering [Sun, 4 Mar 2001 04:04:13 +0000 (04:04 +0000)]
.

23 years ago(output_char): Reformat so each statement is on a separate line.
Jim Meyering [Sun, 4 Mar 2001 03:14:40 +0000 (03:14 +0000)]
(output_char): Reformat so each statement is on a separate line.

23 years ago.
Jim Meyering [Sun, 4 Mar 2001 03:05:32 +0000 (03:05 +0000)]
.

23 years ago.
Jim Meyering [Sun, 4 Mar 2001 01:48:17 +0000 (01:48 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 19:31:47 +0000 (19:31 +0000)]
*** empty log message ***

23 years ago(die): New function.
Jim Meyering [Sat, 3 Mar 2001 19:31:37 +0000 (19:31 +0000)]
(die): New function.
(create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
fillbuf, main): Use it to regularize error messages.  The only change
in behavior is that write_bytes and the final close used to say "write
error" but now give just the output file name, which should be enough.

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 19:21:49 +0000 (19:21 +0000)]
*** empty log message ***

23 years ago(xfclose): Add FILE arg, and report the file name
Jim Meyering [Sat, 3 Mar 2001 19:21:41 +0000 (19:21 +0000)]
(xfclose): Add FILE arg, and report the file name
on error.  All callers changed.

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 19:19:12 +0000 (19:19 +0000)]
*** empty log message ***

23 years ago(main): When fclose (stdin) fails, do not mention
Jim Meyering [Sat, 3 Mar 2001 19:19:06 +0000 (19:19 +0000)]
(main): When fclose (stdin) fails, do not mention
the output file in the error message; mention "-" instead.

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 19:12:29 +0000 (19:12 +0000)]
*** empty log message ***

23 years ago(xfopen): Set have_read_stdin to 1 only if file is "-".
Jim Meyering [Sat, 3 Mar 2001 19:12:23 +0000 (19:12 +0000)]
(xfopen): Set have_read_stdin to 1 only if file is "-".
Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
stdin, stdout, or stderr.
(xfclose): stdout is no longer a special case.
(main): Close output file, don't just flush it; there might be
an error on the close.

23 years ago(libfetish_a_SOURCES): Add dup-safer.c, fopen-safer.c.
Jim Meyering [Sat, 3 Mar 2001 19:06:54 +0000 (19:06 +0000)]
(libfetish_a_SOURCES): Add dup-safer.c, fopen-safer.c.
(noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 19:06:28 +0000 (19:06 +0000)]
*** empty log message ***

23 years agofrom Paul Eggert
Jim Meyering [Sat, 3 Mar 2001 19:05:36 +0000 (19:05 +0000)]
from Paul Eggert

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 18:53:53 +0000 (18:53 +0000)]
*** empty log message ***

23 years ago(initbuf): If the desired size cannot be
Jim Meyering [Sat, 3 Mar 2001 18:53:44 +0000 (18:53 +0000)]
(initbuf): If the desired size cannot be
allocated, repeatedly halve it until allocation succeeds.

23 years ago(parse_field_count): Comment fix.
Jim Meyering [Sat, 3 Mar 2001 18:40:44 +0000 (18:40 +0000)]
(parse_field_count): Comment fix.

23 years ago.
Jim Meyering [Sat, 3 Mar 2001 18:38:22 +0000 (18:38 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 3 Mar 2001 18:23:37 +0000 (18:23 +0000)]
*** empty log message ***

23 years agoTune allocation and comparison of nodes
Jim Meyering [Sat, 3 Mar 2001 18:23:29 +0000 (18:23 +0000)]
Tune allocation and comparison of nodes
representing temp files.  This improved CPU performance of
'sort -S 1 *.[ch]' by 17% on my host.

(struct tempnode): name member now uses struct hack.
(temphead): Now a pointer, not a structure.  All uses changed.
(create_temp_file): Allocate node using struct hack.
(zaptemp): Free node using struct hack.  Use pointer comparison, not
string comparison.

23 years ago(eolchar, trim_trailing_blanks): Now static.
Jim Meyering [Fri, 2 Mar 2001 03:44:49 +0000 (03:44 +0000)]
(eolchar, trim_trailing_blanks): Now static.

23 years ago*** empty log message ***
Jim Meyering [Fri, 2 Mar 2001 03:41:50 +0000 (03:41 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Fri, 2 Mar 2001 03:14:38 +0000 (03:14 +0000)]
*** empty log message ***

23 years ago(jm_MACROS): Use mkstemp replacement if the system
Jim Meyering [Fri, 2 Mar 2001 03:14:31 +0000 (03:14 +0000)]
(jm_MACROS): Use mkstemp replacement if the system
lacks mkstemp.  Compile our own tempname.c if we compile our own
mkstemp.c, as mkstemp relies on tempname.

23 years agofrom GNU libc
Jim Meyering [Fri, 2 Mar 2001 03:13:34 +0000 (03:13 +0000)]
from GNU libc

23 years agofrom GNU libc
Jim Meyering [Fri, 2 Mar 2001 03:12:47 +0000 (03:12 +0000)]
from GNU libc

23 years ago*** empty log message ***
Jim Meyering [Fri, 2 Mar 2001 03:10:42 +0000 (03:10 +0000)]
*** empty log message ***

23 years ago.
Jim Meyering [Fri, 2 Mar 2001 03:06:08 +0000 (03:06 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Fri, 2 Mar 2001 02:58:30 +0000 (02:58 +0000)]
*** empty log message ***

23 years ago'sort' race condition fixes.
Jim Meyering [Fri, 2 Mar 2001 02:58:23 +0000 (02:58 +0000)]
'sort' race condition fixes.

Defend against a DoS attack where someone else creates a
temporary file with the same name as ours.  Use mkstemp to do
this, supplying our own mkstemp if the system doesn't have one.

Also, fix a race condition during cleanup on hosts without
sigaction.

(NAME_MAX_IN_DIR): Remove.
(sigprocmask, sigset_t): New macros, defined only on older hosts.
(caught_signals): New var.
(xtmpfopen, tempname): Removed.
(create_temp_file): New function, combining the functions of the old
xtmpfopen and tempname.  All callers changed.
Use mkstemp to create the file.
(sighandler): On hosts without sigaction, ignore signals while
cleaning up, instead of letting them interrupt cleanup.
(main): Initialize caught_signals.  On hosts with sigaction, block all
caught signals while handling one.  Remove duplicate code.

23 years ago*** empty log message ***
Jim Meyering [Thu, 1 Mar 2001 05:33:25 +0000 (05:33 +0000)]
*** empty log message ***

23 years ago(jm_AC_DOS): Remove extra backslashes, now that
Jim Meyering [Thu, 1 Mar 2001 05:33:18 +0000 (05:33 +0000)]
(jm_AC_DOS): Remove extra backslashes, now that
AH_VERBATIM really does output its argument verbatim.

23 years ago*** empty log message ***
Jim Meyering [Sun, 25 Feb 2001 07:55:33 +0000 (07:55 +0000)]
*** empty log message ***

23 years agoFix typo: '-d=1may' -> '-d 1may'.
Jim Meyering [Sun, 25 Feb 2001 07:55:27 +0000 (07:55 +0000)]
Fix typo: '-d=1may' -> '-d 1may'.
Fix and clarify time zone usage in 'date' examples.

23 years ago*** empty log message ***
Jim Meyering [Fri, 23 Feb 2001 08:52:27 +0000 (08:52 +0000)]
*** empty log message ***

23 years ago(keycompare): Move declarations of locals, lena and lenb,
Jim Meyering [Thu, 22 Feb 2001 15:11:08 +0000 (15:11 +0000)]
(keycompare): Move declarations of locals, lena and lenb,
into the inner scope where they are used.

23 years ago(main): Remove assignment-in-if-expression.
Jim Meyering [Wed, 21 Feb 2001 10:56:06 +0000 (10:56 +0000)]
(main): Remove assignment-in-if-expression.
In fact, remove t_errno altogether.

23 years ago*** empty log message ***
Jim Meyering [Wed, 21 Feb 2001 10:50:07 +0000 (10:50 +0000)]
*** empty log message ***

23 years agoAdd two tests of existing behavior -- both will
Jim Meyering [Wed, 21 Feb 2001 10:49:58 +0000 (10:49 +0000)]
Add two tests of existing behavior -- both will
have to be changed (soon after release), once ls is fixed.

23 years ago.
Jim Meyering [Tue, 20 Feb 2001 23:04:45 +0000 (23:04 +0000)]
.

23 years agotest for existing behavior
Jim Meyering [Tue, 20 Feb 2001 23:00:33 +0000 (23:00 +0000)]
test for existing behavior

23 years ago.
Jim Meyering [Tue, 20 Feb 2001 22:58:44 +0000 (22:58 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Tue, 20 Feb 2001 22:58:16 +0000 (22:58 +0000)]
*** empty log message ***

23 years ago(FULL_TIME_OPTION): Renamed from FULL_TIME, for
Jim Meyering [Tue, 20 Feb 2001 22:53:38 +0000 (22:53 +0000)]
(FULL_TIME_OPTION): Renamed from FULL_TIME, for
consistency with the other enum values.

23 years ago(SI_OPTION): New enum value.
Jim Meyering [Tue, 20 Feb 2001 22:52:31 +0000 (22:52 +0000)]
(SI_OPTION): New enum value.
(long_options): Use it instead of 'H' for --si.
(decode_switches): Warn that -H will change soon.
(usage): Likewise.

23 years agorevert last change, until after release
Jim Meyering [Tue, 20 Feb 2001 22:48:39 +0000 (22:48 +0000)]
revert last change, until after release

23 years ago*** empty log message ***
Jim Meyering [Tue, 20 Feb 2001 22:48:18 +0000 (22:48 +0000)]
*** empty log message ***

23 years agorevert last change, until after the release
Jim Meyering [Tue, 20 Feb 2001 22:48:00 +0000 (22:48 +0000)]
revert last change, until after the release

23 years ago`ls -Fd symlink-to-directory' would print a trailing `/'
Jim Meyering [Tue, 20 Feb 2001 08:16:47 +0000 (08:16 +0000)]
`ls -Fd symlink-to-directory' would print a trailing `/'
Now it prints a trailing `@'.

(gobble_file): Don't clobber lstat stats of command line
arguments when using -d and -F (--directory and --classify) options.

23 years ago*** empty log message ***
Jim Meyering [Mon, 19 Feb 2001 08:53:37 +0000 (08:53 +0000)]
*** empty log message ***

23 years ago(AUTHORS): Add Paul Eggert.
Jim Meyering [Mon, 19 Feb 2001 08:53:24 +0000 (08:53 +0000)]
(AUTHORS): Add Paul Eggert.

23 years ago*** empty log message ***
Jim Meyering [Mon, 19 Feb 2001 08:52:58 +0000 (08:52 +0000)]
*** empty log message ***

23 years agoFix a race condition: freed storage accessed during a signal handler.
Jim Meyering [Mon, 19 Feb 2001 08:52:53 +0000 (08:52 +0000)]
Fix a race condition: freed storage accessed during a signal handler.

(struct tempnode.next): Now volatile.
(zaptemp): Free the file name after removing it from the temp list,
not before, because a signal can arrive between the two actions
and cleanup () traverses the list.

23 years ago*** empty log message ***
Jim Meyering [Mon, 19 Feb 2001 08:51:00 +0000 (08:51 +0000)]
*** empty log message ***

23 years ago(jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
Jim Meyering [Mon, 19 Feb 2001 08:50:54 +0000 (08:50 +0000)]
(jm_CHECK_ALL_HEADERS): Check for sys/resource.h.

23 years ago*** empty log message ***
Jim Meyering [Mon, 19 Feb 2001 08:50:18 +0000 (08:50 +0000)]
*** empty log message ***

23 years agoCheck for input size, and do not overallocate memory.
Jim Meyering [Mon, 19 Feb 2001 08:50:12 +0000 (08:50 +0000)]
Check for input size, and do not overallocate memory.
Also check for memory quotas.

Revamp storage management so that line tables and character data are
taken from the same buffer.  Line tables are now in reverse order,
since they grow down while the character data grow up.

(<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
(struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
is not defined.
(RLIMIT_AS): Define to RLIMIT_DATA if not defined.
(struct lines): Remove.
(struct buffer): New members nlines, line_bytes, eof.
Remove member newline_free; no longer needed, since the code no longer
runs out of line table space.
(SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
(sort_size): Renamed from sortalloc; now applies to the sum of the
character data and the line table, not just the character data.
(MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
(linelength): remove.
(specify_sort_size): Don't worry about the distinction between the
character data and the line table; that is now the caller's
responsibility.
(default_sort_size): Return the value, instead of being executed for
side effect.  Return half of available memory, or 1/16 of total memory,
whichever is greater; except do not exceed 1/2 of quota.
(sort_buffer_size): New function.
(initbuf): New arg LINE_BYTES.  Ensure that the line array is properly
aligned.  Initialize the new set of struct buffer members.
(buffer_linelim): New function.
(fillbuf): Return int, not size_t, since the callers merely care
whether the result is nonzero.  New arg FILE so that error messages
can report the file name.  Keep track of eof.  Initialize the line
table too, taking its memory from the input buffer's memory; this
subsumes the old findlines function and removes the need for worrying
about running out of line table entries.
(checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
management regime, in particular the fact that line tables are now
filled in by fillbuf and are in reverse order.
(checkfp): Now takes char *, not const char *, since subroutines
require that now.  Rewrite to avoid lint and duplicate code.
If line length alloc calculation overflows,
simply allocate enough memory to hold the line.
(mergefps): New arg FILES, used for buffer size calculation and error
messages.  Rewrite to avoid lint.  Do not loop if savealloc*2
overflows.
(mergefps, merge): Zap temporary files eagerly rather than lazily;
this is needed because we now pass FILES to mergefps.
(sortlines): Args now point at end of arrays, not at beginnings.
(sort): Do not allocate temporary line array for sortlines;
instead, take the space from the same buffer.
(main): Adjust to sort_size and default_sort_size changes.

23 years ago*** empty log message ***
Jim Meyering [Mon, 19 Feb 2001 08:46:00 +0000 (08:46 +0000)]
*** empty log message ***

23 years ago(wc): Rename innermost `buf' to avoid shadowing warning.
Jim Meyering [Mon, 19 Feb 2001 08:42:25 +0000 (08:42 +0000)]
(wc): Rename innermost `buf' to avoid shadowing warning.
(wc): Rename local `wc' to avoid shadowing function name.

23 years ago*** empty log message ***
Jim Meyering [Sun, 18 Feb 2001 19:39:38 +0000 (19:39 +0000)]
*** empty log message ***

23 years ago(TESTS): Add isatty.
Jim Meyering [Sun, 18 Feb 2001 19:39:33 +0000 (19:39 +0000)]
(TESTS): Add isatty.

23 years agoNew test, for the bug fixed below.
Jim Meyering [Sun, 18 Feb 2001 19:39:17 +0000 (19:39 +0000)]
New test, for the bug fixed below.

23 years ago*** empty log message *** FILEUTILS-4_0_41
Jim Meyering [Sun, 18 Feb 2001 16:56:57 +0000 (16:56 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 18 Feb 2001 16:27:16 +0000 (16:27 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 18 Feb 2001 16:25:57 +0000 (16:25 +0000)]
*** empty log message ***