#include "common.h"
+static void xheader_init (struct xheader *xhdr);
static bool xheader_protected_pattern_p (char const *pattern);
static bool xheader_protected_keyword_p (char const *keyword);
static void xheader_set_single_keyword (char *) __attribute__ ((noreturn));
if (xhdr->stk)
{
char *name;
-
+
xheader_finish (xhdr);
xheader_write (XGLTYPE, name = xheader_ghdr_name (), time (NULL), xhdr);
free (name);
}
}
-void
+static void
xheader_init (struct xheader *xhdr)
{
if (!xhdr->stk)
{
size_t j = 0;
- xheader_init (xhdr);
size += BLOCKSIZE;
xhdr->size = size;
xhdr->buffer = xmalloc (size + 1);
if (!p)
FATAL_ERROR ((0, 0, _("Unexpected EOF in archive")));
-
+
memcpy (&xhdr->buffer[j], p->buffer, len);
set_next_block_after (p);
size_t size __attribute__((unused)))
{
uintmax_t u;
- if (decode_num (&u, arg, SIZE_MAX, keyword))
+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
{
if (st->sparse_map_avail < st->sparse_map_size)
st->sparse_map[st->sparse_map_avail++].numbytes = u;
e.numbytes = u;
if (!(u == e.numbytes && errno != ERANGE))
{
- out_of_range_header (keyword, arg, 0, TYPE_MAXIMUM (size_t));
+ out_of_range_header (keyword, arg, 0, TYPE_MAXIMUM (off_t));
return;
}
if (st->sparse_map_avail < st->sparse_map_size)