1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00
Commit Graph

642 Commits

Author SHA1 Message Date
Jim Meyering
744393f0f4 (show_point): Ignore mtab entries with either
nonexistent mount points or with inconsistent device number.
From Eirik Fuller <eirik@synopsys.com>.
1995-09-26 04:18:55 +00:00
Jim Meyering
12e85d31e2 Protoize. 1995-09-24 13:36:13 +00:00
Jim Meyering
528390fa58 (print_kth): Change order of args in compare, and reverse sense of comparison
(Hence, no semantic change).
1995-09-23 20:42:52 +00:00
Jim Meyering
f344b7fab6 (md5_check): Distinguish between open/read failure and checksum mismatch. 1995-09-23 20:22:05 +00:00
Jim Meyering
1b16c152bd (main): Reverse order of check' and compute sums' blocks in if-else
chain to make it a little more readable.
1995-09-20 12:47:37 +00:00
Jim Meyering
0e15d57a89 Rewrite confusing comment. 1995-09-19 12:59:49 +00:00
Jim Meyering
c253d247ca (checkfp): Rearrange loop to avoid duplicate test.
Move a couple dcls from function scope into inner block.
1995-09-19 12:50:34 +00:00
Jim Meyering
dde2c138e9 Protoize. 1995-09-18 12:44:47 +00:00
Jim Meyering
7823351d6b (main, usage): Remove -h, -s, -v short options.
Rename --verbose to --warn, --quiet to --status.
(main): Handle --help and --version using parse_long_options.
(md5_check): Check ferror.
1995-09-18 12:36:12 +00:00
Jim Meyering
b23b6bbcf7 (tempname): Replace `16' with a more readable expansion.
Make sure that SEQ never exceeds 99999.
1995-09-14 13:31:52 +00:00
Jim Meyering
800e219a2d (sort): Rename local: ntemp -> n_temp_files, to avoid confusion
with another local, ntmp.
1995-09-14 13:09:27 +00:00
Jim Meyering
b0453a43c0 (main) [handling --string option]: Don't output nonstandard `b' binary flag. 1995-08-10 21:11:24 +00:00
Jim Meyering
a030007908 (my_strtol): Remove function.
(main): Use xstrtol instead.
1995-08-09 05:33:19 +00:00
Jim Meyering
b014a71007 (main): Fail if either --verbose or --quiet is specified
when not verifying checksums.
1995-08-09 04:21:14 +00:00
Jim Meyering
a6fdb5b75d Include system.h. 1995-08-09 03:57:17 +00:00
Jim Meyering
26574d5284 (md5_check): Fail if no valid line is found.
Don't use the word `fail' unless there were failures --
say `all N tests passed.'
1995-08-09 02:50:09 +00:00
Jim Meyering
f03f8dcc44 (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
compiler warning.  From Ulrich Drepper.
1995-08-08 04:58:46 +00:00
Jim Meyering
a5656326f0 (read_line) [lint]: Initialize CHARS to avoid spurious
compiler warning.  From Ulrich Drepper.
1995-08-08 04:58:23 +00:00
Jim Meyering
f0556f3517 Annotate localizable strings with _(...). From Franc,ois. 1995-08-08 04:37:34 +00:00
Jim Meyering
9c3f1711e2 (is_number): Rename from isnumber. 1995-08-07 16:06:43 +00:00
Jim Meyering
92c50e7f52 Annotate localizable strings with _(...). From Franc,ois. 1995-08-07 14:57:29 +00:00
Jim Meyering
00dadad79c (validate): Remove const attribute from formal #1.
It may be modified.
1995-08-05 05:09:21 +00:00
Jim Meyering
767768457c (__P): No longer define this. It's not used. 1995-08-05 04:58:31 +00:00
Jim Meyering
cbc82e5cc3 Protoize. 1995-08-05 03:36:29 +00:00
Jim Meyering
b0aa8e6985 Protoize. 1995-08-05 03:19:56 +00:00
Jim Meyering
be22aff966 (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.
1995-08-05 03:10:27 +00:00
Jim Meyering
0159470d3d (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).
1995-08-05 03:09:41 +00:00
Jim Meyering
351cf87351 (isnumber): Rename to is_number to avoid conflict with
FreeBSD 2.0.5 macro definition.  Reported by David O'Brien
(obrien@sea.legent.com).
1995-08-05 03:06:41 +00:00
Jim Meyering
b1ab76f3e4 . 1995-08-02 04:26:31 +00:00
Jim Meyering
fc88df7458 (md5_check): Use getline instead of fgets. 1995-07-30 23:57:03 +00:00
Jim Meyering
ba477b681a Add parens to clarify ?: expression. 1995-07-30 05:03:26 +00:00
Jim Meyering
f2fc6e4cad (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>.
1995-07-30 05:02:37 +00:00
Jim Meyering
8904d4a45c Remove spurious space. 1995-07-27 03:57:10 +00:00
Jim Meyering
8c17f50aea (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).
1995-07-27 03:56:35 +00:00
Jim Meyering
28e28e6d74 (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.
1995-07-27 03:45:11 +00:00
Jim Meyering
7732d5d7cf (main): When too few arguments are given, don't just
issue the usage message; also report why.
1995-07-25 04:50:04 +00:00
Jim Meyering
5f33b78417 [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower. 1995-07-25 02:48:00 +00:00
Jim Meyering
6abd6fdd72 (md5_check): New function -- extracted from main. 1995-07-22 05:16:40 +00:00
Jim Meyering
0e7bce124f reformat comment 1995-07-21 06:27:39 +00:00
Jim Meyering
58b1195eb4 (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.
1995-07-21 06:18:58 +00:00
Jim Meyering
855741c7cb 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.
1995-07-21 04:45:40 +00:00
Jim Meyering
d58bdcd4fa (split_3): Accept only old format.
Properly handle file names with leading and trailing white space.
1995-07-20 21:09:57 +00:00
Jim Meyering
1ae54a6140 more comment tweaks 1995-07-20 19:22:28 +00:00
Jim Meyering
db566dba37 Correct typo in Copyright.
Reformat paragraph so line with new FSF address fits in 80 columns.
1995-07-20 19:13:23 +00:00
Jim Meyering
3d699e8ee0 (usage): Move it to precede all other functions.
Fiddle comments.
1995-07-20 19:10:08 +00:00
Jim Meyering
e20e0ba392 New version from Drepper. 1995-07-20 19:08:08 +00:00
Jim Meyering
1e74962c8a 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.
1995-07-16 05:47:55 +00:00
Jim Meyering
14aaf3eab3 (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.
1995-07-16 05:39:09 +00:00
Jim Meyering
adfa243b0d (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.
1995-07-12 03:13:40 +00:00
Jim Meyering
37ba8d9867 (main): Comment out unreachable break stmt. 1995-07-12 03:06:49 +00:00