Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering 3ae9a27c25 (docolon): Zero out re_buffer and re_regs before using them.
From H.J. Lu <hjl@nynexst.com>.
1994-12-13 04:42:23 +00:00
Jim Meyering 0050411112 . 1994-12-12 17:49:55 +00:00
Jim Meyering 5bfdd91cdf . 1994-12-12 00:00:28 +00:00
Jim Meyering 88442ad885 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>.
1994-12-12 00:00:22 +00:00
Jim Meyering f46511eb69 * (<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.
1994-12-11 23:53:54 +00:00
Jim Meyering cfa6527373 . 1994-12-11 23:44:07 +00:00
Jim Meyering 0e168c7d03 (get_format_width, get_format_prec): Use ISDIGIT instead of
comparisons against '0' and '9'.
1994-12-11 23:43:21 +00:00
Jim Meyering 9c5d0aa7a6 [ULONGMAX]: Define it.
[LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
1994-12-11 23:31:12 +00:00
Jim Meyering 5b66c03ac0 . 1994-12-11 23:13:08 +00:00
Jim Meyering 5dd4159e77 (safe_read): Get this function from gcc's cccp.c. 1994-12-10 22:00:12 +00:00
Jim Meyering b3d3591aed . 1994-12-10 06:04:53 +00:00
Jim Meyering fb5c9e690f . 1994-12-10 05:48:14 +00:00
Jim Meyering e737fe145f . 1994-12-10 05:46:18 +00:00
Jim Meyering abdf594b85 No longer include <ctype.h>.
[isascii, ISDIGIT]: Remove definitions.
1994-12-10 05:45:52 +00:00
Jim Meyering 33c44e1d1b No longer include <ctype.h>.
Remove IS* macros.
1994-12-10 05:45:02 +00:00
Jim Meyering ec27c85596 No longer include <ctype.h>. 1994-12-10 05:43:18 +00:00
Jim Meyering 36a504f605 (copy, make_path_private): Use strr?chr instead of r?index. 1994-12-10 05:41:52 +00:00
Jim Meyering c95989d148 (parse_conversion, scan_args): Use strr?chr instead of r?index. 1994-12-10 05:41:16 +00:00
Jim Meyering 06f4d47a29 (remove_parents): Use strr?chr instead of r?index. 1994-12-10 05:39:59 +00:00
Jim Meyering 7f58bbba88 * [!HAVE_STRING_H]: Define strchr to index and strrchr to
rindex instead of the other way around.
* Include <ctype.h> and define IS* macros.
1994-12-10 05:25:15 +00:00
Jim Meyering 651ccf648d No longer include <ctype.h>. 1994-12-10 05:21:29 +00:00
Jim Meyering 2a242b8989 New chapter by Arnold Robbins via Karl. 1994-12-07 14:17:04 +00:00
Jim Meyering f445de3b86 . 1994-12-04 21:15:54 +00:00
Jim Meyering 12042b2fa2 Use strr?chr instead of r?index. 1994-12-04 21:15:46 +00:00
Jim Meyering 06084cb7e8 Get putenv.c from /copies (derived from glibc).
Hack it to work with SGI's __environ junk.
1994-12-04 21:08:50 +00:00
Jim Meyering 96dd28efa2 . 1994-12-04 20:56:35 +00:00
Jim Meyering 3b0ea78aef . 1994-12-04 20:55:30 +00:00
Jim Meyering be4a8a192a . 1994-12-04 20:53:43 +00:00
Jim Meyering fec974e60e (DISTFILES): Add getdate.texi. 1994-12-04 20:52:46 +00:00
Jim Meyering 5150ebf157 Mods from Karl to include getdate.texi. 1994-12-04 20:50:57 +00:00
Jim Meyering 9a102f76c8 . 1994-12-04 20:48:11 +00:00
Jim Meyering 1d6dc36be9 (du_files): Handle very low-probability fchdir failure (when errno != 0
&& errno != EINVAL).
1994-12-03 20:38:20 +00:00
Jim Meyering 9f715b2bdb (du_files): Variable name changes. 1994-12-03 20:29:28 +00:00
Jim Meyering 103e83b65e (du_files): Work around SunOS restriction that fchdir doesn't work when
accounting is enabled -- modelled after djm's find.c mods.
1994-12-03 20:26:33 +00:00
Jim Meyering f55a29ab93 (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>.
1994-12-02 16:54:56 +00:00
Jim Meyering 97f9755aeb (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.
1994-12-02 16:49:47 +00:00
Jim Meyering f2fc6e9054 name changes: number->n_lines|n_bytes 1994-11-30 20:54:21 +00:00
Jim Meyering 04b546bdb9 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.
1994-11-28 06:00:56 +00:00
Jim Meyering f214bd45dc indent 1994-11-28 04:38:27 +00:00
Jim Meyering f021d0ca05 (indent): Use TABs only when doing so replaces at least two spaces. 1994-11-28 04:32:07 +00:00
Jim Meyering c65e1fe89f `colorize' patch from Drepper. 1994-11-28 04:25:31 +00:00
Jim Meyering 7f2c21525b . 1994-11-21 14:23:15 +00:00
Jim Meyering 5fce52076e (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.
1994-11-18 05:15:04 +00:00
Jim Meyering 42c03d3135 . 1994-11-17 17:37:22 +00:00
Jim Meyering fdfd720ec4 (output): Use STDOUT_FILENO instead of `1' in xwrite call. 1994-11-17 12:49:38 +00:00
Jim Meyering 53c46c67ac (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.
1994-11-17 12:49:10 +00:00
Jim Meyering 13e79f4f72 Include <getopt.h> instead of "getopt.h". 1994-11-16 13:19:25 +00:00
Jim Meyering 67af2936fa (tempname): Merge two very similar sprintf stmts into one. 1994-11-16 13:16:53 +00:00
Jim Meyering 5d9de33889 Use BUFSIZ instead of BUFSIZE. 1994-11-16 13:13:07 +00:00
Jim Meyering 5356de1df7 Rewriting to help it pass a reasonable suite of tests. 1994-11-16 13:10:34 +00:00