Jim Meyering [Sat, 12 Apr 2003 19:51:36 +0000 (19:51 +0000)]
Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),
--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or
FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic.
(main): Fix those problems and remove literal quote marks
(e.g., "`%s'") from format string; instead use "%s" in each format
string and `quote (optarg)' as the corresponding argument.
Also, diagnose all invalid command line options before failing.
Jim Meyering [Sat, 12 Apr 2003 18:44:53 +0000 (18:44 +0000)]
(proc_text): Fix a bug introduced on 2001-11-10,
for textutils-2.0.17, that would make nl output extra newlines
in some cases.
Jim Meyering [Sat, 12 Apr 2003 13:03:01 +0000 (13:03 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Apr 2003 13:02:57 +0000 (13:02 +0000)]
(TESTS): Add readlink.
Jim Meyering [Sat, 12 Apr 2003 13:02:34 +0000 (13:02 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Apr 2003 13:02:13 +0000 (13:02 +0000)]
A few tests of the --canonicalize option.
Jim Meyering [Fri, 11 Apr 2003 14:06:02 +0000 (14:06 +0000)]
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values.
Jim Meyering [Fri, 11 Apr 2003 14:05:51 +0000 (14:05 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 12:55:58 +0000 (12:55 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 12:54:22 +0000 (12:54 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 12:51:41 +0000 (12:51 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 12:46:24 +0000 (12:46 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:44:41 +0000 (12:44 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:44:23 +0000 (12:44 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:42:39 +0000 (12:42 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:42:15 +0000 (12:42 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:41:44 +0000 (12:41 +0000)]
Remove SPC in SPC-TAB sequence.
Remove trailing blanks.
filter though cppi
Jim Meyering [Fri, 11 Apr 2003 12:39:58 +0000 (12:39 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:38:19 +0000 (12:38 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:37:58 +0000 (12:37 +0000)]
Remove SPC in SPC-TAB sequence.
Jim Meyering [Fri, 11 Apr 2003 12:36:43 +0000 (12:36 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 12:36:31 +0000 (12:36 +0000)]
Include <stdlib.h> unconditionally.
Jim Meyering [Fri, 11 Apr 2003 12:21:59 +0000 (12:21 +0000)]
Include <string.h> and <stdlib.h> unconditionally.
Jim Meyering [Fri, 11 Apr 2003 12:20:35 +0000 (12:20 +0000)]
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values.
Jim Meyering [Fri, 11 Apr 2003 12:15:21 +0000 (12:15 +0000)]
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values.
Jim Meyering [Fri, 11 Apr 2003 12:03:38 +0000 (12:03 +0000)]
.
Jim Meyering [Fri, 11 Apr 2003 11:59:11 +0000 (11:59 +0000)]
(XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts.
Jim Meyering [Fri, 11 Apr 2003 11:56:44 +0000 (11:56 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 11:56:41 +0000 (11:56 +0000)]
Remove use of PARAMS.
Jim Meyering [Fri, 11 Apr 2003 11:55:33 +0000 (11:55 +0000)]
(PARAMS): Remove definitions and uses.
Jim Meyering [Fri, 11 Apr 2003 11:49:23 +0000 (11:49 +0000)]
duh
Jim Meyering [Fri, 11 Apr 2003 11:45:23 +0000 (11:45 +0000)]
(xalloc-check): Rename from header-check.
Jim Meyering [Fri, 11 Apr 2003 11:42:48 +0000 (11:42 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 11:42:39 +0000 (11:42 +0000)]
Include error.h after system.h, not before.
Jim Meyering [Fri, 11 Apr 2003 10:52:04 +0000 (10:52 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 10:51:56 +0000 (10:51 +0000)]
Remove anachronistic casts of xmalloc,
xrealloc, and xcalloc return values and of xrealloc's first argument.
Jim Meyering [Fri, 11 Apr 2003 09:16:32 +0000 (09:16 +0000)]
include xalloc.h
Jim Meyering [Fri, 11 Apr 2003 09:16:02 +0000 (09:16 +0000)]
do not cast xmalloc return value
Jim Meyering [Fri, 11 Apr 2003 09:15:14 +0000 (09:15 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Apr 2003 09:11:18 +0000 (09:11 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 21:41:08 +0000 (21:41 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 21:41:03 +0000 (21:41 +0000)]
(wrapf): Declare with format attribute.
Jim Meyering [Thu, 10 Apr 2003 19:33:03 +0000 (19:33 +0000)]
.
Jim Meyering [Thu, 10 Apr 2003 19:32:34 +0000 (19:32 +0000)]
.
Jim Meyering [Thu, 10 Apr 2003 19:32:23 +0000 (19:32 +0000)]
(check-texinfo): Check for uses of non-zero. I prefer to spell it `nonzero'.
Jim Meyering [Thu, 10 Apr 2003 19:31:16 +0000 (19:31 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 19:29:49 +0000 (19:29 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 19:27:53 +0000 (19:27 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 19:15:06 +0000 (19:15 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 19:11:11 +0000 (19:11 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 19:11:07 +0000 (19:11 +0000)]
(fs.h): New rule to generate fs.h from stat.c.
(BUILT_SOURCES): Add fs.h, now that it's generated.
(EXTRA_DIST): Add extract-magic.
Jim Meyering [Thu, 10 Apr 2003 19:09:43 +0000 (19:09 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 19:09:30 +0000 (19:09 +0000)]
add comment
Jim Meyering [Thu, 10 Apr 2003 19:07:34 +0000 (19:07 +0000)]
(human_fstype) [__linux__]: Append each hex constant from
fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
Jim Meyering [Thu, 10 Apr 2003 19:06:22 +0000 (19:06 +0000)]
now it's automatically generated
Jim Meyering [Thu, 10 Apr 2003 19:05:43 +0000 (19:05 +0000)]
New script to extract fs.h definitions from stat.c.
Jim Meyering [Thu, 10 Apr 2003 18:07:00 +0000 (18:07 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 18:06:56 +0000 (18:06 +0000)]
(human_fstype): Handle Linux's devpts.
Jim Meyering [Thu, 10 Apr 2003 18:06:23 +0000 (18:06 +0000)]
(S_MAGIC_DEVPTS): New magic for Linux's devpts.
Jim Meyering [Thu, 10 Apr 2003 17:03:30 +0000 (17:03 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 17:03:26 +0000 (17:03 +0000)]
(canonicalize_file_name): NUL-terminate the result.
Jim Meyering [Thu, 10 Apr 2003 16:54:19 +0000 (16:54 +0000)]
(canonicalize_file_name): Always free `extra_buf' before returning.
Jim Meyering [Thu, 10 Apr 2003 16:47:35 +0000 (16:47 +0000)]
(canonicalize_file_name): Return NULL immediately if resolvepath fails.
Otherwise, `readlink --canonical /no-such-file' would exhaust
virtual memory on some systems (e.g. Solaris).
Jim Meyering [Thu, 10 Apr 2003 16:41:17 +0000 (16:41 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 16:41:14 +0000 (16:41 +0000)]
(readlink invocation): Tweak description a little.
Jim Meyering [Thu, 10 Apr 2003 15:57:56 +0000 (15:57 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 15:57:45 +0000 (15:57 +0000)]
(canonicalize_file_name): Remove stray semicolon
that caused `readlink --canonical RELATIVE_NAME' to fail on e.g.,
Solaris systems.
Jim Meyering [Thu, 10 Apr 2003 15:57:31 +0000 (15:57 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 08:36:41 +0000 (08:36 +0000)]
Skip this test (don't fail) if creating a file with nominal length > 4GB fails.
Jim Meyering [Thu, 10 Apr 2003 07:15:51 +0000 (07:15 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Apr 2003 07:15:38 +0000 (07:15 +0000)]
Add `SEE ALSO' reference to unexpand.
Jim Meyering [Thu, 10 Apr 2003 07:15:29 +0000 (07:15 +0000)]
Add `SEE ALSO' reference to expand.
Jim Meyering [Wed, 9 Apr 2003 20:55:17 +0000 (20:55 +0000)]
Make sure that a huge obsolete option evokes the right failure.
Jim Meyering [Wed, 9 Apr 2003 20:54:56 +0000 (20:54 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Apr 2003 20:48:54 +0000 (20:48 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Apr 2003 20:48:29 +0000 (20:48 +0000)]
(line_bytes_split): Arg is of type size_t, since
that's all that is supported for now.
(main): Check for overflow in obsolescent line count option.
Jim Meyering [Wed, 9 Apr 2003 14:57:32 +0000 (14:57 +0000)]
Ensure that split --lines=N and --bytes=N work for N=2^32.
Currently (coreutils-5.0.1) split --line-bytes=M fails
with `invalid number of bytes' for M=2^32 or larger. Test it.
Jim Meyering [Wed, 9 Apr 2003 14:45:12 +0000 (14:45 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Apr 2003 14:43:33 +0000 (14:43 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Apr 2003 14:40:10 +0000 (14:40 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Apr 2003 14:40:05 +0000 (14:40 +0000)]
(bytes_split): Use size_t temporary (rather than
uintmax_t original) in remaining computations. From Paul Eggert.
Jim Meyering [Wed, 9 Apr 2003 14:37:47 +0000 (14:37 +0000)]
Handle command line option arguments larger than 2^31.
This allows e.g., splitting into files of size 2GB and larger,
and running split --lines=N with N=2^31 or more.
But for --line-bytes=N, the restriction that N <= SIZE_MAX
remains (for now), due to the way it is implemented.
Include "inttostr.h".
(bytes_split, lines_split, line_bytes_split, main):
Use uintmax_t, not size_t, for file sizes.
(main): Give a better diagnostic for option arguments == 0.
Use umaxtostr to print file sizes.
Jim Meyering [Wed, 9 Apr 2003 13:38:39 +0000 (13:38 +0000)]
tweak white-space to make backslashes line up
Jim Meyering [Wed, 9 Apr 2003 13:25:48 +0000 (13:25 +0000)]
(lines_split): Rename local, nlines -> n_lines.
Jim Meyering [Wed, 9 Apr 2003 12:21:13 +0000 (12:21 +0000)]
also check obsolete option -0
Jim Meyering [Tue, 8 Apr 2003 12:53:58 +0000 (12:53 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 12:53:53 +0000 (12:53 +0000)]
(usage): Mention that --directory (-d) works only on some systems.
Jim Meyering [Tue, 8 Apr 2003 12:53:26 +0000 (12:53 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 11:50:23 +0000 (11:50 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 11:49:57 +0000 (11:49 +0000)]
(main): Use STDIN_FILENO, not literal `0'.
Jim Meyering [Tue, 8 Apr 2003 11:46:05 +0000 (11:46 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 11:45:58 +0000 (11:45 +0000)]
(TESTS): Add split-fail.
Jim Meyering [Tue, 8 Apr 2003 11:45:44 +0000 (11:45 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 10:55:01 +0000 (10:55 +0000)]
Run $PERL to see if it is available, rather than testing its value.
Jim Meyering [Tue, 8 Apr 2003 10:54:09 +0000 (10:54 +0000)]
.
Jim Meyering [Tue, 8 Apr 2003 10:14:19 +0000 (10:14 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 09:51:57 +0000 (09:51 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 09:51:17 +0000 (09:51 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Apr 2003 09:50:50 +0000 (09:50 +0000)]
(main): Rename local variable: s/accum/n_units/.
Jim Meyering [Tue, 8 Apr 2003 09:39:08 +0000 (09:39 +0000)]
also change NCHARS, in comments, to N_BYTES