\f
char *volume_label;
char *continued_file_name;
-uintmax_t continued_file_size;
-uintmax_t continued_file_offset;
+off_t continued_file_size;
+off_t continued_file_offset;
\f
static int volno = 1; /* which volume of a multi-volume tape we're
tar_stat_destroy (&dummy);
ASSIGN_STRING_N (&continued_file_name, current_header->header.name);
continued_file_size =
- UINTMAX_FROM_HEADER (current_header->header.size);
+ OFF_FROM_HEADER (current_header->header.size);
continued_file_offset =
- UINTMAX_FROM_HEADER (current_header->oldgnu_header.offset);
+ OFF_FROM_HEADER (current_header->oldgnu_header.offset);
break;
default:
}
}
- uintmax_t s;
+ off_t s;
if (ckd_add (&s, continued_file_size, continued_file_offset)
|| s != bufmap_head->sizetotal)
{
- paxwarn (0, _("%s is the wrong size (%jd != %ju + %ju)"),
+ paxwarn (0, _("%s is the wrong size (%jd != %jd + %jd)"),
quote (continued_file_name),
intmax (bufmap_head->sizetotal),
- uintmax (continued_file_size),
- uintmax (continued_file_offset));
+ intmax (continued_file_size),
+ intmax (continued_file_offset));
return false;
}
if (bufmap_head->sizetotal - bufmap_head->sizeleft
!= continued_file_offset)
{
- paxwarn (0, _("This volume is out of sequence (%jd - %jd != %ju)"),
+ paxwarn (0, _("This volume is out of sequence (%jd - %jd != %jd)"),
intmax (bufmap_head->sizetotal),
intmax (bufmap_head->sizeleft),
- uintmax (continued_file_offset));
+ intmax (continued_file_offset));
return false;
}
}
extern bool write_archive_to_stdout;
extern char *volume_label;
extern char *continued_file_name;
-extern uintmax_t continued_file_size;
-extern uintmax_t continued_file_offset;
+extern off_t continued_file_size;
+extern off_t continued_file_offset;
extern off_t records_written;
extern union block *record_start;
extern union block *record_end;
char const *tartime (struct timespec t, bool full_time);
#define OFF_FROM_HEADER(where) off_from_header (where, sizeof (where))
-#define UINTMAX_FROM_HEADER(where) uintmax_from_header (where, sizeof (where))
-
off_t off_from_header (const char *buf, idx_t size);
-uintmax_t uintmax_from_header (const char *buf, idx_t size);
void list_archive (void);
void test_archive_label (void);
false, false);
}
-uintmax_t
-uintmax_from_header (const char *p, idx_t s)
-{
- return from_header (p, s, "uintmax_t", 0, UINTMAX_MAX, false, false);
-}
-
/* Return a printable representation of T. The result points to
static storage that can be reused in the next call to this
break;
case GNUTYPE_MULTIVOL:
- fprintf (stdlis, _("--Continued at byte %ju--\n"),
- UINTMAX_FROM_HEADER (blk->oldgnu_header.offset));
+ fprintf (stdlis, _("--Continued at byte %jd--\n"),
+ intmax (OFF_FROM_HEADER (blk->oldgnu_header.offset)));
break;
}
}
char const *arg, MAYBE_UNUSED idx_t size)
{
uintmax_t u;
- if (decode_num (&u, arg, TYPE_MAXIMUM (uintmax_t), keyword))
+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
continued_file_size = u;
}
char const *arg, MAYBE_UNUSED idx_t size)
{
uintmax_t u;
- if (decode_num (&u, arg, TYPE_MAXIMUM (uintmax_t), keyword))
+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
continued_file_offset = u;
}