summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-11-19(check_file): Don't check stdout for errors here.Jim Meyering
2004-11-18(robust_getcwd): Correct the comment: this function constructs theJim Meyering
directory name. The caller prints it.
2004-11-17Regenerate.Paul Eggert
2004-11-17(STATFS): New macro, for portability to Solaris 9.Paul Eggert
(do_statfs): Use it.
2004-11-17(main): argv is not const.Paul Eggert
2004-11-17(main): Use getopt_long rather than getopt.Paul Eggert
2004-11-16Add putty, screen-bce.Paul Eggert
2004-11-16(usage): Improve documentation along the lines suggestedPaul Eggert
by Debian 5.2.1-2.
2004-11-16Fix memory leak.Paul Eggert
2004-11-16(C_ASCII, C_EBCDIC, C_IBM, C_BLOCK, C_UNBLOCK,Paul Eggert
C_LCASE, C_UCASE, C_SWAB, C_NOERROR, C_NOTRUNC, C_SYNC, C_TWOBUFS, C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): Now constants, not macros. (STATUS_NOXFER, statuses): New constants. (usage, print_stats, scanargs): Add support for status=noxfer. (usage): Update status output to match new behavior. (print_stats): Always output complete byte count. Put space between numbers and units, as SI requires. Use ngettext so that i18n can use plurals for "byte" and "second". Don't multiply by 1e-9 (inexact); divide by 1e9 (which is exact). (iflag_error_msgid, oflag_error_msgid): Remove; replace uses by the string.
2004-11-15Include "human.h".Paul Eggert
(w_bytes, start_time): New vars. (usage): Document new I/O statistics output (print_stats): Output new I/O statistics. (cleanup): Do statistics after closing stdin and stdout, so that the times are more accurate. (write_output, dd_copy): Count output bytes. (main): Get initial value of clock.
2004-11-15(dd_LDADD): Add $(LIB_CLOCK_GETTIME).Paul Eggert
2004-11-14(usage): Put the description of `[-n] STRING'Jim Meyering
on two lines, one for `-n STRING' and one for `STRING' so that help2man properly escapes the `-'. Otherwise, the hyphen is rendered inappropriately in UTF-8 locales.
2004-11-14(zaptemp): Mark new diagnostic for translation.Jim Meyering
2004-11-14.Jim Meyering
2004-11-13(zaptemp): Warn if a temporary file is not removed.Paul Eggert
Prune unnecessary accesses to volatile locations, and take some code out of the critical section that didn't need to be in it.
2004-11-13Make the newly-introduced critical section a bit smaller.Paul Eggert
2004-11-13Avoid O(N**2) behavior when there are many temporary files.Paul Eggert
(temptail): New variable, so that we can easily append to list. (create_temp_file): Create new files at end of list, so that searching the list has O(N**NMERGE) behavior instead of O(N**2). (zaptemp): Update temptail if needed. (mergefps, merge): Accept new arg that counts temp files, and keep it up to date as we create and remove temporaries. This is for efficiency, so that we don't call zaptemp so often. All callers changed. (sort): Don't create array in reverse order, since the list of temporaries is now in the correct order. (zaptemp): Protect against race condition: if 'sort' is interrupted in the middle of zaptemp, it might unlink the temporary file twice, and the second time this happens the file might already have been created by some other process. (create_temp_file): Use offsetof for clarity. (die): Move it up earlier, to clean up the code a bit.
2004-11-12(strtoumax): Declare if not declared.Paul Eggert
(skip_to_page, first_page_number, last_page_number, page_number, first_last_page, print_header): Use uintmax_t for page numbers. (first_last_page): Remove unnecessary forward declaration. Do not modify arg (it is now a const pointer). Return a true if successful, false (without print a diagnostic) otherwise. (main): If +XXX does not specify a valid page range, treat it as a file name. This follows the response to Open Group XCU ERN 41 <http://www.opengroup.org/sophocles/show_mail.tpl?source=L&listname=austin-group-l&id=7717>, which says the behavior is allowed. (skip_to_page): When starting page number exceeds page count, print both numbers in the diagnostic. (print_header): Detect page number overflow.
2004-11-12Sync from gnulib and regenerate.Paul Eggert
2004-11-09[__APPLE__]: Include <mach/machine.h> and <mach-o/arch.h>.Jim Meyering
(main) [__APPLE__]: Get the processor type via syscall rather than hard-coding "powerpc". From toby@opendarwin.org.
2004-11-07(merge): Remove declarations of now-unused variables.Jim Meyering
2004-11-06(first_same_file): Remove. Move most of the code to....Paul Eggert
(avoid_trashing_input): New function. (merge): Avoid some silly merges, e.g., copying a single file to a temporary file when there are exactly 17 input files to merge. Take a count of temporary files rather than a max_merge arg. All uses changed.
2004-11-06.Jim Meyering
2004-11-06(xfclose): Don't close stdout here (just flush it),Jim Meyering
since close_stdout now closes stdout unconditionally.
2004-11-05(inittables, sort_buffer_size, getmonth, mergefps,Paul Eggert
first_same_file, merge, sort, main): Use size_t for indexes into arrays. This fixes some unlikely havoc-wreaking bugs (e.g., more than INT_MAX temporary files). (getmonth, keycompare, compare): Rewrite to avoid need for alloca, thus avoiding unchecked stack overflow in some cases. As a side effect this improve the performance of "sort -M" by a factor of 4 on my benchmarks.
2004-11-04Regenerate.Paul Eggert
2004-11-03Include "vasprintf.h" since we use vasprintf now.Paul Eggert
2004-11-03(check-AUTHORS): Don't assume \? works in a sedPaul Eggert
expression; it's not portable. Problem reported by Albert Chin. Don't invoke a program more than once.
2004-11-03(version): New variable, containing author info,Paul Eggert
for benefit of AUTHORS check. Use it when acting on --version option.
2004-11-03Don't #define and #undef getopt around <stdlib.h>,Paul Eggert
as this breaks the new regime that does "#define getopt rpl_getopt".
2004-11-03quote(...) file names in diagnostics.Jim Meyering
2004-11-03Regenerate.Paul Eggert
2004-10-29 * src/tac.c (tac_file): Remove temporary prototype and move thisJim Meyering
function `down' so that it precedes definition of tac_nonseekable.
2004-10-29`tac /proc/modules' would print nothingJim Meyering
(copy_to_temp): Renamed from save_stdin, since now it copies a general file descriptor, not just stdin. (tac_nonseekable): Renamed/adapted from tac_stdin. (tac_file): Get fd via `open' directly rather than via fopen/fileno, since we never used the stream. Perform "-" to stdin mapping here rather than in main. Determine whether a file is seekable, by trying to `lseek' to its end, and dispatch to tac_seekable or tac_nonseekable accordingly. (main): Rewrite argument handling now that it uses only tac_file. Reported by Harald Dunkel in http://bugs.debian.org/278604.
2004-10-21.Jim Meyering
2004-10-21Correct my patch of 2004-10-18.Jim Meyering
(rm): Destroy the saved_cwd here (via cwd_state), if necessary, not in remove_dir. Otherwise, removing multiple `.'-relative nonempty directories no longer worked.
2004-10-20(usage): Improve description of --prefix.Paul Eggert
Problem reported by Edward Welbourne.
2004-10-18Plug a leak that would cause rm or a cross-device mv to fail whenJim Meyering
operating on too many command-line-specified nonempty directories. (remove_dir): Destroy the `struct saved_cwd' on the top of the stack before returning. This usually closes the file descriptor that was used to return to the original working directory. Reported by Cyril Bouthors in http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/3048
2004-10-18(validate_file_name): Give a more descriptiveJim Meyering
diagnostic when pathconf fails. This also avoids an unwarranted warning from gcc-3.3.5 about a format not being a string literal.
2004-10-18(main): Remove declaration of unused local, optc.Jim Meyering
2004-10-18(main): Remove declaration of unused local, opt.Jim Meyering
2004-10-18(main): Remove declaration of unused local, c.Jim Meyering
2004-10-18(AUTHORS): Add self.Paul Eggert
Change "path" to "file name" whenever possible. Remove usage comment, as it was a duplication of the code or doc. Include <wchar.h> if available. (mbrlen, mbstate_t) [! (HAVE_MBRLEN && HAVE_MBSTATE_T)]: Define. (NEED_PATHCONF_WRAPPER, PATH_MAX, PATH_MAX_FOR, NAME_MAX, pathconf_wrapper, portable_chars, dir_ok): Remove. (NAME_MAX_MINIMUM, PATH_MAX_MINIMUM): New macros. (pathconf, _PC_NAME_MAX, _PC_PATH_MAX): Define if nonexistent. (portable_chars_only): New arg FILELEN. Don't assume ASCII; we might be on an EBCDIC host. Don't assume unibyte locale in diagnostic. (component_start, component_len): New functions. (validate_file_name): Renamed from validate_path. All uses changed. Pretty much a complete rewrite. Don't make copy of file arg. Always append trailing slash to pathconf arg, just in case it's a symlink (this is pure paranoia; we don't know of any hosts where the trailing slash is required). Use size_t instead of long int when possible. Avoid need to call pathconf in most practical cases. Don't use euidaccess several times to test searchability; just use lstat once. Reword diagnostic to put the (often very long) file names last.
2004-10-15(usage): Mention Unicode, and use H for hex digits.Paul Eggert
2004-10-12Add .mpc as an audio suffix, too.Jim Meyering
2004-10-12Add .flac as an audio suffix.Jim Meyering
2004-10-05(ignore_mode): Renamed from ignore, to avoid shadowingPaul Eggert
problems. All uses changed.
2004-10-05remove trailing blanks.Jim Meyering
2004-10-05(NEW, OLD): Remove, partly to avoidPaul Eggert
reference to obsolescent macro XMALLOC. All uses replaced by xmalloc and free.