Lines Matching defs:tar
29 * is_tar() -- figure out whether file is a tar archive.
31 * Stolen (by the author!) from the public domain tar program:
49 #include "tar.h"
57 "tar archive",
58 "POSIX tar archive",
59 "POSIX tar archive (GNU)",
66 * Do the tar test first, because if the first file in the tar
69 int tar;
75 tar = is_tar(buf, nbytes);
76 if (tar < 1 || tar > 3)
79 if (file_printf(ms, "%s", mime ? "application/x-tar" :
80 tartype[tar - 1]) == -1)
87 * 0 if the checksum is bad (i.e., probably not a tar archive),
88 * 1 for old UNIX tar file,
89 * 2 for Unix Std (POSIX) tar file,
90 * 3 for GNU tar file.
117 return 0; /* Not a tar archive */
121 return 3; /* GNU Unix Standard tar archive */
125 return 2; /* Unix Standard tar archive */
127 return 1; /* Old fashioned tar archive */