platform/upstream/coreutils.git
29 years ago* src/*.c: Include "error.h" instead of simply declaring
Jim Meyering [Tue, 20 Dec 1994 05:26:44 +0000 (05:26 +0000)]
* src/*.c: Include "error.h" instead of simply declaring
`void error ();'.

29 years agoBegin overhaul.
Jim Meyering [Tue, 20 Dec 1994 05:24:13 +0000 (05:24 +0000)]
Begin overhaul.

29 years ago.
Jim Meyering [Tue, 20 Dec 1994 05:10:42 +0000 (05:10 +0000)]
.

29 years ago.
Jim Meyering [Tue, 20 Dec 1994 05:05:55 +0000 (05:05 +0000)]
.

29 years ago(test_stat, binary_operator): Use safe_stat instead of SAFE_STAT.
Jim Meyering [Tue, 20 Dec 1994 04:51:10 +0000 (04:51 +0000)]
(test_stat, binary_operator): Use safe_stat instead of SAFE_STAT.
(unary_operator): Use safe_lstat instead of SAFE_LSTAT.

29 years ago(print_entry): Use safe_stat instead of SAFE_STAT.
Jim Meyering [Tue, 20 Dec 1994 04:50:25 +0000 (04:50 +0000)]
(print_entry): Use safe_stat instead of SAFE_STAT.

29 years ago(dir_ok): Use safe_stat instead of SAFE_STAT.
Jim Meyering [Tue, 20 Dec 1994 04:49:55 +0000 (04:49 +0000)]
(dir_ok): Use safe_stat instead of SAFE_STAT.

29 years ago(numerous functions): Give char* filename arguments the const attribute.
Jim Meyering [Tue, 20 Dec 1994 04:27:35 +0000 (04:27 +0000)]
(numerous functions): Give char* filename arguments the const attribute.

29 years ago.
Jim Meyering [Tue, 20 Dec 1994 04:23:49 +0000 (04:23 +0000)]
.

29 years ago.
Jim Meyering [Tue, 20 Dec 1994 04:17:23 +0000 (04:17 +0000)]
.

29 years ago.
Jim Meyering [Tue, 20 Dec 1994 04:15:30 +0000 (04:15 +0000)]
.

29 years ago(main): Use safe_stat, not SAFE_STAT.
Jim Meyering [Tue, 20 Dec 1994 04:03:28 +0000 (04:03 +0000)]
(main): Use safe_stat, not SAFE_STAT.

29 years agoInclude "error.h" instead of simply declaring `void error ();'.
Jim Meyering [Fri, 16 Dec 1994 05:45:57 +0000 (05:45 +0000)]
Include "error.h" instead of simply declaring `void error ();'.
(main): Don't advance optarg past leading sign -- otherwise, we'd
be making tail accept invalid options like `-+1'.
(tail_file): Fix call to error with %s in format, but no corresponding argument.

29 years agoInclude "error.h" instead of simply declaring `void error ();'.
Jim Meyering [Fri, 16 Dec 1994 05:42:47 +0000 (05:42 +0000)]
Include "error.h" instead of simply declaring `void error ();'.

29 years agoInclude "error.h" instead of simply declaring `void error ();'.
Jim Meyering [Fri, 16 Dec 1994 05:41:05 +0000 (05:41 +0000)]
Include "error.h" instead of simply declaring `void error ();'.

29 years ago(main): Use %lu, not %d for unsigned long.
Jim Meyering [Fri, 16 Dec 1994 05:32:30 +0000 (05:32 +0000)]
(main): Use %lu, not %d for unsigned long.
(my_strtoul, uint_fatal_error): Remove functions.  Use xstrtoul
and STRTOL_FATAL_ERROR instead.

29 years ago(main): Move to end.
Jim Meyering [Tue, 13 Dec 1994 05:42:44 +0000 (05:42 +0000)]
(main): Move to end.
(factor, do_stdin): Declare static.

29 years ago(docolon): Zero out re_buffer and re_regs before using them.
Jim Meyering [Tue, 13 Dec 1994 04:42:23 +0000 (04:42 +0000)]
(docolon): Zero out re_buffer and re_regs before using them.
From H.J. Lu <hjl@nynexst.com>.

29 years ago.
Jim Meyering [Mon, 12 Dec 1994 17:49:55 +0000 (17:49 +0000)]
.

29 years ago.
Jim Meyering [Mon, 12 Dec 1994 00:00:28 +0000 (00:00 +0000)]
.

29 years agosort.c (main): Fix interpretation of field offsets when specified
Jim Meyering [Mon, 12 Dec 1994 00:00:22 +0000 (00:00 +0000)]
sort.c (main): Fix interpretation of field offsets when specified
via -k option.  They were being interpreted as zero-indexed.
POSIX says they are 1-based indices.
(keycompare): Don't ignore characters at the end of words
when otherwise they compare equal.  Both from Rik Faith
<faith@cs.unc.edu>.

29 years ago* (<most functions>): Change the type of n_units/n_lines/n_bytes
Jim Meyering [Sun, 11 Dec 1994 23:53:54 +0000 (23:53 +0000)]
* (<most functions>): Change the type of n_units/n_lines/n_bytes
to off_t because n_bytes is used as the option to fseek and off_t may
be long long (e.g. on BSD4.4).  The only place where a 32-bit limit is
imposed is in the string-to-integer converstion of xstrtol.
(main): Use xstrtol instead of manual string to integer conversion.

29 years ago.
Jim Meyering [Sun, 11 Dec 1994 23:44:07 +0000 (23:44 +0000)]
.

29 years ago(get_format_width, get_format_prec): Use ISDIGIT instead of
Jim Meyering [Sun, 11 Dec 1994 23:43:21 +0000 (23:43 +0000)]
(get_format_width, get_format_prec): Use ISDIGIT instead of
comparisons against '0' and '9'.

29 years ago[ULONGMAX]: Define it.
Jim Meyering [Sun, 11 Dec 1994 23:31:12 +0000 (23:31 +0000)]
[ULONGMAX]: Define it.
[LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.

29 years ago.
Jim Meyering [Sun, 11 Dec 1994 23:13:08 +0000 (23:13 +0000)]
.

29 years ago(safe_read): Get this function from gcc's cccp.c.
Jim Meyering [Sat, 10 Dec 1994 22:00:12 +0000 (22:00 +0000)]
(safe_read): Get this function from gcc's cccp.c.

29 years ago.
Jim Meyering [Sat, 10 Dec 1994 06:04:53 +0000 (06:04 +0000)]
.

29 years ago.
Jim Meyering [Sat, 10 Dec 1994 05:48:14 +0000 (05:48 +0000)]
.

29 years ago.
Jim Meyering [Sat, 10 Dec 1994 05:46:18 +0000 (05:46 +0000)]
.

29 years agoNo longer include <ctype.h>.
Jim Meyering [Sat, 10 Dec 1994 05:45:52 +0000 (05:45 +0000)]
No longer include <ctype.h>.
[isascii, ISDIGIT]: Remove definitions.

29 years agoNo longer include <ctype.h>.
Jim Meyering [Sat, 10 Dec 1994 05:45:02 +0000 (05:45 +0000)]
No longer include <ctype.h>.
Remove IS* macros.

29 years agoNo longer include <ctype.h>.
Jim Meyering [Sat, 10 Dec 1994 05:43:18 +0000 (05:43 +0000)]
No longer include <ctype.h>.

29 years ago(copy, make_path_private): Use strr?chr instead of r?index.
Jim Meyering [Sat, 10 Dec 1994 05:41:52 +0000 (05:41 +0000)]
(copy, make_path_private): Use strr?chr instead of r?index.

29 years ago(parse_conversion, scan_args): Use strr?chr instead of r?index.
Jim Meyering [Sat, 10 Dec 1994 05:41:16 +0000 (05:41 +0000)]
(parse_conversion, scan_args): Use strr?chr instead of r?index.

29 years ago(remove_parents): Use strr?chr instead of r?index.
Jim Meyering [Sat, 10 Dec 1994 05:39:59 +0000 (05:39 +0000)]
(remove_parents): Use strr?chr instead of r?index.

29 years ago* [!HAVE_STRING_H]: Define strchr to index and strrchr to
Jim Meyering [Sat, 10 Dec 1994 05:25:15 +0000 (05:25 +0000)]
* [!HAVE_STRING_H]: Define strchr to index and strrchr to
rindex instead of the other way around.
* Include <ctype.h> and define IS* macros.

29 years agoNo longer include <ctype.h>.
Jim Meyering [Sat, 10 Dec 1994 05:21:29 +0000 (05:21 +0000)]
No longer include <ctype.h>.

29 years agoNew chapter by Arnold Robbins via Karl.
Jim Meyering [Wed, 7 Dec 1994 14:17:04 +0000 (14:17 +0000)]
New chapter by Arnold Robbins via Karl.

29 years ago.
Jim Meyering [Sun, 4 Dec 1994 21:15:54 +0000 (21:15 +0000)]
.

29 years agoUse strr?chr instead of r?index.
Jim Meyering [Sun, 4 Dec 1994 21:15:46 +0000 (21:15 +0000)]
Use strr?chr instead of r?index.

29 years agoGet putenv.c from /copies (derived from glibc).
Jim Meyering [Sun, 4 Dec 1994 21:08:50 +0000 (21:08 +0000)]
Get putenv.c from /copies (derived from glibc).
Hack it to work with SGI's __environ junk.

29 years ago.
Jim Meyering [Sun, 4 Dec 1994 20:56:35 +0000 (20:56 +0000)]
.

29 years ago.
Jim Meyering [Sun, 4 Dec 1994 20:55:30 +0000 (20:55 +0000)]
.

29 years ago.
Jim Meyering [Sun, 4 Dec 1994 20:53:43 +0000 (20:53 +0000)]
.

29 years ago(DISTFILES): Add getdate.texi.
Jim Meyering [Sun, 4 Dec 1994 20:52:46 +0000 (20:52 +0000)]
(DISTFILES): Add getdate.texi.

29 years agoMods from Karl to include getdate.texi.
Jim Meyering [Sun, 4 Dec 1994 20:50:57 +0000 (20:50 +0000)]
Mods from Karl to include getdate.texi.

29 years ago.
Jim Meyering [Sun, 4 Dec 1994 20:48:11 +0000 (20:48 +0000)]
.

29 years ago(du_files): Handle very low-probability fchdir failure (when errno != 0
Jim Meyering [Sat, 3 Dec 1994 20:38:20 +0000 (20:38 +0000)]
(du_files): Handle very low-probability fchdir failure (when errno != 0
&& errno != EINVAL).

29 years ago(du_files): Variable name changes.
Jim Meyering [Sat, 3 Dec 1994 20:29:28 +0000 (20:29 +0000)]
(du_files): Variable name changes.

29 years ago(du_files): Work around SunOS restriction that fchdir doesn't work when
Jim Meyering [Sat, 3 Dec 1994 20:26:33 +0000 (20:26 +0000)]
(du_files): Work around SunOS restriction that fchdir doesn't work when
accounting is enabled -- modelled after djm's find.c mods.

29 years ago(checkfp): Initialize keybeg and keylim fields.
Jim Meyering [Fri, 2 Dec 1994 16:54:56 +0000 (16:54 +0000)]
(checkfp): Initialize keybeg and keylim fields.
Before, this command
  perl -e 'print join ("\n", (1..513)), "\n";'|sort -cs -n
failed on SunOS 4 systems.  From Robert H. de Vries <robert@and.nl>.

29 years ago(xfclose): Report failed fflush. Otherwise, failed write to stdout
Jim Meyering [Fri, 2 Dec 1994 16:49:47 +0000 (16:49 +0000)]
(xfclose): Report failed fflush.  Otherwise, failed write to stdout
could be missed because of subsequent clearerr.
(main): Include filename in a couple error messages.
Add missing %s in an error format string.

29 years agoname changes: number->n_lines|n_bytes
Jim Meyering [Wed, 30 Nov 1994 20:54:21 +0000 (20:54 +0000)]
name changes: number->n_lines|n_bytes

29 years agoMake some globals `static' and/or `const'.
Jim Meyering [Mon, 28 Nov 1994 06:00:56 +0000 (06:00 +0000)]
Make some globals `static' and/or `const'.
(LEN_STR_PAIR): New macro.
(decode_switches): Only ignore invalid TABSET value instead of dying.
(parse_ls_color): Use error, not fprintf.
(print_type_indicator): Remove dcls of two unused variables.

29 years agoindent
Jim Meyering [Mon, 28 Nov 1994 04:38:27 +0000 (04:38 +0000)]
indent

29 years ago(indent): Use TABs only when doing so replaces at least two spaces.
Jim Meyering [Mon, 28 Nov 1994 04:32:07 +0000 (04:32 +0000)]
(indent): Use TABs only when doing so replaces at least two spaces.

29 years ago`colorize' patch from Drepper.
Jim Meyering [Mon, 28 Nov 1994 04:25:31 +0000 (04:25 +0000)]
`colorize' patch from Drepper.

29 years ago.
Jim Meyering [Mon, 21 Nov 1994 14:23:15 +0000 (14:23 +0000)]
.

29 years ago(list_entries): Delete. Split in two actually...
Jim Meyering [Fri, 18 Nov 1994 05:15:04 +0000 (05:15 +0000)]
(list_entries): Delete.  Split in two actually...
(list_entries_users, list_entries_who, userid_compare): New functions.
(list_entries_users): Sort the user names.  Reported by
Michael I Bushnell.
Topologically sort the functions and remove fwd declarations.

29 years ago.
Jim Meyering [Thu, 17 Nov 1994 17:37:22 +0000 (17:37 +0000)]
.

29 years ago(output): Use STDOUT_FILENO instead of `1' in xwrite call.
Jim Meyering [Thu, 17 Nov 1994 12:49:38 +0000 (12:49 +0000)]
(output): Use STDOUT_FILENO instead of `1' in xwrite call.

29 years ago(dump_remainder): Flush standard output just before
Jim Meyering [Thu, 17 Nov 1994 12:49:10 +0000 (12:49 +0000)]
(dump_remainder): Flush standard output just before
sleeping so that `tail -f' will output partial lines sooner.
This applies only when following the end of a single file.
From Leonard N. Zubkoff <lnz@dandelion.com>.

(file_lines, pipe_lines, pipe_bytes, start_bytes, start_lines, dump_remainder):
Use STDOUT_FILENO instead of `1' in XWRITE calls.

29 years agoInclude <getopt.h> instead of "getopt.h".
Jim Meyering [Wed, 16 Nov 1994 13:19:25 +0000 (13:19 +0000)]
Include <getopt.h> instead of "getopt.h".

29 years ago(tempname): Merge two very similar sprintf stmts into one.
Jim Meyering [Wed, 16 Nov 1994 13:16:53 +0000 (13:16 +0000)]
(tempname): Merge two very similar sprintf stmts into one.

29 years agoUse BUFSIZ instead of BUFSIZE.
Jim Meyering [Wed, 16 Nov 1994 13:13:07 +0000 (13:13 +0000)]
Use BUFSIZ instead of BUFSIZE.

29 years agoRewriting to help it pass a reasonable suite of tests.
Jim Meyering [Wed, 16 Nov 1994 13:10:34 +0000 (13:10 +0000)]
Rewriting to help it pass a reasonable suite of tests.

29 years agoDeclare DELIM to be `int' rather than unsigned char.
Jim Meyering [Wed, 16 Nov 1994 13:09:13 +0000 (13:09 +0000)]
Declare DELIM to be `int' rather than unsigned char.

29 years ago.
Jim Meyering [Wed, 16 Nov 1994 13:06:45 +0000 (13:06 +0000)]
.

29 years ago.
Jim Meyering [Wed, 16 Nov 1994 13:05:38 +0000 (13:05 +0000)]
.

29 years ago.
Jim Meyering [Mon, 14 Nov 1994 22:31:47 +0000 (22:31 +0000)]
.

30 years ago(my_strtol): New function.
Jim Meyering [Fri, 11 Nov 1994 16:14:19 +0000 (16:14 +0000)]
(my_strtol): New function.
(main): Use it instead of atoi to convert argument strings to
major and minor device numbers.  Now, mknod diagnoses invalid
device numbers and accepts octal and hexadecimal as well as
decimal string arguments.  Ralf Lammers
<rlammers@physik.uni-osnabrueck.de> suggested that mknod accept
hex device numbers for compatibility with HPUX's mknod program.

30 years ago(SOURCES): Add strtol.c.
Jim Meyering [Fri, 11 Nov 1994 16:10:16 +0000 (16:10 +0000)]
(SOURCES): Add strtol.c.

30 years ago.
Jim Meyering [Wed, 9 Nov 1994 20:16:23 +0000 (20:16 +0000)]
.

30 years ago.
Jim Meyering [Tue, 8 Nov 1994 22:40:52 +0000 (22:40 +0000)]
.

30 years ago.
Jim Meyering [Mon, 7 Nov 1994 12:55:05 +0000 (12:55 +0000)]
.

30 years agoInitial revision
Jim Meyering [Mon, 7 Nov 1994 12:47:50 +0000 (12:47 +0000)]
Initial revision

30 years ago.
Jim Meyering [Mon, 7 Nov 1994 05:38:19 +0000 (05:38 +0000)]
.

30 years ago.
Jim Meyering [Mon, 7 Nov 1994 05:37:05 +0000 (05:37 +0000)]
.

30 years agoAdd test names.
Jim Meyering [Mon, 7 Nov 1994 04:36:41 +0000 (04:36 +0000)]
Add test names.

30 years agoAdd -w and clean up.
Jim Meyering [Mon, 7 Nov 1994 04:36:07 +0000 (04:36 +0000)]
Add -w and clean up.

30 years agomerge with 1.12
Jim Meyering [Sun, 6 Nov 1994 17:51:23 +0000 (17:51 +0000)]
merge with 1.12

30 years agomerge with 1.11
Jim Meyering [Sun, 6 Nov 1994 17:47:32 +0000 (17:47 +0000)]
merge with 1.11

30 years agomerge with 1.10
Jim Meyering [Sun, 6 Nov 1994 17:42:51 +0000 (17:42 +0000)]
merge with 1.10

30 years agoInitial revision
Jim Meyering [Sun, 6 Nov 1994 17:40:20 +0000 (17:40 +0000)]
Initial revision

30 years agomerge with 1.12
Jim Meyering [Sat, 5 Nov 1994 14:17:55 +0000 (14:17 +0000)]
merge with 1.12

30 years agomerge with 3.10
Jim Meyering [Sat, 5 Nov 1994 13:37:38 +0000 (13:37 +0000)]
merge with 3.10

30 years agomerge with 3.9u1
Jim Meyering [Fri, 4 Nov 1994 16:50:04 +0000 (16:50 +0000)]
merge with 3.9u1

30 years agomerge with 1.9.1k1
Jim Meyering [Fri, 4 Nov 1994 16:43:33 +0000 (16:43 +0000)]
merge with 1.9.1k1

30 years ago.
Jim Meyering [Fri, 4 Nov 1994 14:48:40 +0000 (14:48 +0000)]
.

30 years ago.
Jim Meyering [Fri, 4 Nov 1994 14:15:12 +0000 (14:15 +0000)]
.

30 years agoChange _P to __P.
Jim Meyering [Fri, 4 Nov 1994 14:04:43 +0000 (14:04 +0000)]
Change _P to __P.

30 years ago.
Jim Meyering [Fri, 4 Nov 1994 14:04:03 +0000 (14:04 +0000)]
.

30 years agoInclude makepath.h.
Jim Meyering [Fri, 4 Nov 1994 06:05:34 +0000 (06:05 +0000)]
Include makepath.h.
Add an argument: PRESERVE_EXISTING.
Declare char* arguments const.

30 years ago.
Jim Meyering [Fri, 4 Nov 1994 06:04:42 +0000 (06:04 +0000)]
.

30 years agoInclude <limits.h> before system.h because limits.h on
Jim Meyering [Fri, 4 Nov 1994 06:04:02 +0000 (06:04 +0000)]
Include <limits.h> before system.h because limits.h on
some systems undefines PATH_MAX, whereas system.h includes pathmax.h
which sets PATH_MAX.  From Kaveh Ghazi.

30 years ago(make_path_private): Rename function from make_path to avoid confusion.
Jim Meyering [Fri, 4 Nov 1994 06:03:25 +0000 (06:03 +0000)]
(make_path_private): Rename function from make_path to avoid confusion.
(do_copy): Update caller.

30 years ago(DISTFILES): Add makepath.h.
Jim Meyering [Fri, 4 Nov 1994 06:02:21 +0000 (06:02 +0000)]
(DISTFILES): Add makepath.h.
(makepath.o): Depend on it.

30 years agoUpdate calls to make_path.
Jim Meyering [Fri, 4 Nov 1994 06:00:41 +0000 (06:00 +0000)]
Update calls to make_path.

30 years ago.
Jim Meyering [Thu, 3 Nov 1994 22:32:35 +0000 (22:32 +0000)]
.