summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar/util.c
Commit message (Collapse)AuthorAgeFilesLines
* A very minor tweak to the handling of leading '/' characters.kientzle2005-04-171-1/+6
|
* Support path-rewriting options (including --strip-components) for bothkientzle2005-04-171-0/+53
| | | | | | extraction and creation. While I'm here, fix a bug reported by Garrett Wollman: when stripping the leading '/' from the path "/", don't produce an entry with an empty name; produce "." instead.
* Move the smart chdir logic into a couple of utility functions in util.c.kientzle2004-08-081-0/+58
| | | | | Then use them to provide consistent -C support throughout the program. Thanks to: Christoph Mallon
* A bunch of style and security fixes (error checking return values, etc),kientzle2004-07-251-2/+4
| | | | mostly from: Tim J Robbins
* Augment the -T handling:kientzle2004-06-271-0/+86
| | | | | | | | | | | | * Add --null option (sort #defines here) * Add process_lines function to util.c that reads newline-terminated or null-terminated lines (with self-sizing buffers, etc) and iteratively invokes a provided function. Use this to dramatically simplify: -T handling for -c, --exclude-from-file, and --include-from-file. * Add -T handling to -x (via include_from_file) Hopefully, this will fix the openoffice port and a couple of others that rely on -T and --null.
* Pointy hat: sticky bit 't' or 'T' is shown over IXOTH bit, not IXGRP. <sigh>kientzle2004-06-031-1/+1
|
* Speed up safe_fprintf by copying to a temp buffer, then writingkientzle2004-05-171-13/+32
| | | | blocks at a time, rather than using putc().
* Propagate struct bsdtar down into a lot more places.kientzle2004-05-171-16/+8
| | | | Move global progname variable into struct bsdtar.
* Contrariwise, Linux sys/stat.h doesn't define mode_t and friends,kientzle2004-05-041-0/+1
| | | | even though POSIX requires it. <sigh>
* For portability, don't rely on libc's strmode(3). <sigh>kientzle2004-05-031-0/+51
|
* As suggested by Julian Elischer, use a self-sizing hashkientzle2004-04-151-15/+21
| | | | | | | | table for the hardlink cache. This dramatically improves performance when archiving millions of hardlinked files. While I'm here, clean up some style bugs (per Bruce Evans) and clarify some comments.
* Eliminate a lot of malloc/free calls by usingkientzle2004-04-131-4/+11
| | | | | a stack-allocated buffer for safe_fprintf formatting. Only if the result is too large do we resort to malloc.
* Initial commit for bsdtar.kientzle2004-04-051-0/+160
OpenPOWER on IntegriCloud