platform/upstream/coreutils.git
28 years ago. FILEUTILS-3_12a
Jim Meyering [Wed, 9 Aug 1995 05:33:24 +0000 (05:33 +0000)]
.

28 years ago(my_strtol): Remove function.
Jim Meyering [Wed, 9 Aug 1995 05:33:19 +0000 (05:33 +0000)]
(my_strtol): Remove function.
(main): Use xstrtol instead.

28 years agoInclude config.h.
Jim Meyering [Wed, 9 Aug 1995 05:15:31 +0000 (05:15 +0000)]
Include config.h.
Define bcopy to memcpy if possible.

28 years agoIndent cpp directives.
Jim Meyering [Wed, 9 Aug 1995 05:14:06 +0000 (05:14 +0000)]
Indent cpp directives.

28 years ago.
Jim Meyering [Wed, 9 Aug 1995 04:21:48 +0000 (04:21 +0000)]
.

28 years ago(main): Fail if either --verbose or --quiet is specified
Jim Meyering [Wed, 9 Aug 1995 04:21:14 +0000 (04:21 +0000)]
(main): Fail if either --verbose or --quiet is specified
when not verifying checksums.

28 years ago.
Jim Meyering [Wed, 9 Aug 1995 04:17:53 +0000 (04:17 +0000)]
.

28 years ago.
Jim Meyering [Wed, 9 Aug 1995 04:17:27 +0000 (04:17 +0000)]
.

28 years ago.
Jim Meyering [Wed, 9 Aug 1995 04:14:52 +0000 (04:14 +0000)]
.

28 years agoInclude system.h.
Jim Meyering [Wed, 9 Aug 1995 03:57:17 +0000 (03:57 +0000)]
Include system.h.

