}
}
-enum { UINTMAX_STRSIZE_BOUND = INT_BUFSIZE_BOUND (uintmax_t) };
-enum { SYSINT_BUFSIZE =
- max (UINTMAX_STRSIZE_BOUND, INT_BUFSIZE_BOUND (intmax_t)) };
+enum
+ {
+ INTMAX_STRSIZE_BOUND = INT_BUFSIZE_BOUND (intmax_t),
+ UINTMAX_STRSIZE_BOUND = INT_BUFSIZE_BOUND (uintmax_t),
+ SYSINT_BUFSIZE = max (INTMAX_STRSIZE_BOUND, UINTMAX_STRSIZE_BOUND)
+ };
char *sysinttostr (uintmax_t, intmax_t, uintmax_t, char buf[SYSINT_BUFSIZE]);
intmax_t stoint (char const *, char **, bool *, intmax_t, uintmax_t);
char *timetostr (time_t, char buf[SYSINT_BUFSIZE]);
bool xheader_string_end (struct xheader *xhdr, char const *keyword);
bool xheader_keyword_deleted_p (const char *kw);
char *xheader_format_name (struct tar_stat_info *st, const char *fmt,
- size_t n);
+ intmax_t n);
void xheader_xattr_init (struct tar_stat_info *st);
void xattr_map_init (struct xattr_map *map);
struct xheader *xhdr);
/* Number of global headers written so far. */
-static size_t global_header_count;
+static intmax_t global_header_count;
/* FIXME: Possibly it should be reset after changing the volume.
POSIX %n specification says that it is expanded to the sequence
number of current global header in *the* archive. However, for
%% A '%' character. */
char *
-xheader_format_name (struct tar_stat_info *st, const char *fmt, size_t n)
+xheader_format_name (struct tar_stat_info *st, const char *fmt, intmax_t n)
{
char *buf;
size_t len;
char *base = NULL;
char pidbuf[UINTMAX_STRSIZE_BOUND];
char const *pptr = NULL;
- char nbuf[UINTMAX_STRSIZE_BOUND];
+ char nbuf[INTMAX_STRSIZE_BOUND];
char const *nptr = NULL;
len = 0;
break;
case 'n':
- nptr = umaxtostr (n, nbuf);
+ nptr = imaxtostr (n, nbuf);
len += nbuf + sizeof nbuf - 1 - nptr;
break;