Jim Meyering [Thu, 22 Nov 2001 10:57:27 +0000 (10:57 +0000)]
(main): Add a literal format string to suppress
a warning from gcc's -Wformat-security.
Jim Meyering [Thu, 22 Nov 2001 10:56:01 +0000 (10:56 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 10:55:40 +0000 (10:55 +0000)]
(cp_option_init): Initialize new member.
(do_copy): Remove const attribute from declaration of parameter, x.
dest_info_init now takes a parameter.
Jim Meyering [Thu, 22 Nov 2001 10:54:31 +0000 (10:54 +0000)]
(cp_option_init): Initialize new member.
(main): dest_info_init now takes a parameter.
Jim Meyering [Thu, 22 Nov 2001 10:54:05 +0000 (10:54 +0000)]
(cp_option_init): Initialize new member.
(main): dest_info_init now takes a parameter.
Jim Meyering [Thu, 22 Nov 2001 10:52:40 +0000 (10:52 +0000)]
Include hash.h.
(struct cp_options) [dest_info]: New member.
Jim Meyering [Thu, 22 Nov 2001 10:52:15 +0000 (10:52 +0000)]
copy.c shouldn't maintain static state.
(dest_info): Remove declaration of file-scoped global.
(dest_info_init): Require a parameter.
Update all callers.
(seen_dest): Require a hash table parameter. Update callers.
(record_dest): Likewise.
Jim Meyering [Thu, 22 Nov 2001 10:38:49 +0000 (10:38 +0000)]
Bracket contents of file with #ifndef HASH_H_ ... #endif.
Jim Meyering [Thu, 22 Nov 2001 10:10:00 +0000 (10:10 +0000)]
.
Jim Meyering [Thu, 22 Nov 2001 10:09:13 +0000 (10:09 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 10:04:10 +0000 (10:04 +0000)]
.
Jim Meyering [Thu, 22 Nov 2001 09:31:30 +0000 (09:31 +0000)]
.
Jim Meyering [Thu, 22 Nov 2001 09:05:26 +0000 (09:05 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 09:01:39 +0000 (09:01 +0000)]
csplit could get a failed assertion: printf 'a\n\n'|csplit - '/^$/' 2
No longer include assert.h.
(process_line_count): Remove invalid assertion.
Jim Meyering [Thu, 22 Nov 2001 09:00:52 +0000 (09:00 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 08:50:58 +0000 (08:50 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 08:46:23 +0000 (08:46 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 08:44:49 +0000 (08:44 +0000)]
*** empty log message ***
Jim Meyering [Thu, 22 Nov 2001 08:40:37 +0000 (08:40 +0000)]
(TESTS): Add csplit.
Jim Meyering [Thu, 22 Nov 2001 08:20:49 +0000 (08:20 +0000)]
*** empty log message ***
Jim Meyering [Tue, 20 Nov 2001 10:38:47 +0000 (10:38 +0000)]
*** empty log message ***
Jim Meyering [Tue, 20 Nov 2001 10:37:24 +0000 (10:37 +0000)]
update comment to reflect that SunOS4, solaris2.5.1 lose, too.
Jim Meyering [Tue, 20 Nov 2001 09:53:33 +0000 (09:53 +0000)]
remove FIXME comment about duplicate code
Jim Meyering [Mon, 19 Nov 2001 13:33:50 +0000 (13:33 +0000)]
remove a harmless newline
Jim Meyering [Mon, 19 Nov 2001 13:33:26 +0000 (13:33 +0000)]
(Makefile): Depend on $(BUILT_SOURCES), so those
files will be created before anything else.
Jim Meyering [Mon, 19 Nov 2001 13:32:29 +0000 (13:32 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 13:32:23 +0000 (13:32 +0000)]
(mode_adjust): Fix error introduced on 1999-04-26
that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
rather than group writable. Patch by Juan F. Codagnone.
Jim Meyering [Mon, 19 Nov 2001 11:10:23 +0000 (11:10 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 11:06:38 +0000 (11:06 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 11:06:32 +0000 (11:06 +0000)]
(TMP_MAX): Remove; no longer needed.
(TEMPORARIES): New macro.
(__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
removes an artificial limitation (e.g. HP-UX 10.20, where
TMP_MAX is 17576).
Jim Meyering [Mon, 19 Nov 2001 11:00:10 +0000 (11:00 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 10:59:56 +0000 (10:59 +0000)]
(xlseek): New function.
Call it instead of lseek, in most cases, so any failure is reported.
Jim Meyering [Mon, 19 Nov 2001 10:00:17 +0000 (10:00 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 10:00:06 +0000 (10:00 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 10:00:00 +0000 (10:00 +0000)]
(UTILS_FUNC_MKSTEMP): Don't bother with a temporary
directory. Use "conftestXXXXXX" as the template.
Suggestion from Paul Eggert.
Jim Meyering [Mon, 19 Nov 2001 09:56:36 +0000 (09:56 +0000)]
*** empty log message ***
Jim Meyering [Mon, 19 Nov 2001 09:56:29 +0000 (09:56 +0000)]
Close each descriptor immediately so the test
doesn't mistakenly hit the max-open-files limit.
Jim Meyering [Sun, 18 Nov 2001 17:59:36 +0000 (17:59 +0000)]
.
Jim Meyering [Sun, 18 Nov 2001 10:55:55 +0000 (10:55 +0000)]
*** empty log message ***
Jim Meyering [Sun, 18 Nov 2001 10:55:26 +0000 (10:55 +0000)]
*** empty log message ***
Jim Meyering [Sun, 18 Nov 2001 10:55:18 +0000 (10:55 +0000)]
(jm_PREREQ_TEMPNAME): Check for declaration of getenv.
Jim Meyering [Sun, 18 Nov 2001 10:54:42 +0000 (10:54 +0000)]
[!HAVE_DECL_GETENV]: Declare getenv to avoid warning on SunOS4.
Jim Meyering [Sat, 17 Nov 2001 23:43:36 +0000 (23:43 +0000)]
.
Jim Meyering [Sat, 17 Nov 2001 23:05:28 +0000 (23:05 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 22:53:29 +0000 (22:53 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 22:53:24 +0000 (22:53 +0000)]
($(srcdir)/m4/jm-glibc-io.m4): Use $(move_if_change),
not the literal `move-if-change'.
Jim Meyering [Sat, 17 Nov 2001 18:42:23 +0000 (18:42 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 18:25:11 +0000 (18:25 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 18:24:54 +0000 (18:24 +0000)]
(TESTS): Add equals.
Jim Meyering [Sat, 17 Nov 2001 18:24:38 +0000 (18:24 +0000)]
New test for the just-fixed bug in lib/modechange.c.
Jim Meyering [Sat, 17 Nov 2001 14:11:06 +0000 (14:11 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 14:10:52 +0000 (14:10 +0000)]
(tail_forever): Add a cast.
Jim Meyering [Sat, 17 Nov 2001 13:57:08 +0000 (13:57 +0000)]
(TESTS): Add proc-ksyms and start-middle.
Jim Meyering [Sat, 17 Nov 2001 13:51:40 +0000 (13:51 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 13:51:34 +0000 (13:51 +0000)]
Remove explicit declarations of xmalloc and xrealloc,
Instead, include "xalloc.h".
Jim Meyering [Sat, 17 Nov 2001 13:50:40 +0000 (13:50 +0000)]
Include unlocked-io.h after all system headers.
Remove explicit declarations of xmalloc, xrealloc,
and xstrdup. Instead, include "xalloc.h".
Jim Meyering [Sat, 17 Nov 2001 13:45:34 +0000 (13:45 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 13:31:37 +0000 (13:31 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 13:29:42 +0000 (13:29 +0000)]
Include unlocked-io.h.
Jim Meyering [Sat, 17 Nov 2001 12:21:27 +0000 (12:21 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 12:21:00 +0000 (12:21 +0000)]
Remove `unsigned' attribute from type of global `prefix'.
(copy_rest): Cast to (unsigned char *) before dereferencing.
(get_prefix): Likewise.
Jim Meyering [Sat, 17 Nov 2001 11:31:21 +0000 (11:31 +0000)]
.
Jim Meyering [Sat, 17 Nov 2001 11:09:24 +0000 (11:09 +0000)]
.
Jim Meyering [Sat, 17 Nov 2001 11:08:49 +0000 (11:08 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 11:04:00 +0000 (11:04 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 10:59:07 +0000 (10:59 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 10:59:01 +0000 (10:59 +0000)]
#undef mkstemp.
Include config.h.
(rpl_mkstemp): Rename from mkstemp.
Protoize.
Jim Meyering [Sat, 17 Nov 2001 08:54:26 +0000 (08:54 +0000)]
(UTILS_FUNC_MKSTEMP): New file and macro.
Prompted by a report from Bob Proulx.
Jim Meyering [Sat, 17 Nov 2001 08:18:48 +0000 (08:18 +0000)]
(jm_MACROS): Don't test for mkstemp here.
Instead, require UTILS_FUNC_MKSTEMP.
Jim Meyering [Sat, 17 Nov 2001 07:25:14 +0000 (07:25 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 07:13:18 +0000 (07:13 +0000)]
*** empty log message ***
Jim Meyering [Sat, 17 Nov 2001 07:13:12 +0000 (07:13 +0000)]
(jm_WINSIZE_IN_PTEM): Do not define
WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
Jim Meyering [Fri, 16 Nov 2001 09:20:31 +0000 (09:20 +0000)]
*** empty log message ***
Jim Meyering [Fri, 16 Nov 2001 09:20:25 +0000 (09:20 +0000)]
[HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
(physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
determine the amount of total physical memory, use pstat_getstatic.
HPUX-11 doesn't define _SC_PHYS_PAGES.
(physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
If sysconf couldn't be used to determine the amount of available
physical memory, use both pstat_getstatic and pstat_getdynamic.
Based on a patch from Bob Proulx.
Jim Meyering [Wed, 14 Nov 2001 11:53:06 +0000 (11:53 +0000)]
*** empty log message ***
Jim Meyering [Wed, 14 Nov 2001 11:52:59 +0000 (11:52 +0000)]
(file_lines): Remove unnecessary cast.
(tail_lines): Could have called file_lines even though the first
lseek failed. Fix that.
Jim Meyering [Wed, 14 Nov 2001 10:51:53 +0000 (10:51 +0000)]
*** empty log message ***
Jim Meyering [Wed, 14 Nov 2001 10:30:42 +0000 (10:30 +0000)]
*** empty log message ***
Jim Meyering [Wed, 14 Nov 2001 10:19:11 +0000 (10:19 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 23:36:57 +0000 (23:36 +0000)]
split a line that was too long
Jim Meyering [Tue, 13 Nov 2001 23:32:18 +0000 (23:32 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 23:32:12 +0000 (23:32 +0000)]
(file_lines): Add a parameter, start_pos.
Work properly even when the read pointer is not at beginning of file.
(tail_lines): Call file_lines for any regular file, as long as lseek
can be used to seek to its end, not just when the initial read pointer
is at beginning of file.
Jim Meyering [Tue, 13 Nov 2001 10:23:44 +0000 (10:23 +0000)]
(tail_lines): Move declaration of local `length' into scope where it's used.
(tail_file): Likewise for local `stats'.
Jim Meyering [Tue, 13 Nov 2001 10:21:12 +0000 (10:21 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 10:20:48 +0000 (10:20 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 10:20:02 +0000 (10:20 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 10:19:39 +0000 (10:19 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 10:19:09 +0000 (10:19 +0000)]
*** empty log message ***
Jim Meyering [Tue, 13 Nov 2001 10:14:12 +0000 (10:14 +0000)]
`tail /proc/ksyms' would segfault on Linux.
(tail_lines): Use status of lseek (...SEEK_END) call
in deciding whether to call file_lines or pipe_lines.
From Herbert Xu.
Jim Meyering [Mon, 12 Nov 2001 13:06:16 +0000 (13:06 +0000)]
clean up
Jim Meyering [Mon, 12 Nov 2001 12:44:01 +0000 (12:44 +0000)]
use rm, not $RM
Jim Meyering [Mon, 12 Nov 2001 12:41:40 +0000 (12:41 +0000)]
*** empty log message ***
Jim Meyering [Sun, 11 Nov 2001 20:05:33 +0000 (20:05 +0000)]
*** empty log message ***
Jim Meyering [Sun, 11 Nov 2001 20:04:57 +0000 (20:04 +0000)]
(usage): Split --help output into smaller pieces.
Use fputs, not printf.
Jim Meyering [Sun, 11 Nov 2001 16:05:20 +0000 (16:05 +0000)]
*** empty log message ***
Jim Meyering [Sun, 11 Nov 2001 16:04:43 +0000 (16:04 +0000)]
(usage): Split --help output into smaller pieces.
Jim Meyering [Sun, 11 Nov 2001 15:42:07 +0000 (15:42 +0000)]
(struct tspec): Declare function pointer with prototype.
Jim Meyering [Sun, 11 Nov 2001 15:40:39 +0000 (15:40 +0000)]
(main): Declare function pointer with prototype.
Jim Meyering [Sun, 11 Nov 2001 15:38:00 +0000 (15:38 +0000)]
(usage): Fix typo in last change to usage.
Jim Meyering [Sun, 11 Nov 2001 15:35:37 +0000 (15:35 +0000)]
(count_items): Mark parameter as unused.