summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2000-03-01(get_width_format): Fix portability problem with `-0' vs. `0'.Jim Meyering
2000-02-29(decode_switches): Remove `e' from getopt_long's list ofJim Meyering
option characters. Reported by John Summerfield.
2000-02-29(make_blank): Add an explicit cast to `unsigned char *'Jim Meyering
to placate HPUX's C compiler. Reported by Bob Proulx.
2000-02-29split a long lineJim Meyering
2000-02-27Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.Jim Meyering
2000-02-27Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL...'Jim Meyering
now that autoconf always defines the HAVE_DECL_ symbols.
2000-02-27(install_file_to_path): Always use install_file_in_file.Jim Meyering
Based on a patch from Adam Klein via Michael Stone.
2000-02-15(pop_dir): New function.Jim Meyering
(count_entry): Factor out common code (pop_dir), and call the new function instead. Move declaration of global, `stat_buf' into this function. (du_files): Don't stat `.' or call save_cwd, since count_entry never returns with a changed working directory.
2000-02-12(usage): Mention only `:', and not `.' as the separator.Jim Meyering
2000-02-11(main): Count the stat'able arguments.Jim Meyering
Print the header line only if there is at least one valid argument. Reported by Andy Longton <alongton@metamark.com>
2000-02-09(correct_password): Correct HAVE_STRUCT_* name in #if guardJim Meyering
to go along with corrected autoconf test: Reported by G Queri.
2000-02-05Use UT_USER in place of hard-coded `->ut_name' here, too.Jim Meyering
2000-02-05(copy_internal): Don't allow mv to move a directory ontoJim Meyering
a non-directory. Reported by Brian Kimball via Michael Stone.
2000-02-03(O_NDELAY): Define to 0 if not defined.Jim Meyering
(O_NONBLOCK): Define to O_NDELAY if not defined. (touch): Open with O_NONBLOCK, so one can touch a fifo without hanging. Reported by Eric G. Miller via Michael Stone.
2000-01-31Use UT_USER in place of hard-coded `->ut_name' here, too.Jim Meyering
2000-01-30(correct_password): Guard with `HAVE_GETSPNAM && HAVE_STRUCT_PASSWD_SP_PWDP',Jim Meyering
rather than just `#ifdef HAVE_SHADOW_H'.
2000-01-30(ST_NBLOCKS): Use st_size only for regular files andJim Meyering
for directories. From H. J. Lu.
2000-01-30(main): Exit with nonzero status if ftruncate fails.Jim Meyering
2000-01-29Back out most of the 2000-01-21 and 01-22 changes.Jim Meyering
[Instead, merely give examples showing how to accomplish the same task with fewer limitations using existing tools. ] Suggestion from Bruno Haible. (valid_format): Rename from check_format.
2000-01-29(screen_columns): Change #if-0 (test code, mistakenly committed in last delta)Jim Meyering
back to #ifdef TIOCGWINSZ.
2000-01-28(wrapf): Emit a newline only if 0 < current_col.Jim Meyering
(screen_columns): Use xstrtol, not atoi. If get_win_size fails and $COLUMNS == 0, then return 80, not `0'.
2000-01-26(detect_loop): Update incomplete comment.Jim Meyering
From Mark Kettenis.
2000-01-25tsort now works more like the traditional UNIX tsort. Before it wouldJim Meyering
exit when it found a loop. Now it continues and outputs all items. (exit_status): New variable. (loop): New varibale. (count_items, scan_zeroes): Change return type to int. (detect_loop): Complete rewrite to correctly implement detection of loops. Also change return type to int. (recurse_tree): Stop if ACTION returns non-zero. This involves changing the return type of this function and ACTION to int. (walk_tree): Change return type of ACTION to int. (tsort): Continue sort after a loop has been detected (and broken). Set exit_status to 1 if a loop was detected. (main): Use exit_status to determine exit code.
2000-01-24(usage): Describe behavior when LINK_NAME is omitted.Jim Meyering
From Michael Stone.
2000-01-24(main): Don't expect array index `n_files - 1' to evaluateJim Meyering
to `-1' for unsigned int n_files == 0. Doing so lead to a segfault on alpha. From Michael Stone.
2000-01-22(keycompare): Use global, hard_LC_COLLATE in place ofJim Meyering
local that is sometimes undeclared.
2000-01-22[! HAVE_DECL_STRTOUL]: Declare strtoul.Jim Meyering
[! HAVE_DECL_STRTOULL]: Declare strtoull. Required for some AIX systems. Reported by Christian Krackowizer.
2000-01-22Topologically sort the functions and remove fwd declarations.Jim Meyering
2000-01-22(enum Format_type): Declare.Jim Meyering
(format_type): New global to take place of intconv. (DO_printf): New macro. (main): Use it.
2000-01-22Add support for octal and hexadecimal output.Jim Meyering
(intconv): New variable. (usage): Update. (main): Call scan_arg instead of scan_double_arg. Call check_format before scan_arg. (scan_int_arg, scan_arg): New functions. (check_format): Add intconv argument. Accept %d, %u, %o, %x, %X. (print_numbers): If intconv is true, pass an int argument to printf.
2000-01-22("xstrtol.h"): Include.Jim Meyering
(Filter): Rename from PFL. (non_neg_strtol): Remove function. (find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol. (squeeze_filter, set_initialize, main): Use size_t and ssize_t in place of long and int in several decls. (read_and_delete, read_and_xlate): Likewise, and remove assertion.
2000-01-21Correct copying notice to use GPL, per author's request.Jim Meyering
(AUTHORS): Add djm.
2000-01-21Correct copying notice to use GPL, per author's request.Jim Meyering
2000-01-21(PFI): Return `long', not `int'.Jim Meyering
(PFL): Rename from PFI now that it returns long. (squeeze_filter): Declare as `long': i, nr, out_len.
2000-01-19Tweak sort performance.Jim Meyering
(hard_LC_CTYPE): Remove. (keylist): Renamed from keyhead. Now a pointer, not a mostly-unused struct. All uses changed. (findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps, sort): Tune and use a more consistent style for reallocation. (keycompare, main): Don't worry about LC_CTYPE; it's buggy with multibyte chars anyway. (compare): Invoke alloca (0) after each call to keycompare, not just the ones that return nonzero. This avoids a memory leak on architectures without builtin alloca that occurs sometimes when a file contains all duplicate lines.
2000-01-18(interrupt_handler, main):Jim Meyering
Don't use SA_INTERRUPT to decide whether to call sigaction, as POSIX.1 doesn't require SA_INTERRUPT and some systems (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead; it's been part of POSIX.1 since day 1 (in 1988).
2000-01-18(sighandler, main):Jim Meyering
Don't use SA_INTERRUPT to decide whether to call sigaction, as POSIX.1 doesn't require SA_INTERRUPT and some systems (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead; it's been part of POSIX.1 since day 1 (in 1988).
2000-01-18(interrupt_handler):Jim Meyering
Don't use SA_INTERRUPT to decide whether to call sigaction, as POSIX.1 doesn't require SA_INTERRUPT and some systems (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead; it's been part of POSIX.1 since day 1 (in 1988). (install_handler): Use SA_NOCLDSTOP, not _POSIX_VERSION, to decide whether to call sigaction; this fixes an old typo.
2000-01-16(usage): Correct error in %V description.Jim Meyering
From Wolfram Kleff.
2000-01-15(TAB_STOP_SENTINEL): Define.Jim Meyering
(unexpand): Use it instead of INT_MAX. Declare column and pending to be `unsigned'. Increment pending and column counters only if column is smaller than TAB_STOP_SENTINEL.
2000-01-13(fillbuf): Avoid quadratic behavior with long lines.Jim Meyering
Also, stop worrying about ancient memchr bug (misbehavior when size is zero), since other code doesn't worry either.
2000-01-12(count_entry): Adjust to new calling convention for excluded_filename.Jim Meyering
(main): Likewise, for add_exclude_file.
2000-01-09(do_link): Produce the same sort of one-line output forJim Meyering
`--backup --verbose' as cp, mv, install. Before this, the backup file name wasn't printed at all.
2000-01-09This affects cp, install, and mv.Jim Meyering
(copy_internal): When making backup files in verbose mode, print the backup file name on the same line as the rest of the information, e.g., `a -> b (backup: b.~13~)' rather than on a line by itself.
2000-01-08(PAGES_OPTION, COLUMNS_OPTION): Define these and use them instead ofJim Meyering
`CHAR_MAX + n'.
2000-01-08(OUTPUT_DELIMITER_OPTION): Define this and use it instead of `CHAR_MAX + n'.Jim Meyering
2000-01-06add blank lineJim Meyering
2000-01-06(apply_suffix): Comment.Jim Meyering
2000-01-06fix typo in commentJim Meyering
2000-01-06Minor code cleanup.Jim Meyering
(clock_get_realtime): Return argument, for convenience. (main): Use this to simplify main sleep loop.