Lines Matching defs:hdr

374   struct ar_hdr hdr;
375 char *hdrp = (char *) &hdr;
389 if (strncmp (hdr.ar_fmag, ARFMAG, 2) != 0
391 || strncmp (hdr.ar_fmag, mag, 2) != 0))
398 parsed_size = strtol (hdr.ar_size, NULL, 10);
408 if ((hdr.ar_name[0] == '/'
409 || (hdr.ar_name[0] == ' '
410 && memchr (hdr.ar_name, '/', ar_maxnamelen (abfd)) == NULL))
413 filename = get_extended_arelt_filename (abfd, hdr.ar_name);
419 else if (hdr.ar_name[0] == '#'
420 && hdr.ar_name[1] == '1'
421 && hdr.ar_name[2] == '/'
422 && ISDIGIT (hdr.ar_name[3]))
425 namelen = atoi (&hdr.ar_name[3]);
450 e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
453 e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
455 e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
459 namelen = e - hdr.ar_name;
480 memcpy (ared->arch_header, &hdr, sizeof (struct ar_hdr));
490 memcpy (ared->filename, hdr.ar_name, namelen);
1272 struct ar_hdr *hdr = arch_hdr (current);
1273 if (strncmp (normal, hdr->ar_name, thislen) != 0
1274 || (thislen < sizeof hdr->ar_name
1275 && hdr->ar_name[thislen] != ar_padchar (current)))
1279 memcpy (hdr->ar_name, normal, thislen);
1281 || (thislen == maxname && thislen < sizeof hdr->ar_name))
1282 hdr->ar_name[thislen] = ar_padchar (current);
1314 struct ar_hdr *hdr = arch_hdr (current);
1323 hdr->ar_name[0] = ar_padchar (current);
1324 _bfd_ar_spacepad (hdr->ar_name + 1, maxname - 1, "%-ld",
1372 struct ar_hdr *hdr;
1395 hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
1398 memset (hdr, ' ', sizeof (struct ar_hdr));
1400 _bfd_ar_spacepad (hdr->ar_date, sizeof (hdr->ar_date), "%-12ld",
1406 hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_uid);
1409 _bfd_ar_spacepad (hdr->ar_uid, sizeof (hdr->ar_uid), "%ld",
1415 hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_gid);
1418 _bfd_ar_spacepad (hdr->ar_gid, sizeof (hdr->ar_gid), "%ld",
1420 _bfd_ar_spacepad (hdr->ar_mode, sizeof (hdr->ar_mode), "%-8lo",
1422 _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld",
1424 memcpy (hdr->ar_fmag, ARFMAG, 2);
1426 ared->arch_header = (char *) hdr;
1452 struct ar_hdr *hdr;
1461 hdr = arch_hdr (abfd);
1464 buf->stelt = strtol (hdr->arelt, &aloser, size); \
1465 if (aloser == hdr->arelt) \
1471 if (hdr->arelt[5] == ' ') \
1480 if (hdr->arelt[cnt] < ' ' || hdr->arelt[cnt] > ' ' + 0x3f) \
1483 buf->stelt += hdr->arelt[cnt] - ' '; \
1485 if (hdr->arelt[5] < '@' || hdr->arelt[5] > '@' + 3) \
1488 buf->stelt += hdr->arelt[5] - '@'; \
1512 struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
1533 memcpy (hdr->ar_name, filename, length);
1537 || (length == maxlen && length < sizeof hdr->ar_name))
1538 (hdr->ar_name)[length] = ar_padchar (abfd);
1544 struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
1568 memcpy (hdr->ar_name, filename, length);
1572 memcpy (hdr->ar_name, filename, maxlen);
1577 (hdr->ar_name)[length] = ar_padchar (abfd);
1592 struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
1616 memcpy (hdr->ar_name, filename, length);
1619 memcpy (hdr->ar_name, filename, maxlen);
1622 hdr->ar_name[maxlen - 2] = '.';
1623 hdr->ar_name[maxlen - 1] = 'o';
1629 (hdr->ar_name)[length] = ar_padchar (abfd);
1702 struct ar_hdr hdr;
1704 memset (&hdr, ' ', sizeof (struct ar_hdr));
1705 memcpy (hdr.ar_name, ename, strlen (ename));
1707 _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
1709 memcpy (hdr.ar_fmag, ARFMAG, 2);
1710 if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
1727 struct ar_hdr *hdr = arch_hdr (current);
1730 if (bfd_bwrite (hdr, sizeof (*hdr), arch)
1731 != sizeof (*hdr))
1948 struct ar_hdr hdr;
1954 memset (&hdr, ' ', sizeof (struct ar_hdr));
1955 memcpy (hdr.ar_name, RANLIBMAG, strlen (RANLIBMAG));
1960 _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
1962 _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", getuid ());
1963 _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", getgid ());
1964 _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize);
1965 memcpy (hdr.ar_fmag, ARFMAG, 2);
1966 if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
2029 struct ar_hdr hdr;
2049 memset (hdr.ar_date, ' ', sizeof (hdr.ar_date));
2050 _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
2057 || (bfd_bwrite (hdr.ar_date, sizeof (hdr.ar_date), arch)
2058 != sizeof (hdr.ar_date)))
2099 struct ar_hdr hdr;
2111 memset (&hdr, ' ', sizeof (struct ar_hdr));
2112 hdr.ar_name[0] = '/';
2113 _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
2115 _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
2118 _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
2119 _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);
2120 _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0);
2121 memcpy (hdr.ar_fmag, ARFMAG, 2);
2124 if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)