platform/upstream/coreutils.git
29 years ago.
Jim Meyering [Thu, 27 Jul 1995 04:04:18 +0000 (04:04 +0000)]
.

29 years ago.
Jim Meyering [Thu, 27 Jul 1995 03:57:20 +0000 (03:57 +0000)]
.

29 years agoRemove spurious space.
Jim Meyering [Thu, 27 Jul 1995 03:57:10 +0000 (03:57 +0000)]
Remove spurious space.

29 years ago(tail_bytes) [from_start]: For regular files, seek
Jim Meyering [Thu, 27 Jul 1995 03:56:35 +0000 (03:56 +0000)]
(tail_bytes) [from_start]: For regular files, seek
relative to the initial input file pointer position, not
necessarily from the beginning of the file.
[!from_start]: Don't back up past the initial position of the
input file pointer.
(tail_lines): Call file_lines only if FD refers to a regular file
with its file pointer positioned at beginning of file.  Otherwise,
call pipe_lines.  This is a kludge.  Once there's a decent test
suite, fix this properly.
Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
would output both lines of the input file even though the first had
already been read.  Reported by John Roll (john@panic.harvard.edu).

29 years ago(have_read_stdin): New global variable.
Jim Meyering [Thu, 27 Jul 1995 03:45:11 +0000 (03:45 +0000)]
(have_read_stdin): New global variable.
(md5_file, md5_check): Set it.
(main): Use it.

[OPENOPTS]: Depend explicitly on BINARY.
(md5_file): Take a new parameter, MD5_RESULT, and no longer
generate output.
(md5_check): Invoke md5_file instead of calling fopen directly.
When giving a diagnostic for a line with invalid format, also report
the line number.
(main): Generate output after a successful md5_file call.
[in many places]: Upon detection of an error, rather than exiting
immediately, issue a diagnostic, note that an error occurred and
exit later.

29 years ago(main): When too few arguments are given, don't just
Jim Meyering [Tue, 25 Jul 1995 04:50:04 +0000 (04:50 +0000)]
(main): When too few arguments are given, don't just
issue the usage message; also report why.

