platform/upstream/coreutils.git
19 years agoAdd support for "chown : file" and the like.
Paul Eggert [Thu, 19 Aug 2004 20:07:20 +0000 (20:07 +0000)]
Add support for "chown : file" and the like.
Also, fix a regression and some memory leaks.

19 years agoRegenerate.
Paul Eggert [Thu, 19 Aug 2004 20:06:22 +0000 (20:06 +0000)]
Regenerate.

19 years ago(chown invocation): Fix synopsis:
Paul Eggert [Thu, 19 Aug 2004 20:05:52 +0000 (20:05 +0000)]
(chown invocation): Fix synopsis:
group must always be preceded by separator.
"chown : file" and "chown '' file" don't change the owner or group.
Update the explanation of what happens to the set-user-ID or
set-group-ID bits, e.g., they sometimes are not cleared if they
denote mandatory locking.  Change "find"-oriented examples to use
chown -h.

19 years agoDon't use <alloca.h>, so that we don't use alloca on
Paul Eggert [Thu, 19 Aug 2004 20:04:42 +0000 (20:04 +0000)]
Don't use <alloca.h>, so that we don't use alloca on
strings on unbounded length.  alloca's performance benefits aren't
that important here.
(V_STRDUP): Remove.
(parse_with_separator): New function, with most of the internals
of the old parse_user_spec.  Allow user to omit both user and group,
for compatibility with FreeBSD.
Clone only the user name, not the entire spec.
Do not set *uid, *gid unless entirely successful.
Avoid memory leak in some failing cases.
Fix regression for USER.GROUP reported by Dmitry V. Levin in
<http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
(parse_user_spec): Rewrite to use parse_with_separator.

19 years agoNew file, partly taken from
Paul Eggert [Thu, 19 Aug 2004 20:04:21 +0000 (20:04 +0000)]
New file, partly taken from
Dmitry V. Levin's suggestion in
<http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>

19 years ago(TESTS): Add separator.
Paul Eggert [Thu, 19 Aug 2004 20:04:02 +0000 (20:04 +0000)]
(TESTS): Add separator.

19 years agoTest "chgrp '' file".
Paul Eggert [Thu, 19 Aug 2004 20:03:48 +0000 (20:03 +0000)]
Test "chgrp '' file".

19 years ago(usage): "chown '' file" is now allowed.
Paul Eggert [Thu, 19 Aug 2004 20:03:26 +0000 (20:03 +0000)]
(usage): "chown '' file" is now allowed.
(main): Do not set user name to the empty string if the group
name is null.

19 years ago(describe_change): Describe changes to -1:-1
Paul Eggert [Thu, 19 Aug 2004 20:03:11 +0000 (20:03 +0000)]
(describe_change): Describe changes to -1:-1
without using "to OWNERSHIP" phrase.

19 years ago(parse_group): Return gid_t rather than storing it
Paul Eggert [Thu, 19 Aug 2004 20:02:46 +0000 (20:02 +0000)]
(parse_group): Return gid_t rather than storing it
through a pointer.  Treat "chgrp '' file" as a no-op change,
as FreeBSD does.
(main): Set chopt.group_name to NULL if the group is the empty
string.

19 years ago"chown : file", "chown '' file", and "chgrp '' file" now
Paul Eggert [Thu, 19 Aug 2004 20:02:07 +0000 (20:02 +0000)]
"chown : file", "chown '' file", and "chgrp '' file" now
succeed without changing the uid and gid, like FreeBSD.

19 years agoAdd fts.h, search.h.
Paul Eggert [Wed, 18 Aug 2004 20:48:50 +0000 (20:48 +0000)]
Add fts.h, search.h.

19 years agoAdd .kludge-stamp.
Paul Eggert [Wed, 18 Aug 2004 20:48:35 +0000 (20:48 +0000)]
Add .kludge-stamp.

