Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering f646cade60 (add_field_list): Don't use alloca with unbounded
size; just modify the argument, which is no longer const *.

Various other minor cleanups, mostly to avoid the need for casts.

(extract_field): Renamed from ADD_FIELD, as it's now a function.

(struct field.beg): Now char *, not unsigned char const *.  All
uses changed.  It shouldn't be const since xmemcoll writes on its
arguments.
(extract_field): Likewise, for 2nd arg.
(keycmp): Remove now-unnecessary cast of xmemcoll args.

(is_blank): New function, to avoid need to cast arg to unsigned char.
(extract_field): Use it.

(xfields): Rewrite pretty much from scratch.

(hard_LC_COLLATE): Now bool, not int.
(get_line, getseq, add_field_list): Now returns bool, not int.
(decode_field_spec, add_field_list): Return true on success (not
false), for consistency with the rest of the code.  All uses changed.

(tab): Now char, not unsigned char.  This wasn't 100% necessary
but is slightly cleaner.
(prjoin): Hoist (tab ? tab : ' ') expression, to help the compiler.

(empty_filler): Now const *.

(make_blank): Remove; wasn't needed.  Remove all calls.
(main): Don't set uni_blank.nfields; zero is fine.
2003-12-30 08:24:26 +00:00
Jim Meyering fdb08248b8 Include "quote.h".
(min, max): Remove definitions.
Make a few function parameters and corresponding
locals `const'.  Use bool for boolean variables.
Use size_t (not int) for all counters and related index variables.
(prjoin): Remove now-useless assertion.
(string_to_join_field): New function.
(main): Accept join fields as large as SIZE_MAX.
(keycmp): Rename `min' to MIN and max to MAX.
2003-12-27 14:36:26 +00:00
Jim Meyering 064ca9ef3c *** empty log message *** 2003-12-27 09:58:11 +00:00
Jim Meyering 11ea239f36 . 2003-12-27 09:55:48 +00:00
Jim Meyering baf3556d8d *** empty log message *** 2003-12-27 09:55:22 +00:00
Jim Meyering 77962dd067 fold -s didn't work on e.g., alpha-based systems.
* src/fold.c (fold_file): Adjust types (int->size_t) so that using
x2nrealloc works properly on systems with differing sizes for int
and size_t.  Reported by Nelson Beebe.

* src/fold.c: Use `bool' (not int) as the type for a few
global variables.
2003-12-27 09:55:11 +00:00
Jim Meyering 74d143fd76 *** empty log message *** 2003-12-24 16:38:41 +00:00
Jim Meyering 80de43f488 (length_of_file_names_and_frills):
Remove forward decl; not needed.
(print_file_name_and_frills, length_of_file_name_and_frills):
With -m, don't output spaces before inum or size.
(print_with_commas): Don't output space just before newline.
2003-12-24 16:38:36 +00:00
Jim Meyering 6a40a6b266 (TESTS): Add m-option. 2003-12-24 16:37:38 +00:00
Jim Meyering 05bc7f6b3c . 2003-12-24 16:35:18 +00:00
Jim Meyering 4e9c25d0cc bump to 5.1.1 2003-12-22 15:36:43 +00:00
Jim Meyering 7c148bb672 . 2003-12-21 08:40:30 +00:00
Jim Meyering f2b9a50eb5 . COREUTILS-5_1_0 2003-12-21 07:52:00 +00:00
Jim Meyering 3289e8a8ec *** empty log message *** 2003-12-21 07:51:37 +00:00
Jim Meyering 5e9e6c75e7 *** empty log message *** 2003-12-21 07:51:23 +00:00
Jim Meyering c74f99c571 *** empty log message *** 2003-12-20 18:08:11 +00:00
Jim Meyering e164c2bbeb [!_LIBC]: Undefine, then define-away __P. 2003-12-20 18:08:02 +00:00
Jim Meyering deaf944ceb . 2003-12-20 17:59:15 +00:00
Jim Meyering 5a1305abb4 . 2003-12-20 17:58:46 +00:00
Jim Meyering 0ea4558007 *** empty log message *** 2003-12-20 17:57:35 +00:00
Jim Meyering c9e16ed123 Don't require UTILS_SYS_OPEN_MAX. 2003-12-20 17:57:30 +00:00
Jim Meyering c26ec64a0b *** empty log message *** 2003-12-20 17:55:18 +00:00
Jim Meyering b904a67dc8 (UTILS_SYS_OPEN_MAX): Remove file. No longer used. 2003-12-20 17:55:13 +00:00
Jim Meyering 01fc0cb461 *** empty log message *** 2003-12-20 16:51:55 +00:00
Jim Meyering 31361deb52 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
value, $ac_cv_search_crypt, if it's "none required".
2003-12-20 16:51:51 +00:00
Jim Meyering 6ff0bf52e2 Change type of global, buff_allocated, to size_t. 2003-12-20 16:44:12 +00:00
Jim Meyering 18c313d563 [struct seq]: Change types of members count and alloc
from `int' to `size_t'.
2003-12-20 16:41:54 +00:00
Jim Meyering f4bebc82bb *** empty log message *** 2003-12-20 16:36:04 +00:00
Jim Meyering 38fe0df54d [!_LIBC]: Define __P. 2003-12-20 16:35:59 +00:00
Jim Meyering d039892e8f . 2003-12-20 13:06:25 +00:00
Jim Meyering 13a732ea73 remove /vg 2003-12-20 13:06:12 +00:00
Jim Meyering af1df22b42 . 2003-12-20 11:39:08 +00:00
Jim Meyering 10f46a9857 . 2003-12-20 11:38:12 +00:00
Jim Meyering d19241453e . 2003-12-20 11:32:52 +00:00
Jim Meyering 41c9f774a8 . 2003-12-20 11:32:45 +00:00
Jim Meyering b3711e549a *** empty log message *** 2003-12-20 11:32:38 +00:00
Jim Meyering ce2ec20ca3 (root-hint): Tweak wording. 2003-12-20 11:32:32 +00:00
Jim Meyering 4adc127426 *** empty log message *** 2003-12-20 11:30:55 +00:00
Jim Meyering ee1a768122 Accept new option (-0, --null) that makes it so each
output line is NUL-terminated rather than newline-terminated.
2003-12-20 11:29:30 +00:00
Jim Meyering 340b33464a (du invocation): Describe new option: -0, --null. 2003-12-20 11:28:14 +00:00
Jim Meyering e08866d436 *** empty log message *** 2003-12-20 09:34:49 +00:00
Jim Meyering 701926715a New test for the above. 2003-12-20 09:34:25 +00:00
Jim Meyering d22a3e0af9 (TESTS): Add unblock-sync. 2003-12-20 09:33:58 +00:00
Jim Meyering adc5058db2 (apply_translations): Don't prohibit conv=unblock,sync. 2003-12-20 09:23:19 +00:00
Jim Meyering 072ddb1147 *** empty log message *** 2003-12-20 09:23:08 +00:00
Jim Meyering 1d6665c978 *** empty log message *** 2003-12-20 09:21:17 +00:00
Jim Meyering a086112e73 Duh. Fix last change. 2003-12-19 22:30:14 +00:00
Jim Meyering 6f438344f1 *** empty log message *** 2003-12-19 21:48:41 +00:00
Jim Meyering ddf8b7b638 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME if no library is required. 2003-12-19 21:48:35 +00:00
Jim Meyering 02dd87543e *** empty log message *** 2003-12-19 16:13:34 +00:00