Lines Matching refs:hdr

336   struct ar_hdr hdr;
337 char *hdrp = (char *) &hdr;
351 if (strncmp (hdr.ar_fmag, ARFMAG, 2) != 0
353 || strncmp (hdr.ar_fmag, mag, 2) != 0))
360 parsed_size = strtol (hdr.ar_size, NULL, 10);
370 if ((hdr.ar_name[0] == '/'
371 || (hdr.ar_name[0] == ' '
372 && memchr (hdr.ar_name, '/', ar_maxnamelen (abfd)) == NULL))
375 filename = get_extended_arelt_filename (abfd, hdr.ar_name);
384 else if (hdr.ar_name[0] == '#'
385 && hdr.ar_name[1] == '1'
386 && hdr.ar_name[2] == '/'
387 && ISDIGIT (hdr.ar_name[3]))
390 namelen = atoi (&hdr.ar_name[3]);
415 e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
418 e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
420 e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
424 namelen = e - hdr.ar_name;
445 memcpy (ared->arch_header, &hdr, sizeof (struct ar_hdr));
455 memcpy (ared->filename, hdr.ar_name, namelen);
1241 struct ar_hdr *hdr = arch_hdr (current);
1242 if (strncmp (normal, hdr->ar_name, thislen) != 0
1243 || (thislen < sizeof hdr->ar_name
1244 && hdr->ar_name[thislen] != ar_padchar (current)))
1248 memcpy (hdr->ar_name, normal, thislen);
1250 || (thislen == maxname && thislen < sizeof hdr->ar_name))
1251 hdr->ar_name[thislen] = ar_padchar (current);
1282 struct ar_hdr *hdr = arch_hdr (current);
1291 hdr->ar_name[0] = ar_padchar (current);
1294 sprintf ((hdr->ar_name) + 1, "%-d", (unsigned) (strptr - *tabloc));
1298 char *temp = hdr->ar_name + 2;
1299 for (; temp < hdr->ar_name + maxname; temp++)
1349 struct ar_hdr *hdr;
1373 hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
1376 memset (hdr, ' ', sizeof (struct ar_hdr));
1378 strncpy (hdr->ar_fmag, ARFMAG, 2);
1381 sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime);
1386 hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_uid);
1389 sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
1394 hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_gid);
1397 sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
1398 sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
1399 sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
1403 temp = (char *) hdr;
1410 strncpy (hdr->ar_fmag, ARFMAG, 2);
1412 ared->arch_header = (char *) hdr;
1438 struct ar_hdr *hdr;
1447 hdr = arch_hdr (abfd);
1450 buf->stelt = strtol (hdr->arelt, &aloser, size); \
1451 if (aloser == hdr->arelt) \
1457 if (hdr->arelt[5] == ' ') \
1466 if (hdr->arelt[cnt] < ' ' || hdr->arelt[cnt] > ' ' + 0x3f) \
1469 buf->stelt += hdr->arelt[cnt] - ' '; \
1471 if (hdr->arelt[5] < '@' || hdr->arelt[5] > '@' + 3) \
1474 buf->stelt += hdr->arelt[5] - '@'; \
1498 struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
1519 memcpy (hdr->ar_name, filename, length);
1523 || (length == maxlen && length < sizeof hdr->ar_name))
1524 (hdr->ar_name)[length] = ar_padchar (abfd);
1530 struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
1554 memcpy (hdr->ar_name, filename, length);
1558 memcpy (hdr->ar_name, filename, maxlen);
1563 (hdr->ar_name)[length] = ar_padchar (abfd);
1578 struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
1602 memcpy (hdr->ar_name, filename, length);
1605 memcpy (hdr->ar_name, filename, maxlen);
1608 hdr->ar_name[maxlen - 2] = '.';
1609 hdr->ar_name[maxlen - 1] = 'o';
1615 (hdr->ar_name)[length] = ar_padchar (abfd);
1695 struct ar_hdr hdr;
1697 memset (&hdr, 0, sizeof (struct ar_hdr));
1698 strcpy (hdr.ar_name, ename);
1700 sprintf (&(hdr.ar_size[0]), "%-10d",
1702 strncpy (hdr.ar_fmag, ARFMAG, 2);
1704 if (((char *) (&hdr))[i] == '\0')
1705 (((char *) (&hdr))[i]) = ' ';
1706 if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
1721 struct ar_hdr *hdr = arch_hdr (current);
1724 if (bfd_bwrite (hdr, sizeof (*hdr), arch)
1725 != sizeof (*hdr))
1938 struct ar_hdr hdr;
1945 memset (&hdr, 0, sizeof (struct ar_hdr));
1946 sprintf (hdr.ar_name, RANLIBMAG);
1951 sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
1952 sprintf (hdr.ar_uid, "%ld", (long) getuid ());
1953 sprintf (hdr.ar_gid, "%ld", (long) getgid ());
1954 sprintf (hdr.ar_size, "%-10d", (int) mapsize);
1955 strncpy (hdr.ar_fmag, ARFMAG, 2);
1957 if (((char *) (&hdr))[i] == '\0')
1958 (((char *) (&hdr))[i]) = ' ';
1959 if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
2022 struct ar_hdr hdr;
2043 memset (hdr.ar_date, 0, sizeof (hdr.ar_date));
2044 sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
2045 for (i = 0; i < sizeof (hdr.ar_date); i++)
2046 if (hdr.ar_date[i] == '\0')
2047 (hdr.ar_date)[i] = ' ';
2053 || (bfd_bwrite (hdr.ar_date, sizeof (hdr.ar_date), arch)
2054 != sizeof (hdr.ar_date)))
2095 struct ar_hdr hdr;
2108 memset (&hdr, 0, sizeof (struct ar_hdr));
2109 hdr.ar_name[0] = '/';
2110 sprintf (hdr.ar_size, "%-10d", (int) mapsize);
2111 sprintf (hdr.ar_date, "%ld", (long) time (NULL));
2113 sprintf ((hdr.ar_uid), "%d", 0);
2114 sprintf ((hdr.ar_gid), "%d", 0);
2115 sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0);
2116 strncpy (hdr.ar_fmag, ARFMAG, 2);
2119 if (((char *) (&hdr))[i] == '\0')
2120 (((char *) (&hdr))[i]) = ' ';
2123 if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)