Commit Graph
19067 Commits
Author SHA1 Message Date
Paul Eggert d0cbf9ff71 (do_lookup, short_list, short_output, include_idle,
include_heading, include_mesg, include_exit, need_boottime,
need_deadprocs, need_login, need_initspawn, need_clockchange,
need_runlevel, need_users, my_line_only, main): Use bool for booleans.
(print_runlevel): Use unsigned char for bytes.
(list_entries_who, scan_entries, who): Use size_t for sizes.
(main): No need to pass a non-NULL last arg to getopt_long.
2004-08-02 20:56:46 +00:00
Paul Eggert 889b25b472 (list_entries_users, users): Use size_t for sizes.
(list_entries_users): Use char for bytes.
(main): No need to pass a non-NULL last arg to getopt_long.
2004-08-02 20:56:30 +00:00
Paul Eggert 67f5163d28 (print_uptime, uptime): Use size_t for sizes.
(print_uptime): Remove unused local variable.
(main): No need to pass a non-NULL last arg to getopt_long.
2004-08-02 20:56:10 +00:00
Paul Eggert ea81db5369 (include_idle, include_heading, include_fullname,
include_project, include_plan, include_home_and_shell, do_short_format,
include_where, main): Use bool for booleans.
(count_ampersands, create_fullname, scan_entries, short_pinky):
Use size_t for sizes.
(create_fullname): Check for overflow in size calculations.
(idle_string): Don't assume that the number of idle days
is less than 10**8 and/or INT_MAX/(24*60*60).
(main): No need to pass a non-NULL last arg to getopt_long.
2004-08-02 20:55:44 +00:00
Paul Eggert 838af3f618 (read_utmp): Don't assume that the number of users is less than INT_MAX.
Check for integer overflow in size calculations.
Return -1 (not 1) on failure, since we set errno in that case.
2004-08-02 20:55:14 +00:00
Paul Eggert 6517d85e05 (UT_USER): Parenthesize properly.
(UT_USER_SIZE): New constant.
(read_utmp): Don't assume that the number of users is less than
INT_MAX.
2004-08-02 20:54:45 +00:00
Paul Eggert e71e29e309 (posix_time_parse): Don't assume that the length of
the string being parsed is <= UINT_MAX.
2004-08-02 20:34:27 +00:00
Paul Eggert 25d291e3ec (read_file_system_list): Accept bool flag, not int.
(errno): Remove decl; we now assume C89 or better.
(xatoi): Remove; replaced by strtoul.  Hence device numbers can now
go up to ULONG_MAX.
2004-08-02 20:27:45 +00:00
Paul Eggert d1ee2543c7 Include <stdbool.h>.
(read_file_system_list): Accept bool flag, not int.
2004-08-02 20:27:16 +00:00
Paul Eggert df3b48143b Regenerate. 2004-08-02 20:17:31 +00:00
Paul Eggert 7bb8bcf375 No longer needed by 'install', so remove it. 2004-08-02 20:15:49 +00:00
Paul Eggert def5c89707 (libfetish_a_SOURCES): Remove isdir.c. 2004-08-02 20:14:53 +00:00
Paul Eggert 1dfc8b472e (isdir): Remove decl.
(install_file_to_path): Rely on make_path to fail if the destination
is not a directory, by passing preserve_existing==true to it.
Hence we no longer need to call isdir.
Free dest_dir immediately when it's no longer needed, rather than
waiting until the end of the function.
(copy_file): Don't bother calling isdir, as copy will do the
right thing if the destination is a directory.
2004-08-02 20:14:39 +00:00
Paul Eggert e4d5fc2283 (fts_debug, opt_all, apparent_size, opt_count_all,
print_grand_total, opt_separate_dirs, hash_ins, process_file, main):
Use bool for booleans.
(max_depth): Now size_t, not int, to avoid an arbitrary limit
of INT_MAX on depth.
(G_fail): Remove: no longer needed, now that the relevant
functions return bool.
(process_file): Use return value to signal success rather than
setting a global.  Remove first_call static var; not needed, since
we can look at n_alloc.  Use size_t for depths.  Remove FIXME
about size_t casts, as it's now fixed.  Use xnrealloc rather
than the obsolescent XREALLOC.  Don't bother to check whether
reallocation is needed unless level > prev_level.
(du_files): Invert sense of result, for consistency with
other coreutils code.  All callers changed.
(main): Allow --max-depth values up to SIZE_MAX.
2004-08-02 19:43:38 +00:00
Paul Eggert c1bbe24045 Add an FSF copyright notice, since our changes are becoming nontrivial.
Include stdint.h if available, as Autoconf suggests.
(ALIGNBYTES, ALIGN): Remove; no longer needed now that fts_statp
is an array.
(fts_alloc, fts_palloc, fts_sort, fts_load, fts_build):
Use size_t for sizes.
(fts_stat, fts_safe_changedir, fts_debug, fts_read, fts_build,
fts_palloc):
Use bool when appropriate.
(SIZE_MAX, TYPE_SIGNED): New macros.
(fts_read): Use u_short for instructions.
(fts_build): Use ptrdiff_t for levels.  Don't assume file name lengths
fit into int.  Don't assume nlink_t is signed.
(find_matching_ancestor): Don't assume dev, ino fit in int.
(fts_stat): Use function prototype; required for bool arg.
(fts_sort): Detect integer overflow in size calculations.
(fts_alloc): Simplify allocation code, now that fts_statp is an array
and not a pointer.
2004-08-02 19:42:01 +00:00
Paul Eggert 787b4d50d0 Add an FSF copyright notice, since our changes are becoming nontrivial.
Include stddef.h, for ptrdiff_t.
(FTS.fts_nitems): Now size_t, not int, for hosts that allow more
than INT_MAX entries in a directory.
(FTS_ROOTPARENTLEVEL): Parenthesize properly.
(FTSENT.fts_level): Now ptrdiff_t, not int, to allow recursing more
than INT_MAX levels deep on 64-bit hosts.
(FTSENT.fts_namelen): Now size_t, not u_short, to support hosts like
the Hurd that don't have arbitrary limits on directory entry lengths.
(FTSENT.fts_statp): Now an array, not a pointer, so that we don't
have to play unportable games with pointer arithmetic.  Keep it array
for the benefit of user code that assumes it is a pointer.
2004-08-02 19:41:35 +00:00
Paul Eggert 97f2714e35 Use Autoconf-suggested pattern for inttypes and stdint.
Include unistd.h, for lseek.
2004-08-02 18:44:11 +00:00
Paul Eggert 11e8886958 Include <stdbool.h>.
(struct fs_usage): Use uintmax_t for block sizes, so that they're
not limited to INT_MAX.
Use bool for booleans.
2004-08-02 18:43:56 +00:00
Paul Eggert 2f9bb99f37 (inode_format, show_all_fs, show_local_fs,
show_listed_fs, posix_format, require_sync, print_type,
selected_fstype, excluded_fstype, show_dev, show_point, main):
Use bool for booleans.
(df_readable, show_dev): Use UINTMAX_MAX instead of -1.
(show_dev, show_point, main):
Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
Don't assume disk name lengths are <= INT_MAX.
Rewrite pct calculation to avoid cast.
(show_point): Don't assume resolved length is <= SSIZE_MAX.
2004-08-02 18:43:35 +00:00
Paul Eggert b4b2eed874 (EXT): Use size_t for sizes, not ptrdiff_t, so that we don't have
to worry about wraparound.
2004-08-02 18:21:05 +00:00
Paul Eggert 272dfbf173 fnmatch_loop.c (EXT, FCT): Use bool when appropriate.
(FCT): Use size_t, not unsigned int, for sizes.
(EXT): Use ptrdiff_t, not int, for a variable that has to
store a size-related quantity but might go negative.
ptrdiff_t is good enough here, since in practice the value
can't exceed SIZE_MAX/2.
2004-08-02 18:10:55 +00:00
Paul Eggert a4805f79e8 Include <stdbool.h>.
(errno): Remove decl; we now assume C89 or better.
2004-08-02 18:10:35 +00:00
Paul Eggert 46499517ba (strip_trailing_slashes): Now returns bool. 2004-08-02 17:33:57 +00:00
Paul Eggert 8889b11fa1 (dir_name): Use bool when appropriate. 2004-08-02 17:33:37 +00:00
Paul Eggert 68d51a361e Include <stdbool.h>.
(strip_trailing_slashes): Now returns bool.
2004-08-02 17:33:24 +00:00
Paul Eggert 3ed11627ff (argmatch, __xargmatch_internal, argmatch_invalid):
Use ptrdiff_t, not int, when counting arguments, to allow more
than INT_MAX arguments.
Use bool when appropriate.
2004-08-02 17:24:00 +00:00
Paul Eggert 233d4fe941 (argmatch, __xargmatch_internal, argmatch_invalid):
Use ptrdiff_t, not int, when counting arguments, to allow more
than INT_MAX arguments.
2004-08-02 17:23:19 +00:00
Paul Eggert 7d3d26e57f Install safe-read fix for blocksizes greater than 2**31. 2004-08-02 05:56:14 +00:00
Paul Eggert bd6af0743d (errno): Remove decl; we now assume C89 or better.
(safe_rw): Don't work around Tru64 bug unless the bug symptoms
manifest themselves.  This allows us to do proper reads and writes
on other hosts, e.g., "dd" with a block size greater than 2**31.
2004-08-02 05:55:54 +00:00
Paul Eggert 09e6455c57 Regenerate. 2004-08-02 05:30:48 +00:00
Paul Eggert 49d9b45b0c Regenerate. 2004-08-02 05:29:29 +00:00
Paul Eggert d0cb135720 Initial revision 2004-08-02 05:28:02 +00:00
Paul Eggert 2f2165dc9e uintptr_t and uint32_t port to Solaris 8. 2004-08-02 05:26:59 +00:00
Paul Eggert 08eeecbbbb (ptr_align): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
2004-08-02 05:26:19 +00:00
Paul Eggert 45e8d9f87b (UINT_MAX_32_BITS): Remove.
(word32): Remove.  All uses changed to uint32_t.
(isaac_seed_data): Remove unnecessary cast.
2004-08-02 05:26:01 +00:00
Paul Eggert 2c223a305b (hash_int) [!defined UINTPTR_MAX]: Use size_t instead of uintptr_t. 2004-08-02 05:25:33 +00:00
Paul Eggert caef677896 Initial revision. 2004-08-02 05:24:47 +00:00
Paul Eggert 46791e4ae4 (gl_MD5): Require gl_AC_TYPE_UINT32_T. 2004-08-02 05:23:39 +00:00
Paul Eggert fd35412abb (gl_CHECK_ALL_TYPES):
Require gl_AC_TYPE_UINTPTR_T instead of using AC_CHECK_TYPE
on uintptr_t.  Require gl_AC_TYPE_UINT32_T.
2004-08-02 05:22:57 +00:00
Paul Eggert deda01980f (UNALIGNED_P): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
2004-08-02 05:22:22 +00:00
Paul Eggert 5682fe455f Don't include inttypes.h or stdint.h.
(UNALIGNED_P): Remove.
(__memrchr): Use size_t, not uintptr_t, to test alignment.
2004-08-02 05:21:47 +00:00
Paul Eggert b6f35b5d52 Don't include inttypes.h or stdint.h.
(UNALIGNED_P): Remove.
(__memchr): Use size_t, not uintptr_t, to test alignment.
2004-08-02 05:21:12 +00:00
Paul Eggert 90cfcabe95 Don't include <limits.h>. Include <inttypes.h> if available,
as it defines symbols like UINT32_MAX on Solaris 8.
(md5_uint32): Assume uint32_t exists; Autoconf will define it
otherwise (if the host has a 32-bit unsigned type, anyway).
2004-08-02 05:20:05 +00:00
Paul Eggert aa0a7d5865 (UNALIGNED_P): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
2004-08-02 05:19:30 +00:00
Paul Eggert 7d66365bcf Fix typo: down -> done. 2004-08-01 15:21:56 +00:00
Paul Eggert 6c7be35e86 * src/Makefile.am (localedir.h): Make it readonly. 2004-08-01 15:19:02 +00:00
Paul Eggert bb1e87735e (localedir.h): Make it readonly; this
undoes part of the 2004-07-27 patch.
2004-08-01 15:18:29 +00:00
Paul Eggert 94732c8a71 Improve comment for first_same_file. 2004-07-30 23:24:03 +00:00
Paul Eggert 55710cf6e1 sort, system.h, tr int cleanup 2004-07-30 21:09:04 +00:00
Paul Eggert 7eb95094d3 (to_uchar): Remove; now in system.h.
(is_char_class_member): Use bool when appropriate.
2004-07-30 21:08:48 +00:00