{
char const *keyword;
void (*coder) (struct tar_stat_info const *, char const *,
- struct xheader *, void *data);
+ struct xheader *, void const *data);
void (*decoder) (struct tar_stat_info *, char const *, size_t);
bool protect;
};
void
xheader_string_end (char const *keyword)
-{
+{
size_t len;
size_t p;
size_t n = 0;
if (extended_header.buffer)
return;
extended_header_init ();
-
+
len = strlen (keyword) + string_length + 3; /* ' ' + '=' + '\n' */
-
+
do
{
p = n;
dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)),
char const *keyword __attribute__ ((unused)),
struct xheader *xhdr __attribute__ ((unused)),
- void *data __attribute__ ((unused)))
+ void const *data __attribute__ ((unused)))
{
}
static void
atime_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_time (st->atime, keyword, xhdr);
}
static void
gid_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_num (st->stat.st_gid, keyword, xhdr);
}
static void
gname_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_string (st->gname, keyword, xhdr);
}
static void
linkpath_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_string (st->link_name, keyword, xhdr);
}
static void
ctime_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_time (st->ctime, keyword, xhdr);
}
static void
mtime_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_time (st->mtime, keyword, xhdr);
}
static void
path_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_string (st->file_name, keyword, xhdr);
}
static void
size_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_num (st->stat.st_size, keyword, xhdr);
}
static void
uid_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_num (st->stat.st_uid, keyword, xhdr);
}
static void
uname_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data __attribute__ ((unused)))
+ struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_string (st->uname, keyword, xhdr);
}
static void
sparse_size_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data)
+ struct xheader *xhdr, void const *data)
{
size_coder (st, keyword, xhdr, data);
}
static void
sparse_numblocks_coder (struct tar_stat_info const *st, char const *keyword,
struct xheader *xhdr,
- void *data __attribute__ ((unused)))
+ void const *data __attribute__ ((unused)))
{
code_num (st->sparse_map_avail, keyword, xhdr);
}
static void
sparse_offset_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data)
+ struct xheader *xhdr, void const *data)
{
- size_t *pi = data;
+ size_t const *pi = data;
code_num (st->sparse_map[*pi].offset, keyword, xhdr);
}
static void
sparse_numbytes_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data)
+ struct xheader *xhdr, void const *data)
{
- size_t *pi = data;
+ size_t const *pi = data;
code_num (st->sparse_map[*pi].numbytes, keyword, xhdr);
}
{
int offset = 1;
static char *keyword = "GNU.sparse.map";
-
+
st->sparse_map_avail = 0;
while (1)
{
uintmax_t u;
char *delim;
struct sp_array e;
-
+
if (!ISDIGIT (*arg))
{
ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"),
return;
}
}
-
+
offset = !offset;
if (*delim == 0)
static void
dumpdir_coder (struct tar_stat_info const *st, char const *keyword,
- struct xheader *xhdr, void *data)
+ struct xheader *xhdr, void const *data)
{
xheader_print_n (xhdr, keyword, data, dumpdir_size (data));
}
{ "GNU.dumpdir", dumpdir_coder, dumpdir_decoder,
true },
-
+
#if 0 /* GNU private keywords (not yet implemented) */
/* Keeps the tape/volume header. May be present only in the global headers.