Commit Graph

19804 Commits

Author SHA1 Message Date
Jim Meyering 8bd2bc6d00 *** empty log message *** 2004-12-05 19:37:56 +00:00
Jim Meyering 334c1b1801 (unit-test): New target.
(check): Depend on it.
(noinst_PROGRAMS): Define.
2004-12-05 19:37:49 +00:00
Jim Meyering ff13a286c7 Test the __fpending function.
This ensures that if there is an error in the definition of the
PENDING_OUTPUT_N_BYTES expression, we'll find about it right away;
that value is used only in the rare event that close_stdout's
fclose fails with EBADF.
2004-12-05 19:28:15 +00:00
Jim Meyering a2b300f156 revert to 1.8, now that we test the offending
condition externally (via new t-fpending.c program)
2004-12-05 19:27:47 +00:00
Jim Meyering 9df080cfc5 *** empty log message *** 2004-12-05 18:53:40 +00:00
Jim Meyering 2edd4a3769 *** empty log message *** 2004-12-05 18:52:37 +00:00
Jim Meyering 210212143b Include <stdlib.h>.
(__fpending): Abort if PENDING_OUTPUT_N_BYTES is negative.
This ensures that if there is an error in the definition of the
PENDING_OUTPUT_N_BYTES expression, we'll find about it right away;
this value is used only in the rare event that close_stdout's
fclose fails with EBADF.
2004-12-05 18:52:33 +00:00
Jim Meyering 821a730797 *** empty log message *** 2004-12-04 14:23:51 +00:00
Jim Meyering b4c28f911e (cut invocation): Say when --complement is useful. 2004-12-04 14:23:48 +00:00
Jim Meyering 7d4bd07095 *** empty log message *** 2004-12-04 14:15:54 +00:00
Jim Meyering fca9a76e83 Mention cut's new --complement option. 2004-12-04 14:15:46 +00:00
Jim Meyering 046287ab0f *** empty log message *** 2004-12-04 13:37:59 +00:00
Jim Meyering f049ac4acc *** empty log message *** 2004-12-04 13:33:11 +00:00
Jim Meyering ba23d0aa8d *** empty log message *** 2004-12-04 13:32:53 +00:00
Jim Meyering 7380cf792a (complement, COMPLEMENT_OPTION): New.
(longopts): Add --complement.
(usage): Say not that -b, -c, and -f `print' fields,
but rather that they `select' fields for printing.
Describe the new --complement option.
(mark_range_start): Extracted from set_fields.
(print_kth): Support --complement.
(compare_ranges): New function.
(set_fields): Rewrite the part that populates range_start_ht,
merging it with the part that populates printable_field.
(main): Handle --complement.

