Commit Graph
15907 Commits
Author SHA1 Message Date
Jim Meyering 148e5d1b4d Factor out the differences between MD5 and SHA1,
and parameterize so this code may be used by both md5sum and the new
program, shasum.  Loosely based on a patch from Scott Miller.
2000-10-22 11:50:16 +00:00
Jim Meyering 8a149d2242 Support 8-byte integers, assuming they're printable with e.g., %lld.
Add support for printing data as unsigned
long long integers.
2000-10-22 07:33:21 +00:00
Jim Meyering b84871a279 add missing backslash 2000-10-22 07:20:24 +00:00
Jim Meyering 807e464dec *** empty log message *** 2000-10-22 06:57:54 +00:00
Jim Meyering 1f3a6e1eb8 (O_DIRECTORY): Define, if needed.
(save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
Suggestion from Ulrich Drepper.
2000-10-22 06:57:42 +00:00
Jim Meyering a48426382d *** empty log message *** 2000-10-22 06:50:02 +00:00
Jim Meyering 77ad7205cb *** empty log message *** 2000-10-22 06:43:52 +00:00
Jim Meyering c599760ff1 2000-10-21 20:07:49 +00:00
Jim Meyering e563a1a5b5 . 2000-10-21 20:07:03 +00:00
Jim Meyering 4e329a1473 *** empty log message *** 2000-10-21 20:01:28 +00:00
Jim Meyering fd717e8d45 *** empty log message *** 2000-10-21 20:00:37 +00:00
Jim Meyering 13e80acf07 The command, `yes ''|./cat -n' would stop printing after INT_MAX lines.
(cat): Never let `newlines' exceed 3.
2000-10-21 19:57:41 +00:00
Jim Meyering 51e2ffc524 Prevent a counter buffer overrun when numbering lines and when
processing 100 billion lines (or more) of input.

(LINE_COUNTER_BUF_LEN): Define to allow numbering as
many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could
be exceeded without too much trouble).	Use this symbol rather
than hard-coding the constant everywhere.  Rather than overruning
for input with more lines, mark the line number by putting a
`>' in the leftmost slot.
(next_line_num): Fixed (now academic) possible line buffer overrun.
Patch by Jan Nieuwenhuizen.
2000-10-21 19:16:37 +00:00
Jim Meyering 379688e35d *** empty log message *** 2000-10-21 13:22:39 +00:00
Jim Meyering 4d2231d02c *** empty log message *** 2000-10-21 13:09:31 +00:00
Jim Meyering c344de8d9b *** empty log message *** 2000-10-21 13:05:55 +00:00
Jim Meyering fb5e934c73 (SORT_OUT_OF_ORDER): Define.
(main): Use it instead of hard-coding the `1'.
2000-10-21 13:05:40 +00:00
Jim Meyering 09ad98374b (main): Use EXIT_SUCCESS rather than 0.
Fail when checking (-c) with more than one file argument,
rather than simply ignoring the extra arguments.
2000-10-21 13:03:40 +00:00
Jim Meyering 6864ceca11 tweak comment 2000-10-21 12:46:58 +00:00
Jim Meyering ef43db1c4b (dir_name_r): New function, factored out of dir_name.
(dir_name): Use dir_name_r.
2000-10-21 11:44:43 +00:00
Jim Meyering b9dbd94712 *** empty log message *** 2000-10-21 11:29:01 +00:00
Jim Meyering 9ff69c8035 (memrchr): Declare if necessary.
(dir_name): Remove the restriction that there be no
trailing slashes.  Now, this code skips past them, effectively
ignoring them.
[TEST_DIRNAME] (main): New unit tests.
2000-10-21 11:28:42 +00:00
Jim Meyering c03498f2e7 *** empty log message *** 2000-10-21 10:37:14 +00:00
Jim Meyering e45c3dba07 (jm_PREREQ_DIRNAME): New macro. 2000-10-21 10:37:10 +00:00
Jim Meyering bc6477ff72 (AC_REPLACE_FUNCS): Add memrchr. 2000-10-21 10:36:49 +00:00
Jim Meyering e46f105350 (jm_CHECK_DECLS): Also check for memrchr. 2000-10-21 10:36:32 +00:00
Jim Meyering 6ab7032952 *** empty log message *** 2000-10-21 10:33:25 +00:00
Jim Meyering a5301cb3e2 New file, derived from the one in GNU libc. 2000-10-21 10:27:59 +00:00
Jim Meyering 9bab244d20 . 2000-10-19 11:43:34 +00:00
Jim Meyering 3b5b337246 Update from master repository. 2000-10-19 11:43:28 +00:00
Jim Meyering 3b60294bd9 *** empty log message *** 2000-10-18 20:48:04 +00:00
Jim Meyering 7243403b27 (universal_time): Remove; it's just a temptation to do the wrong thing.
(main): The -u option now just sets TZ; it doesn't do anything else.
(show_date): Do not do anything special if -u is set.
This affects the behavior of the -I and -R options.
2000-10-18 20:47:25 +00:00
Jim Meyering d478d6efec * src/date.c (universal_time): Remove; it's just a temptation to
do the wrong thing.
(main): The -u option now just sets TZ; it doesn't do anything else.
(show_date): Do not do anything special if -u is set.
This affects the behavior of the -I and -R options.

