Lines Matching refs:ar
9 #include "ar.h"
17 bb_error_msg_and_die("invalid ar header");
28 } ar;
35 if (read(archive_handle->src_fd, ar.raw, 60) != 60) {
40 /* ar header starts on an even byte (2 byte aligned)
43 if (ar.raw[0] == '\n') {
45 memmove(ar.raw, &ar.raw[1], 59);
46 ar.raw[59] = xread_char(archive_handle->src_fd);
51 if (ar.formatted.magic[0] != '`' || ar.formatted.magic[1] != '\n')
52 bb_error_msg_and_die("invalid ar header");
57 ar.formatted.magic[0] = '\0'; /* else 4G-2 file will have size="4294967294`\n..." */
58 typed->size = size = read_num(ar.formatted.size, 10);
61 if (ar.formatted.name[0] == '/') {
62 if (ar.formatted.name[1] == ' ') {
69 if (ar.formatted.name[1] == '/') {
90 typed->mode = read_num(ar.formatted.mode, 8);
91 typed->mtime = read_num(ar.formatted.date, 10);
92 typed->uid = read_num(ar.formatted.uid, 10);
93 typed->gid = read_num(ar.formatted.gid, 10);
96 if (ar.formatted.name[0] == '/') {
99 /* The number after the '/' indicates the offset in the ar data section
101 long_offset = read_num(&ar.formatted.name[1], 10);
110 typed->name = xstrndup(ar.formatted.name, 16);