From Paolo Bonzini.
2004-12-04 13:32:48 +00:00
Paul Eggert 4dd208a372 * src/tail.c (tail_file): Set errnum to -1 if the initial "tail" failed. 2004-12-04 07:03:11 +00:00
Paul Eggert cd9d7fd2bd (tail_file): Set errnum to -1 if the initial "tail" failed. 2004-12-04 07:02:35 +00:00
Paul Eggert fcf9cad088 Mention copyright notice in latest checkin. 2004-12-03 07:34:40 +00:00
Paul Eggert fcf37d8842 Recent changes to save-cwd, openat. 2004-12-03 07:13:31 +00:00
Paul Eggert f85b7c2b0c Regenerate. 2004-12-03 07:12:46 +00:00
Paul Eggert f125837030 Import from gnulib. 2004-12-03 07:10:19 +00:00
Paul Eggert 5a6d8bdbb4 Add copyright notice.
(gl_FUNC_OPENAT): Require gl_USE_SYSTEM_EXTENSIONS, since Solaris
requires __EXTENSIONS__ to be defined when compiling pedantically.
2004-12-03 07:01:35 +00:00
Paul Eggert dddbfd198a Add copyright and authorship notice.
(AT_FDCWD): Use the same value Solaris 9 uses.
2004-12-03 06:44:30 +00:00
Paul Eggert d2117d918c Include "openat.h" before other include files.
Include "exitfail.h".
(openat): Remove #undef; no longer needed now that we include openat.h first.
(rpl_openat): Add comment about mode_t promotion.  Simplify
code a bit by moving initializations around.  Use exit_failure
rather than EXIT_FAILURE.
2004-12-03 06:43:59 +00:00
Paul Eggert f2173447ba save-cwd.c: Include "save-cwd.h" before other include files.
(O_DIRECTORY): Remove; not needed here, since "." must be
a directory.  All uses removed.
(save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
universal on Suns, and we also need to test for IRIX.
Revamp code to use 'if' rather than '#if'.
Avoid unnecessary comparison of cwd->desc to 0.
2004-12-03 06:25:03 +00:00
Jim Meyering 2da62dbe9a *** empty log message *** 2004-12-02 07:47:18 +00:00
Jim Meyering d6fed8d35e With using --color and with LS_COLORS saying not to color
executables, don't stat every file.

(is_colored): New function.
(gobble_file): Use it.
(main): Use it here, in place of too-strict tests against NULL:
if either ORPHAN or MISSING was set to 0 from LS_COLORS, the
old test would fail.
2004-12-02 07:47:14 +00:00
Paul Eggert a7c9d8dae8 Assume setlocale, locale.h, and localeconv exist and work. 2004-12-02 06:57:05 +00:00
Paul Eggert c82d4cf0b5 (different): Assume setlocale exists. 2004-12-02 06:56:28 +00:00
Paul Eggert bba741d6c2 Assume locale.h exists.
(HAVE_SETLOCALE): Remove.
2004-12-02 06:56:08 +00:00
Paul Eggert 543696d559 (C_DECIMAL_POINT): Remove. Use changed to '.'.
Assume setlocale exists.
(thousands_sep): Renamed from th_sep.
(IS_THOUSANDS_SEP): Remove.  All uses replaced by comparisons.
(NONZERO): Parenthesize use of arg.
(numcompare): Avoid duplicate loads.  Use ISDIGIT as boolean, for
consistency.  Avoid unnecessary negation by reversing
fraccompare args.
(main): Rewrite localeconv call to match seq.c.
2004-12-02 06:55:31 +00:00
Paul Eggert d153646bbc (decimal_point): Treat like sort. Now char.
All uses changed.
2004-12-02 06:55:08 +00:00
Paul Eggert 037268041b (keycmp): Assume setlocale exists. 2004-12-02 06:54:40 +00:00
Paul Eggert a0a9d4c6f4 (compare_files): Assume setlocale exists. 2004-12-02 06:54:16 +00:00
Paul Eggert 1cdb15c44c (gl_MACROS): Assume localeconv exists. 2004-12-02 06:53:49 +00:00
Paul Eggert 7e01484e7f (gl_HUMAN): Assume locale.h and localeconv exist. 2004-12-02 06:53:29 +00:00
Paul Eggert 98902d4bfb (gl_HARD_LOCALE): Assume locale.h and setlocale exist. 2004-12-02 06:53:00 +00:00
Paul Eggert 08da1bb439 Assume <locale.h> exists.
(human_readable): Assume localeconv exists.
2004-12-02 06:52:10 +00:00
Paul Eggert 2dea4ec8b0 Assume <locale.h> exists.
Include "strdup.h".
(GLIBC_VERSION): New macro.
(hard_locale): Assume setlocale exists.
Rewrite to avoid #ifdef.
Use strdup rather than malloc + strcpy.
2004-12-02 06:51:46 +00:00
Paul Eggert c98d52c34a * src/ls.c (sort_files): Minor cleanup. 2004-12-02 00:32:00 +00:00
Paul Eggert 29f4f8aff6 (sort_files): Minor cleanup. Remove an unnecessary
'volatile' on a local variable.  Rewrite to avoid unnecessary
double-assignment to 'func' in the usual case where strcoll does
not fail.
2004-12-02 00:31:43 +00:00
Paul Eggert 782bb54c6b Regenerate. 2004-12-01 07:16:36 +00:00
Paul Eggert 02496d03b5 * getcwd.c: Use system getcwd first, if appropriate. 2004-12-01 07:13:35 +00:00
Paul Eggert 2e9a7b5621 * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
2004-12-01 07:13:11 +00:00
Paul Eggert d35469d4f4 (gl_FUNC_GETCWD_PATH_MAX):
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
2004-12-01 07:12:46 +00:00
Paul Eggert 3b8fa2ba33 (is_ENAMETOOLONG): New macro.
(__getcwd.c): Don't restore errno; glibc doesn't.
[HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
first, falling back to our code only if its results look suspicious.
Ensure that the resulting buffer is only as large as necessary.
2004-12-01 07:12:14 +00:00
Paul Eggert 52a0364803 Go back to including <sys/types.h> rather than <stddef.h>; this is
needed on OpenBSD since its <utmp.h> needs time_t without making sure
that time_t is defined.
2004-12-01 07:07:38 +00:00
Paul Eggert 5528311c08 * readutmp.m4 (gl_READUTMP): Don't check for sys/param.h. 2004-11-30 21:48:33 +00:00
Paul Eggert 761241d981 (gl_READUTMP): Don't check for sys/param.h. 2004-11-30 21:48:23 +00:00
Paul Eggert 525e6c12c3 Make readutmp more consistent among its client code. 2004-11-30 21:41:31 +00:00