summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorLines
2004-04-27Rename to sc_tight_scope.Jim Meyering-1/+1
2004-04-27(backup_type): Declare `static'.Jim Meyering-1/+1
2004-04-27(opt_nul_terminate_output): Declare `static'.Jim Meyering-1/+1
2004-04-27(G_fail): Declare `static'.Jim Meyering-1/+1
2004-04-27(forget_created, remember_created)Jim Meyering-6/+6
(src_to_dest_lookup, remember_copied, hash_init, forget_all): Add `extern' keyword.
2004-04-27(dest_info_init, src_info_init, copy): Add `extern' keyword.Jim Meyering-3/+3
2004-04-27(chopt_init, chopt_free, gid_to_name, uid_to_name, chown_files):Jim Meyering-5/+5
Add `extern' keyword.
2004-04-27(rm): Add `extern' keyword.Jim Meyering-1/+1
2004-04-27.Jim Meyering-0/+19
2004-04-27(sc_src_functions_have_static_scope): New rule.Jim Meyering-0/+19
2004-04-26.Jim Meyering-4/+6
2004-04-26(limfield): Make a comment clearer.Jim Meyering-2/+3
2004-04-26Fix POSIX-conformance bug: "sort -k 3,3.5b" is supposed to skipJim Meyering-26/+3
leading blanks when computing the location of the field end; it is not supposed to skip trailing blanks. Solaris 8 "sort" does conform to POSIX. Also fix the documentation to clarify this and related issues. (limfield): Use skipeblanks, not skipsblanks, to decode whether to skip leading blanks. (trailing_blanks): Remove. (fillbuf, getmonth, keycompare): Don't trim trailing blanks.
2004-04-24.Jim Meyering-1/+1
2004-04-24More signal-handling cleanup for ls.c. Do not allow signals toJim Meyering-66/+160
happen between arbitrary output bytes, as the restore-default-color sequence can bollix up multibyte chars or color-change sequences in the ordinary output. Instead, process signals only between printing a file name and changing the color back to non_filename_text color. That way, if the signal handler changes the color (to the default), 'ls' will change it back when 'ls' continues (after being suspended). Also, do not bother with signal-handling unless stdout is a controlling terminal; this lets stdio buffer better when "ls --color" is piped or sent to a file. (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: New macros. Do not include "full-write.h"; no longer needed. (tcgetpgrp) [! HAVE_TCGETPGRP]: New macro. (put_indicator_direct): Remove. All callers changed to use put_indicator. (caught_signals, interrupt_signal, stop_signal_count): New vars. (restore_default_color): Don't bother checking for put_indicator failure. (sighandler): Don't handle SIGTSTP; that's another handler now. Simply set interrupt_signal to the signal, then exit. (stophandler, process_signals): New functions. (main): Don't output any color changes until _after_ the signal handlers are set up. This fixes a race condition where 'ls' could be interrupted while initializing colors, and leaving the terminal in an undesirable state. Don't mess with signal-handling if standard output is not a controlling terminal. When exiting, restore the default color, then restore the default signal handling, then act on any signals that weren't acted on yet. Do not print //DIRED// etc. in colors; this avoids the need to catch signals when printing them. (print_name_with_quoting): Process signals just before switching color back to non_filename_text.
2004-04-23Avoid segfault on systems for which SIZE_MAX != (size_t) -1.Jim Meyering-2/+3
(quote_name): Use SIZE_MAX, not -1, in calls of quotearg_buffer. Patch by Mikulas Patocka.
2004-04-21(main): Do not ignore SIGPIPE, as POSIX 1003.1-2001Jim Meyering-4/+0
does not allow this. This undoes the 1996-10-24 patch.
2004-04-21 - csplit sometimes failed to remove files when interrupted.Jim Meyering-59/+93
- csplit didn't clean up if two signals arrived nearly simultaneously. (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: Define. (filename_space, prefix, suffix, digits, files_created, remove_files): Now volatile. (caught_signals): New var. (cleanup): Block signals while deleting all files. (cleanup_fatal, handle_line_error, regexp_error): Mark with ATTRIBUTE_NORETURN. (create_output_file, close_output_file, interrupt_handler): Block signals while changing the number of output files, to fix some race conditions. (delete_all_files): Do nothing if remove_files is zero. Clear files_created. (main): Don't mess with signals until after argument processing is done. (main): Rewrite signal-catching code to make it similar to other coreutils programs. When processing signals, block all signals that we catch, but do not block signals that we don't catch. Avoid problems with unsigned int warnings. (interrupt_handler): Use void, not (obsolete) RETSIGTYPE. (interrupt_handler) [defined SA_NOCLDSTOP]: Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
2004-04-21 - ls could incorrectly restore color if multiple signalsJim Meyering-39/+26
arrived nearly simultaneously. (main): Rewrite signal-catching code to make it similar to other coreutils programs. When processing signals, block all signals that we catch, but do not block signals that we don't catch. Avoid problems with unsigned int warnings. (sighandler) [defined SA_NOCLDSTOP]: Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent. (sighandler) [!defined SA_NOCLDSTOP]: Reset signal handler to self, not to SIG_IGN, since SIGTSTP can be received more than once. (main): Use SA_RESTART, as that is simpler than checking for EINTR failures all over the place.
2004-04-21install -s failed on System V if SIGCHLD was ignored.Jim Meyering-0/+5
Include <signal.h>. (main) [defined SIGCHLD]: Set SIGCHLD handler to the default, if -s is given, since System V fork+wait does not work if SIGCHLD is ignored.
2004-04-20(is_empty_dir): Clarify comment.Jim Meyering-1/+1
2004-04-20(main) [!defined _POSIX_SOURCE]:Jim Meyering-23/+1
Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
2004-04-20(main): Rewrite signal-catching code to make itJim Meyering-36/+21
similar to other coreutils programs. When processing signals, block all signals that we catch, but do not block signals that we don't catch. Avoid problems with unsigned int warnings. (sighandler) [defined SA_NOCLDSTOP]: Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
2004-04-20(sigill_handler, isaac_seed_machdep): Use void, not (obsolete) RETSIGTYPE.Jim Meyering-2/+2
2004-04-20(main) [!defined _POSIX_SOURCE]:Jim Meyering-12/+1
Use simpler "signal (sig, SIG_IGN)" rather than sigaction equivalent.
2004-04-20.Jim Meyering-1/+1
2004-04-20Don't include pathmax.h; system.h already does it.Jim Meyering-1/+0
2004-04-20.Jim Meyering-1/+1
2004-04-20(cut_fields): Free buffer upon getndelim2 failure.Jim Meyering-0/+1
2004-04-19(isaac_seed_start) [AVOID_USED_UNINITIALIZED_WARNINGS]:Jim Meyering-1/+8
Initialize a buffer to avoid warnings from tools like valgrind.
2004-04-19.Jim Meyering-2/+2
2004-04-19Make pwd work even if the resulting name is so long that getcwd fails.Jim Meyering-6/+252
(path_free, path_init, path_prepend): New functions. (nth_parent, find_dir_entry, robust_getcwd): New functions. (main): First try getcwd, then, upon failure, robust_getcwd.
2004-04-18(print_user): Use xrealloc here, rather than unchecked realloc.Jim Meyering-3/+3
Remove anachronistic casts.
2004-04-18(full_filename_): Don't leak upon failed realloc.Jim Meyering-2/+5
2004-04-18(readdir_ignoring_dotdirs): Move function to system.h, renaming it. Update ↵Jim Meyering-14/+2
uses.
2004-04-18(readdir_ignoring_dot_and_dotdot): New inline function, from remove.c.Jim Meyering-0/+12
2004-04-17(add_file_name): Declare function to be `static'.Jim Meyering-1/+1
2004-04-17(ds_init, ds_free): Declare functions to be `static'.Jim Meyering-6/+6
2004-04-17(string_to_join_field): Declare function to be `static'.Jim Meyering-1/+1
2004-04-15Include getpagesize.h.Jim Meyering-7/+17
(main): Align I/O buffers to page boundaries.
2004-04-15Include getpagesize.h.Jim Meyering-8/+10
(dopass): Align I/O buffers to page boundaries.
2004-04-15Include getpagesize.h.Jim Meyering-2/+6
(copy_reg): Align I/O buffers to page boundaries.
2004-04-15(gcd, lcm, ptr_align): New functions, moved from od.c.Jim Meyering-0/+40
2004-04-15(gcd, lcm): Remove; now in system.h.Jim Meyering-27/+0
2004-04-15(ROUND_UP_OFFSET, PTR_ALIGN): Remove.Jim Meyering-6/+2
All uses replaced by ptr_align.
2004-04-15Include getpagesize.h.Jim Meyering-1/+3
(main): Align I/O buffers to page boundaries.
2004-04-14.Jim Meyering-16/+16
2004-04-12.Jim Meyering-10/+10
2004-04-12Include "utimecmp.h".Jim Meyering-9/+22
(copy_internal): Compare time stamps using utimecmp rather than MTIME_CMP.
2004-04-09Include stat-macros.h, not file-type.h.Jim Meyering-78/+1
Move more definitions into stat-macros.h.