Commit Graph
17261 Commits
Author SHA1 Message Date
Jim Meyering ac5d4cb798 (who): Free `utmp_buf' so there is no confusion about
whether it's leaked or not.
2003-11-06 09:28:40 +00:00
Jim Meyering a5aaf05fbf (main): Free `fstatus' so there is no confusion about
whether it's leaked or not.
2003-11-06 09:28:13 +00:00
Jim Meyering c1f33f59f5 Fix 'cut' problems with size_t overflow and unsigned int.
More generally, resize integer variables to fit use more precisely.

(ADD_RANGE_PAIR): Remove unnecessary parens.
(struct range_pair): Make members to be of type size_t, not unsigned.
(max_range_endpoint, eol_range_start): Now size_t, not unsigned.
(suppress_non_delimited, output_delimiter_specified,
have_read_stdin, print_kth, set_fields): Now bool, nt int.
(delim): Now unsigned char, not int.
(mark_printable_field, is_printable_field, is_range_start_index,
set_fields, set_fields, cut_bytes, cut_fields):
Use size_t, not unsigned, for field and byte counts.
(hash_int): Use uintptr_t, not unsigned, for pointers converted
to integers.  This squeezes more info out of them.
(set_fields, cut_bytes, cut_fields, main):
Use bool, not int, for booleans.
(set_fields): Allocate zeroed byte array with xzalloc, not xcalloc.
2003-11-06 08:37:55 +00:00
Jim Meyering da13dd4431 *** empty log message *** 2003-11-06 08:37:17 +00:00
Jim Meyering 5b2ca52688 *** empty log message *** 2003-11-06 08:37:13 +00:00
Jim Meyering 32cc366160 (jm_CHECK_ALL_TYPES): Check for uintptr_t. 2003-11-06 08:37:09 +00:00
Jim Meyering 9c99c1247a . 2003-11-06 08:06:58 +00:00
Jim Meyering d3d81daf32 *** empty log message *** 2003-11-06 08:03:33 +00:00
Jim Meyering 9bc557bf88 (check-programs-vs-x):
Work even if $(programs) contains '$'.
Work even if 'missing=1' in environment.
Don't report an error simply because $(programs) outputs nothing.
2003-11-06 08:03:27 +00:00
Jim Meyering 9e4ee6ce82 New file. From gnulib. 2003-11-06 06:08:07 +00:00
Jim Meyering 79879e13f0 *** empty log message *** 2003-11-06 06:07:44 +00:00
Jim Meyering 16e4df0708 (jm_MACROS): Require gl_FUNC_FREE. 2003-11-05 22:47:44 +00:00
Jim Meyering 2397cca268 *** empty log message *** 2003-11-05 22:47:37 +00:00
Jim Meyering 77697dc798 Update from gnulib. 2003-11-05 21:56:05 +00:00
Jim Meyering 62105db3d6 Update from gnulib. 2003-11-05 21:47:00 +00:00
Jim Meyering 30a2df0376 *** empty log message *** 2003-11-05 21:44:14 +00:00
Jim Meyering 426dc6dad7 (jm_MACROS): Require autoconf-2.58.
(AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
2003-11-05 21:44:10 +00:00
Jim Meyering ea276c1b60 *** empty log message *** 2003-11-05 21:42:49 +00:00
Jim Meyering d87b612132 . 2003-11-05 14:55:33 +00:00
Jim Meyering d675fc09bd *** empty log message *** 2003-11-05 03:55:48 +00:00
Jim Meyering e3158db155 *** empty log message *** 2003-11-05 03:53:25 +00:00
Jim Meyering df81ab2911 Cast NULL to `(char *)' in call to variadic function,
parse_long_options, so that it works even on systems for which
sizeof char* != sizeof int.
2003-11-05 03:53:19 +00:00
Jim Meyering 25e8fe4172 *** empty log message *** 2003-11-05 03:49:44 +00:00
Jim Meyering bea0f02fc7 (spec_init): Fix typo in last change. 2003-11-05 03:49:29 +00:00
Jim Meyering e809d156e9 (main): Cast NULL to `(char *)' in
call to variadic version_etc function, so that it works even on systems
for which sizeof char* != sizeof int.
2003-11-05 03:43:30 +00:00
Jim Meyering 6e2c46ce47 (case_GETOPT_VERSION_CHAR): Cast NULL to `(char *)' in
call to variadic version_etc function, so that it works even on systems
for which sizeof char* != sizeof int.
2003-11-05 03:43:22 +00:00
Jim Meyering b05cf2dee5 *** empty log message *** 2003-11-05 03:34:15 +00:00
Jim Meyering 875086bc91 Document _POSIX2_VERSION. 2003-11-05 03:34:09 +00:00
Jim Meyering d324de53cb *** empty log message *** 2003-11-05 03:19:14 +00:00
Jim Meyering 0a9816d8ba (users): Free `utmp_buf' explicitly so that people
don't mistake this for a real leak.
2003-11-05 03:15:21 +00:00
Jim Meyering f920b8b66e *** empty log message *** 2003-11-05 03:14:28 +00:00
Jim Meyering 4f081364fb . 2003-11-04 14:42:54 +00:00
Jim Meyering 0dd12bdc03 *** empty log message *** 2003-11-04 14:42:09 +00:00
Jim Meyering 62236f25e8 (ADD_FIELD, initseq, getseq): Use x2nrealloc rather than xrealloc. 2003-11-04 14:42:05 +00:00
Jim Meyering 6228ff86bd (fold_file): Use x2nrealloc rather than xrealloc. 2003-11-04 10:27:24 +00:00
Jim Meyering dfed7d19ac (store_char): Use x2nrealloc rather than xrealloc. 2003-11-04 09:32:16 +00:00
Jim Meyering bf4248b344 (memrchr): Remove #if-0'd function.
(tac_stdin_to_mem): Clean up #if-0'd code.
2003-11-04 09:31:08 +00:00
Jim Meyering 5506fdeffd (new_key): Use xzalloc, not xcalloc. 2003-11-04 09:28:28 +00:00
Jim Meyering e1c6989ecf (show_date): Use x2nrealloc rather than xrealloc. 2003-11-04 09:27:54 +00:00
Jim Meyering eab4bc5278 (decode_format_string): Remove unnecessary casts.
Use more maintainable `sizeof *var'.
(main): Call decode_format_string rather than decode_one_format,
now that `spec' may be NULL.
2003-11-04 09:27:19 +00:00
Jim Meyering 59436e7b92 (decode_format_string, dump_strings): Use x2nrealloc rather than xrealloc. 2003-11-04 06:32:51 +00:00
Jim Meyering 6ffc95a9e3 (ADD_RANGE_PAIR): Use x2nrealloc rather than xrealloc,
to avoid potential overflow in pointer arithmetic.
(set_fields): Use not `1', but rather `sizeof *printable_field' as
second argument to xcalloc.
2003-11-04 06:28:01 +00:00
Jim Meyering 26809f0450 (next_file_name): Use `sizeof *var' rather than
hard-coding `sizeof size_t'.
2003-11-04 06:25:45 +00:00
Jim Meyering 11e97f430c (AUTHORS): Add my name. 2003-11-04 06:21:03 +00:00
Jim Meyering 45240f2481 (main): Use sizeof *var' rather than sizeof EXPLICIT_TYPE'.
The former is more maintainable and usually shorter.
2003-11-04 06:13:55 +00:00
Jim Meyering d63bdf9a4d (initseq, add_field, make_blank): Use `sizeof *var' rather
than `sizeof EXPLICIT_TYPE'.
The former is more maintainable and usually shorter.
2003-11-04 06:07:01 +00:00
Jim Meyering 62e944695c *** empty log message *** 2003-11-03 16:11:14 +00:00
Jim Meyering 88d5e8e8f1 (TESTS_ENVIRONMENT): Define PACKAGE_VERSION. 2003-11-03 16:11:06 +00:00
Jim Meyering 30543245a1 Fail the test immediately if we're not running
the expected version of fold.
2003-11-03 16:10:58 +00:00
Jim Meyering 8994346d65 . 2003-11-03 15:08:50 +00:00