47 #include <sys/types.h>
53 "POSIX tar archive (GNU)",
61 #define isodigit(c) (((c) >= '0') && ((c) <= '7'))
62 static int from_oct(
int digs,
const char *where) {
70 while (digs > 0 &&
isodigit(*where)) {
74 if (digs > 0 && *where && !
isspace((
ut8)*where)) {
100 for (
i =
sizeof(
union record); --
i >= 0;) {
109 for (
i =
sizeof header->header.chksum; --
i >= 0;) {
110 sum -= 0xFF &
header->header.chksum[
i];
112 sum +=
' ' *
sizeof header->header.chksum;
131 int mime = ms->flags & RZ_MAGIC_MIME;
133 if (tar < 1 || tar > 3) {
136 if (
mime == RZ_MAGIC_MIME_ENCODING) {
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void nbytes
int file_printf(struct rz_magic_set *, const char *,...)
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n mime
static int is_tar(const ut8 *buf, size_t nbytes)
int file_is_tar(RzMagic *ms, const ut8 *buf, size_t nbytes)
static int from_oct(int digs, const char *where)
static const char tartype[][32]
#define header(is_bt, len_min, ret_op)
int tar(gzFile in, int action, int arg, int argc, char **argv)