Jim Meyering [Thu, 17 Mar 2005 18:08:46 +0000 (18:08 +0000)]
spacing nit
Jim Meyering [Thu, 17 Mar 2005 17:43:54 +0000 (17:43 +0000)]
Fix typo.
Jim Meyering [Thu, 17 Mar 2005 17:42:53 +0000 (17:42 +0000)]
(DECIMAL_DIGIT_ACCUMULATE): The use of __typeof__ must be conditional.
Jim Meyering [Thu, 17 Mar 2005 17:38:28 +0000 (17:38 +0000)]
*** empty log message ***
Jim Meyering [Thu, 17 Mar 2005 15:34:53 +0000 (15:34 +0000)]
*** empty log message ***
Jim Meyering [Thu, 17 Mar 2005 15:33:50 +0000 (15:33 +0000)]
(main): Use DECIMAL_DIGIT_ACCUMULATE macro in place of nearly-equivalent code.
Jim Meyering [Thu, 17 Mar 2005 15:32:53 +0000 (15:32 +0000)]
(parse_tab_stops, main): Use DECIMAL_DIGIT_ACCUMULATE macro in
place of nearly-equivalent code.
Jim Meyering [Thu, 17 Mar 2005 15:32:10 +0000 (15:32 +0000)]
(main): Use DECIMAL_DIGIT_ACCUMULATE macro in place of nearly-equivalent code.
Jim Meyering [Thu, 17 Mar 2005 15:30:00 +0000 (15:30 +0000)]
(parse_tab_stops, main): Use DECIMAL_DIGIT_ACCUMULATE macro in
place of nearly-equivalent code.
Jim Meyering [Thu, 17 Mar 2005 14:35:42 +0000 (14:35 +0000)]
(set_fields): Use DECIMAL_DIGIT_ACCUMULATE macro in
place of nearly-equivalent code.
Jim Meyering [Thu, 17 Mar 2005 14:34:23 +0000 (14:34 +0000)]
Use VERIFY macro in place of an equivalent open-coded declaration.
Jim Meyering [Thu, 17 Mar 2005 14:33:39 +0000 (14:33 +0000)]
(VERIFY, VERIFY_EXPR, DECIMAL_DIGIT_ACCUMULATE): New macros.
Jim Meyering [Thu, 17 Mar 2005 14:27:12 +0000 (14:27 +0000)]
Before, this command would make uniq skip 11 fields and print
only the first line.
$ _POSIX2_VERSION=1 ./uniq -f1 -1 <(seq --format='1 %g' 2)
1 1
1 2
(main): Interpret `uniq -f1 -1' like `uniq -f1', not like `uniq -f11'.
Paul Eggert [Wed, 16 Mar 2005 01:01:36 +0000 (01:01 +0000)]
* strftime.c (my_strftime): Prepend space to format.
Paul Eggert [Wed, 16 Mar 2005 01:01:23 +0000 (01:01 +0000)]
(my_strftime): Prepend space to format so that we can
reliably distinguish strftime failure from empty output on POSIX
hosts.
Jim Meyering [Tue, 15 Mar 2005 19:24:19 +0000 (19:24 +0000)]
.
Jim Meyering [Tue, 15 Mar 2005 18:10:50 +0000 (18:10 +0000)]
.
Jim Meyering [Tue, 15 Mar 2005 18:10:26 +0000 (18:10 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Mar 2005 18:09:05 +0000 (18:09 +0000)]
Both `pr -0' and e.g., `pr -03' would evoke `column count too large'.
`pr -0' should give a better diagnostic and `pr -03' should be
equivalent to `pr -3'.
(parse_column_count): Change return type to void.
Call error (EXIT_FAILURE, ... for an invalid string.
(main): Allocate space for column_count_string using malloc.
Accumulate all old-style column-count digits before converting.
When the number of columns is specified via both old-style,
(e.g., -3), and a long option (--columns=5), ensure that only
the last one specified takes effect.
Add tests for the above.
Jim Meyering [Tue, 15 Mar 2005 18:05:13 +0000 (18:05 +0000)]
Both `pr -0' and e.g., `pr -03' evoke `column count too large'.
`pr -0' should give a better diagnostic and `pr -03' should be
equivalent to `pr -3'.
(parse_column_count): Change return type to void.
Call error (EXIT_FAILURE, ... for an invalid string.
(main): Allocate space for column_count_string using malloc.
Accumulate all old-style column-count digits before converting.
When the number of columns is specified via both old-style,
(e.g., -3), and a long option (--columns=5), ensure that only
the last one specified takes effect.
Jim Meyering [Tue, 15 Mar 2005 15:39:46 +0000 (15:39 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Mar 2005 15:39:40 +0000 (15:39 +0000)]
(copy_reg): Copy regular files in binary mode.
Paul Eggert [Tue, 15 Mar 2005 00:44:29 +0000 (00:44 +0000)]
Fix comments and indenting.
Paul Eggert [Tue, 15 Mar 2005 00:40:17 +0000 (00:40 +0000)]
Sync mktime.c and strtol.c macros from intprops.h.
Paul Eggert [Mon, 14 Mar 2005 23:23:25 +0000 (23:23 +0000)]
* strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
&& HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[].
Paul Eggert [Mon, 14 Mar 2005 18:38:05 +0000 (18:38 +0000)]
* NEWS: Restate why ls limits time stamp lengths.
Paul Eggert [Mon, 14 Mar 2005 18:36:31 +0000 (18:36 +0000)]
Reword ls time-stamp limit issue.
Jim Meyering [Sat, 12 Mar 2005 16:24:13 +0000 (16:24 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Mar 2005 10:59:38 +0000 (10:59 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Mar 2005 10:59:23 +0000 (10:59 +0000)]
Add a little infrastructure to help prevent future bugs like the
one fixed today.
(xstrcat): New function.
(print_statfs, print_stat): Add buf_len parameter and convert all
uses of strcat to xstrcat. Update callers.
(print_it): Call print_func with buf_len parameter.
Jim Meyering [Sat, 12 Mar 2005 10:54:20 +0000 (10:54 +0000)]
Invoking stat -c FMT with a lone format directive of %s, %f, %h, %s,
could cause a buffer overrun error.
(print_it): Allocate 2 more bytes, to accommodate our
conversion of the stat %s format string to the longer printf %llu one.
Patch from Guochun Shi.
Jim Meyering [Sat, 12 Mar 2005 10:51:06 +0000 (10:51 +0000)]
*** empty log message ***
Paul Eggert [Fri, 11 Mar 2005 23:14:31 +0000 (23:14 +0000)]
"ls" now refuses to generate very long time stamps.
Paul Eggert [Fri, 11 Mar 2005 23:13:58 +0000 (23:13 +0000)]
ls now refuses to generate time stamps containing more than 1000 bytes.
Paul Eggert [Fri, 11 Mar 2005 23:13:37 +0000 (23:13 +0000)]
* coreutils.texi (Formatting file timestamps): Very long timestamps
may be treated as errors.
Paul Eggert [Fri, 11 Mar 2005 23:13:19 +0000 (23:13 +0000)]
(Formatting file timestamps): Very long timestamps
may be treated as errors.
Paul Eggert [Fri, 11 Mar 2005 23:12:43 +0000 (23:12 +0000)]
(TIME_STAMP_LEN_MAXIMUM): New constant.
(long_time_expected_width, print_long_format): Use it, to avoid
some possible denial-of-service attacks.
Jim Meyering [Fri, 11 Mar 2005 10:04:16 +0000 (10:04 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Mar 2005 09:37:15 +0000 (09:37 +0000)]
Add tests for this:
Prompt once again for `mv -i A B' when A and B are hard links
to the same file. This fixes a bug introduced by my 2003-04-04
(coreutils-5.0.1) change.
Jim Meyering [Fri, 11 Mar 2005 09:36:56 +0000 (09:36 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Mar 2005 09:36:52 +0000 (09:36 +0000)]
Prompt once again for `mv -i A B' when A and B are hard links
to the same file. This fixes a bug introduced by my 2003-04-04
(coreutils-5.0.1) change.
(abandon_move): New function, factored out of
copy_internal, now that this code is being used from two places.
(copy_internal): Perform the same interactive-related test for
whether it's alright to proceed and (usually) overwrite the
destination file.
Jim Meyering [Thu, 10 Mar 2005 12:40:40 +0000 (12:40 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 12:07:47 +0000 (12:07 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 12:07:31 +0000 (12:07 +0000)]
(long_time_expected_width): Use x2nrealloc, not alloca,
so format string abuse cannot provoke stack overflow.
(print_long_format): Likewise.
Jim Meyering [Thu, 10 Mar 2005 11:29:32 +0000 (11:29 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 10:01:23 +0000 (10:01 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 08:56:00 +0000 (08:56 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 08:54:50 +0000 (08:54 +0000)]
(gl_SAVE_CWD): Check for fchdir.
Jim Meyering [Thu, 10 Mar 2005 08:51:53 +0000 (08:51 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 08:51:49 +0000 (08:51 +0000)]
Don't segfault for a long header date string, e.g.,
echo a|pr -D +%
9999999A
(init_header): Use x2nrealloc, rather than alloca.
Don't bother with fixed-sized initial buffer; always use x*alloc.
Jim Meyering [Thu, 10 Mar 2005 08:03:13 +0000 (08:03 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Mar 2005 08:02:24 +0000 (08:02 +0000)]
(tostring, printv): Use INT_BUFSIZE_BOUND in place of INT_STRLEN_BOUND + 1.
Jim Meyering [Thu, 10 Mar 2005 07:58:34 +0000 (07:58 +0000)]
(init_header): Use INT_BUFSIZE_BOUND in place of INT_STRLEN_BOUND + 1.
Paul Eggert [Wed, 9 Mar 2005 23:22:14 +0000 (23:22 +0000)]
Add TYPE_ONES_COMPLEMENT and TYPE_SIGNED_MAGNITUDE, and use
less-tricky TYPE_MINIMUM and TYPE_MAXIMUM.
Jim Meyering [Wed, 9 Mar 2005 23:21:10 +0000 (23:21 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 23:21:00 +0000 (23:21 +0000)]
[!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
so that this module works on systems without fchdir.
Jim Meyering [Wed, 9 Mar 2005 23:16:07 +0000 (23:16 +0000)]
.
Jim Meyering [Wed, 9 Mar 2005 23:12:48 +0000 (23:12 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 23:11:19 +0000 (23:11 +0000)]
(libfetish_a_SOURCES): Remove xstrtol.c and xstrtol.h.
Jim Meyering [Wed, 9 Mar 2005 23:10:46 +0000 (23:10 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 23:06:55 +0000 (23:06 +0000)]
(gl_XNANOSLEEP): Add intprops.h.
Jim Meyering [Wed, 9 Mar 2005 23:06:16 +0000 (23:06 +0000)]
(gl_UTIMECMP): Add intprops.h.
Jim Meyering [Wed, 9 Mar 2005 23:05:32 +0000 (23:05 +0000)]
(gl_USERSPEC): Add intprops.h.
Jim Meyering [Wed, 9 Mar 2005 23:04:47 +0000 (23:04 +0000)]
(gl_FUNC_SIG2STR): Add intprops.h.
Jim Meyering [Wed, 9 Mar 2005 23:03:42 +0000 (23:03 +0000)]
(gl_INTTOSTR): Add intprops.h.
Jim Meyering [Wed, 9 Mar 2005 23:02:25 +0000 (23:02 +0000)]
(gl_HUMAN): Add intprops.h.
Jim Meyering [Wed, 9 Mar 2005 23:01:36 +0000 (23:01 +0000)]
(gl_XSTRTOL): Use AC_LIBSOURCES and AC_LIBOBJ to list the required files.
Paul Eggert [Wed, 9 Mar 2005 19:27:23 +0000 (19:27 +0000)]
* src/system.h: Include intprops.h instead of rolling our own.
Paul Eggert [Wed, 9 Mar 2005 19:27:02 +0000 (19:27 +0000)]
Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND): Remove;
they are now defined in intprops.h.
Paul Eggert [Wed, 9 Mar 2005 19:26:36 +0000 (19:26 +0000)]
Factor int-properties macros into a single file, except for
glibc-related files.
Paul Eggert [Wed, 9 Mar 2005 19:25:58 +0000 (19:25 +0000)]
Include xstrtol.h first, to test interface.
Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:25:34 +0000 (19:25 +0000)]
Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:25:14 +0000 (19:25 +0000)]
Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
(utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
instead of rolling our own expressions.
Paul Eggert [Wed, 9 Mar 2005 19:24:37 +0000 (19:24 +0000)]
Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:24:15 +0000 (19:24 +0000)]
Adjust comments to match intprops.h.
Paul Eggert [Wed, 9 Mar 2005 19:23:59 +0000 (19:23 +0000)]
(TYPE_SIGNED): Remove.
(INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
Paul Eggert [Wed, 9 Mar 2005 19:23:35 +0000 (19:23 +0000)]
Include <signal.h>, intprops.h.
(INT_STRLEN_BOUND): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:23:05 +0000 (19:23 +0000)]
(TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
for consistency with intprops.h.
(time_t_is_integer, twos_complement_arithmetic): Use them.
Paul Eggert [Wed, 9 Mar 2005 19:22:48 +0000 (19:22 +0000)]
Include intprops.h instead of limits.h.
(INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:22:21 +0000 (19:22 +0000)]
(LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000.
Paul Eggert [Wed, 9 Mar 2005 19:22:05 +0000 (19:22 +0000)]
Include intprops.h.
(group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
Paul Eggert [Wed, 9 Mar 2005 19:21:43 +0000 (19:21 +0000)]
Include intprops.h instead of limits.h.
(INT_STRLEN_BOUND): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:21:20 +0000 (19:21 +0000)]
* lib/fts.c: Include intprops.h.
(TYPE_SIGNED): Remove.
Paul Eggert [Wed, 9 Mar 2005 19:20:59 +0000 (19:20 +0000)]
Initial revision.
Jim Meyering [Wed, 9 Mar 2005 10:27:16 +0000 (10:27 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 10:26:52 +0000 (10:26 +0000)]
Remove entry about named pipes. It was fixed in 5.3.0.
Jim Meyering [Wed, 9 Mar 2005 10:18:43 +0000 (10:18 +0000)]
* argmatch.m4, cycle-check.m4: New files.
* prereq.m4: Require their macros.
Jim Meyering [Wed, 9 Mar 2005 10:17:51 +0000 (10:17 +0000)]
.
Jim Meyering [Wed, 9 Mar 2005 10:17:30 +0000 (10:17 +0000)]
.
Jim Meyering [Wed, 9 Mar 2005 09:41:58 +0000 (09:41 +0000)]
More migration to AC_LIBSOURCES/AC_LIBOBJ.
(libfetish_a_SOURCES): Remove two more pairs of files:
cycle-check.c, cycle-check.h and argmatch.c, argmatch.h.
Jim Meyering [Wed, 9 Mar 2005 09:41:38 +0000 (09:41 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 09:41:17 +0000 (09:41 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 09:40:56 +0000 (09:40 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Mar 2005 08:56:50 +0000 (08:56 +0000)]
.
Jim Meyering [Wed, 9 Mar 2005 08:54:48 +0000 (08:54 +0000)]
Don't include "xalloc.h". It's not used.
Paul Eggert [Tue, 8 Mar 2005 22:20:24 +0000 (22:20 +0000)]
* src/date.c (usage): Redo to match recent documentation changes.
Paul Eggert [Tue, 8 Mar 2005 22:20:11 +0000 (22:20 +0000)]
(usage): Redo to match recent documentation changes.
Don't bother documenting which usages are GNU extensions; the list
wasn't correct, and is better left to the printed manual anyway.
Paul Eggert [Tue, 8 Mar 2005 22:19:54 +0000 (22:19 +0000)]
Improve "date invocation" again.
Paul Eggert [Tue, 8 Mar 2005 22:19:39 +0000 (22:19 +0000)]
(date invocation): Use an example that makes it
clear tha the default date use space-padded day of month.
Replace "directive" with "conversion specifier" to be consistent
with POSIX. All uses changed.
Fix menu RHS to match actual directive lists.
(Time conversion specifiers): Renamed from Time directives.
Use @samp consistently, sometimes instead of @code.
Consistently ention which specifiers are GNU extensions.
Give more examples (in some cases, instead of ranges).
Say why %F is preferred for dates.
(Date conversion specifiers): Renamed from Date directives.
Likewise for other changes.
(Padding and other flags): Correct the description.
Document #. Give an example for %9B.
Jim Meyering [Sun, 6 Mar 2005 19:34:46 +0000 (19:34 +0000)]
*** empty log message ***