Lines Matching full:tar
29 * is_tar() -- figure out whether file is a tar archive.
31 * Stolen (by the author!) from the file_public domain tar program:
49 #include "tar.h"
57 "tar archive", /* found in ../magic/Magdir/archive */
58 "POSIX tar archive",
59 "POSIX tar archive (GNU)", /* */
68 * Do the tar test first, because if the first file in the tar in file_is_tar()
71 int tar; in file_is_tar() local
77 tar = is_tar(buf, nbytes); in file_is_tar()
78 if (tar < 1 || tar > 3) in file_is_tar()
84 if (file_printf(ms, "%s", mime ? "application/x-tar" : in file_is_tar()
85 tartype[tar - 1]) == -1) in file_is_tar()
93 * 0 if the checksum is bad (i.e., probably not a tar archive),
94 * 1 for old UNIX tar file,
95 * 2 for Unix Std (POSIX) tar file,
96 * 3 for GNU tar file.
137 return 0; /* Not a tar archive */ in is_tar()
141 return 3; /* GNU Unix Standard tar archive */ in is_tar()
145 return 2; /* Unix Standard tar archive */ in is_tar()
147 return 1; /* Old fashioned tar archive */ in is_tar()