Age | Commit message (Collapse) | Author | |
---|---|---|---|
2004-06-01 | Add some index references for POSIXLY_CORRECT. | Jim Meyering | |
(echo invocation): Document today's changes. | |||
2004-06-01 | (V9_ECHO): Remove; always enabled. | Jim Meyering | |
(DEFAULT_ECHO_TO_XPG): Renamed from V9_DEFAULT, so that we use the same naming convention as bash. Now an enum, not a macro. (usage): Reword to mention -e/-E more accurately. Mention \0NNN (the POSIX syntax) rather than \NNN (nonstandard). (hextobin): New function. (main): Use bool rather than int for local vars when appropriate. Do not allow options if POSIXLY_CORRECT, unless we are using BSD semantics and the first argument is "-n". Don't pass unnecessary extra arg to parse_long_options. do_v9 now defaults to DEFAULT_ECHO_TO_XPG, not to allow_options. Do not look for options if !allow_options. Use size_t rather than int when appropriate. Open-code option test rather than using strrchr. Use faster test for "-". Avoid redundant argc test. Add support for \x, for Bash compatibility. Use e.g. '\a' rather than '\007', for portability to EBCDIC hosts. When '\c' is encountered, stop printing immediately, as POSIX requires. Add support for \xhh syntax. Add support for \0ooo syntax; POSIX requires this. | |||
2004-06-01 | *** empty log message *** | Jim Meyering | |
2004-06-01 | Update from gnulib. | Jim Meyering | |
2004-06-01 | *** empty log message *** | Jim Meyering | |
2004-06-01 | . | Jim Meyering | |
2004-05-31 | *** empty log message *** | Jim Meyering | |
2004-05-31 | . | Jim Meyering | |
2004-05-31 | . | Jim Meyering | |
2004-05-31 | regenerate | Jim Meyering | |
2004-05-31 | 2004-05-29 Paul Eggert <eggert@cs.ucla.edu> | Jim Meyering | |
tr cleanup, mostly having to do with integer type ranges. Remove all casts. * tests/tr/Test.pm: Add a few tests for the below. Alas, most of the test cases wouldn't be portable, or would take too much CPU time, or both. | |||
2004-05-31 | (TESTS_ENVIRONMENT): Define PATH to include | Jim Meyering | |
the build src/ directory -- at the front. ($(srcdir)/$x-tests): Depend on Makefile.am. Use $x as the program name, except when it would be `test' (test is the sole program tested via mk-script that is also a shell built-in). In that case, use the old ../../src/$x. | |||
2004-05-31 | . | Jim Meyering | |
2004-05-31 | . | Jim Meyering | |
2004-05-31 | *** empty log message *** | Jim Meyering | |
2004-05-31 | (TESTS_ENVIRONMENT): Set PATH. | Jim Meyering | |
2004-05-31 | *** empty log message *** | Jim Meyering | |
2004-05-31 | (set_initialize): Remove unnecessary initialization of the `in_set' | Jim Meyering | |
buffer; that initialization triggered the same compiler bug as above. | |||
2004-05-31 | tr cleanup, mostly having to do with integer type ranges. | Jim Meyering | |
Remove all casts. Here are examples of the failures: $ echo a | tr a '[x*][y*2147483646][y*2147483646][y*4]' x $ echo abcd | tr abc '[b*\9]' bbbd $ echo abcd | tr abc '[b*0]' tr: invalid repeat count `0' in [c*n] construct $ echo abcd | tr -c '[a*65536]\n' '[b*]' tr: ../../coreutils-5.2.1/src/tr.c:1942: main: Assertion `get_next (s2, ((void *)0)) == -1 || truncate_set1' failed. Aborted (N_CHARS, N_CHAR_CLASSES): Now an enum, not a macro. This is safe since the code already assumes N_CHARS fits in int. (Filter): Remove: we want to prototype everything. (ORD, CHR): Remove. All uses removed. Some replaced with: (uchar): New function. All places where a char must be converted to an unsigned char are now done this way, not by ad-hoc methods. (count): New type. Use it whenever counts or states are needed. (BEGIN_STATE): Increase from INT_MAX - 1 (which was bogus, anyway, since we used it in an unsigned int context) to UINTMAX_MAX - 1. (REPEAT_COUNT_MAXIMUM): New macro. Use it in place of BEGIN_STATE whenever appropriate. (NOT_A_CHAR): Remove global macro; now a local enum. (UL_LOWER, UL_UPPER, UL_NONE): No longer specify values, since the rest of the code no longer depends on them. (class_ok): Remove; all uses changed to use inline comparisons. (RE_NO_TYPE): Remove; wasn't used or needed. (struct List_element): normal_char and equiv_code are now unsigned char, not int. first_char, last_char, and the_repeated_char are now unsigned char, not unsigned int. repeat_count is now count, not size_t. All uses changed. (struct Spec_list): state is now count, not unsigned int. lengthis now count, not size_t. n_indefinite_repeats is now size_t, not int. has_equiv_class, has_char_class, and has_restricted_char_class are now bool, not int. All uses changed. (struct E_string): s is now char *, not unsigned char *. escaped is now bool *, not int *. All uses changed. (ES_MATCH): Remove macro, replacing with: (es_match): New inline function. All uses changed. (squeeze_repeats, complement, posix_pedantic, truncate_set1, translating): Now bool, not int. (io_buf): Now char array, not unsigned char. (SET_TYPE): Remove. All uses replaced with bool. (is_equiv_class_member, unquote, append_range, append_char_class, append_equiv_class, find_closing_delim, star_digits_closebracket, build_spec_list, parse_str, homogeneous_spec_list): Now returns bool, not int. All uses changed. (is_equiv_class_member): Now inline. (is_equiv_class_member, is_char_class_member, make_printable_str, append_normal_char, append_range, append_repeated_char, get_s2_spec_stats): Args are now of proper integer type. (unquote, look_up_char_class, make_printable_str, append_equiv_class, build_spec_list, squeeze_filter): Avoid unsigned char *p; gently convert *p to unsigned char instead. (unquote, get_spec_stats): Do not jump past declarations and then use them; C doesn't allow this in portable programs. (make_printable_str): Check for overflow in size calculations. (xmemdup): Remove. All uses rewritten. (find_bracketed_repeat): Args are now of proper pointer-to-integer type. Do not reject [c*0]. Use xstrtoumax, not xstrtoul. (find_bracketed_repeat, star_digits_closebracket): Check that the digits are not escaped. (build_spec_list): Don't bother to copy opnd_str; not needed. (build_spec_list, get_next): Simplify internal logic a bit. (card_of_complement): Fix bug due to char overflow. (get_spec_stats): Don't assume len fits into int. Check for integer overflow. Use abort() rather than assert(0). (string2_extend): Fix subscript error: is_char_class_member (..., 255) was being invoked. (squeeze_filter): READER is never null now; simplify code. READER arg now has a simpler type. Remove unnecessary casts. (squeeze_filter, main): Calls to fwrite improperly checked result against zero, rather than against requested size. (plain_read): New function. (read_and_delete, read_and_xlate): Remove unused filter arg, and don't worry about hit_eof. Simplify by using plain_read. (set_initialize): Args are bool and bool *, not int and SET_TYPE *. (main): Always pass a non-null procedure to squeeze_filter. Rewrite so that class_ok isn't needed. | |||
2004-05-30 | *** empty log message *** | Jim Meyering | |
2004-05-30 | Work around HPUX /bin/cc compiler bug. | Jim Meyering | |
(card_of_complement): Use cleaner `sizeof in_set' rather than `N_CHARS * sizeof(in_set[0])'. Using HPUX's /bin/cc (aC++/ANSI C B3910B A.05.55 [Dec 04 2003]) on an ia64-hp-hpux11.22 system, those two expressions are not the same (256 vs. 1024). The effect of this problem was that `tr -c x y' would fail: tr: when not truncating set1, string2 must be non-empty | |||
2004-05-30 | *** empty log message *** | Jim Meyering | |
2004-05-30 | (dosync): Ignore EBADF errors, as IRIX 6.5 | Jim Meyering | |
fdatasync reports EBADF when syncing (unwritable) directories. Problem reported by Albert Chin-A-Young in: http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00165.html | |||
2004-05-29 | . | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | remove trailing blank | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | (rm_option_init): Initialize new member, | Jim Meyering | |
2004-05-29 | (rm_option_init): Initialize new member, x->require_restore_cwd. | Jim Meyering | |
2004-05-29 | (struct rm_options) [require_restore_cwd]: New member. | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | rm -r would get a failed assertion when run from an inaccessible | Jim Meyering | |
directory and with two or more command line arguments including an absolute-named directory followed by a relative-named directory. (struct cwd_state): Define. (AD_pop_and_chdir): Redesign interface so that a restore_cwd failure can be detected by the caller. Instead of returning a malloc'd directory name, communicate it to caller via a new parameter, and return an indication of whether restore_cwd failed. Update caller. Eliminate an unnecessary call to AC_stack_top. (remove_dir): Change type of cwd_state parameter to `struct cwd_state' so we can now communicate to caller whether/how functions like restore_cwd have failed. Update caller. (rm_1): Fail if we've failed to restore the working directory and the name of the next file to remove is `.'-relative. (rm): Fail if the require_restore_cwd flag is true and we've failed to restore the working directory. | |||
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Define. | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | (gl_PREREQ_XMALLOC): Require AC_FUNC_CALLOC. | Jim Meyering | |
2004-05-29 | . | Jim Meyering | |
2004-05-29 | Fix typo: use ls -ldo, not ls -ldg. Patch from Albert Chin. | Jim Meyering | |
2004-05-29 | *** empty log message *** | Jim Meyering | |
2004-05-29 | (AC_FUNC_CALLOC, _AC_FUNC_CALLOC_IF): New file/macros. | Jim Meyering | |
2004-05-29 | New file. | Jim Meyering | |
2004-05-29 | (text_buffer_maxend): Remove declarations unused variable. | Jim Meyering | |
2004-05-28 | *** empty log message *** | Jim Meyering | |
2004-05-28 | (push_dir): Merge declaration and adjacent assignment into a single statement. | Jim Meyering | |
2004-05-28 | tweak a comment | Jim Meyering | |
2004-05-28 | *** empty log message *** | Jim Meyering | |
2004-05-28 | (AD_mark_helper): Eliminate unnecessary comparison. | Jim Meyering | |
2004-05-28 | *** empty log message *** | Jim Meyering | |