19 years ago* coreutils.texi (printf invocation): Clarify "printf".
Paul Eggert [Wed, 18 Aug 2004 20:22:58 +0000 (20:22 +0000)]
* coreutils.texi (printf invocation): Clarify "printf".

19 years ago(printf invocation): Clarify how "printf" is
Paul Eggert [Wed, 18 Aug 2004 20:22:32 +0000 (20:22 +0000)]
(printf invocation): Clarify how "printf" is
supposed to work with extra arguments, missing arguments, etc.

19 years agoRegenerate.
Paul Eggert [Wed, 11 Aug 2004 23:47:29 +0000 (23:47 +0000)]
Regenerate.

19 years agoFurther fix for -d regression.
Paul Eggert [Wed, 11 Aug 2004 23:41:44 +0000 (23:41 +0000)]
Further fix for -d regression.

19 years agoFix typo: missing ).
Paul Eggert [Wed, 11 Aug 2004 22:30:23 +0000 (22:30 +0000)]
Fix typo: missing ).

19 years agoobstack fixes
Paul Eggert [Wed, 11 Aug 2004 22:26:23 +0000 (22:26 +0000)]
obstack fixes

19 years agominor porting fixes (e.g., obstack)
Paul Eggert [Wed, 11 Aug 2004 22:26:17 +0000 (22:26 +0000)]
minor porting fixes (e.g., obstack)

19 years ago(gl_PREREQ_OBSTACK): Require
Paul Eggert [Wed, 11 Aug 2004 22:24:57 +0000 (22:24 +0000)]
(gl_PREREQ_OBSTACK): Require
gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.

19 years agoDo not include error.h. (merge from gnulib).
Paul Eggert [Wed, 11 Aug 2004 22:24:25 +0000 (22:24 +0000)]
Do not include error.h.  (merge from gnulib).

19 years agoInclude <inttypes.h> and <stdint.h> if available.
Paul Eggert [Wed, 11 Aug 2004 22:24:14 +0000 (22:24 +0000)]
Include <inttypes.h> and <stdint.h> if available.
(union fooround): Use uintmax_t, not long int.
The rest is a merge from libc:
[defined _LIBC]: Include <shlib-compat.h>.
(_obstack) [defined _LIBC]: Remove after 2.3.4.

19 years ago(settime): Recode to avoid warning with Sun Forte C 6U2.
Paul Eggert [Wed, 11 Aug 2004 22:24:04 +0000 (22:24 +0000)]
(settime): Recode to avoid warning with Sun Forte C 6U2.

19 years ago(O_DIRECTORY): Define to 0 if the system doesn't define.
Paul Eggert [Wed, 11 Aug 2004 22:23:54 +0000 (22:23 +0000)]
(O_DIRECTORY): Define to 0 if the system doesn't define.

19 years agoTest for the -d regression.
Paul Eggert [Wed, 11 Aug 2004 21:52:17 +0000 (21:52 +0000)]
Test for the -d regression.

19 years agoTest for the -d regression.
Paul Eggert [Wed, 11 Aug 2004 21:51:57 +0000 (21:51 +0000)]
Test for the -d regression.

19 years ago* src/install.c (main): Fix -d regression
Paul Eggert [Wed, 11 Aug 2004 21:44:49 +0000 (21:44 +0000)]
* src/install.c (main): Fix -d regression

19 years ago(main): Fix -d regression introduced with
Paul Eggert [Wed, 11 Aug 2004 21:44:36 +0000 (21:44 +0000)]
(main): Fix -d regression introduced with
--target-directory support at 2004-06-25.

19 years agoFix porting problem to Reliant Unix.
Paul Eggert [Wed, 11 Aug 2004 17:53:50 +0000 (17:53 +0000)]
Fix porting problem to Reliant Unix.

19 years ago(WIDE_CHAR_SUPPORT): Don't set to 1 if missing
Paul Eggert [Wed, 11 Aug 2004 17:53:34 +0000 (17:53 +0000)]
(WIDE_CHAR_SUPPORT): Don't set to 1 if missing
wmemchr or wmemcpy.  Problem reported by Robert Dahlem
for Reliant Unix 5.43.

