From: Paul Eggert Date: Thu, 19 Aug 2010 22:49:39 +0000 (-0700) Subject: tar: remove trailing white space from source files X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=0ab5e64ac07d5b0162bf863f4da485d26760a8eb;p=chaz%2Ftar tar: remove trailing white space from source files * ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README: * README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi: * doc/gendocs_template, doc/intern.texi, doc/mastermenu.el: * doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi: * doc/value.texi, lib/Makefile.am, scripts/backup-specs: * scripts/dump-remind.in, scripts/tar-snapshot-edit, scripts/tarcat: * scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c: * src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c: * src/tar.h, src/update.c, src/warning.c, src/xheader.c: * tests/append01.at, tests/append02.at, tests/atlocal.in: * tests/delete03.at, tests/exclude.at, tests/exclude06.at: * tests/extrac04.at, tests/extrac05.at, tests/extrac06.at: * tests/extrac07.at, tests/filerem01.at, tests/filerem02.at: * tests/incr01.at, tests/incr02.at, tests/incr03.at, tests/incr06.at: * tests/label02.at, tests/label03.at, tests/label04.at: * tests/label05.at, tests/link02.at, tests/link03.at: * tests/listed01.at, tests/listed02.at, tests/long01.at: * tests/longv7.at, tests/multiv01.at, tests/multiv02.at: * tests/multiv03.at, tests/multiv05.at, tests/multiv06.at: * tests/multiv07.at, tests/multiv08.at, tests/options.at: * tests/options02.at, tests/remfiles03.at, tests/rename01.at: * tests/rename02.at, tests/rename03.at, tests/rename04.at: * tests/rename05.at, tests/same-order01.at, tests/same-order02.at: * tests/shortfile.at, tests/shortupd.at, tests/sparse01.at: * tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at: * tests/star/README, tests/star/gtarfail2.at: * tests/star/multi-fail.at: * tests/star/pax-big-10g.at, tests/star/quicktest.sh: * tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at: * tests/update01.at, tests/update02.at, tests/volsize.at: * tests/volume.at: Remove trailing spaces and tabs from lines, and remove trailing empty lines from files. This makes it a bit easier to share code among coreutils and other projects that do this. --- diff --git a/ChangeLog.1 b/ChangeLog.1 index 726fe72..75c8814 100644 --- a/ChangeLog.1 +++ b/ChangeLog.1 @@ -1,4 +1,4 @@ -Currently there is just one ChangeLog file for tar, but +Currently there is just one ChangeLog file for tar, but there used to be separate ChangeLog files for each subdirectory. This file records what used to be in those separate files. diff --git a/ChangeLog.CVS b/ChangeLog.CVS index 41227f5..71a5965 100644 --- a/ChangeLog.CVS +++ b/ChangeLog.CVS @@ -5,7 +5,7 @@ 2009-03-04 Sergey Poznyakoff Add xz support. - + * src/buffer.c, src/suffix.c: Add support for xz compression. * src/tar.c: New option --xz, for compression/decompression using xz. Re-assign -J as a short equivalent of --xz. @@ -34,8 +34,8 @@ 2008-11-25 Sergey Poznyakoff Do not try to drain the input pipe before closing the - archive. - + archive. + * src/buffer.c (close_archive): Remove call to sys_drain_input_pipe. Pass hit_eof as the second argument to sys_wait_for_child. @@ -63,7 +63,7 @@ * src/extract.c (extract_link, extract_symlink): Remove calls to transform_member_name. It is done in read_header. * src/list.c (decode_xform): Reflect change in data type of 2nd - argument. + argument. (transform_member_name): 2nd arg is int. (decode_header): Transform file name and link target names. * src/tar.c: Remove --transform-symlinks. @@ -73,7 +73,7 @@ set global flags using `flags=' syntax. (_transform_name_to_obstack, transform_name_fp) (transform_name): Take an additional argument, specifying scope - flags. + flags. 2008-10-19 Sergey Poznyakoff @@ -86,7 +86,7 @@ * tests/sparsemvp.at: Likewise. * tests/volsize.at: Likewise. * NEWS: Update. - + 2008-10-16 Sergey Poznyakoff * src/common.h (transform_symlinks_option): New global. @@ -99,11 +99,11 @@ * doc/tar.texi: Document --transform-symlinks * NEWS: Update. * THANKS: Update. - + * src/names.c (name_gather): Use xzalloc. * src/buffer.c (short_read): Move record size detection before the loop. - + 2008-10-07 Sergey Poznyakoff * src/tar.c (options): Add --lzop option. @@ -111,7 +111,7 @@ 2008-10-05 Xavier Hienne (tiny change) * src/checkpoint.c (checkpoint_compile_action): Add missing - `else'. + `else'. 2008-09-24 Sergey Poznyakoff @@ -157,7 +157,7 @@ * tests/atlocal.in (decho): New function. * tests/multiv06.at: Use decho instead of echo2. * tests/incremental.at: Raise wait interval to 2 seconds. - + 2008-07-24 Sergey Poznyakoff * src/tar.c (decode_options): Do not allow volume length less @@ -193,21 +193,21 @@ tests/longv7.at, tests/lustar01.at, tests/lustar02.at, tests/shortfile.at: Update to match new diagnostic wording (see 2008-05-06). - + * NEWS: Update. 2008-06-14 Sergey Poznyakoff * doc/tar.texi (exclude): Document support for new VCS. * THANKS: Update. - * NEWS: Update. + * NEWS: Update. * tests/multiv05.at: Fix typos. * tests/volsize.at: Remove a TZ dependency. - + 2008-06-14 Dan Drake (tiny change) * src/tar.c (exclude_vcs_files): Support for Bazaar, Mercurial and - Darcs. + Darcs. 2008-05-06 Sergey Poznyakoff @@ -231,23 +231,23 @@ * tests/incr03.at, tests/incr04.at, tests/rename02.at, tests/rename03.at: Insert calls to sleep between creation of files and adding them to the archive. - + 2008-03-31 Sergey Poznyakoff * src/create.c (dump_file0): Count links only for actually dumped - files. + files. 2008-03-27 Sergey Poznyakoff * NEWS: Document --no-check-device and --check-device. * doc/rendition.texi: Change the way FIXME-*refs are handled in - !PROOF. + !PROOF. * doc/intern.texi, doc/tar.texi: Update. * doc/untabify.el: New file. * doc/Makefile.am (EXTRA_DIST): Add untabify.el (untabify, final, check-format, check-refs, check-fixmes) (check-unrevised, all-check-docs, check-docs): New rules. - + * src/common.h (check_device_option): New global. * src/incremen.c (procdir): Use boolean and instead of bitwise one. Patch by Jean-Louis Martineau. @@ -256,7 +256,7 @@ --check-device. Proposed by Jean-Louis Martineau. (parse_opt): Hanlde new options. (decode_options): Initialize check_device_option to true. - + * THANKS: Update 2008-03-06 Sergey Poznyakoff @@ -267,7 +267,7 @@ * po/.cvsignore: Update * src/system.c: Remove include setenv.h. * tests/atlocal.in (STAR_DATA_URL): Update. - * tests/star/README: Update URL. + * tests/star/README: Update URL. 2008-02-09 Sergey Poznyakoff @@ -303,7 +303,7 @@ Exit with nonzero status if a close fails on an archive. Problem (and initial trivial fix) * src/buffer.c (close_archive, new_volume): close_error, not - close_warn. + close_warn. 2007-12-05 Sergey Poznyakoff diff --git a/Makefile.am b/Makefile.am index df8ea4c..af332d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,7 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = ChangeLog.1 Make.rules SUBDIRS = doc gnu lib rmt src scripts po tests -dist-hook: +dist-hook: $(MAKE) changelog_dir=$(distdir) ChangeLog -rm -f $(distdir).cpio find $(distdir) | cpio -Hcrc -o | \ @@ -36,5 +36,3 @@ include Make.rules gen_start_date = 2009-03-06 prev_change_log = ChangeLog.CVS changelog_dir = . - - diff --git a/NEWS b/NEWS index a84873d..d6712d0 100644 --- a/NEWS +++ b/NEWS @@ -46,12 +46,12 @@ update of an archive: tar -rf archive --label 'My volume' . -This did not work in previous versions, in spite of what the docs said. +This did not work in previous versions, in spite of what the docs said. ** --record-size and --tape-length (-L) options Usual size suffixes are allowed for these options. For example, --L10k stands for a 10 kilobyte tape length. +-L10k stands for a 10 kilobyte tape length. ** Fix dead loop on extracting existing symlinks with the -k option. @@ -134,7 +134,7 @@ the Epoch or a `Time reference' (see below). * Time references in --pax-option argument. Any value from the --pax-option argument that is enclosed in a pair -of curly braces represents a time reference. The string between the +of curly braces represents a time reference. The string between the braces is understood either as a textual time representation, as described in chapter 7, "Date input formats", of the Tar manual, or as a name of an existing file, starting with `/' or `.'. In the latter @@ -168,14 +168,14 @@ version 1.22 - Sergey Poznyakoff, 2009-03-05 * Support for xz compression -Tar uses xz for compression if one of the following conditions is met: +Tar uses xz for compression if one of the following conditions is met: 1. The option --xz or -J (see below) is used. 2. The xz binary is set as compressor using --use-compress-program option. 3. The file name of the archive being created ends in `.xz' and auto-compress option (-a) is used. -Xz is used for decompression if one of the following conditions is met: +Xz is used for decompression if one of the following conditions is met: 1. The option --xz or -J is used. 2. The xz binary is set as compressor using --use-compress-program option. @@ -228,7 +228,7 @@ control type of archive members affected by them. The flags are: - s Apply transformation to symbolic link targets. - - h + - h Apply transformation to hard link targets. Corresponding upper-case letters negate the meaning, so that @@ -307,7 +307,7 @@ during both creation and extraction. Tar 1.19 used them only during extraction. For a detailed description, see chapter 6.7 "Modifying File and Member -Names". +Names". * Info (end-of-volume) scripts @@ -334,8 +334,8 @@ control systems, e.g. "CVS/", ".svn/", etc. The following options now work with incremental archives as well: - --exclude-caches - --exclude-caches-all + --exclude-caches + --exclude-caches-all --exclude-tag --exclude-tag-all --exclude-tag-under @@ -346,7 +346,7 @@ Previous versions always stored absolute file names in rename records, even if -P was not used. This is fixed: rename records contain file names processed in accordance with the command line settings. - + * Fix --version output. * Recognition of broken archives. diff --git a/README b/README index f07050c..bf65e82 100644 --- a/README +++ b/README @@ -180,19 +180,19 @@ the `lchown' call will be used if available, but that's all. GNU `tar' is able to create archive in the following formats: *** The format of UNIX version 7 - *** POSIX.1-1988 format, also known as "ustar format" + *** POSIX.1-1988 format, also known as "ustar format" *** POSIX.1-2001 format, also known as "pax format" *** Old GNU format (described below) In addition to those, GNU `tar' is also able to read archives -produced by `star' archiver. +produced by `star' archiver. A so called `Old GNU' format is based on an early draft of the POSIX 1003.1 `ustar' standard which is different from the final standard. It defines its extensions (such as incremental backups and handling of the long file names) in a way incompatible with any existing tar archive format, therefore the use of old GNU -format is strongly discouraged. +format is strongly discouraged. Please read the file NEWS for more information about POSIX compliance and new `tar' features. @@ -248,4 +248,3 @@ mode: outline paragraph-separate: "[ ]*$" version-control: never End: - diff --git a/README-hacking b/README-hacking index c2b543a..35e4a30 100644 --- a/README-hacking +++ b/README-hacking @@ -6,20 +6,20 @@ this package. You need the following packages to build the Git version of GNU tar. We do not make any efforts to accommodate older versions of these packages, so please make sure that you have the latest stable -version. +version. - Automake - Autoconf - M4 - Texinfo -- Gnulib +- Gnulib - Git * Bootstrapping Obviously, if you are reading these notes, you did manage to clone tar from Git. The next step is to get other files needed to build, -which are extracted from other source packages: +which are extracted from other source packages: 1. Change to the source tree directory @@ -27,7 +27,7 @@ which are extracted from other source packages: 2. Run - ./bootstrap + ./bootstrap Once done, proceed as described in the file README (section INSTALLATION). @@ -43,7 +43,7 @@ contents: Replace `$HOME/gnulib' with the actual directory where the Gnulib sources reside. - + For more information about `bootstrap', run `bootstrap --help'. @@ -67,5 +67,3 @@ mode: outline paragraph-separate: "[ ^L]*$" version-control: never End: - - diff --git a/directory b/directory index 69451b7..94bdf8f 100644 --- a/directory +++ b/directory @@ -65,7 +65,7 @@ programs (using pipes); tar can even access remote devices or files %%contributors: Jay Fenlason, Joy Kendall, Francois Pinard - + %%source-tarball: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.15.1.tar.gz %%source-info: http://savannah.gnu.org/projects/tar @@ -84,4 +84,3 @@ programs (using pipes); tar can even access remote devices or files %%bug-list: bug-tar@gnu.org bug-tar@gnu.org http://mail.gnu.org/mailman/listinfo/bug-tar %%entry-written-by: Sergey Poznyakoff - diff --git a/doc/Makefile.am b/doc/Makefile.am index ec771ca..1a4bccf 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -124,7 +124,7 @@ check-unrevised: all-check-docs: check-format check-options check-refs check-fixmes check-unrevised -check-docs: +check-docs: $(MAKE) -k all-check-docs # @@ -144,4 +144,3 @@ manual: MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \ TEXI2DVI="$(TEXI2DVI) -t @finalout" \ $(GENDOCS) --texi2html tar 'GNU tar manual' - diff --git a/doc/dumpdir.texi b/doc/dumpdir.texi index faf9ca2..7af3ba7 100644 --- a/doc/dumpdir.texi +++ b/doc/dumpdir.texi @@ -16,7 +16,7 @@ dumped directory in special data blocks called @dfn{dumpdirs}. @noindent where @var{C} is one of the @dfn{control codes} described below, @var{filename} is the name of the file @var{C} operates upon, and -@samp{\0} represents a nul character (ASCII 0). The white space +@samp{\0} represents a nul character (ASCII 0). The white space characters were added for readability, real dumpdirs do not contain them. @@ -68,7 +68,7 @@ directory}. For example, consider the following scenario: @enumerate 1 @item Previous run dumped a directory @file{foo} which contained the -following three directories: +following three directories: @smallexample a @@ -93,7 +93,7 @@ New incremental dump was made. renaming @file{a} to @file{b} will destroy the existing directory. To correctly process it, @GNUTAR{} needs a temporary directory, so it creates the following dumpdir (newlines have been added for -readability): +readability): @smallexample @group @@ -114,7 +114,7 @@ work as usual, and, finally, the last command, @samp{R\0Tfoo/a\0} tells tar to rename the temporary directory to @file{foo/a}. The exact placement of a dumpdir in the archive depends on the -archive format (@pxref{Formats}): +archive format (@pxref{Formats}): @itemize @item PAX archives diff --git a/doc/gendocs_template b/doc/gendocs_template index 2f989ed..1bdd5b0 100755 --- a/doc/gendocs_template +++ b/doc/gendocs_template @@ -36,7 +36,7 @@

The manual for %%PACKAGE%% is available in the following formats:

    -
  • HTML +
  • HTML (%%HTML_MONO_SIZE%%K bytes) - entirely on one web page.
  • HTML - with one web page per node.
  • @@ -49,7 +49,7 @@ chapter. %%ENDIF HTML_CHAPTER%%
  • HTML compressed - (%%HTML_MONO_GZ_SIZE%%K gzipped characters) - entirely on + (%%HTML_MONO_GZ_SIZE%%K gzipped characters) - entirely on one web page.
  • HTML compressed (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file) - @@ -96,9 +96,9 @@ Return to the GNU Project home page.

    -Please send FSF & GNU inquiries to +Please send FSF & GNU inquiries to gnu@gnu.org. -There are also other ways to contact +There are also other ways to contact the FSF.
    Please send broken links and other corrections (or suggestions) to diff --git a/doc/intern.texi b/doc/intern.texi index 3580a7b..7a918c4 100644 --- a/doc/intern.texi +++ b/doc/intern.texi @@ -107,10 +107,10 @@ group permission could be copied from the @emph{other} permission. The @code{uid} and @code{gid} fields are the numeric user and group @acronym{ID} of the file owners, respectively. If the operating system does not support numeric user or group @acronym{ID}s, these fields should -be ignored. +be ignored. The @code{size} field is the size of the file in bytes; linked files -are archived with this field specified as zero. +are archived with this field specified as zero. The @code{mtime} field is the data modification time of the file at the time it was archived. It is the ASCII representation of the octal @@ -330,4 +330,3 @@ checksum error. @node Dumpdir @unnumberedsec Dumpdir @include dumpdir.texi - diff --git a/doc/mastermenu.el b/doc/mastermenu.el index 5f1dbe1..db8c631 100644 --- a/doc/mastermenu.el +++ b/doc/mastermenu.el @@ -27,11 +27,11 @@ ;; This file redefines texinfo-master-menu-list so that it takes into ;; account included files. -;; Known bugs: @menu without previous sectioning command will inherit +;; Known bugs: @menu without previous sectioning command will inherit ;; documentation string from the previous menu. However, since such a ;; menu is illegal in a texinfo file, we can live with it. -(require 'texinfo) +(require 'texinfo) (require 'texnfo-upd) (defun texinfo-master-menu-list-recursive (title) diff --git a/doc/snapshot.texi b/doc/snapshot.texi index 656fd18..5607a08 100644 --- a/doc/snapshot.texi +++ b/doc/snapshot.texi @@ -137,4 +137,3 @@ previous versions it is not quoted; @end enumerate @c End of snapshot.texi - diff --git a/doc/sparse.texi b/doc/sparse.texi index d48375c..bd8f75f 100644 --- a/doc/sparse.texi +++ b/doc/sparse.texi @@ -232,4 +232,3 @@ into a separate directory. Then, using a simple program it would be possible to expand the file to its original form even without @GNUTAR{}. @xref{Sparse Recovery}, for the detailed information on how to extract sparse members without @GNUTAR{}. - diff --git a/doc/tar-snapshot-edit.texi b/doc/tar-snapshot-edit.texi index 9c930ef..ed9640c 100644 --- a/doc/tar-snapshot-edit.texi +++ b/doc/tar-snapshot-edit.texi @@ -55,4 +55,3 @@ file version 2 $ @kbd{tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a} file version 2 @end smallexample - diff --git a/doc/value.texi b/doc/value.texi index e80311f..d7cd620 100644 --- a/doc/value.texi +++ b/doc/value.texi @@ -18,5 +18,3 @@ @end ifclear @xopindex{\option\, summary} @end macro - - diff --git a/lib/Makefile.am b/lib/Makefile.am index 4bfee8b..5380128 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -26,7 +26,7 @@ rmt-command.h : Makefile $(AM_V_at)mv $@-t $@ BUILT_SOURCES = rmt-command.h CLEANFILES = rmt-command.h rmt-command.h-t -INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu +INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu noinst_HEADERS = system.h system-ioctl.h rmt.h paxlib.h stdopen.h libtar_a_SOURCES = \ @@ -36,4 +36,3 @@ libtar_a_SOURCES = \ rmt.h \ stdopen.c stdopen.h \ system.h system-ioctl.h - diff --git a/scripts/backup-specs b/scripts/backup-specs index 47d4f16..ae8df8a 100644 --- a/scripts/backup-specs +++ b/scripts/backup-specs @@ -65,9 +65,9 @@ XLIST=exclude_files SLEEP_TIME=15 # Script to be run when it's time to insert a new tape in for the next -# volume. Administrators may want to tailor this script for their site. +# volume. Administrators may want to tailor this script for their site. # If this variable isn't set, tar will use some default behavior which is -# probably defined in the manual. +# probably defined in the manual. #DUMP_REMIND_SCRIPT='rsh apple-gunkies /home/gd2/dump/dump-remind' # Message to display on the terminal while waiting for dump time. Usually @@ -75,7 +75,7 @@ SLEEP_TIME=15 # entertaining than this. The awk script here saves some redundant # repetition, but is not really all that desirable. SLEEP_MESSAGE="`awk ' - BEGIN { + BEGIN { for (i = 0; i < 30; i++) print \" \" \ \"D O N O T T O U C H T H I S T E R M I N A L !!!!!\" diff --git a/scripts/dump-remind.in b/scripts/dump-remind.in index 0b95f4b..a3f013f 100644 --- a/scripts/dump-remind.in +++ b/scripts/dump-remind.in @@ -2,14 +2,14 @@ # This file is included in the GNU tar distribution as an example. It is # not used by default unless the proper line is uncommented in backup-specs. # System administrators will probably want to customize this and -# backup-specs for their site. +# backup-specs for their site. # # This script should be run by tar with --info-script (-F) to inform # interested parties that a tape for the next volume of the backup needs to -# be put in the tape drive. +# be put in the tape drive. # -# Include location of `sendmail' and GNU finger. +# Include location of `sendmail' and GNU finger. PATH="/usr/lib:/usr/local/gnubin:${PATH}" export PATH @@ -27,7 +27,7 @@ MT_OFFLINE # # Certain users (like `root') aren't real users, and shouldn't be notified. # Neither should `zippy', `elvis', etc. (on the GNU machines) since they're -# just test accounts. +# just test accounts. recipients="` finger .clients 2> /dev/null \ | sed -ne ' @@ -69,8 +69,8 @@ Cc: ${ADMINISTRATOR} Subject: Backup needs new tape for volume ${TAR_VOLUME} Reply-To: ${ADMINISTRATOR} -This is an automated report from the backup script running on -`hostname`. +This is an automated report from the backup script running on +`hostname`. Volume ${TAR_VOLUME} of the backup needs to be put in the tape drive. Usually whoever prepared the backup leaves labeled tapes on top of the @@ -92,8 +92,8 @@ Cc: ${ADMINISTRATOR} Subject: Volume ${TAR_VOLUME} for backup has been added Reply-To: ${ADMINISTRATOR} -This is an automated report from the backup script running on -`hostname`. +This is an automated report from the backup script running on +`hostname`. The backup has been continued, so for now no further attention is required. __EOF__ diff --git a/scripts/tar-snapshot-edit b/scripts/tar-snapshot-edit index 1fae773..a54902f 100755 --- a/scripts/tar-snapshot-edit +++ b/scripts/tar-snapshot-edit @@ -211,7 +211,7 @@ sub write_incr_db ($$) { sub write_incr_db_0 ($$) { my $info = shift; my $file = shift; - + my $timestamp_sec = $info->[1]; print $file "$timestamp_sec\n"; @@ -226,7 +226,7 @@ sub write_incr_db_0 ($$) { sub write_incr_db_1 ($$) { my $info = shift; my $file = shift; - + print $file "GNU tar-1.15-1\n"; my $timestamp_sec = $info->[1]; @@ -246,7 +246,7 @@ sub write_incr_db_1 ($$) { sub write_incr_db_2 ($$) { my $info = shift; my $file = shift; - + print $file "GNU tar-1.16-2\n"; my $timestamp_sec = $info->[1]; diff --git a/scripts/tarcat b/scripts/tarcat index 5c2671a..2690664 100755 --- a/scripts/tarcat +++ b/scripts/tarcat @@ -35,8 +35,7 @@ do fi if [ "$T" = "M" ]; then SKIP=$(($SKIP + 1)) - fi + fi fi - dd skip=$SKIP if="$f" + dd skip=$SKIP if="$f" done - diff --git a/scripts/xsparse.c b/scripts/xsparse.c index 7fd31d9..fd91b48 100644 --- a/scripts/xsparse.c +++ b/scripts/xsparse.c @@ -4,7 +4,7 @@ Copyright (C) 2006, 2007 Free Software Foundation, Inc. Written by Sergey Poznyakoff - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later @@ -129,12 +129,12 @@ get_var (FILE *fp, char **name, char **value) static char *buffer; static size_t bufsize = OFF_T_STRSIZE_BOUND; char *p, *q; - + buffer = emalloc (bufsize); do { size_t len, s; - + if (!fgets (buffer, bufsize, fp)) return 0; len = strlen (buffer); @@ -186,12 +186,12 @@ read_xheader (char *name) if (verbose) printf ("Reading extended header file\n"); - + while (get_var (fp, &kw, &val)) { if (verbose) printf ("Found variable GNU.sparse.%s = %s\n", kw, val); - + if (expect && strcmp (kw, expect)) die (1, "bad keyword sequence: expected `%s' but found `%s'", expect, kw); @@ -267,7 +267,7 @@ read_map (FILE *ifp) if (verbose) printf ("Reading v.1.0 sparse map\n"); - + get_line (nbuf, sizeof nbuf, ifp); sparse_map_size = string_to_size (nbuf, NULL); sparse_map = emalloc (sparse_map_size * sizeof *sparse_map); @@ -282,7 +282,7 @@ read_map (FILE *ifp) fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE, SEEK_SET); -} +} void expand_sparse (FILE *sfp, int ofd) @@ -294,11 +294,11 @@ expand_sparse (FILE *sfp, int ofd) for (i = 0; i < sparse_map_size; i++) if (maxbytes < sparse_map[i].numbytes) maxbytes = sparse_map[i].numbytes; - + for (buffer = malloc (maxbytes); !buffer; maxbytes /= 2) if (maxbytes == 0) die (1, "not enough memory"); - + for (i = 0; i < sparse_map_size; i++) { size_t size = sparse_map[i].numbytes; @@ -342,13 +342,13 @@ guess_outname (char *name) { char *p; char *s; - + if (name[0] == '.' && name[1] == '/') name += 2; p = name + strlen (name) - 1; s = NULL; - + for (; p > name && *p != '/'; p--) ; if (*p == '/') @@ -358,7 +358,7 @@ guess_outname (char *name) for (p--; p > name && *p != '/'; p--) ; } - + if (*p != '/') { if (s) @@ -389,7 +389,7 @@ main (int argc, char **argv) FILE *ifp; struct stat st; int ofd; - + progname = argv[0]; while ((c = getopt (argc, argv, "hnvx:")) != EOF) { @@ -408,7 +408,7 @@ main (int argc, char **argv) case 'v': verbose++; break; - + default: exit (1); } @@ -429,17 +429,17 @@ main (int argc, char **argv) if (stat (inname, &st)) die (1, "cannot stat %s (%d)", inname, errno); - + ifp = fopen (inname, "r"); if (ifp == NULL) die (1, "cannot open file %s (%d)", inname, errno); - + if (!xheader_file || version_major == 1) read_map (ifp); if (!outname) guess_outname (inname); - + ofd = open (outname, O_RDWR|O_CREAT|O_TRUNC, st.st_mode); if (ofd == -1) die (1, "cannot open file %s (%d)", outname, errno); @@ -452,7 +452,7 @@ main (int argc, char **argv) printf ("Finished dry run\n"); return 0; } - + expand_sparse (ifp, ofd); fclose (ifp); @@ -460,7 +460,7 @@ main (int argc, char **argv) if (verbose) printf ("Done\n"); - + if (outsize) { if (stat (outname, &st)) @@ -468,7 +468,6 @@ main (int argc, char **argv) if (st.st_size != outsize) die (1, "expanded file has wrong size"); } - + return 0; } - diff --git a/src/arith.h b/src/arith.h index bcd1c0a..a2abfe8 100644 --- a/src/arith.h +++ b/src/arith.h @@ -22,6 +22,6 @@ blocked in 1 kB boundaries. We'll need arbitrary precision arithmetic anyway once we get into the 2**64 range, so there's no point doing anything fancy before then. */ - + #define TARLONG_FORMAT "%.0f" typedef double tarlong; diff --git a/src/buffer.c b/src/buffer.c index 07b11ab..c66b08c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -76,7 +76,7 @@ static bool read_full_records = false; /* We're reading, but we just read the last block and it's time to update. Declared in update.c - + FIXME: Either eliminate it or move it to common.h. */ extern bool time_to_start_writing; @@ -152,7 +152,7 @@ static struct bufmap * bufmap_locate (size_t off) { struct bufmap *map; - + for (map = bufmap_head; map; map = map->next) { if (!map->next @@ -576,7 +576,7 @@ _open_archive (enum access_mode wanted_access) FATAL_ERROR ((0, 0, _("No archive name given"))); tar_stat_destroy (¤t_stat_info); - + record_index = 0; init_buffer (); @@ -749,7 +749,7 @@ _flush_write (void) map = map->next; bufmap_reset (map, map ? (- map->start) : 0); } - } + } return status; } @@ -1771,7 +1771,7 @@ _gnu_flush_write (size_t buffer_level) size_t copy_size; size_t bufsize; struct bufmap *map; - + status = _flush_write (); if (status != record_size && !multi_volume_option) archive_write_error (status); @@ -1788,7 +1788,7 @@ _gnu_flush_write (size_t buffer_level) } map = bufmap_locate (status); - + if (status % BLOCKSIZE) { ERROR ((0, 0, _("write did not end on a block boundary"))); @@ -1811,13 +1811,13 @@ _gnu_flush_write (size_t buffer_level) copy_ptr = record_start->buffer + status; copy_size = buffer_level - status; - + /* Switch to the next buffer */ record_index = !record_index; init_buffer (); inhibit_map = 1; - + if (volume_label_option) add_volume_label (); diff --git a/src/compare.c b/src/compare.c index ffadc24..2a314da 100644 --- a/src/compare.c +++ b/src/compare.c @@ -331,7 +331,7 @@ static int dumpdir_cmp (const char *a, const char *b) { size_t len; - + while (*a) switch (*a) { @@ -345,7 +345,7 @@ dumpdir_cmp (const char *a, const char *b) a += len; b += len; break; - + case 'D': if (strcmp(a, b)) return 1; @@ -353,7 +353,7 @@ dumpdir_cmp (const char *a, const char *b) a += len; b += len; break; - + case 'R': case 'T': case 'X': @@ -577,8 +577,8 @@ verify_volume (void) flush_read (); while (1) { - enum read_header status = read_header (¤t_header, - ¤t_stat_info, + enum read_header status = read_header (¤t_header, + ¤t_stat_info, read_header_auto); if (status == HEADER_FAILURE) @@ -608,7 +608,7 @@ verify_volume (void) { char buf[UINTMAX_STRSIZE_BOUND]; - status = read_header (¤t_header, ¤t_stat_info, + status = read_header (¤t_header, ¤t_stat_info, read_header_auto); if (status == HEADER_ZERO_BLOCK) break; @@ -617,7 +617,7 @@ verify_volume (void) STRINGIFY_BIGINT (current_block_ordinal (), buf))); } } - + diff_archive (); tar_stat_destroy (¤t_stat_info); } diff --git a/src/create.c b/src/create.c index f526b33..6777f9c 100644 --- a/src/create.c +++ b/src/create.c @@ -71,7 +71,7 @@ exclusion_tag_warning (const char *dirname, const char *tagname, message)); } -enum exclusion_tag_type +enum exclusion_tag_type check_exclusion_tags (const char *dirname, const char **tag_file_name) { static char *tagname; @@ -80,7 +80,7 @@ check_exclusion_tags (const char *dirname, const char **tag_file_name) size_t dlen = strlen (dirname); int addslash = !ISSLASH (dirname[dlen-1]); size_t noff = 0; - + for (tag = exclusion_tags; tag; tag = tag->next) { size_t size = dlen + addslash + tag->length + 1; @@ -263,7 +263,7 @@ to_chars_subst (int negative, int gnu_format, uintmax_t value, size_t valsize, 1. In OLDGNU_FORMAT all strings in a tar header end in \0 2. Incremental archives use oldgnu_header. - + Apart from this they are completely identical. */ uintmax_t s = (negsub &= archive_format == GNU_FORMAT) ? - sub : sub; char subbuf[UINTMAX_STRSIZE_BOUND + 1]; @@ -618,7 +618,7 @@ write_ustar_long_name (const char *name) size_t length = strlen (name); size_t i, nlen; union block *header; - + if (length > PREFIX_FIELD_SIZE + NAME_FIELD_SIZE + 1) { ERROR ((0, 0, _("%s: file name is too long (max %d); not dumped"), @@ -713,7 +713,7 @@ write_extended (bool global, struct tar_stat_info *st, union block *old_header) char *p; int type; time_t t; - + if (st->xhdr.buffer || st->xhdr.stk == NULL) return old_header; @@ -1041,7 +1041,7 @@ dump_regular_file (int fd, struct tar_stat_info *st) while (size_left > 0) { size_t bufsize, count; - + blk = find_next_block (); bufsize = available_space_after (blk); @@ -1077,7 +1077,7 @@ dump_regular_file (int fd, struct tar_stat_info *st) size_left), quotearg_colon (st->orig_file_name), STRINGIFY_BIGINT (size_left, buf))); - if (! ignore_failed_read_option) + if (! ignore_failed_read_option) set_exit_status (TAREXIT_DIFFERS); pad_archive (size_left - (bufsize - count)); return dump_status_short; @@ -1126,7 +1126,7 @@ dump_dir0 (char *directory, size_t bufsize; ssize_t count; const char *buffer, *p_buffer; - + block_ordinal = current_block_ordinal (); buffer = safe_directory_contents (gnu_list_name->directory); totsize = dumpdir_size (buffer); @@ -1134,7 +1134,7 @@ dump_dir0 (char *directory, finish_header (st, blk, block_ordinal); p_buffer = buffer; size_left = totsize; - + mv_begin_write (st->file_name, totsize, totsize); while (size_left > 0) { @@ -1173,13 +1173,13 @@ dump_dir0 (char *directory, { char *name_buf; size_t name_size; - + switch (check_exclusion_tags (st->orig_file_name, &tag_file_name)) { case exclusion_tag_all: /* Handled in dump_file0 */ break; - + case exclusion_tag_none: { char const *entry; @@ -1203,7 +1203,7 @@ dump_dir0 (char *directory, if (!excluded_name (name_buf)) dump_file (name_buf, false, our_device); } - + free (name_buf); } break; @@ -1218,7 +1218,7 @@ dump_dir0 (char *directory, dump_file (name_buf, false, our_device); free (name_buf); break; - + case exclusion_tag_under: exclusion_tag_warning (st->orig_file_name, tag_file_name, _("contents not dumped")); @@ -1427,7 +1427,7 @@ file_count_links (struct tar_stat_info *st) assign_string (&linkname, st->orig_file_name); transform_name (&linkname, XFORM_LINK); - + lp = xmalloc (offsetof (struct link, name) + strlen (linkname) + 1); lp->ino = st->stat.st_ino; @@ -1435,13 +1435,13 @@ file_count_links (struct tar_stat_info *st) lp->nlink = st->stat.st_nlink; strcpy (lp->name, linkname); free (linkname); - + if (! ((link_table || (link_table = hash_initialize (0, 0, hash_link, compare_links, 0))) && (duplicate = hash_insert (link_table, lp)))) xalloc_die (); - + if (duplicate != lp) abort (); lp->nlink--; @@ -1523,10 +1523,10 @@ dump_file0 (struct tar_stat_info *st, const char *p, /* See if we want only new files, and check if this one is too old to put in the archive. - + This check is omitted if incremental_option is set *and* the requested file is not explicitely listed in the command line. */ - + if (!(incremental_option && !is_individual_file (p)) && !S_ISDIR (st->stat.st_mode) && OLDER_TAR_STAT_TIME (*st, m) @@ -1589,7 +1589,7 @@ dump_file0 (struct tar_stat_info *st, const char *p, close (fd); return; } - + ok = dump_dir (fd, st, top_level, parent_device); /* dump_dir consumes FD if successful. */ diff --git a/src/delete.c b/src/delete.c index 75dc01f..a0a6d67 100644 --- a/src/delete.c +++ b/src/delete.c @@ -262,7 +262,7 @@ delete_archive_members (void) if (current_block == record_end) flush_archive (); - status = read_header (¤t_header, ¤t_stat_info, + status = read_header (¤t_header, ¤t_stat_info, read_header_auto); xheader_decode (¤t_stat_info); @@ -296,7 +296,7 @@ delete_archive_members (void) set_next_block_after (current_header); blocks_to_skip = (current_stat_info.stat.st_size + BLOCKSIZE - 1) / BLOCKSIZE; - + while (record_end - current_block <= blocks_to_skip) { blocks_to_skip -= (record_end - current_block); diff --git a/src/exit.c b/src/exit.c index ad4d27c..d1ddaf9 100644 --- a/src/exit.c +++ b/src/exit.c @@ -1,4 +1,4 @@ -/* This file is part of GNU tar. +/* This file is part of GNU tar. Copyright (C) 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it diff --git a/src/suffix.c b/src/suffix.c index 23868c9..a46b087 100644 --- a/src/suffix.c +++ b/src/suffix.c @@ -27,7 +27,7 @@ struct compression_suffix }; static struct compression_suffix compression_suffixes[] = { -#define __CAT2__(a,b) a ## b +#define __CAT2__(a,b) a ## b #define S(s,p) #s, sizeof (#s) - 1, __CAT2__(p,_PROGRAM) { S(gz, GZIP) }, { S(tgz, GZIP) }, @@ -54,7 +54,7 @@ static const char * find_compression_program (const char *name, const char *defprog) { char *suf = strrchr (name, '.'); - + if (suf) { int i; @@ -80,4 +80,3 @@ set_comression_program_by_suffix (const char *name, const char *defprog) if (program) use_compress_program_option = program; } - diff --git a/src/tar.c b/src/tar.c index 10ba8a9..dcc3116 100644 --- a/src/tar.c +++ b/src/tar.c @@ -1509,7 +1509,7 @@ parse_opt (int key, char *arg, struct argp_state *state) { uintmax_t u; char *p; - + if (xstrtoumax (arg, &p, 10, &u, TAR_SIZE_SUFFIXES) != LONGINT_OK) USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg), _("Invalid tape length"))); @@ -1968,7 +1968,7 @@ parse_opt (int key, char *arg, struct argp_state *state) case RECORD_SIZE_OPTION: { uintmax_t u; - + if (! (xstrtoumax (arg, NULL, 10, &u, TAR_SIZE_SUFFIXES) == LONGINT_OK && u == (size_t) u)) USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg), diff --git a/src/tar.h b/src/tar.h index 7f72f3e..08ccab3 100644 --- a/src/tar.h +++ b/src/tar.h @@ -311,7 +311,7 @@ struct tar_stat_info /* Extended headers */ struct xheader xhdr; - + /* For dumpdirs */ bool is_dumpdir; /* Is the member a dumpdir? */ bool skipped; /* The member contents is already read diff --git a/src/update.c b/src/update.c index b015175..d00e8d6 100644 --- a/src/update.c +++ b/src/update.c @@ -114,8 +114,8 @@ update_archive (void) while (!found_end) { - enum read_header status = read_header (¤t_header, - ¤t_stat_info, + enum read_header status = read_header (¤t_header, + ¤t_stat_info, read_header_auto); switch (status) @@ -150,14 +150,14 @@ update_archive (void) else { namebuf_t nbuf = namebuf_create (name->name); - + for (p = dirp; *p; p += strlen (p) + 1) addname (namebuf_name (nbuf, p), 0, false, NULL); - + namebuf_free (nbuf); free (dirp); - + remname (name); } } @@ -167,7 +167,7 @@ update_archive (void) remname (name); } } - + skip_member (); break; } diff --git a/src/warning.c b/src/warning.c index a9cbccb..4374a88 100644 --- a/src/warning.c +++ b/src/warning.c @@ -76,7 +76,7 @@ set_warning_option (const char *arg) { int negate = 0; int option; - + if (strcmp (arg, "none") == 0) { warning_option = 0; @@ -88,11 +88,10 @@ set_warning_option (const char *arg) arg += 3; } - option = XARGMATCH ("--warning", arg, + option = XARGMATCH ("--warning", arg, warning_args, warning_types); if (negate) warning_option &= ~option; else warning_option |= option; } - diff --git a/src/xheader.c b/src/xheader.c index b5c9869..311e775 100644 --- a/src/xheader.c +++ b/src/xheader.c @@ -452,7 +452,7 @@ xheader_write_global (struct xheader *xhdr) if (xhdr->stk) { char *name; - + xheader_finish (xhdr); xheader_write (XGLTYPE, name = xheader_ghdr_name (), time (NULL), xhdr); free (name); @@ -708,7 +708,7 @@ xheader_read (struct xheader *xhdr, union block *p, size_t size) if (!p) FATAL_ERROR ((0, 0, _("Unexpected EOF in archive"))); - + memcpy (&xhdr->buffer[j], p->buffer, len); set_next_block_after (p); diff --git a/tests/append01.at b/tests/append01.at index 18348e1..2dc2108 100644 --- a/tests/append01.at +++ b/tests/append01.at @@ -21,11 +21,11 @@ # When decoding a header tar was assigning 0 to oldgnu_header.isextended, # which destroyed name prefix. When updating archive, modified prefix # could have been written to disk thus producing invalid archive member. -# Reported by Adye, TJ (Tim), +# Reported by Adye, TJ (Tim), # References: # <7231C15EAC2F164CA6DC326D97493C8B36C25D@exchange35.fed.cclrc.ac.uk> # http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00032.html - + AT_SETUP([appending files with long names]) AT_KEYWORDS([append append01]) @@ -45,4 +45,3 @@ PREFIX/file2 [],[],[],[oldgnu, ustar, posix, gnu]) AT_CLEANUP - diff --git a/tests/append02.at b/tests/append02.at index 7b8e07d..869f8a5 100644 --- a/tests/append02.at +++ b/tests/append02.at @@ -20,7 +20,7 @@ # Using tar 1.15.x the following equivalent command sets: # -# 1. tar cf archive file1 file2 +# 1. tar cf archive file1 file2 # and # 2. tar cfT archive /dev/null # tar rf archive file1 @@ -62,7 +62,7 @@ genfile --file file2 MTIME="--mtime=@0" # For PAX archives, we need to make sure extended header names are -# reproducible and that their contents won't change with time +# reproducible and that their contents won't change with time if test $[]TEST_TAR_FORMAT = posix; then TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime" fi diff --git a/tests/atlocal.in b/tests/atlocal.in index 5eaaab6..12591e3 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -16,17 +16,17 @@ fi STAR_DATA_URL=ftp://ftp.berlios.de/pub/star/testscripts if test -z "$STAR_TESTSCRIPTS"; then STAR_TESTSCRIPTS=$TEST_DATA_DIR -fi +fi # tarball_prereq file sum dir url tarball_prereq() { - if test -d "$3"; then + if test -d "$3"; then if test -r $3/$1; then : elif test -n "$FULL_TEST"; then wget -q --directory-prefix=$3 $4/$1 fi - fi + fi echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1 } @@ -34,4 +34,3 @@ decho() { echo $* echo >&2 $* } - diff --git a/tests/delete03.at b/tests/delete03.at index d2823b7..70fa3a9 100644 --- a/tests/delete03.at +++ b/tests/delete03.at @@ -31,8 +31,8 @@ for i in 1 2 3 4 5 6 7 8 9 do touch $prefix$i done tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive + tar --delete -f archive ./${prefix}5 && + tar -tf archive ], [0], [./PREFIX[]1 diff --git a/tests/exclude.at b/tests/exclude.at index 689aa11..7fe92a4 100644 --- a/tests/exclude.at +++ b/tests/exclude.at @@ -36,7 +36,7 @@ mkdir dir/rock echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG echo "test" > dir/rock/file -for option in exclude-caches exclude-caches-under exclude-caches-all +for option in exclude-caches exclude-caches-under exclude-caches-all do echo OPTION $option tar -cf archive.tar --$option -v dir 2>err | sort @@ -45,7 +45,7 @@ do tar tf archive.tar | sort done -for option in exclude-tag exclude-tag-under exclude-tag-all +for option in exclude-tag exclude-tag-under exclude-tag-all do echo OPTION $option tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort diff --git a/tests/exclude06.at b/tests/exclude06.at index f7ab141..3fef892 100644 --- a/tests/exclude06.at +++ b/tests/exclude06.at @@ -19,7 +19,7 @@ # # Reported-by: Matthew Peterson # References: -# http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html +# http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html AT_SETUP([exclude: long files in pax archives]) AT_KEYWORDS([exclude exclude06]) diff --git a/tests/extrac04.at b/tests/extrac04.at index 49a199e..05cb658 100644 --- a/tests/extrac04.at +++ b/tests/extrac04.at @@ -36,7 +36,7 @@ tar -cf archive ./file1 directory tar -tf archive \ --exclude='./*1' \ --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort + --exclude='d*/s*/*2' | sort ], [0], [directory/ diff --git a/tests/extrac05.at b/tests/extrac05.at index 82c2ed3..3e0e986 100644 --- a/tests/extrac05.at +++ b/tests/extrac05.at @@ -30,13 +30,13 @@ AT_SETUP([extracting selected members from pax]) AT_KEYWORDS([extract extract05]) -AT_DATA([list], +AT_DATA([list], [jeden cztery ]) AT_TAR_CHECK([ -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST +genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST genfile --length 118 --file jeden genfile --length 223 --file dwa genfile --length 517 --file trzy diff --git a/tests/extrac06.at b/tests/extrac06.at index 9f3fdb9..d7e807d 100644 --- a/tests/extrac06.at +++ b/tests/extrac06.at @@ -23,7 +23,7 @@ # permissions than your umask. In this case, the permissions of the # existing directory will toggle between the version which complies with # your umask (which would be correct, without -p) and the version from the -# tarfile. +# tarfile. # # Reported by: Ian Jackson # @@ -41,7 +41,7 @@ umask 022 # Make sure user's umask is honored, even if we are superuser TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -# Create a directory +# Create a directory mkdir directory chmod 777 directory genfile --stat=mode:777 directory diff --git a/tests/extrac07.at b/tests/extrac07.at index abfb2b2..920175c 100644 --- a/tests/extrac07.at +++ b/tests/extrac07.at @@ -55,5 +55,3 @@ dir/foo [],[],[],[ustar]) # Testing one format is enough AT_CLEANUP - - diff --git a/tests/filerem01.at b/tests/filerem01.at index 70f47bf..a2561d7 100644 --- a/tests/filerem01.at +++ b/tests/filerem01.at @@ -26,7 +26,7 @@ # instead. # # Reported by: Solar Designer -# +# # References: <20090228235820.GA13362@openwall.com> # http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html # @@ -98,4 +98,3 @@ tar: dir/file1: File removed before we read it AT_CLEANUP - diff --git a/tests/filerem02.at b/tests/filerem02.at index 8d7005a..2390298 100644 --- a/tests/filerem02.at +++ b/tests/filerem02.at @@ -47,4 +47,3 @@ tar: Exiting with failure status due to previous errors # Timing information: see filerem01.at AT_CLEANUP - diff --git a/tests/incr01.at b/tests/incr01.at index 8f0be14..ce2d047 100644 --- a/tests/incr01.at +++ b/tests/incr01.at @@ -51,5 +51,3 @@ tar: Deleting `directory/bar' [],[],[],[gnu, oldgnu, posix]) AT_CLEANUP - - diff --git a/tests/incr02.at b/tests/incr02.at index c054253..38b78a5 100644 --- a/tests/incr02.at +++ b/tests/incr02.at @@ -23,9 +23,9 @@ # if the archive has normal member ordering, i.e. each directory # member is immediately followed by members located under that directory. # This is not true for incremental archives, where directory members -# precede the non-directory ones. Due to this, GNU tar up to version 1.15.2 +# precede the non-directory ones. Due to this, GNU tar up to version 1.15.2 # failed to correctly restore directory timestamps from an incremental -# archive if this directory contained some files in it. +# archive if this directory contained some files in it. # # References: <200511291228.47081.karaman@dssgmbh.de> diff --git a/tests/incr03.at b/tests/incr03.at index 673191e..113793a 100644 --- a/tests/incr03.at +++ b/tests/incr03.at @@ -45,9 +45,9 @@ tar -cf archive.2 -g db directory mv directory orig echo Listing of archive.1 -tar -tf archive.1 | sort +tar -tf archive.1 | sort echo Listing of archive.2 -tar -tf archive.2 | sort +tar -tf archive.2 | sort echo Directory after first restore tar -xf archive.1 -g db @@ -55,7 +55,7 @@ find directory | sort echo Directory after second restore tar -xf archive.2 -g db -find directory | sort +find directory | sort ], [0], [Listing of archive.1 @@ -78,4 +78,3 @@ directory/z AT_CLEANUP # End of incr03.at - diff --git a/tests/incr06.at b/tests/incr06.at index 7efd3f2..d63a260 100644 --- a/tests/incr06.at +++ b/tests/incr06.at @@ -75,5 +75,3 @@ sub/b/file4 ],[],[],[],[gnu, oldgnu, posix]) AT_CLEANUP - - diff --git a/tests/label02.at b/tests/label02.at index 3aa5ce7..7d1246f 100644 --- a/tests/label02.at +++ b/tests/label02.at @@ -25,7 +25,7 @@ genfile --length 0 --file foo genfile --length 12288 --file bar genfile --length 12288 --file baz tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz -tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar ], [0], [Test Volume 1 diff --git a/tests/label03.at b/tests/label03.at index 71a422f..81b0992 100644 --- a/tests/label03.at +++ b/tests/label03.at @@ -85,5 +85,3 @@ tar: Archive label mismatch ],[],[],[gnu,oldgnu,posix]) AT_CLEANUP - - diff --git a/tests/label04.at b/tests/label04.at index e551502..fc3aa26 100644 --- a/tests/label04.at +++ b/tests/label04.at @@ -49,5 +49,3 @@ tar: Error is not recoverable: exiting now ],[],[],[gnu,oldgnu,posix]) AT_CLEANUP - - diff --git a/tests/label05.at b/tests/label05.at index 5f8cffc..5b968a1 100644 --- a/tests/label05.at +++ b/tests/label05.at @@ -46,5 +46,3 @@ tar: Error is not recoverable: exiting now ],[],[],[gnu,oldgnu,posix]) AT_CLEANUP - - diff --git a/tests/link02.at b/tests/link02.at index a557de0..320a86e 100644 --- a/tests/link02.at +++ b/tests/link02.at @@ -49,4 +49,3 @@ file1 AT_CLEANUP # End of link02.at - diff --git a/tests/link03.at b/tests/link03.at index b3f42b1..30272bf 100644 --- a/tests/link03.at +++ b/tests/link03.at @@ -52,5 +52,3 @@ file1 ]) AT_CLEANUP - - diff --git a/tests/listed01.at b/tests/listed01.at index 5884f8c..cb5b841 100644 --- a/tests/listed01.at +++ b/tests/listed01.at @@ -60,4 +60,3 @@ directory/file2 [],[],[],[gnu, oldgnu]) AT_CLEANUP - diff --git a/tests/listed02.at b/tests/listed02.at index 2f1f070..94a339c 100644 --- a/tests/listed02.at +++ b/tests/listed02.at @@ -19,9 +19,9 @@ # 02110-1301, USA. # Check if listed-incremental backups work for files moved from one directory -# to another. +# to another. # Based on a script by Martin Simmons -# References: +# References: # <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com> # http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html @@ -69,7 +69,7 @@ sleep 1 echo Creating incremental archive echo >&2 "Creating incremental archive" cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 sleep 1 @@ -81,7 +81,7 @@ echo Extracting incremental archive # This command should produce three messages about deletion # of the existing files, that may appear in any order. Piping # to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null echo Final files: find tart -print | sort 2>/dev/null diff --git a/tests/long01.at b/tests/long01.at index d01195e..f57be11 100644 --- a/tests/long01.at +++ b/tests/long01.at @@ -18,7 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. -# In GNU format, when extracting or listing a file member with a name +# In GNU format, when extracting or listing a file member with a name # whose length is divisible by block size (512) tar used to read an # extra block of data. In consequence the following file was not extracted. # Reported by Josef Bauer @@ -46,4 +46,3 @@ endfile [],[],[],[gnu,oldgnu]) AT_CLEANUP - diff --git a/tests/longv7.at b/tests/longv7.at index 9f03744..a17d663 100644 --- a/tests/longv7.at +++ b/tests/longv7.at @@ -45,4 +45,3 @@ tar: Exiting with failure status due to previous errors [],[],[v7]) AT_CLEANUP - diff --git a/tests/multiv01.at b/tests/multiv01.at index 2b39558..de75da1 100644 --- a/tests/multiv01.at +++ b/tests/multiv01.at @@ -61,5 +61,3 @@ cmp file2 extract-dir-pipe/file2 [],[],[],[],[gnu, oldgnu, pax]) AT_CLEANUP - - diff --git a/tests/multiv02.at b/tests/multiv02.at index 88eb92a..7dfee1a 100644 --- a/tests/multiv02.at +++ b/tests/multiv02.at @@ -21,8 +21,8 @@ # Previous versions of tar were not able to skip a member straddling # the multivolume archive boundary. Reported by Mads Martin Joergensen # -# -# References: <20040402144254.GC4409@suse.de> +# +# References: <20040402144254.GC4409@suse.de> # http://lists.gnu.org/archive/html/bug-tar/2004-04/msg00002.html AT_SETUP([skipping a straddling member]) diff --git a/tests/multiv03.at b/tests/multiv03.at index 27d0a28..aa4274f 100644 --- a/tests/multiv03.at +++ b/tests/multiv03.at @@ -25,7 +25,7 @@ # References: <20040809214854.GB32706@suse.de> # http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html # <200604270859.47241.Juergen.Vollmer@informatik-vollmer.de> -# +# AT_SETUP([MV archive & long filenames]) AT_KEYWORDS([multivolume multiv multiv03]) @@ -68,4 +68,3 @@ cmp $BFILE bfile [],[],[gnu, oldgnu]) AT_CLEANUP - diff --git a/tests/multiv05.at b/tests/multiv05.at index 2e5b74c..9d963c7 100644 --- a/tests/multiv05.at +++ b/tests/multiv05.at @@ -40,7 +40,7 @@ tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f ) echo separator mkdir bak mv m4_foreach([f],[FILELIST],f )bak -tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar +tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar m4_foreach([f], [FILELIST], [echo Diffing f @@ -62,6 +62,3 @@ m4_foreach([file], ],[],[], [gnu]) AT_CLEANUP - - - diff --git a/tests/multiv06.at b/tests/multiv06.at index 9665299..97cefbf 100644 --- a/tests/multiv06.at +++ b/tests/multiv06.at @@ -49,4 +49,3 @@ Testing archive [gnu, pax]) AT_CLEANUP - diff --git a/tests/multiv07.at b/tests/multiv07.at index fc3e82d..9a40f7b 100644 --- a/tests/multiv07.at +++ b/tests/multiv07.at @@ -15,7 +15,7 @@ # along with this program. If not, see . # Description: When creating POSIX multivolume archives, tar may in -# some cases write an extended header at the end of one volume, and +# some cases write an extended header at the end of one volume, and # the corresponding ustar header at the beginning of the next volume. # Such archives do not fully comply with the POSIX specs, but tar must # be able to read them anyway. This is what this script tests. diff --git a/tests/multiv08.at b/tests/multiv08.at index 7f4f38e..c7bfb9d 100644 --- a/tests/multiv08.at +++ b/tests/multiv08.at @@ -46,6 +46,3 @@ Testing [gnu]) AT_CLEANUP - - - diff --git a/tests/options.at b/tests/options.at index 8428f64..e682f69 100644 --- a/tests/options.at +++ b/tests/options.at @@ -34,4 +34,3 @@ tar tf archive ]) AT_CLEANUP - diff --git a/tests/options02.at b/tests/options02.at index bec145f..d4cc285 100644 --- a/tests/options02.at +++ b/tests/options02.at @@ -36,4 +36,3 @@ tar tf archive ]) AT_CLEANUP - diff --git a/tests/remfiles03.at b/tests/remfiles03.at index 02104e9..85d76a8 100644 --- a/tests/remfiles03.at +++ b/tests/remfiles03.at @@ -41,5 +41,3 @@ genfile --stat a ]) AT_CLEANUP - - diff --git a/tests/rename01.at b/tests/rename01.at index 30d1350..e62e89d 100644 --- a/tests/rename01.at +++ b/tests/rename01.at @@ -19,7 +19,7 @@ # 02110-1301, USA. # Description: Test basic handling of renamed directory in the incremental -# archives. +# archives. AT_SETUP([renamed dirs in incrementals]) AT_KEYWORDS([incremental rename rename01]) @@ -46,7 +46,7 @@ mv foo old tar xfg arch.1 /dev/null echo "Begin directory listing 1" -find foo | sort +find foo | sort echo "End directory listing 1" tar xfg arch.2 /dev/null diff --git a/tests/rename02.at b/tests/rename02.at index d20f2b0..6cadee3 100644 --- a/tests/rename02.at +++ b/tests/rename02.at @@ -19,7 +19,7 @@ # 02110-1301, USA. # Description: Incremental archives should be able to handle directories -# moved between directory hierarchies. +# moved between directory hierarchies. AT_SETUP([move between hierarchies]) AT_KEYWORDS([incremental rename rename02]) @@ -50,7 +50,7 @@ tar xfg arch.1 /dev/null 2>tmperr sort tmperr >&2 echo "Begin directory listing 1" -find foo | sort +find foo | sort echo "End directory listing 1" tar xfgv arch.2 /dev/null diff --git a/tests/rename03.at b/tests/rename03.at index c79df8b..6dec2e2 100644 --- a/tests/rename03.at +++ b/tests/rename03.at @@ -58,10 +58,10 @@ echo "Second dump" >&2 tar -g incr -cf arch.2 -v foo 2>tmperr sort tmperr >&2 -tar xfg arch.1 /dev/null +tar xfg arch.1 /dev/null echo "Begin directory listing 1" -find foo | sort +find foo | sort echo "End directory listing 1" tar xfgv arch.2 /dev/null diff --git a/tests/rename04.at b/tests/rename04.at index 3e9eb1a..ac593de 100644 --- a/tests/rename04.at +++ b/tests/rename04.at @@ -79,5 +79,3 @@ Second restore AT_CLEANUP # End of rename04.at - - diff --git a/tests/rename05.at b/tests/rename05.at index 3ad93a6..26d9202 100644 --- a/tests/rename05.at +++ b/tests/rename05.at @@ -77,5 +77,3 @@ Second restore AT_CLEANUP # End of rename05.at - - diff --git a/tests/same-order01.at b/tests/same-order01.at index d339dfa..a0fd4bf 100644 --- a/tests/same-order01.at +++ b/tests/same-order01.at @@ -36,7 +36,7 @@ tar cf archive file1 file2 mkdir directory tar -xf archive --same-order -C directory || exit 1 -ls directory|sort +ls directory|sort ], [0], [file1 @@ -44,4 +44,3 @@ file2 ]) AT_CLEANUP - diff --git a/tests/same-order02.at b/tests/same-order02.at index e3f7b34..9538295 100644 --- a/tests/same-order02.at +++ b/tests/same-order02.at @@ -19,7 +19,7 @@ # 02110-1301, USA. # In previous versions a single -C option did not work with --same-order -# (see same-order01.sh). However, multiple -C options worked OK. +# (see same-order01.sh). However, multiple -C options worked OK. # Test if we did not break the correct behavior. AT_SETUP([multiple -C options]) diff --git a/tests/shortfile.at b/tests/shortfile.at index 1c0b4dc..261f42f 100644 --- a/tests/shortfile.at +++ b/tests/shortfile.at @@ -38,4 +38,3 @@ tar: Exiting with failure status due to previous errors [],[],[gnu]) AT_CLEANUP - diff --git a/tests/shortupd.at b/tests/shortupd.at index 33f3570..a2bbd13 100644 --- a/tests/shortupd.at +++ b/tests/shortupd.at @@ -36,4 +36,3 @@ tar uf archive foo [0]) AT_CLEANUP - diff --git a/tests/sparse01.at b/tests/sparse01.at index 465031f..f7a6994 100644 --- a/tests/sparse01.at +++ b/tests/sparse01.at @@ -49,4 +49,3 @@ sparsefile 10344448 ]) AT_CLEANUP - diff --git a/tests/sparse02.at b/tests/sparse02.at index bd0016d..9e7ce8a 100644 --- a/tests/sparse02.at +++ b/tests/sparse02.at @@ -23,7 +23,7 @@ AT_KEYWORDS([sparse sparse02]) # Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe. # References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us> -# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html +# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html AT_TAR_CHECK([ genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST diff --git a/tests/sparsemv.at b/tests/sparsemv.at index 81da613..6549083 100644 --- a/tests/sparsemv.at +++ b/tests/sparsemv.at @@ -35,7 +35,7 @@ echo "Pass 1: Split between data blocks" echo "Create archive" tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 +tar --record-size=512 -t -M -f arc.1 -f arc.2 echo "Compare archive" tar --record-size=512 -d -M -f arc.1 -f arc.2 @@ -44,7 +44,7 @@ genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || AT_SKIP_TEST echo "Create archive" tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 +tar --record-size=512 -t -M -f arc.1 -f arc.2 echo "Compare archive" tar --record-size=512 -d -M -f arc.1 -f arc.2 ], diff --git a/tests/sparsemvp.at b/tests/sparsemvp.at index 1ab8bf1..729f542 100644 --- a/tests/sparsemvp.at +++ b/tests/sparsemvp.at @@ -29,7 +29,7 @@ exec <&- genfile --sparse --file sparsefile $2 || AT_SKIP_TEST echo "Pass 1: Split between data blocks" echo "Create archive" -tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile echo "Test archive" tar -t -M -f arc.1 -f arc.2 -f arc.3 echo "Compare archive" @@ -38,7 +38,7 @@ tar -d -M -f arc.1 -f arc.2 -f arc.3 echo "Pass 2: Split within a data block" genfile --sparse --file sparsefile $3 || AT_SKIP_TEST echo "Create archive" -tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile echo "Test archive" tar -t -M -f arc.1 -f arc.2 -f arc.3 echo "Compare archive" @@ -57,4 +57,3 @@ sparsefile Compare archive ], [],[],[],[pax])]) - diff --git a/tests/star/README b/tests/star/README index e247ff4..2b96aa6 100644 --- a/tests/star/README +++ b/tests/star/README @@ -10,14 +10,14 @@ STAR_TESTSCRIPTS to point to the directory where they reside, for example: make STAR_TESTSCRIPTS=testdir check -or +or make TESTS_ENVIRONMENT='STAR_TESTSCRIPTS=testdir' check The file `quicktest.sh' is a separate test. It is never executed within `make check' command, you will need to run it manually. Please, carefully read section `quicktest.sh' below before running it. - + Following is a short description of the tests: * gtarfail.at and gtarfail2.at @@ -30,7 +30,7 @@ by previous versions of GNU tar. Requires gnu-multi-fail-volume1.gtar and gnu-multi-fail-volume2.gtar. These are two parts of a multi-volume archive that previous versions -of tar refused to read (at least, without -B option). +of tar refused to read (at least, without -B option). * ustar-big-2g.at diff --git a/tests/star/gtarfail2.at b/tests/star/gtarfail2.at index c0ce544..f00b767 100644 --- a/tests/star/gtarfail2.at +++ b/tests/star/gtarfail2.at @@ -41,5 +41,3 @@ lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../li ]) AT_CLEANUP - - diff --git a/tests/star/multi-fail.at b/tests/star/multi-fail.at index 2b351d1..ebf7717 100644 --- a/tests/star/multi-fail.at +++ b/tests/star/multi-fail.at @@ -86,4 +86,3 @@ tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \ ]) AT_CLEANUP - diff --git a/tests/star/pax-big-10g.at b/tests/star/pax-big-10g.at index f37d2f0..732d0fa 100644 --- a/tests/star/pax-big-10g.at +++ b/tests/star/pax-big-10g.at @@ -39,5 +39,3 @@ RE_CHECK([stderr],[tar: Record size = .* ]) AT_CLEANUP - - diff --git a/tests/star/quicktest.sh b/tests/star/quicktest.sh index 01b8e12..cbc6511 100755 --- a/tests/star/quicktest.sh +++ b/tests/star/quicktest.sh @@ -57,7 +57,7 @@ test_access() { echo "$1 does not exist or is unreadable" echo 77 fi -} +} check_environ() { if [ "$STAR_TESTSCRIPTS" = "" ]; then @@ -70,12 +70,12 @@ check_environ() { else echo "STAR_TESTSCRIPTS is not a directory" exit 77 - fi + fi ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar test_access $ARCHIVE FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist - test_access $FILELIST + test_access $FILELIST ${TARTEST:-tartest} < /dev/null > /dev/null 2>&1 if [ $? -eq 127 ]; then @@ -93,7 +93,7 @@ getargs() { *) echo "Unknown option: $option" >&2 exit 77;; esac - done + done } if [ -w / ]; then diff --git a/tests/star/ustar-big-2g.at b/tests/star/ustar-big-2g.at index a5bee73..1609d1b 100644 --- a/tests/star/ustar-big-2g.at +++ b/tests/star/ustar-big-2g.at @@ -39,4 +39,3 @@ RE_CHECK([stderr],[tar: Record size = .* ]) AT_CLEANUP - diff --git a/tests/star/ustar-big-8g.at b/tests/star/ustar-big-8g.at index 49a05c0..d1ecbcd 100644 --- a/tests/star/ustar-big-8g.at +++ b/tests/star/ustar-big-8g.at @@ -39,4 +39,3 @@ RE_CHECK([stderr],[tar: Record size = .* ]) AT_CLEANUP - diff --git a/tests/update01.at b/tests/update01.at index 161b06f..374b971 100644 --- a/tests/update01.at +++ b/tests/update01.at @@ -55,4 +55,3 @@ a/c ]) AT_CLEANUP - diff --git a/tests/update02.at b/tests/update02.at index 40f90b9..09b7f0b 100644 --- a/tests/update02.at +++ b/tests/update02.at @@ -52,4 +52,3 @@ a/b ]) AT_CLEANUP - diff --git a/tests/volsize.at b/tests/volsize.at index 74ba28b..282e03a 100644 --- a/tests/volsize.at +++ b/tests/volsize.at @@ -57,5 +57,3 @@ abc/CCC AT_CLEANUP # End of volsize.at - - diff --git a/tests/volume.at b/tests/volume.at index 30b405f..87a910b 100644 --- a/tests/volume.at +++ b/tests/volume.at @@ -55,4 +55,3 @@ tar: Error is not recoverable: exiting now [],[],[gnu, oldgnu]) AT_CLEANUP -