* doc/sh-utils.texi: Document the above.
2000-10-18 20:45:20 +00:00
Jim Meyering dbfbb93424 Undo the effect of the 1997-07-12 change to date.c; it
broke "date -u MMDDhhmm" and it wasn't documented.
This reverts to the behavior of the 1996-01-03 patch.

(utc-0, utc-1, relative-2): Adjust to above change.
2000-10-18 19:03:30 +00:00
Jim Meyering 29a4bf90d3 Undo the effect of the 1997-07-12 change to date.c; it
broke "date -u MMDDhhmm" and it wasn't documented.
This reverts to the behavior of the 1996-01-03 patch.

(TZ_UTC0, MAYBE_SET_TZ_UTC0, set_tz): Remove.
(batch_convert): Don't futz with TZ.
(main): -u now parses all dates as UTC, not just some.
2000-10-18 19:02:56 +00:00
Jim Meyering fe5cad6b29 space to tab 2000-10-18 19:02:34 +00:00
Jim Meyering 39520407ef *** empty log message *** 2000-10-18 09:51:00 +00:00
Jim Meyering 2e4b629e21 (Examples of date): Fix a typo. 2000-10-18 09:50:56 +00:00
Jim Meyering eaca68c289 *** empty log message *** 2000-10-18 07:42:08 +00:00
Jim Meyering 7e02b6c989 Make sure the programs use C-locale formats
and translations.  Bruno Haible reported that this test would fail
when using other locales, because ls printed a translation of `total'.
2000-10-18 07:41:59 +00:00
Jim Meyering 32dfed954f *** empty log message *** 2000-10-17 08:45:42 +00:00
Jim Meyering 55f43f7915 *** empty log message *** 2000-10-17 08:45:32 +00:00
Jim Meyering 6cca23cec4 *** empty log message *** 2000-10-17 08:45:11 +00:00
Jim Meyering 0be2660d96 [PARAMS]: Define and use. 2000-10-17 08:45:07 +00:00
Jim Meyering a8bf544803 *** empty log message *** 2000-10-17 06:45:57 +00:00
Jim Meyering c841079462 Update from libc. 2000-10-17 06:45:49 +00:00
Jim Meyering ad06715030 *** empty log message *** 2000-10-16 22:05:20 +00:00
Jim Meyering 66a4baa8a6 *** empty log message *** 2000-10-16 22:01:11 +00:00
Jim Meyering ae2b7961cf *** empty log message *** 2000-10-16 14:31:38 +00:00
Jim Meyering 6f84766d19 *** empty log message *** 2000-10-16 14:30:39 +00:00