Jim Meyering
7a79266014
Include xnanosleep.h and xstrtod.h.
...
Move declaration of global variable, sleep_interval, to ...
(main): ...here.
(usage): Update description of --sleep-interval option.
(tail_forever): New parameter, sleep_interval. Update caller.
Use xnanosleep, rather than sleep.
(parse_options): New parameter, sleep_interval. Update caller.
Use xstrtod, now that we accept floating point values.
2002-09-12 11:38:47 +00:00
Jim Meyering
afef4e7e86
.
2002-09-06 20:58:23 +00:00
Jim Meyering
37f7bae4f0
(prompt): Change comment to give a better note to translators.
2002-09-06 08:00:30 +00:00
Jim Meyering
496f29fa8c
(NEED_PATHCONF_WRAPPER): Define.
...
(pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
2002-09-02 07:43:38 +00:00
Jim Meyering
0ea01d21a3
(skip): Add casts to avoid warning about comparison
...
between signed and unsigned. Also rearrange range-checking
comparisons to make them more readable.
2002-09-02 07:38:53 +00:00
Jim Meyering
2ebfe2fc9c
(print_table_row): Use an unsigned type for widths
...
to avoid warning about comparison between signed and unsigned.
(list_signals): Likewise.
2002-09-02 07:31:24 +00:00
Jim Meyering
680cd976cc
(skip): Add a cast to avoid warning about comparison
...
between signed and unsigned.
2002-09-02 07:23:09 +00:00
Jim Meyering
62808a7fb5
Symlinks were always reported as using 0 blocks.
...
(ST_NBLOCKS): Don't depend on file type.
This reverts the change of 2000-01-30.
Based on a report and patch from Neil Brown via Michael Stone.
2002-08-31 16:04:57 +00:00
Jim Meyering
4006f4e672
Change exit (0)' to exit (EXIT_SUCCESS)',
...
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-31 08:52:10 +00:00
Jim Meyering
7488703199
Change error (1, ...' to error (EXIT_FAILURE, ...'.
2002-08-30 23:04:53 +00:00
Jim Meyering
649a00e9b8
(is_empty_dir): Detect and diagnose readdir failures.
...
Always close directory handle.
2002-08-29 10:42:12 +00:00
Jim Meyering
515f184462
(print_dir): Detect and diagnose readdir failures.
...
On some systems (at least EMC Celerra and Solaris5.8),
this appears to be necessary.
(print_dir): Rename local variable: reading -> dirp.
2002-08-29 10:16:00 +00:00
Jim Meyering
1f8ece552f
(remove_cwd_entries): Use closedir (not CLOSEDIR) when ignoring any return value.
2002-08-29 10:13:57 +00:00
Jim Meyering
82c0b315bc
(print_dir): Rename local variable: reading -> dirp.
2002-08-29 09:44:23 +00:00
Jim Meyering
9a9e0503a2
(remove_cwd_entries): Detect and diagnose readdir
...
failures. On some systems (at least EMC Celerra and Solaris5.8),
this appears to be necessary.
2002-08-29 09:42:43 +00:00
Jim Meyering
cd79080f4a
(remove_cwd_entries): Use CLOSEDIR, not closedir.
...
Give a diagnostic and fail if closedir fails.
2002-08-28 06:52:07 +00:00
Jim Meyering
234cd4e3fe
(close_stdout_wrapper): New, kludgey, function and file-scoped global.
...
(main): Register it with atexit.
Close STDOUT_FILENO, to avoid a problem when writing to
/dev/audio on at least Solaris 2.7 and 2.8 systems.
2002-08-26 07:23:37 +00:00
Jim Meyering
3124a4e393
(main): Close STDIN_FILENO rather than a literal `0'.
2002-08-25 14:32:02 +00:00
Jim Meyering
91d008f619
.
2002-08-20 10:18:19 +00:00
Jim Meyering
01ac2fda31
Don't use "exec --"; it's not portable and shouldn't be needed.
2002-08-10 09:57:57 +00:00
Jim Meyering
f12b040a86
.
2002-08-09 22:13:49 +00:00
Jim Meyering
b1113d0168
(main): Don't ignore -COLUMN if it's the last option.
...
(usage): Clarify help text for the -COLUMN option.
2002-08-09 10:03:58 +00:00
Jim Meyering
4cb69e11ad
Guard inclusion of <langinfo.h> with
...
`#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
2002-08-08 16:36:33 +00:00
Jim Meyering
0a6e22bb95
(main): Adjust to posixtime signature change.
...
Remove unnecessary initialization.
Use localtime, not posixtm, to warn about obsolete "touch".
2002-08-07 22:04:37 +00:00
Jim Meyering
1f6174e466
(main): Adjust to posixtime signature change.
2002-08-07 22:04:01 +00:00
Jim Meyering
4ab4543c2d
.
2002-08-05 08:27:56 +00:00
Jim Meyering
a3e653fea2
*** empty log message ***
2002-08-04 13:36:39 +00:00
Jim Meyering
ca845879a4
(check-README): New target/rule.
...
(check): Depend on it.
2002-08-04 11:03:08 +00:00
Jim Meyering
cefeb81dd5
(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.
2002-08-03 16:44:33 +00:00
Jim Meyering
545c2323d4
Include hard-locale.h, xmemcoll.h.
...
(hard_LC_COLLATE): New var.
(different): Args are now char *, not const char *.
Use xmemcoll instead of memcmp to compare lines, so that
LC_COLLATE has effect. However, use memcmp if it is an
easy locale.
(check_file): Do not include newline in comparison, so that
xmemcoll has a byte to stomp on temporarily.
(main): Set hard_LC_COLLATE.
2002-08-02 14:42:37 +00:00
Jim Meyering
d2b62daff5
(run_shell): Exit with status 126 or 127 when execvp or
...
execv fails, for consistency with POSIX commands like env and nice.
2002-08-01 09:19:24 +00:00
Jim Meyering
a6005c2ba4
(main): Exit with status 126 or 127 when execvp or
...
execv fails, for consistency with POSIX commands like env and nice.
2002-08-01 08:50:19 +00:00
Jim Meyering
2a41097fd7
Change behavior to conform to POSIX 1003.1-2001:
...
- Do not adjust scheduling priority.
- Redirects stderr to stdout, if stderr is not a terminal.
- Exit status is now 126 if command was found but not invoked,
127 if nohup failed or if command was not found.
Fix bug: command was run if nohup.out wasn't writeable.
2002-08-01 08:47:33 +00:00
Jim Meyering
72c145938f
.
2002-07-29 10:54:44 +00:00
Jim Meyering
c8729cad98
Adjust command examples in comments to use POSIX 1003.1-2001 option syntax.
...
From Paul Eggert.
2002-07-29 08:40:10 +00:00
Jim Meyering
86af2dfa29
(UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Remove definitions.
...
Now they're defined in readutmp.h.
(print_deadprocs): Remove obsolete FIXME comment.
2002-07-27 21:31:50 +00:00
Jim Meyering
62c03f8fac
Port to POSIX 1003.1-2001 "nice", which
...
requires the option "-n 5" rather than "-5". This matters
with GNU "nice" if the user has set the _POSIX2_VERSION
environment variable.
2002-07-27 08:45:49 +00:00
Jim Meyering
e4d4cea119
Don't include malloc.h -- it was unnecessary.
2002-07-26 07:38:35 +00:00
Jim Meyering
be7f1936bd
undo last change
2002-07-24 08:24:12 +00:00
Jim Meyering
33106990a6
(usage): The short form of --dereference is now -L, not -l.
2002-07-22 15:39:12 +00:00
Jim Meyering
2bd28f0200
Add new option, --presume-input-tty, for testing only.
...
Not documented.
2002-07-22 12:24:41 +00:00
Jim Meyering
db6dff2e6e
rm would prompt for non-dangling symlinks
...
(prompt): When not interactive, don't prompt for a symlink.
2002-07-22 06:59:26 +00:00
Jim Meyering
bcfbac9349
(copy_internal): Use file_name_lookup, not getdport.
...
Patch by Alfred M. Szmidt.
2002-07-20 20:06:41 +00:00
Jim Meyering
334294f09d
(main): Add an explicit `exit (EXIT_SUCCESS);'
...
for --version, rather than falling through.
2002-07-20 15:18:37 +00:00
Jim Meyering
3f6c422f1a
(false.c): Convert only the final EXIT_SUCCESS
...
into EXIT_FAILURE. Otherwise, false --help and false --version
would fail.
2002-07-20 15:18:20 +00:00
Jim Meyering
7ca9560caf
Add .wav.
2002-07-19 21:36:46 +00:00
Jim Meyering
a19f9253c4
(main): Test sysctl(...) >= 0, not == 0, since
...
on NetBSD the return value may well be positive.
Use one-line aggregate initializations.
Use tightly scoped static buffers to avoid warnings about
unused variables on some systems.
2002-07-18 18:35:42 +00:00
Jim Meyering
510f7bfe87
(UNAME_HARDWARE_PLATFORM, UNAME_PROCESSOR): New macros.
...
(main): Use them, along with sysctl, to support uname -i and uname -p
on BSD hosts.
2002-07-18 18:28:53 +00:00
Jim Meyering
a536063677
Add the following to the list of colorizable
...
TERM names: dtterm xterm-color Eterm.
New archive suffix: .jar
New image suffixes: .jpeg .pbm .pgm .tiff .mpeg .xcf .xwd
Audio suffixes: .ogg .mp3
2002-07-18 09:28:41 +00:00
Jim Meyering
37bbc4c47f
(print_uptime): Restore use of (equivalent, but
...
more readable) `>=' from Bruno's patch.
2002-07-17 10:59:54 +00:00