pax = (struct pax *)malloc(sizeof(*pax));
if (pax == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate pax data");
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate pax data");
return (ARCHIVE_FATAL);
}
memset(pax, 0, sizeof(*pax));
ret = ARCHIVE_OK;
} else if (strcmp(val, "UTF-8") == 0) {
/*
- * Specify UTF-8 character-set to be used for filenames.
- * This is almost the test that running platform supports
- * the string conversion. Especially libarchive_test needs
- * this trick for its test.
+ * Specify UTF-8 character-set to be used for
+ * filenames. This is almost the test that
+ * running platform supports the string conversion.
+ * Especially libarchive_test needs this trick for
+ * its test.
*/
pax->sconv_utf8 = archive_string_conversion_to_charset(
&(a->archive), "UTF-8", 0);
else
ret = ARCHIVE_OK;
} else
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_MISC,
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"pax: invalid charset name");
} else
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
url_encoded_name = url_encode(name);
if (url_encoded_name != NULL) {
/* Convert narrow-character to UTF-8. */
- r = archive_strcpy_in_locale(&(pax->l_url_encoded_name),
+ r = archive_strcpy_in_locale(
+ &(pax->l_url_encoded_name),
url_encoded_name, pax->sconv_utf8);
free(url_encoded_name); /* Done with this. */
if (r == 0)
/* Initialize the string conversion object
* we must need */
pax->sconv_utf8 = archive_string_conversion_to_charset(
- &(a->archive), "UTF-8", 1);
+ &(a->archive), "UTF-8", 1);
if (pax->sconv_utf8 == NULL)
/* Couldn't allocate memory */
return (ARCHIVE_FAILED);
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"tar format cannot archive this (type=0%lo)",
- (unsigned long)archive_entry_filetype(entry_original));
+ (unsigned long)
+ archive_entry_filetype(entry_original));
return (ARCHIVE_FAILED);
}
}
* should not lose data just because the local filesystem
* can't store it.
*/
- mac_metadata = archive_entry_mac_metadata(entry_original, &mac_metadata_size);
+ mac_metadata =
+ archive_entry_mac_metadata(entry_original, &mac_metadata_size);
if (mac_metadata != NULL) {
const char *oname;
char *name, *bname;
archive_entry_set_size(extra, mac_metadata_size);
archive_entry_set_filetype(extra, AE_IFREG);
- archive_entry_set_perm(extra, archive_entry_perm(entry_original));
+ archive_entry_set_perm(extra,
+ archive_entry_perm(entry_original));
archive_entry_set_mtime(extra,
- archive_entry_mtime(entry_original),
- archive_entry_mtime_nsec(entry_original));
- archive_entry_set_gid(extra, archive_entry_gid(entry_original));
- archive_entry_set_gname(extra, archive_entry_gname(entry_original));
- archive_entry_set_uid(extra, archive_entry_uid(entry_original));
- archive_entry_set_uname(extra, archive_entry_uname(entry_original));
+ archive_entry_mtime(entry_original),
+ archive_entry_mtime_nsec(entry_original));
+ archive_entry_set_gid(extra,
+ archive_entry_gid(entry_original));
+ archive_entry_set_gname(extra,
+ archive_entry_gname(entry_original));
+ archive_entry_set_uid(extra,
+ archive_entry_uid(entry_original));
+ archive_entry_set_uname(extra,
+ archive_entry_uname(entry_original));
/* Recurse to write the special copyfile entry. */
r = archive_write_pax_header(a, extra);
}
pax->entry_bytes_remaining = archive_strlen(&(pax->pax_header));
- pax->entry_padding = 0x1ff & (-(int64_t)pax->entry_bytes_remaining);
+ pax->entry_padding =
+ 0x1ff & (-(int64_t)pax->entry_bytes_remaining);
r = __archive_write_output(a, pax->pax_header.s,
archive_strlen(&(pax->pax_header)));
/* If the platform can't fetch the pid, don't include it. */
strcpy(buff, "PaxHeader");
#endif
- /* General case: build a ustar-compatible name adding "/PaxHeader/". */
+ /* General case: build a ustar-compatible name adding
+ * "/PaxHeader/". */
build_ustar_entry_name(dest, src, p - src, buff);
return (dest);
/* If the platform can't fetch the pid, don't include it. */
strcpy(buff, "GNUSparseFile");
#endif
- /* General case: build a ustar-compatible name adding "/GNUSparseFile/". */
+ /* General case: build a ustar-compatible name adding
+ * "/GNUSparseFile/". */
build_ustar_entry_name(dest, src, p - src, buff);
return (dest);