28 years ago(md5_check): Fail if no valid line is found.
Jim Meyering [Wed, 9 Aug 1995 02:50:09 +0000 (02:50 +0000)]
(md5_check): Fail if no valid line is found.
Don't use the word `fail' unless there were failures --
say `all N tests passed.'

28 years agowork on updating md5sum
Jim Meyering [Tue, 8 Aug 1995 05:37:39 +0000 (05:37 +0000)]
work on updating md5sum

28 years ago.
Jim Meyering [Tue, 8 Aug 1995 04:59:01 +0000 (04:59 +0000)]
.

28 years ago(mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
Jim Meyering [Tue, 8 Aug 1995 04:58:46 +0000 (04:58 +0000)]
(mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
compiler warning.  From Ulrich Drepper.

28 years ago(read_line) [lint]: Initialize CHARS to avoid spurious
Jim Meyering [Tue, 8 Aug 1995 04:58:23 +0000 (04:58 +0000)]
(read_line) [lint]: Initialize CHARS to avoid spurious
compiler warning.  From Ulrich Drepper.

28 years agoAnnotate localizable strings with _(...). From Franc,ois.
Jim Meyering [Tue, 8 Aug 1995 04:37:34 +0000 (04:37 +0000)]
Annotate localizable strings with _(...).  From Franc,ois.

28 years ago.
Jim Meyering [Tue, 8 Aug 1995 04:31:02 +0000 (04:31 +0000)]
.

28 years agoDeclare xmalloc, xrealloc rather than including xalloc.h. SH-UTILS-1_12a
Jim Meyering [Mon, 7 Aug 1995 22:21:03 +0000 (22:21 +0000)]
Declare xmalloc, xrealloc rather than including xalloc.h.

28 years ago.
Jim Meyering [Mon, 7 Aug 1995 16:09:10 +0000 (16:09 +0000)]
.

28 years agoAdd FIXME comments.
Jim Meyering [Mon, 7 Aug 1995 16:07:28 +0000 (16:07 +0000)]
Add FIXME comments.

28 years ago(is_number): Rename from isnumber.
Jim Meyering [Mon, 7 Aug 1995 16:06:43 +0000 (16:06 +0000)]
(is_number): Rename from isnumber.

28 years ago.
Jim Meyering [Mon, 7 Aug 1995 14:57:56 +0000 (14:57 +0000)]
.

28 years agoAnnotate localizable strings with _(...). From Franc,ois.
Jim Meyering [Mon, 7 Aug 1995 14:57:29 +0000 (14:57 +0000)]
Annotate localizable strings with _(...).  From Franc,ois.

28 years agoSort examples. textutils-1_12_1
Jim Meyering [Sun, 6 Aug 1995 20:02:27 +0000 (20:02 +0000)]
Sort examples.

28 years ago.
Jim Meyering [Sun, 6 Aug 1995 04:54:08 +0000 (04:54 +0000)]
.

28 years ago.
Jim Meyering [Sun, 6 Aug 1995 04:52:09 +0000 (04:52 +0000)]
.

28 years ago(validate): Remove const attribute from formal #1.
Jim Meyering [Sat, 5 Aug 1995 05:09:21 +0000 (05:09 +0000)]
(validate): Remove const attribute from formal #1.
It may be modified.

28 years ago(__P): No longer define this. It's not used.
Jim Meyering [Sat, 5 Aug 1995 04:58:31 +0000 (04:58 +0000)]
(__P): No longer define this.  It's not used.

28 years ago.
Jim Meyering [Sat, 5 Aug 1995 04:22:16 +0000 (04:22 +0000)]
.

28 years agoProtoize.
Jim Meyering [Sat, 5 Aug 1995 03:36:29 +0000 (03:36 +0000)]
Protoize.

28 years agoProtoize.
Jim Meyering [Sat, 5 Aug 1995 03:19:56 +0000 (03:19 +0000)]
Protoize.

28 years ago(isnumber): Rename to is_number.
Jim Meyering [Sat, 5 Aug 1995 03:13:16 +0000 (03:13 +0000)]
(isnumber): Rename to is_number.
(parse_user_spec): Rename uses, too.

28 years ago.
Jim Meyering [Sat, 5 Aug 1995 03:11:30 +0000 (03:11 +0000)]
.

28 years ago(save_cwd, restore_cwd, free_cwd): Remove functions.
Jim Meyering [Sat, 5 Aug 1995 03:10:27 +0000 (03:10 +0000)]
(save_cwd, restore_cwd, free_cwd): Remove functions.
New versions have been broken out into save-cwd.c.
(du_files): Adapt to handle status code returned by new versions
of save_cwd and restore_cwd.
(count_entry): Likewise.

28 years ago(decode_switches): Set SORT_TYPE. Before, ls -c was sorting
Jim Meyering [Sat, 5 Aug 1995 03:09:41 +0000 (03:09 +0000)]
(decode_switches): Set SORT_TYPE.  Before, ls -c was sorting
by name, rather than change time.  Reported by Ken Estes
(m-ke0082@sparky.cs.nyu.edu).

28 years ago(SOURCES, OBJECTS, DISTFILES): Update for new files, save-cwd.[ch].
Jim Meyering [Sat, 5 Aug 1995 03:08:09 +0000 (03:08 +0000)]
(SOURCES, OBJECTS, DISTFILES): Update for new files, save-cwd.[ch].

28 years ago(isnumber): Rename to is_number to avoid conflict with
Jim Meyering [Sat, 5 Aug 1995 03:06:41 +0000 (03:06 +0000)]
(isnumber): Rename to is_number to avoid conflict with
FreeBSD 2.0.5 macro definition.  Reported by David O'Brien
(obrien@sea.legent.com).

28 years ago.
Jim Meyering [Fri, 4 Aug 1995 15:23:25 +0000 (15:23 +0000)]
.

28 years ago(SOURCES, OBJECTS, DISTFILES): Update for new files.
Jim Meyering [Fri, 4 Aug 1995 15:15:24 +0000 (15:15 +0000)]
(SOURCES, OBJECTS, DISTFILES): Update for new files.

28 years ago.
Jim Meyering [Fri, 4 Aug 1995 15:09:12 +0000 (15:09 +0000)]
.

28 years ago(_getopt_internal) [lint]: Initialize INDFOUND to
Jim Meyering [Fri, 4 Aug 1995 14:30:19 +0000 (14:30 +0000)]
(_getopt_internal) [lint]: Initialize INDFOUND to
avoid warning from gcc.

28 years ago.
Jim Meyering [Thu, 3 Aug 1995 16:44:17 +0000 (16:44 +0000)]
.

28 years ago.
Jim Meyering [Wed, 2 Aug 1995 04:26:31 +0000 (04:26 +0000)]
.

28 years ago.
Jim Meyering [Sun, 30 Jul 1995 23:58:28 +0000 (23:58 +0000)]
.

28 years ago.
Jim Meyering [Sun, 30 Jul 1995 23:58:06 +0000 (23:58 +0000)]
.

28 years ago(md5_check): Use getline instead of fgets.
Jim Meyering [Sun, 30 Jul 1995 23:57:03 +0000 (23:57 +0000)]
(md5_check): Use getline instead of fgets.

28 years agoNew version -- now derived from the line in libc.
Jim Meyering [Sun, 30 Jul 1995 18:42:09 +0000 (18:42 +0000)]
New version -- now derived from the line in libc.

28 years agoGet new copy from FSF.
Jim Meyering [Sun, 30 Jul 1995 05:30:04 +0000 (05:30 +0000)]
Get new copy from FSF.

28 years ago[memcpy]: Define to bcopy if needed.
Jim Meyering [Sun, 30 Jul 1995 05:12:30 +0000 (05:12 +0000)]
[memcpy]: Define to bcopy if needed.
(md5_buffer): Explicitely cast SWAP expressions to unsigned
to avoid warning.

28 years agoAdd parens to clarify ?: expression.
Jim Meyering [Sun, 30 Jul 1995 05:03:26 +0000 (05:03 +0000)]
Add parens to clarify ?: expression.

28 years ago(check): Print `disorder on...' message on standard error, not stdout.
Jim Meyering [Sun, 30 Jul 1995 05:02:37 +0000 (05:02 +0000)]
(check): Print `disorder on...' message on standard error, not stdout.
This is a minor concession to POSIX which says `no output shall be produced'.
(main): Fix -k so it works. -k 2,3 was being treated like -k 2.
Reported by Marcus Daniels <marcus@sysc.pdx.edu>.

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

29 years agoInitial revision
Jim Meyering [Thu, 27 Jul 1995 14:43:01 +0000 (14:43 +0000)]
Initial revision

29 years agoremove trailing blanks
Jim Meyering [Thu, 27 Jul 1995 14:15:09 +0000 (14:15 +0000)]
remove trailing blanks

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.