Jim Meyering [Sat, 21 Oct 2000 19:16:37 +0000 (19:16 +0000)]
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.
Jim Meyering [Sat, 21 Oct 2000 11:28:42 +0000 (11:28 +0000)]
(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.
Jim Meyering [Wed, 18 Oct 2000 20:47:25 +0000 (20:47 +0000)]
(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.
Jim Meyering [Wed, 18 Oct 2000 20:45:20 +0000 (20:45 +0000)]
* 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.
Jim Meyering [Wed, 18 Oct 2000 19:03:30 +0000 (19:03 +0000)]
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.
Jim Meyering [Wed, 18 Oct 2000 19:02:56 +0000 (19:02 +0000)]
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.
Jim Meyering [Wed, 18 Oct 2000 07:41:59 +0000 (07:41 +0000)]
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'.
Jim Meyering [Sat, 30 Sep 2000 09:39:41 +0000 (09:39 +0000)]
(change_file_mode): Perform the chmod even if the
file mode permission bits are the same as those that should be set.
Omitting the chmod call would be alright with minimal 1003.1e DS17
ACLs, but eventually there will be other permissions in addition to
rwx. E.g., add and delete for directories, and something analogous
to NT's take ownership permission.
Jim Meyering [Sat, 30 Sep 2000 08:56:06 +0000 (08:56 +0000)]
(main): Don't set the umask to 0 and hand-apply
the previously-set umask unconditionally. Do that only when a
MODE has been specified. Otherwise, call mkfifo with the full
creation mask (0777 or 0666) and let the kernel apply the umask.
The difference shows up only on file systems with ACL support
when the containing directory has a default ACL.
Patch by Andreas Gruenbacher.
(main): Rename local `symbolic_mode' to `specified_mode'.
Also, when MODE is specified, call chmod to ensure that the
permission bits are set as specified even when the containing
directory has a default ACL.
Jim Meyering [Sat, 30 Sep 2000 08:53:10 +0000 (08:53 +0000)]
(main): Don't set the umask to 0 and hand-apply
the previously-set umask unconditionally. Do that only when a
MODE has been specified. Otherwise, call mknod with the full
creation mask (0777 or 0666) and let the kernel apply the umask.
The difference shows up only on file systems with ACL support
when the containing directory has a default ACL.
Patch by Andreas Gruenbacher.
(main): Rename local `symbolic_mode' to `specified_mode'.
Also, when MODE is specified, call chmod to ensure that the
permission bits are set as specified even when the containing
directory has a default ACL.
Jim Meyering [Sat, 30 Sep 2000 08:49:17 +0000 (08:49 +0000)]
(main): Don't set the umask to 0 and hand-apply
the previously-set umask unconditionally. Do that only when a
MODE has been specified. Otherwise, call mkdir with the full
creation mask (0777 or 0666) and let the kernel apply the umask.
The difference shows up only on file systems with ACL support
when the containing directory has a default ACL.
Patch by Andreas Gruenbacher.
Jim Meyering [Mon, 25 Sep 2000 10:49:35 +0000 (10:49 +0000)]
(PREV_VERSION): Get the value from a file, rather
than trying to derive it from the current version number.
This is much more robust.
(alpha): Record just-released version number in `.version',
and commit (post-tag).