-static void append_extended_header(char **p, const char *keyword,
- const char *value, unsigned int len)
-{
- unsigned int size = extended_header_len(keyword, len);
- append_extended_header_prefix(p, size, keyword);
- memcpy(*p, value, len);
- *p += len;
- append_char(p, '\n');
-}
-
-static void write_header(const unsigned char *, char, const char *, struct path_prefix *,
- const char *, unsigned int, void *, unsigned long);
-
-/* stores a pax extended header directly in the block buffer */
-static void write_extended_header(const char *headerfilename, int is_dir,
- unsigned int flags, const char *basepath,
- struct path_prefix *prefix,
- const char *path, unsigned int namelen,
- void *content, unsigned int contentsize)
-{
- char *buffer, *p;
- unsigned int pathlen, size, linkpathlen = 0;
-
- size = pathlen = extended_header_len("path", namelen);
- if (flags & EXT_HEADER_LINKPATH) {
- linkpathlen = extended_header_len("linkpath", contentsize);
- size += linkpathlen;