mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-06 00:06:54 +00:00
Update FSF postal mail address.
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@
|
||||
|
||||
## 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
## 02110-1301, USA.
|
||||
|
||||
bin_PROGRAMS = tar
|
||||
|
||||
|
||||
+13
-109
@@ -1,5 +1,5 @@
|
||||
/* Simple arithmetic for numbers greater than a long int, for GNU tar.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Long integers, for GNU tar.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
@@ -13,111 +13,15 @@
|
||||
|
||||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Also, see comments at beginning of arith.c. */
|
||||
|
||||
#define BITS_PER_BYTE 8 /* number of bits in each sizeof unit */
|
||||
#define BITS_PER_TARLONG 42 /* wanted number of bits in each tarlong */
|
||||
|
||||
/* In all cases, tarlong is the proper type for a big number.
|
||||
|
||||
For simulated arithmetic, SUPERDIGIT is the base, TARLONG_FORMAT is the
|
||||
format to print a single super-digit filled with zeroes to the left, and
|
||||
BITS_PER_SUPERDIGIT is the smallest number of bits required to fully
|
||||
represent each super-digit. LONGS_PER_TARLONG says how many longs are
|
||||
required for a full tarlong, and SIZEOF_TARLONG is the size of a tarlong
|
||||
in bytes.
|
||||
|
||||
For straight compiler arithmetic, SUPERDIGIT is zero and TARLONG_FORMAT
|
||||
is the format to directly print a tarlong (without zero-filling).
|
||||
|
||||
The values of SIZEOF_LONG_LONG and SIZEOF_UNSIGNED_LONG, below, are
|
||||
obtained through the configuration process. */
|
||||
|
||||
#if BITS_PER_BYTE * SIZEOF_UNSIGNED_LONG >= BITS_PER_TARLONG
|
||||
# define SUPERDIGIT 0
|
||||
# define TARLONG_FORMAT "%uld"
|
||||
typedef unsigned long tarlong;
|
||||
#else
|
||||
# if BITS_PER_BYTE * SIZEOF_LONG_LONG >= BITS_PER_TARLONG + 1
|
||||
# define SUPERDIGIT 0
|
||||
# define TARLONG_FORMAT "%lld"
|
||||
typedef long long tarlong;
|
||||
# else
|
||||
# if BITS_PER_BYTE * SIZEOF_UNSIGNED_LONG >= 64
|
||||
# define SUPERDIGIT 1000000000L
|
||||
# define BITS_PER_SUPERDIGIT 29
|
||||
# define TARLONG_FORMAT "%09uld"
|
||||
# else
|
||||
# if BITS_PER_BYTE * SIZEOF_UNSIGNED_LONG >= 32
|
||||
# define SUPERDIGIT 10000L
|
||||
# define BITS_PER_SUPERDIGIT 14
|
||||
# define TARLONG_FORMAT "%04uld"
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if SUPERDIGIT
|
||||
|
||||
# define LONGS_PER_TARLONG \
|
||||
((BITS_PER_TARLONG + BITS_PER_SUPERDIGIT - 1) / BITS_PER_SUPERDIGIT)
|
||||
# define SIZEOF_TARLONG (LONGS_PER_TARLONG * sizeof (unsigned long))
|
||||
|
||||
/* The NEC EWS 4.2 C compiler gets confused by a pointer to a typedef that
|
||||
is an array. So we wrap the array into a struct. (Pouah!) */
|
||||
|
||||
struct tarlong
|
||||
{
|
||||
unsigned long digit[LONGS_PER_TARLONG];
|
||||
};
|
||||
|
||||
typedef struct tarlong tarlong;
|
||||
|
||||
int zerop_tarlong_helper PARAMS ((unsigned long *));
|
||||
int lessp_tarlong_helper PARAMS ((unsigned long *, unsigned long *));
|
||||
void clear_tarlong_helper PARAMS ((unsigned long *));
|
||||
void add_to_tarlong_helper PARAMS ((unsigned long *, int));
|
||||
void mult_tarlong_helper PARAMS ((unsigned long *, int));
|
||||
void print_tarlong_helper PARAMS ((unsigned long *, FILE *));
|
||||
|
||||
# define zerop_tarlong(Accumulator) \
|
||||
zerop_tarlong_helper (&(Accumulator).digit[0])
|
||||
|
||||
# define lessp_tarlong(First, Second) \
|
||||
lessp_tarlong_helper (&(First).digit[0], &(Second).digit[0])
|
||||
|
||||
# define clear_tarlong(Accumulator) \
|
||||
clear_tarlong_helper (&(Accumulator).digit[0])
|
||||
|
||||
# define add_to_tarlong(Accumulator, Value) \
|
||||
add_to_tarlong_helper (&(Accumulator).digit[0], (Value))
|
||||
|
||||
# define mult_tarlong(Accumulator, Value) \
|
||||
mult_tarlong_helper (&(Accumulator).digit[0], (Value))
|
||||
|
||||
# define print_tarlong(Accumulator, File) \
|
||||
print_tarlong_helper (&(Accumulator).digit[0], (File))
|
||||
|
||||
#else /* not SUPERDIGIT */
|
||||
|
||||
# define zerop_tarlong(Accumulator) \
|
||||
((Accumulator) == 0)
|
||||
|
||||
# define lessp_tarlong(First, Second) \
|
||||
((First) < (Second))
|
||||
|
||||
# define clear_tarlong(Accumulator) \
|
||||
((Accumulator) = 0)
|
||||
|
||||
# define add_to_tarlong(Accumulator, Value) \
|
||||
((Accumulator) += (Value))
|
||||
|
||||
# define mult_tarlong(Accumulator, Value) \
|
||||
((Accumulator) *= (Value))
|
||||
|
||||
# define print_tarlong(Accumulator, File) \
|
||||
(fprintf ((File), TARLONG_FORMAT, (Accumulator)))
|
||||
|
||||
#endif /* not SUPERDIGIT */
|
||||
/* Handle large integers for calculating big tape lengths and the
|
||||
like. In practice, double precision does for now. On the vast
|
||||
majority of machines, it counts up to 2**52 bytes without any loss
|
||||
of information, and counts up to 2**62 bytes if data are always
|
||||
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;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Declare the GNU tar archive format. */
|
||||
#include "tar.h"
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <quotearg.h>
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <getline.h>
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Define to non-zero for forcing old ctime format instead of ISO format. */
|
||||
#undef USE_OLD_CTIME
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include "common.h"
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <rmt.h>
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <quotearg.h>
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
@@ -634,8 +634,8 @@ for complete list of authors.\n"));
|
||||
" GNU General Public License for more details.\n"
|
||||
"\n"
|
||||
" You should have received a copy of the GNU General Public License\n"
|
||||
" along with GNU tar; if not, write to the Free Software\n"
|
||||
" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n"));
|
||||
" along with GNU tar; if not, write to the Free Software Foundation,\n"
|
||||
" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\n\n"));
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* tar Header Block, from POSIX 1003.1-1990. */
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Implement the 'r', 'u' and 'A' options for tar. 'A' means that the
|
||||
file names are tar files, and they should simply be appended to the end
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <quotearg.h>
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
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.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user