29 years ago[_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
Jim Meyering [Tue, 25 Jul 1995 02:48:00 +0000 (02:48 +0000)]
[_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.

29 years ago(md5_check): New function -- extracted from main.
Jim Meyering [Sat, 22 Jul 1995 05:16:40 +0000 (05:16 +0000)]
(md5_check): New function -- extracted from main.

29 years agoreformat comment
Jim Meyering [Fri, 21 Jul 1995 06:27:39 +0000 (06:27 +0000)]
reformat comment

29 years ago.
Jim Meyering [Fri, 21 Jul 1995 06:23:11 +0000 (06:23 +0000)]
.

29 years ago(md5_file): New function -- extracted from main.
Jim Meyering [Fri, 21 Jul 1995 06:18:58 +0000 (06:18 +0000)]
(md5_file): New function -- extracted from main.
(main): Call the new function instead of doing all that in an if stmt.
Always use "%s" format rather than raw filename as format argument
in printf-style functions like error.  Otherwise, filenames containing
e.g. `%s' lose.
Remove all traces of `old format'.  There is only one format now.
The compatible one.

29 years ago(md5_stream): Update prototype.
Jim Meyering [Fri, 21 Jul 1995 04:48:03 +0000 (04:48 +0000)]
(md5_stream): Update prototype.
[__P]: Define macro.

29 years ago(md5_stream): Check for read failure and return
Jim Meyering [Fri, 21 Jul 1995 04:46:50 +0000 (04:46 +0000)]
(md5_stream): Check for read failure and return
indication of success rather than second argument.

29 years agoUse EXIT_FAILURE and EXIT_SUCCESS.
Jim Meyering [Fri, 21 Jul 1995 04:45:40 +0000 (04:45 +0000)]
Use EXIT_FAILURE and EXIT_SUCCESS.
(main): Report an error if md5_stream fails.  Otherwise, running
`md5sum dir-on-mounted-filesystem' always reported the checksum
for an empty file.  Now it gets the `is a directory' error.
Greg McGary reported that the released version got stuck in an
infinite loop with such arguments.

29 years ago(split_3): Accept only old format.
Jim Meyering [Thu, 20 Jul 1995 21:09:57 +0000 (21:09 +0000)]
(split_3): Accept only old format.
Properly handle file names with leading and trailing white space.

29 years agomore comment tweaks
Jim Meyering [Thu, 20 Jul 1995 19:22:28 +0000 (19:22 +0000)]
more comment tweaks

29 years agoCorrect typo in Copyright.
Jim Meyering [Thu, 20 Jul 1995 19:13:23 +0000 (19:13 +0000)]
Correct typo in Copyright.
Reformat paragraph so line with new FSF address fits in 80 columns.

29 years ago(usage): Move it to precede all other functions.
Jim Meyering [Thu, 20 Jul 1995 19:10:08 +0000 (19:10 +0000)]
(usage): Move it to precede all other functions.
Fiddle comments.

29 years agoNew version from Drepper.
Jim Meyering [Thu, 20 Jul 1995 19:08:08 +0000 (19:08 +0000)]
New version from Drepper.

29 years ago.
Jim Meyering [Thu, 20 Jul 1995 17:52:49 +0000 (17:52 +0000)]
.

29 years ago.
Jim Meyering [Sun, 16 Jul 1995 23:43:17 +0000 (23:43 +0000)]
.

29 years ago.
Jim Meyering [Sun, 16 Jul 1995 23:41:17 +0000 (23:41 +0000)]
.

29 years ago.
Jim Meyering [Sun, 16 Jul 1995 23:39:51 +0000 (23:39 +0000)]
.

29 years agoAdd #else block after #ifdef VMS.
Jim Meyering [Sun, 16 Jul 1995 05:47:55 +0000 (05:47 +0000)]
Add #else block after #ifdef VMS.
(main): Rename local variable.
Add FIXME: allow newlines in filenames.
Detect and report failed fclose calls on stdout and checkfile_stream.

29 years ago(build_spec_list): Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to
Jim Meyering [Sun, 16 Jul 1995 05:39:09 +0000 (05:39 +0000)]
(build_spec_list): Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to
be of type size_t, not int.
(main): Declare NR and CHARS_READ to be of type long, not int.

29 years ago(unqote): Comment out unreachable break stmts.
Jim Meyering [Wed, 12 Jul 1995 03:13:40 +0000 (03:13 +0000)]
(unqote): Comment out unreachable break stmts.
(append_range): Declare FIRST and LAST parameters to be unsigned int,
not size_t.
(find_closing_delim): Clean up interface, separating boolean success
indicator and index.
(find_bracketed_repeat): Likewise.
(build_spec_list): Adapt to use new interfaces.

29 years ago(main): Comment out unreachable break stmt.
Jim Meyering [Wed, 12 Jul 1995 03:06:49 +0000 (03:06 +0000)]
(main): Comment out unreachable break stmt.

29 years ago(dump): Convert to use smaller -- but seemingly equivalent -- patch.
Jim Meyering [Wed, 12 Jul 1995 03:06:03 +0000 (03:06 +0000)]
(dump): Convert to use smaller -- but seemingly equivalent -- patch.

29 years agoReorder functions so main is last, so no forward dcls are needed.
Jim Meyering [Wed, 12 Jul 1995 03:01:33 +0000 (03:01 +0000)]
Reorder functions so main is last, so no forward dcls are needed.

29 years ago(tail): Explicitly cast to long the N_UNITS argumennt in
Jim Meyering [Wed, 12 Jul 1995 02:59:44 +0000 (02:59 +0000)]
(tail): Explicitly cast to long the N_UNITS argumennt in
call to tail_lines.  Otherwise, NetBSD lost because N_UNITS (of type
off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
long.  Reported by Dan Hagerty (hag@gnu.ai.it.edu).

29 years ago(main): Add UCHAR casts.
Jim Meyering [Sun, 9 Jul 1995 17:06:41 +0000 (17:06 +0000)]
(main): Add UCHAR casts.

29 years ago.
Jim Meyering [Sun, 9 Jul 1995 16:42:40 +0000 (16:42 +0000)]
.

29 years ago(main): When using obsolescent +pos -pos syntax, allow
Jim Meyering [Sun, 9 Jul 1995 16:42:31 +0000 (16:42 +0000)]
(main): When using obsolescent +pos -pos syntax, allow
omission of field spec only when character offset is specified.
Otherwise, -. +. would be accepted.

29 years ago(main): Allow field spec, M, to be omitted in +M.N or -M.N
Jim Meyering [Sun, 9 Jul 1995 02:25:11 +0000 (02:25 +0000)]
(main): Allow field spec, M, to be omitted in +M.N or -M.N
position specification.  Omitting M is equivalent to specifying `0'
for M.  From Rick Sladkey (jrs@world.std.com).

29 years ago.
Jim Meyering [Fri, 7 Jul 1995 04:46:18 +0000 (04:46 +0000)]
.

29 years ago(dump): Correct loop-termination criterion.
Jim Meyering [Fri, 7 Jul 1995 04:46:03 +0000 (04:46 +0000)]
(dump): Correct loop-termination criterion.
Before, running `printf 1234| ./od --width=4 --read-bytes=4'
printed output for 8 bytes -- the last four were garbage.
This happened only when the dump limit, N, was specified (with
--read-bytes=N) and N was a multiple of bytes_per_block
(usually 16, but 4 in this example).  From Andreas Schwab.

29 years agoRemove trailing white space.
Jim Meyering [Thu, 6 Jul 1995 16:07:07 +0000 (16:07 +0000)]
Remove trailing white space.

29 years ago(od): Remove space beteen -w and optional argument.
Jim Meyering [Thu, 6 Jul 1995 16:06:32 +0000 (16:06 +0000)]
(od): Remove space beteen -w and optional argument.

29 years ago.
Jim Meyering [Mon, 3 Jul 1995 03:12:54 +0000 (03:12 +0000)]
.

29 years ago.
Jim Meyering [Mon, 3 Jul 1995 03:11:05 +0000 (03:11 +0000)]
.

29 years ago(split_3): Rewrite to parse Plumb/Lankester format as well.
Jim Meyering [Mon, 3 Jul 1995 03:10:59 +0000 (03:10 +0000)]
(split_3): Rewrite to parse Plumb/Lankester format as well.
(main): Write (de facto) standard Plumb/Lankester format.
New option: --quiet.
Check option no longer takes an argument.
When checking, exit status reflects success.

29 years agoRemove unused dcl of isnumber.
Jim Meyering [Sun, 25 Jun 1995 01:46:32 +0000 (01:46 +0000)]
Remove unused dcl of isnumber.

29 years ago(parse_group): Use xstrtoul instead of isnumber; the latter would
Jim Meyering [Sun, 25 Jun 1995 01:44:35 +0000 (01:44 +0000)]
(parse_group): Use xstrtoul instead of isnumber; the latter would
silently overflow, accepting a group id larger than INT_MAX.
(isnumber): Remove now-unused static function.
(change_file_group) [MAXUID]: Give a more descriptive message
when numeric group id is larger than MAXUID.

29 years agomerge with 1.12a
Jim Meyering [Sat, 24 Jun 1995 22:02:25 +0000 (22:02 +0000)]
merge with 1.12a

29 years ago.
Jim Meyering [Sat, 24 Jun 1995 21:34:02 +0000 (21:34 +0000)]
.

29 years agoDon't conditionalize use of "inline". Autoconf takes care of defining
Jim Meyering [Sat, 24 Jun 1995 21:33:52 +0000 (21:33 +0000)]
Don't conditionalize use of "inline".  Autoconf takes care of defining
it away for compilers that don't grok it.

29 years ago.
Jim Meyering [Sat, 24 Jun 1995 21:22:11 +0000 (21:22 +0000)]
.

29 years ago.
Jim Meyering [Sat, 24 Jun 1995 21:17:13 +0000 (21:17 +0000)]
.

29 years agoUndefine min and/or max before defining to avoid redefinition warning
Jim Meyering [Sat, 24 Jun 1995 21:10:12 +0000 (21:10 +0000)]
Undefine min and/or max before defining to avoid redefinition warning
on systems.

29 years ago(read_input): Rename paramater MAX to MAX_N_BYTES. To avoid potential
Jim Meyering [Sat, 24 Jun 1995 21:07:55 +0000 (21:07 +0000)]
(read_input): Rename paramater MAX to MAX_N_BYTES.  To avoid potential
conflict with max macro from some system's header files and bad pre-ANSI
compilers.

29 years ago[uint32]: When testing for 32-bit arithmetic type,
Jim Meyering [Sat, 24 Jun 1995 20:53:17 +0000 (20:53 +0000)]
[uint32]: When testing for 32-bit arithmetic type,
also check `unsigned long', as a concession to systems with
int's smaller than 32 bits.

29 years ago(usage): Fix typo.
Jim Meyering [Sat, 24 Jun 1995 20:38:52 +0000 (20:38 +0000)]
(usage): Fix typo.

29 years ago(main): Include program name in --version output.
Jim Meyering [Thu, 22 Jun 1995 18:43:14 +0000 (18:43 +0000)]
(main): Include program name in --version output.

29 years ago[join]: Redefine. Otherwise, systems (Unicos for one) with
Jim Meyering [Thu, 22 Jun 1995 04:03:33 +0000 (04:03 +0000)]
[join]: Redefine.  Otherwise, systems (Unicos for one) with
headers that have a different prototype for `join' get an error.

29 years ago.
Jim Meyering [Thu, 22 Jun 1995 04:00:26 +0000 (04:00 +0000)]
.

29 years ago[word]: Redefine. Otherwise, systems (Unicos for one) with
Jim Meyering [Thu, 22 Jun 1995 03:59:55 +0000 (03:59 +0000)]
[word]: Redefine.  Otherwise, systems (Unicos for one) with
headers that define `word' to be a type get syntax errors because
of the variable by the same name.

29 years ago(interrupt_handler): Declare to have a single integer
Jim Meyering [Thu, 22 Jun 1995 03:59:27 +0000 (03:59 +0000)]
(interrupt_handler): Declare to have a single integer
parameter.  Otherwise, some compilers failed with a type mismatch
error in sa_handler assignment.

29 years ago(main): Remove spurious colon in getopt spec string.
Jim Meyering [Thu, 22 Jun 1995 03:58:21 +0000 (03:58 +0000)]
(main): Remove spurious colon in getopt spec string.
From Ken Pizzini <kenp@spry.com>.

29 years ago(md5_file): Initialize two elements of LEN portably,
Jim Meyering [Tue, 20 Jun 1995 12:00:55 +0000 (12:00 +0000)]
(md5_file): Initialize two elements of LEN portably,
rather than with ANSI aggregate initialization.  Reported by
Edzer Pebesma <Edzer.Pebesma@rivm.nl>.

29 years agomerge with 1.12
Jim Meyering [Sun, 18 Jun 1995 19:33:31 +0000 (19:33 +0000)]
merge with 1.12

29 years ago.
Jim Meyering [Sun, 18 Jun 1995 14:24:56 +0000 (14:24 +0000)]
.

29 years ago.
Jim Meyering [Sun, 18 Jun 1995 14:21:58 +0000 (14:21 +0000)]
.

29 years ago(process_buffer): Copy values from struct into
Jim Meyering [Sun, 18 Jun 1995 14:21:50 +0000 (14:21 +0000)]
(process_buffer): Copy values from struct into
individual local variables before performing computation on them,
then copy results back into returned struct.  Solely for better
optimization by compilers that can't keep struct members in
registers.  From Ulrich Drepper.

29 years ago.
Jim Meyering [Fri, 16 Jun 1995 04:25:05 +0000 (04:25 +0000)]
.

29 years ago.
Jim Meyering [Fri, 16 Jun 1995 04:21:08 +0000 (04:21 +0000)]
.

29 years ago.
Jim Meyering [Fri, 16 Jun 1995 04:15:25 +0000 (04:15 +0000)]
.

29 years ago(split_3): Unprotoize.
Jim Meyering [Fri, 16 Jun 1995 04:13:36 +0000 (04:13 +0000)]
(split_3): Unprotoize.
(hex_digits): Unprotoize.
(main): Interpret `no file args' as request to read from stdin.
(usage): Reflect that change.

29 years agoHalf-assed patch from Karl -- probably need to change `file name' to `filename'.
Jim Meyering [Fri, 16 Jun 1995 03:59:41 +0000 (03:59 +0000)]
Half-assed patch from Karl -- probably need to change `file name' to `filename'.

29 years ago.
Jim Meyering [Fri, 16 Jun 1995 03:26:56 +0000 (03:26 +0000)]
.

29 years agoRemove unnecessary uses of `defined' in #if* tests.
Jim Meyering [Fri, 16 Jun 1995 03:14:19 +0000 (03:14 +0000)]
Remove unnecessary uses of `defined' in #if* tests.
Don't use #elif.  Some older compilers don't grok it.
(split_3): New function to parse out sum, flag, and filename
when reading check file.
(hex_digits): Remove length parameter since string parameter is
now nul-terminated.
(main): Don't allocate separate arrays for filename and sum
when checking.  Get pointers into line buffer with split_3 instead
of using sscanf.

29 years agoDon't include values.h.
Jim Meyering [Thu, 15 Jun 1995 18:44:48 +0000 (18:44 +0000)]
Don't include values.h.
[__P]: Undefine it.

[UNIX || unix]: Also test __UNIX__, __unix__,
and _POSIX_VERSION.  Reported by Arne H. Juul.

29 years ago.
Jim Meyering [Thu, 15 Jun 1995 18:44:27 +0000 (18:44 +0000)]
.

29 years agomerge with 1.11.5b
Jim Meyering [Thu, 15 Jun 1995 16:46:34 +0000 (16:46 +0000)]
merge with 1.11.5b

29 years agopatch from drepper
Jim Meyering [Thu, 15 Jun 1995 15:02:01 +0000 (15:02 +0000)]
patch from drepper

29 years agoAlloca fix for ConvexOS-11.0.
Jim Meyering [Thu, 15 Jun 1995 14:55:26 +0000 (14:55 +0000)]
Alloca fix for ConvexOS-11.0.

29 years agoUse void* alloca, not char*. The latter lost on convexOS.
Jim Meyering [Thu, 15 Jun 1995 03:57:49 +0000 (03:57 +0000)]
Use void* alloca, not char*.  The latter lost on convexOS.

29 years agomd5sum docs from Ulrich.
Jim Meyering [Thu, 15 Jun 1995 03:43:52 +0000 (03:43 +0000)]
md5sum docs from Ulrich.

29 years ago(main): Rename `char binary' to type_flag to avoid confusion with `int binary'.
Jim Meyering [Thu, 15 Jun 1995 03:18:13 +0000 (03:18 +0000)]
(main): Rename `char binary' to type_flag to avoid confusion with `int binary'.

29 years agoDon't use #elif. Some old C compilers don't recognize it.
Jim Meyering [Thu, 15 Jun 1995 03:15:37 +0000 (03:15 +0000)]
Don't use #elif.  Some old C compilers don't recognize it.
(hex_digits): New function.
(result): Give ctx parameter the `const' attribute.
(usage): Rewrite to make it clearer that there are three modes.
(main): Process all options before generating any output.
In particular, collect all --string options rather than operating
on them as they are encountered.

Allow --check=-.  Before it tried to open the file named `-'.

Detect bogus input when --check'ing: non-hex, non-[tb] flag.

Map to lower case all hex digits read from check file.

29 years ago.
Jim Meyering [Wed, 14 Jun 1995 03:44:16 +0000 (03:44 +0000)]
.

29 years ago.
Jim Meyering [Wed, 14 Jun 1995 02:24:18 +0000 (02:24 +0000)]
.

29 years ago[NDEBUG]: Define it to disable assertions.
Jim Meyering [Wed, 14 Jun 1995 02:23:48 +0000 (02:23 +0000)]
[NDEBUG]: Define it to disable assertions.
(is_char_class_member): Set a variable in each branch of switch stmt
and return that value after the switch (rather than returning directly
from every branch).
(unquote): More int->size_t changes.
(build_spec_list): More int->size_t changes.
Be very careful about comparison now that variables are unsigned:
Use i + 2 < len rather than i < len - 2.  The latter failed for len < 2.

29 years ago.
Jim Meyering [Tue, 13 Jun 1995 04:46:19 +0000 (04:46 +0000)]
.

29 years ago(xfclose): Don't try to flush stdin, only stdout.
Jim Meyering [Tue, 13 Jun 1995 04:46:12 +0000 (04:46 +0000)]
(xfclose): Don't try to flush stdin, only stdout.
Otherwise, at least Ultrix-4.3's fflush would return EOF.
Reported by Jim Blandy (jimb@cyclic.com).

29 years ago.
Jim Meyering [Tue, 13 Jun 1995 04:33:45 +0000 (04:33 +0000)]
.

29 years ago[struct Spec_list] (indefinite_repeat_element): New member.
Jim Meyering [Tue, 13 Jun 1995 04:08:59 +0000 (04:08 +0000)]
[struct Spec_list] (indefinite_repeat_element): New member.
Use size_t rather than int or unsigned long where reasonable.
(get_spec_status): Make interface cleaner.
(get_s1_spec_status): New function.
(get_s2_spec_status): New function.
(validate): Use new functions.

29 years agoIndent some things.
Jim Meyering [Tue, 13 Jun 1995 04:02:22 +0000 (04:02 +0000)]
Indent some things.
(long_options): Add NULL entry.  From Uli.
Touch up some comments.
(process_buffer): Bracket definition of OP with do...while(0) so stmts can be
semicolon terminated.

29 years ago(non_neg_strtol): Don't compare signed and unsigned.
Jim Meyering [Mon, 12 Jun 1995 18:28:24 +0000 (18:28 +0000)]
(non_neg_strtol): Don't compare signed and unsigned.

29 years ago[!__GNUC__]: Define INLINE to /* empty */.
Jim Meyering [Mon, 12 Jun 1995 14:42:41 +0000 (14:42 +0000)]
[!__GNUC__]: Define INLINE to /* empty */.

29 years ago.
Jim Meyering [Mon, 12 Jun 1995 05:27:12 +0000 (05:27 +0000)]
.

29 years ago.
Jim Meyering [Mon, 12 Jun 1995 05:25:04 +0000 (05:25 +0000)]
.

29 years agoRemove now-obsolete comment and leading space.
Jim Meyering [Mon, 12 Jun 1995 05:09:57 +0000 (05:09 +0000)]
Remove now-obsolete comment and leading space.

29 years agoRemove now-obsolete comment and leading space.
Jim Meyering [Mon, 12 Jun 1995 05:08:16 +0000 (05:08 +0000)]
Remove now-obsolete comment and leading space.

29 years ago.
Jim Meyering [Sun, 11 Jun 1995 19:56:29 +0000 (19:56 +0000)]
.

29 years agoUse `invalid', not `illegal' in error message.
Jim Meyering [Sun, 11 Jun 1995 19:54:49 +0000 (19:54 +0000)]
Use `invalid', not `illegal' in error message.

29 years agoRemove trailing white space.
Jim Meyering [Sun, 11 Jun 1995 19:37:03 +0000 (19:37 +0000)]
Remove trailing white space.

29 years ago[SWAP]: Parenthesize uses of macro argument.
Jim Meyering [Sun, 11 Jun 1995 06:16:17 +0000 (06:16 +0000)]
[SWAP]: Parenthesize uses of macro argument.
Don't use autoconf macros that require running test programs.

29 years agoFrom Ulrich Drepper.
Jim Meyering [Sun, 11 Jun 1995 06:04:15 +0000 (06:04 +0000)]
From Ulrich Drepper.

29 years ago(look_up_char_class, append_char_class, append_equiv_class): Use const
Jim Meyering [Sun, 11 Jun 1995 05:40:05 +0000 (05:40 +0000)]
(look_up_char_class, append_char_class, append_equiv_class): Use const
attribute when appropriate.

29 years ago(Convert): Use 2037 as threshold, not 1999.
Jim Meyering [Wed, 7 Jun 1995 18:10:17 +0000 (18:10 +0000)]
(Convert): Use 2037 as threshold, not 1999.
Otherwise years after 1999 are treated as invalid.
From Andreas Schwab.