19 years ago(_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
Paul Eggert [Wed, 11 Aug 2004 17:53:16 +0000 (17:53 +0000)]
(_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.

19 years ago(copy_internal): When preserving links, unlink
Paul Eggert [Wed, 11 Aug 2004 17:19:25 +0000 (17:19 +0000)]
(copy_internal): When preserving links, unlink
a destination with link count greater than one.  This is so
that commands like "cp -a" don't get confused when copying into
a destination that already contains many hard links.

19 years agoFix cp -a confusion bug.
Paul Eggert [Wed, 11 Aug 2004 17:19:07 +0000 (17:19 +0000)]
Fix cp -a confusion bug.

19 years agoConvert to UTF-8.
Paul Eggert [Tue, 10 Aug 2004 22:50:58 +0000 (22:50 +0000)]
Convert to UTF-8.

19 years agoConvert to UTF-8.
Paul Eggert [Tue, 10 Aug 2004 22:47:08 +0000 (22:47 +0000)]
Convert to UTF-8.

19 years agoFix typo in previous log entry.
Paul Eggert [Tue, 10 Aug 2004 22:09:11 +0000 (22:09 +0000)]
Fix typo in previous log entry.

19 years ago(usage, tee): "tee -" writes to standard output, not
Paul Eggert [Tue, 10 Aug 2004 22:08:58 +0000 (22:08 +0000)]
(usage, tee): "tee -" writes to standard output, not
to a file named "-".

19 years ago(die, xfopen, mergefps, first_same_file, merge):
Paul Eggert [Tue, 10 Aug 2004 22:08:09 +0000 (22:08 +0000)]
(die, xfopen, mergefps, first_same_file, merge):
A null file arg means standard output.
(main): "-o -" means to write to a file named "-",
not to standard output.

19 years ago(usage): "-" is an operand, not an option.
Paul Eggert [Tue, 10 Aug 2004 22:07:52 +0000 (22:07 +0000)]
(usage): "-" is an operand, not an option.

19 years ago(Common options): Clarify that "-" means
Paul Eggert [Tue, 10 Aug 2004 22:07:31 +0000 (22:07 +0000)]
(Common options): Clarify that "-" means
stdin/stdout only when it is an operand, not when it is an
option-argument.
(shred invocation): "shred -- -" is equivalent to "shred -",
not to "shred ./-".
(tee invocation): "tee -" means to copy (again) to stdout.

19 years agoPOSIX-conformance fixes for "-" used as an operand.
Paul Eggert [Tue, 10 Aug 2004 22:06:52 +0000 (22:06 +0000)]
POSIX-conformance fixes for "-" used as an operand.

19 years ago"sort -o -", "shred -", "tee -" POSIX-conformance fixes.
Paul Eggert [Tue, 10 Aug 2004 22:06:28 +0000 (22:06 +0000)]
"sort -o -", "shred -", "tee -" POSIX-conformance fixes.

19 years agoDocument "sort -o -" and "tee -" POSIX-conformance fixes.
Paul Eggert [Tue, 10 Aug 2004 22:05:47 +0000 (22:05 +0000)]
Document "sort -o -" and "tee -" POSIX-conformance fixes.

19 years agoFix install.c int->bool conversion bug.
Paul Eggert [Tue, 10 Aug 2004 20:32:32 +0000 (20:32 +0000)]
Fix install.c int->bool conversion bug.

19 years ago(change_timestamps): Fix int->bool conversion
Paul Eggert [Tue, 10 Aug 2004 20:32:19 +0000 (20:32 +0000)]
(change_timestamps): Fix int->bool conversion
bugs introduced on 2004-07-29.

19 years agoRegenerate.
Paul Eggert [Tue, 10 Aug 2004 06:54:15 +0000 (06:54 +0000)]
Regenerate.

19 years agoSync with gnulib.
Paul Eggert [Tue, 10 Aug 2004 05:43:11 +0000 (05:43 +0000)]
Sync with gnulib.

19 years agoreadlink.c cleanup
Paul Eggert [Mon, 9 Aug 2004 23:40:58 +0000 (23:40 +0000)]
readlink.c cleanup

19 years ago(canonicalize_fname): Remove unneeded proxy function.
Paul Eggert [Mon, 9 Aug 2004 23:40:49 +0000 (23:40 +0000)]
(canonicalize_fname): Remove unneeded proxy function.
(can_mode): Make variable local.

19 years agoImprove code to work in some cases when files are writeable but not readable.
Paul Eggert [Mon, 9 Aug 2004 23:35:15 +0000 (23:35 +0000)]
Improve code to work in some cases when files are writeable but not readable.

19 years ago(wipename): Work even if the directory is writeable
Paul Eggert [Mon, 9 Aug 2004 23:34:49 +0000 (23:34 +0000)]
(wipename): Work even if the directory is writeable
and not readable.  Prefer write access, since this should work
better with fdatasync.

19 years ago(diropen): New function.
Paul Eggert [Mon, 9 Aug 2004 23:34:15 +0000 (23:34 +0000)]
(diropen): New function.
(fts_open, fts_read, fts_children, fts_safe_changedir):
Use it, so that the code works even if the directory
is writeable but not readable.

19 years ago(rpl_chown): Work even if the file is writeable but not readable.
Paul Eggert [Mon, 9 Aug 2004 23:33:53 +0000 (23:33 +0000)]
(rpl_chown): Work even if the file is writeable but not readable.

19 years agoSwitch to UTF-8.
Paul Eggert [Mon, 9 Aug 2004 23:27:55 +0000 (23:27 +0000)]
Switch to UTF-8.

19 years agoChange to UTF-8.
Paul Eggert [Mon, 9 Aug 2004 23:26:57 +0000 (23:26 +0000)]
Change to UTF-8.

19 years agoImport from gnulib.
Paul Eggert [Mon, 9 Aug 2004 23:26:08 +0000 (23:26 +0000)]
Import from gnulib.

19 years agoRegenerate.
Paul Eggert [Mon, 9 Aug 2004 18:51:05 +0000 (18:51 +0000)]
Regenerate.

19 years ago(xalloc_die): New function.
Paul Eggert [Mon, 9 Aug 2004 18:45:10 +0000 (18:45 +0000)]
(xalloc_die): New function.
(main): Remove now-obsolete initialization of xalloc_fail_func.

19 years agoRemove dependency of xalloc on error, etc.
Paul Eggert [Mon, 9 Aug 2004 18:44:46 +0000 (18:44 +0000)]
Remove dependency of xalloc on error, etc.

19 years agoAdjust to sha->sha1 renaming.
Paul Eggert [Mon, 9 Aug 2004 18:18:41 +0000 (18:18 +0000)]
Adjust to sha->sha1 renaming.

19 years agoFinish renaming sha -> sha1.
Paul Eggert [Mon, 9 Aug 2004 18:16:21 +0000 (18:16 +0000)]
Finish renaming sha -> sha1.

19 years ago(O_BINARY) [!O_BINARY && defined O_BINARY]:
Paul Eggert [Sun, 8 Aug 2004 03:04:21 +0000 (03:04 +0000)]
(O_BINARY) [!O_BINARY && defined O_BINARY]:
Do not define, to avoid annoying compiler messages on QNX 6.3.

19 years ago(O_BINARY) [!O_BINARY && defined O_BINARY]:
Paul Eggert [Sun, 8 Aug 2004 03:04:00 +0000 (03:04 +0000)]
(O_BINARY) [!O_BINARY && defined O_BINARY]:
Do not define, to avoid annoying compiler messages on QNX 6.3.

19 years agoMerge from gnulib.
Paul Eggert [Sat, 7 Aug 2004 07:16:54 +0000 (07:16 +0000)]
Merge from gnulib.

19 years agoRegenerate.
Paul Eggert [Thu, 5 Aug 2004 23:11:21 +0000 (23:11 +0000)]
Regenerate.

19 years agoNew file, imported from gnulib.
Paul Eggert [Thu, 5 Aug 2004 23:09:29 +0000 (23:09 +0000)]
New file, imported from gnulib.

19 years agoSync from gnulib.
Paul Eggert [Thu, 5 Aug 2004 23:01:03 +0000 (23:01 +0000)]
Sync from gnulib.

19 years agoFixes for OpenBSD 3.4.
Paul Eggert [Wed, 4 Aug 2004 22:51:23 +0000 (22:51 +0000)]
Fixes for OpenBSD 3.4.

19 years agoFixes for OpenBSD 3.4.
Paul Eggert [Wed, 4 Aug 2004 22:51:03 +0000 (22:51 +0000)]
Fixes for OpenBSD 3.4.

19 years agoFixes for OpenBSD 3.4.
Paul Eggert [Wed, 4 Aug 2004 22:50:41 +0000 (22:50 +0000)]
Fixes for OpenBSD 3.4.

19 years agoFix parenthesization typo.
Paul Eggert [Wed, 4 Aug 2004 22:35:37 +0000 (22:35 +0000)]
Fix parenthesization typo.

19 years agoRemove bogus "*/" from shell comment.
Paul Eggert [Wed, 4 Aug 2004 22:31:15 +0000 (22:31 +0000)]
Remove bogus "*/" from shell comment.

19 years agoRemove bogus "*/" from shell comment.
Paul Eggert [Wed, 4 Aug 2004 22:30:38 +0000 (22:30 +0000)]
Remove bogus "*/" from shell comment.

19 years agoInclude copyright notice.
Paul Eggert [Wed, 4 Aug 2004 22:27:36 +0000 (22:27 +0000)]
Include copyright notice.
(cu_PREREQ_STAT_PROG): Use the _ONCE variants when appropriate.
Include sys/param.h before testing for sys/mount.h.

19 years agoInclude copyright notice.
Paul Eggert [Wed, 4 Aug 2004 22:27:24 +0000 (22:27 +0000)]
Include copyright notice.
(gl_LIST_MOUNTED_FILE_SYSTEMS): Include sys/param.h before
testing for sys/mount.h.

19 years agoInclude copyright notice.
Paul Eggert [Wed, 4 Aug 2004 22:27:12 +0000 (22:27 +0000)]
Include copyright notice.
(gl_MACROS): Use the _ONCE variants when appropriate.
Include sys/param.h before testing for sys/sysctl.h and sys/mount.h;
needed for OpenBSD 3.4.

19 years agoAdd copyright notice.
Paul Eggert [Wed, 4 Aug 2004 22:27:00 +0000 (22:27 +0000)]
Add copyright notice.
(gl_FSUSAGE): Include sys/param.h before checking for sys/mount.h.
Needed for OpenBSD 3.4.

19 years agoAdd copyright notice.
Paul Eggert [Wed, 4 Aug 2004 22:26:42 +0000 (22:26 +0000)]
Add copyright notice.
(GNULIB_BOOT_TIME): Include sys/param.h before testing
for sys/sysctl.h; needed for OpenBSD 3.4.

19 years ago(PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX):
Paul Eggert [Wed, 4 Aug 2004 22:26:23 +0000 (22:26 +0000)]
(PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX):
Define to a concatenation of string literals, not to an expression;
needed for concatenation contexts.
(INTMAX_MAX, INTMAX_MIN): New macros.

19 years ago(SIZE_MAX): Define after including files, to avoid
Paul Eggert [Wed, 4 Aug 2004 22:08:33 +0000 (22:08 +0000)]
(SIZE_MAX): Define after including files, to avoid
a collision on OpenBSD 3.4.

19 years ago(print_stat): Don't assume st_ino / st_dev fits in
Paul Eggert [Wed, 4 Aug 2004 22:04:26 +0000 (22:04 +0000)]
(print_stat): Don't assume st_ino / st_dev fits in
unsigned long; this isn't true for st_ino on Solaris 9.

19 years ago(LONGEST_MODIFIER): New macro.
Paul Eggert [Wed, 4 Aug 2004 21:58:46 +0000 (21:58 +0000)]
(LONGEST_MODIFIER): New macro.
(PRIuMAX) [!PRI_MACROS_BROKEN && !defined PRIuMAX]: New macro.
(find_matching_ancestor): Use it for dev_t and ino_t.

19 years agoSync from gnulib.
Paul Eggert [Wed, 4 Aug 2004 20:58:57 +0000 (20:58 +0000)]
Sync from gnulib.

19 years agoWork around bug in OpenBSD 3.4 sterror_r: it
Paul Eggert [Wed, 4 Aug 2004 19:35:24 +0000 (19:35 +0000)]
Work around bug in OpenBSD 3.4 sterror_r: it
sometimes returns a positive errno value even when it succeeds.
(print_errno_message) [!LIBC]: Fall back on strerror if
__strerror_r fails.

19 years agoAdd uname kludge to work around Mac OS X bug.
Paul Eggert [Wed, 4 Aug 2004 05:59:25 +0000 (05:59 +0000)]
Add uname kludge to work around Mac OS X bug.

19 years agoDo not depend on HAVE_SYSCTL when deciding
Paul Eggert [Wed, 4 Aug 2004 05:58:43 +0000 (05:58 +0000)]
Do not depend on HAVE_SYSCTL when deciding
whether to include files.  Include <sys/param.h> if
HAVE_SYS_PARAM_H (not HAVE_SYSCTL).
(main) [defined __POWERPC__]: Add a kludge to work around a
Mac OS X bug, so that uname -p defaults to "powerpc" if
sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
fails.  Problem reported by Petter Reinholdtsen in:
http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html

19 years agoint cleanups for uniq, wc, who, whoami, unexpand, touch, tsort, tty,
Paul Eggert [Tue, 3 Aug 2004 23:40:20 +0000 (23:40 +0000)]
int cleanups for uniq, wc, who, whoami, unexpand, touch, tsort, tty,
test, tac, su, stty, remove.h, tee, ptx, printf, shred, split, stat, pr.

19 years ago(main): Print uids using unsigned long int, not unsigned int.
Paul Eggert [Tue, 3 Aug 2004 23:38:40 +0000 (23:38 +0000)]
(main): Print uids using unsigned long int, not unsigned int.

19 years ago(scan_entries): 0 -> STDIN_FILENO.
Paul Eggert [Tue, 3 Aug 2004 23:38:21 +0000 (23:38 +0000)]
(scan_entries): 0 -> STDIN_FILENO.

19 years ago(iswspace, wc): Use to_uchar rather than a cast.
Paul Eggert [Tue, 3 Aug 2004 23:38:10 +0000 (23:38 +0000)]
(iswspace, wc): Use to_uchar rather than a cast.
(print_lines, print_words, print_chars, print_bytes, print_linelength,
have_read_stdin, wc, wc_file, main):
Use bool for booleans.
(exit_status): Remove.
(wc, wc_file): Return bool status.  All callers changed.

19 years ago(hard_LC_COLLATE, ignore_case, different, check_file,
Paul Eggert [Tue, 3 Aug 2004 23:37:56 +0000 (23:37 +0000)]
(hard_LC_COLLATE, ignore_case, different, check_file,
main): Use bool for booleans.
(writeline, check_file): Use uintmax_t for line counts.
(check_file): Check for and report line number overflow,
when that matters.

19 years agoInt cleanup and minor reorganization to be more like src/expand.c.
Paul Eggert [Tue, 3 Aug 2004 23:27:20 +0000 (23:27 +0000)]
Int cleanup and minor reorganization to be more like src/expand.c.
Include quote.h, xstrndup.h.
(TAB_STOP_SENTINEL): Increase from INT_MAX to INTMAX_MAX.
(convert_entire_line, have_read_stdin, parse_tabstops, next_file,
unexpand, main):
Use bool for booleans.
(tab_size, tab_list, add_tabstop, validate_tabstops, unexpand):
Use uintmax_t for column counts.
(first_free_tab, validate_tabstops, unexpand): Use size_t for sizes.
(add_tabstop, parse_tabstops, main): Don't reserve UINTMAX_MAX
as a tab stop.
(parse_tabstops): Don't use ISBLANK on possibly-signed char.
Detect overflow in tab stop string.
(next_file, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0.
(unexpand): Concatenate input files the same way expand does.

19 years ago(print_element): Use bool for booleans.
Paul Eggert [Tue, 3 Aug 2004 23:14:17 +0000 (23:14 +0000)]
(print_element): Use bool for booleans.

19 years ago(silent, main): Use bool for booleans.
Paul Eggert [Tue, 3 Aug 2004 23:14:08 +0000 (23:14 +0000)]
(silent, main): Use bool for booleans.
(main): 0 -> STDIN_FILENO.

19 years ago(struct item, n_strings): Use size_t for sizes.
Paul Eggert [Tue, 3 Aug 2004 23:13:20 +0000 (23:13 +0000)]
(struct item, n_strings): Use size_t for sizes.
(have_read_stdin, count_items, scan_zeros, detect_loop,
recurse_tree, walk_tree, tsort, main):
Use bool for booleans.
(exit_status): Remove.
(tsort): Return a success flag instead of storing into a global.
(main): Use it.

19 years ago(no_create, use_ref, posix_date, amtime_now,
Paul Eggert [Tue, 3 Aug 2004 23:13:09 +0000 (23:13 +0000)]
(no_create, use_ref, posix_date, amtime_now,
touch, main): Use bool for booleans.
(main): Avoid integer overflow when given more than INT_MAX
options.

19 years ago(TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):
Paul Eggert [Tue, 3 Aug 2004 23:03:04 +0000 (23:03 +0000)]
(TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):
Remove.  All uses replaced by C99 boolean primitives.
(TEST_TRUE, TEST_FALSE): New constants, for readability.
(test_unop, binop, unary_operator, binary_operator, two_arguments,
three_arguments, posixtest, expr, term, and, or, is_int, age_of,
one_argument, main): Use bool for booleans.
(advance, unary_advance): Now inline procedures rather than a macros.
(is_int): Renamed from isint, to avoid namespace clash with ctype.h.
(term, and, or): When it's easy, loop instead of recursing.
(term): Avoid integer overflow if there are INT_MAX-3 args (!).
(binary_operator, unary_operator): Simplify by systematically rewriting
true==FOO to FOO (where FOO is a boolean).
(unary_operator): Don't consider a file to be a regular file
merely because its mode&S_IFMT is zero.  Just use S_ISREG.
Remove unnecessary casts.  Remove ifdefs for things like
S_ISSOCK that are no longer needed, since stat-macros.h always
defines them now.

19 years ago(separator_ends_record, tac_seekable, tac_file,
Paul Eggert [Tue, 3 Aug 2004 22:40:28 +0000 (22:40 +0000)]
(separator_ends_record, tac_seekable, tac_file,
tac_stdin, tac_stdin_to_mem, main): Use bool for booleans.
(match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes.
(tac_seekable): Use ptrdiff_t for pointer subtraction.
Report an error if the result is out of range.
(tac_seekable, main): Check for integer overflow in buffer size
calculations.
(main): Remove unnecessary casts.

19 years ago(buf_init_from_stdin, find_bol, tac_mem):
Paul Eggert [Tue, 3 Aug 2004 22:40:15 +0000 (22:40 +0000)]
(buf_init_from_stdin, find_bol, tac_mem):
Use bool for booleans.
(buf_init_from_stdin, buf_free, find_bol, print_line):
Use size_t for sizes.