Jim Meyering
3191649a85
(copy_reg): Use ST_NBLOCKS (sb) * 512', not sb.st_blocks *
...
DEV_BSIZE.' From H.J. Lu (hjl@lucon.org ).
1996-04-03 12:20:24 +00:00
Jim Meyering
4325d27ddd
Include assert.h (disabled).
...
(path_concat): New function.
(do_copy): Use path_concat instead of open-coding part of its
functionality in two places. This has the additional benefit
of avoiding forming destination names like `D//file' when the
destination directory D includes a trailing slash -- as would
happen when cp is used like this:
mkdir D; touch file D/file; cp -i file D/
Reported by Fran?ois Pinard.
1996-04-03 05:42:14 +00:00
Jim Meyering
3d1c60aba7
.
1996-03-31 17:19:06 +00:00
Jim Meyering
399abab9bc
(quote_filename): Use ISGRAPH and ISPRINT in place of
...
ASCII-centric tests against literals.
(length_of_file_name_and_frills): Likewise.
1996-03-31 17:18:28 +00:00
Jim Meyering
908040f25e
Rip out color support.
1996-03-31 14:22:12 +00:00
Jim Meyering
c2efd628df
.
1996-03-29 04:53:57 +00:00
Jim Meyering
fee163dd57
Move usage to precede main.
...
Say `too few arguments' if that's why we display usage.
Protoize.
Include error.h.
Update copyright.
1996-03-28 06:17:34 +00:00
Jim Meyering
0271d97259
from Roland
1996-03-28 05:42:56 +00:00
Jim Meyering
7c5f9f7faa
(cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
...
to be POSIX compliant. From Stephen Gildea <gildea@x.org >.
1996-03-28 05:35:31 +00:00
Jim Meyering
5de0b392f2
Update FSF's address.
1996-03-24 18:47:09 +00:00
Jim Meyering
3613700a38
Update FSF's address.
1996-03-24 18:40:53 +00:00
Jim Meyering
318a497768
Update FSF's address.
1996-03-24 18:33:12 +00:00
Jim Meyering
f9714aa24d
Include xstrtod.h.
...
(scan_double_arg): Use xstrtod rather than strtod directly.
1996-03-24 18:16:10 +00:00
Jim Meyering
236c02759b
Make parameters const where appropriate.
...
Rename global FROM to START.
(print_numbers): Rewrite loops to avoid incrementing. Instead,
use `x = first + i * increment' paradigm. Otherwise, with inexact
increment, you could miss the last value.
1996-03-24 17:50:09 +00:00
Jim Meyering
777948e773
Protoize and reorder functions.
1996-03-24 17:43:41 +00:00
Jim Meyering
6e45576dd6
(main): Reformat if-block a little.
...
Declare index I to be of type size_t to avoid warning from gcc -Wall.
1996-03-24 17:21:40 +00:00
Jim Meyering
818d29db9b
Call error with EXIT_FAILURE (rather than `1') as first actual parameter.
1996-03-24 16:59:11 +00:00
Jim Meyering
47f70113d4
Exit with status EXIT_SUCCESS or EXIT_FAILURE, rather than 0 or 1.
...
This doesn't change `error (1' calls.
1996-03-24 14:58:01 +00:00
Jim Meyering
e6fae6c23f
[SORT_FAILURE]: New macro.
...
Be careful to exit with 1 only when -c is used and the
input is not properly sorted. In all other cases, use
SORT_FAILURE as required by POSIX.
(main): Change some `error (1, ...' to use SORT_FAILURE.
Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
Replace all uses of `2' (as exit code) with SORT_FAILURE.
1996-03-24 02:26:21 +00:00
Jim Meyering
7178674807
Include assert.h, but disable assertions.
...
(process_line_count): Replace if-abort with a slightly relaxed
assertion. Before, `echo |csplit - 1 1' would abort.
Reported by Samuli.Karkkainen@hut.fi .
(parse_patterns): Disallow uses like `csplit FILE 0' with zero
line number, `csplit FILE 2 1' with decreasing line numbers, and
warn about uses like `csplit FILE 3 3' that have equal line numbers.
1996-03-22 04:54:46 +00:00
Jim Meyering
1954f681c6
(main): Declare to be of type int, not void.
1996-03-21 22:47:02 +00:00
Jim Meyering
bb6a548712
(main): Declare to be of type int, not void.
1996-03-21 22:45:19 +00:00
Jim Meyering
adb7c216b2
(main): Declare to be of type int, not void.
1996-03-21 22:41:04 +00:00
Jim Meyering
dd5db06467
(main): Declare to return int, not void. From Peter Seebach
...
<seebs@taniemarie.solon.com >.
1996-03-21 13:00:15 +00:00
Jim Meyering
4229a555fc
Don't include version.h.
...
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-16 22:30:54 +00:00
Jim Meyering
ca0246a4c1
Don't include version.h.
...
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-16 16:49:28 +00:00
Jim Meyering
c1cdafa1b4
Change @VERSION@ to @PKG_VERSION@.
1996-03-16 16:41:36 +00:00
Jim Meyering
3ee97d4d5b
Don't include version.h.
...
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-16 16:14:26 +00:00
Jim Meyering
2e5cc5e04e
(read_utmp): Declare n_read to be of type size_t rather than int.
1996-03-16 05:44:02 +00:00
Jim Meyering
182c784a99
(validate_path): Cast path_max to size_t before
...
comparing with strlen(path).
1996-03-16 05:43:24 +00:00
Jim Meyering
b14b621029
Remove __P-protected prototype for basename.
...
Reported by Fran?ois Pinard.
(remove_suffix): Move to precede use. Remove prototype.
Declare formal parameter SUFFIX to be const.
1996-03-16 05:42:53 +00:00
Jim Meyering
6fc4ae7a28
(main): Initialize for internationalized message support:
...
call setlocale, bindtextdomain, and textdomain.
1996-03-12 23:49:29 +00:00
Jim Meyering
fe456215a6
[_]: Don't define this away.
1996-03-12 04:02:07 +00:00
Jim Meyering
10c96c43ac
(main): Initialize for internationalized message support: call setlocale,
...
bindtextdomain, and textdomain.
1996-03-12 03:08:30 +00:00
Jim Meyering
8e8fd5439a
Add definitions and includes for NLS.
1996-03-12 03:06:47 +00:00
Jim Meyering
6526b37460
(write_bytes): Renamed from xfwrite.
...
Remove SIZE parameter. It was always 1.
Update all callers.
Rename NELEM parameter to N_BYTES and change its type to size_t.
1996-03-11 22:07:21 +00:00
Jim Meyering
f090816a3f
(star_digits_closebracket): Declare formal param, IDX, and local I to
...
be of type size_t (rather than int) to avoid warnings from gcc -Wall.
1996-03-09 20:25:29 +00:00
Jim Meyering
d385bbc985
(memcasecmp): Declare local I to be unsigned to avoid warning from gcc -Wall.
1996-03-09 20:24:01 +00:00
Jim Meyering
715765a548
(main): Initialize for internationalized message support: call setlocale,
...
bindtextdomain, and textdomain.
1996-03-09 20:19:13 +00:00
Jim Meyering
8ddd60a387
(copy): Comment change to avoid overwriting source with backup.
1996-03-09 04:59:22 +00:00
Jim Meyering
ff6400a018
(main): Tell read_filesystem_list that it should determine file system type
...
when the user specifies --print-type or -T. From Michael Rendell
<michael@cs.mun.ca >
1996-03-08 02:25:40 +00:00
Jim Meyering
a74458a36e
(print_entry): Use STRUCT_UTMP, not `struct utmp'.
1996-03-07 03:41:22 +00:00
Jim Meyering
c239e82816
(usage): Reorder --time and --help so --help is the latter (just
...
before --version) to be consistent with other usage functions.
1996-03-06 05:04:05 +00:00
Jim Meyering
b21af8a7dd
(main): Exit after processing --version.
1996-03-05 05:47:04 +00:00
Jim Meyering
815b5ca1d5
(WINDOWS_SETFILEMODE_BINARY): New macro.
...
(skip) [_WIN32 && _O_BINARY]: Use it.
(read_char): Likewise.
(read_block): Likewise.
Based on changes by Gary Newman <gnewman@shore.net >.
1996-03-02 05:45:45 +00:00
Jim Meyering
3d2a9041f9
(docolon): Don't use deceptively-named RE_SYNTAX_POSIX_BASIC -- it recognizes
...
non-BRE \?, \+, and \|. Instead, use RE_SYNTAX_POSIX_MINIMAL_BASIC.
1996-03-02 02:45:20 +00:00
Jim Meyering
446976666c
General cleanup. Use xstrtoul, not atoi.
...
Change output format. Allow inputs as large as ULONG_MAX.
Allow more than one command line argument.
1996-02-29 05:07:34 +00:00
Jim Meyering
557514f55c
(wrapf) [!__STDC__]: Indent by one space the first line of the pre-ANSI
...
function definition so ansi2knr doesn't munge it.
1996-02-29 03:06:10 +00:00
Jim Meyering
9a181424ac
(eval6): Cast strlen to int to avoid warning from gcc -Wall.
1996-02-29 02:53:37 +00:00
Jim Meyering
edac0ff420
(copy): Remove bogus (now that we're using full_write) increment of w_partial.
...
Change sense of the tests (though they're equivalent) that check
the value returned by full_write. making it clearer where errno
is valid. full_write always writes the full amount or fails.
1996-02-27 03:24:31 +00:00