X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftar;a=blobdiff_plain;f=scripts%2Fxsparse.c;h=29ee1b194aa0bceecc2c28d5f408b855845f2b66;hp=14d5658c18a34541152a960e289e15c4490f36ba;hb=45ccda119355a1087450039a250359c1d0de0d08;hpb=a59c819beb4886ee43f16dfd80ec1151fda1abe6 diff --git a/scripts/xsparse.c b/scripts/xsparse.c index 14d5658..29ee1b1 100644 --- a/scripts/xsparse.c +++ b/scripts/xsparse.c @@ -1,23 +1,24 @@ /* xsparse - expands compressed sparse file images extracted from GNU tar archives. - Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc. + Copyright 2006-2007, 2010, 2013-2014 Free Software Foundation, Inc. - Written by Sergey Poznyakoff + This file is part of GNU tar. - 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 - version. + GNU tar 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 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General - Public License for more details. + GNU tar is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + Written by Sergey Poznyakoff */ #include #include @@ -164,7 +165,7 @@ get_var (FILE *fp, char **name, char **value) p += 11; q = strchr (p, '='); if (!q) - die (1, "malformed header: expected `=' not found"); + die (1, "malformed header: expected '=' not found"); *q++ = 0; q[strlen (q) - 1] = 0; *name = p; @@ -194,7 +195,7 @@ read_xheader (char *name) 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'", + die (1, "bad keyword sequence: expected '%s' but found '%s'", expect, kw); expect = NULL; if (strcmp (kw, "name") == 0) @@ -235,13 +236,13 @@ read_xheader (char *name) { sparse_map[i].offset = string_to_off (val, &val); if (*val != ',') - die (1, "bad GNU.sparse.map: expected `,' but found `%c'", + die (1, "bad GNU.sparse.map: expected ',' but found '%c'", *val); sparse_map[i].numbytes = string_to_off (val+1, &val); if (*val != ',') { if (!(*val == 0 && i == sparse_map_size-1)) - die (1, "bad GNU.sparse.map: expected `,' but found `%c'", + die (1, "bad GNU.sparse.map: expected ',' but found '%c'", *val); } else @@ -252,7 +253,7 @@ read_xheader (char *name) } } if (expect) - die (1, "bad keyword sequence: expected `%s' not found", expect); + die (1, "bad keyword sequence: expected '%s' not found", expect); if (version_major == 0 && sparse_map_size == 0) die (1, "size of the sparse map unknown"); if (i != sparse_map_size) @@ -449,7 +450,7 @@ main (int argc, char **argv) die (1, "cannot open file %s (%d)", outname, errno); if (verbose) - printf ("Expanding file `%s' to `%s'\n", inname, outname); + printf ("Expanding file '%s' to '%s'\n", inname, outname); if (dry_run) {