1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-03 11:40:04 +02:00
Commit Graph

1003 Commits

Author SHA1 Message Date
Jim Meyering
ea4cda6907 [memcpy]: Define to bcopy if needed.
(md5_buffer): Explicitely cast SWAP expressions to unsigned
to avoid warning.
1995-07-30 05:12:30 +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
6473e3638f . 1995-07-27 20:22:29 +00:00
Jim Meyering
7e93c0f64b Initial revision 1995-07-27 14:43:01 +00:00
Jim Meyering
1126d3b93e remove trailing blanks 1995-07-27 14:15:09 +00:00
Jim Meyering
c02e97e2c5 . 1995-07-27 04:04:18 +00:00
Jim Meyering
f7ccdd300d . 1995-07-27 03:57:20 +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
35eda3509e . 1995-07-21 06:23:11 +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
bb79abc8a3 (md5_stream): Update prototype.
[__P]: Define macro.
1995-07-21 04:48:03 +00:00
Jim Meyering
574cc98b23 (md5_stream): Check for read failure and return
indication of success rather than second argument.
1995-07-21 04:46:50 +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
dfe3d8837e . 1995-07-20 17:52:49 +00:00
Jim Meyering
e59ec88ea2 . 1995-07-16 23:43:17 +00:00
Jim Meyering
66c43ec708 . 1995-07-16 23:41:17 +00:00
Jim Meyering
e692090b89 . 1995-07-16 23:39:51 +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
Jim Meyering
c20ee98ac8 (dump): Convert to use smaller -- but seemingly equivalent -- patch. 1995-07-12 03:06:03 +00:00
Jim Meyering
21aa588967 Reorder functions so main is last, so no forward dcls are needed. 1995-07-12 03:01:33 +00:00
Jim Meyering
ba34723398 (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).
1995-07-12 02:59:44 +00:00
Jim Meyering
51c3164ba3 (main): Add UCHAR casts. 1995-07-09 17:06:41 +00:00
Jim Meyering
307526e92d . 1995-07-09 16:42:40 +00:00
Jim Meyering
6dfad5e900 (main): When using obsolescent +pos -pos syntax, allow
omission of field spec only when character offset is specified.
Otherwise, -. +. would be accepted.
1995-07-09 16:42:31 +00:00
Jim Meyering
ccfb7f032d (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).
1995-07-09 02:25:11 +00:00
Jim Meyering
bb5590f7b6 . 1995-07-07 04:46:18 +00:00
Jim Meyering
67718aff76 (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.
1995-07-07 04:46:03 +00:00
Jim Meyering
b9d3dc4101 Remove trailing white space. 1995-07-06 16:07:07 +00:00
Jim Meyering
20b6a5b40a (od): Remove space beteen -w and optional argument. 1995-07-06 16:06:32 +00:00
Jim Meyering
72d4155c90 . 1995-07-03 03:12:54 +00:00
Jim Meyering
e7c2d62889 . 1995-07-03 03:11:05 +00:00
Jim Meyering
c8e05ecd8d (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.
1995-07-03 03:10:59 +00:00
Jim Meyering
9c8e5123bd Remove unused dcl of isnumber. 1995-06-25 01:46:32 +00:00
Jim Meyering
9a5882ba80 (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.
1995-06-25 01:44:35 +00:00
Jim Meyering
7981e85eb3 merge with 1.12a 1995-06-24 22:02:25 +00:00