The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: johnh@psych.usyd.edu.au (John Holden)
Subject: [pups] extract old archive format?
Date: Fri, 9 Apr 2010 12:40:44 +1000 (EST)	[thread overview]
Message-ID: <201004090240.o392eigZ402010@psychwarp.psych.usyd.edu.au> (raw)


> Well I found the ar specification (in ar.5 not ar.1).
>
>              struct ar_hdr {
>                      char      ar_name[14];
>                      long      ar_date;
>                      char      ar_uid;
>                      char      ar_gid;
>                      int       ar_mode;
>                      long      ar_size;
>              };

Endian should not be a problem on a Intel/AMD processor. More likely your C
compiler is padding out the array for alignment. Try a '-fpack-struct' or
more safely, read the elements individually rather than a structure.

PS

To check, see what 'sizeof (struct ar_hdr_)' returns.

John



             reply	other threads:[~2010-04-09  2:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09  2:40 John Holden [this message]
     [not found] ` <n2m5904d5731004082137u5b054823wd4a9ce55113b1dee@mail.gmail.com>
2010-04-09  4:39   ` Carl Lowenstein
2010-04-09 10:23     ` Johnny Billquist
2010-04-09 10:21 ` Johnny Billquist
     [not found] <337550.74945.qm@web82407.mail.mud.yahoo.com>
2010-04-09  5:35 ` Jeremy C. Reed
  -- strict thread matches above, loose matches on Subject: below --
2010-04-09  1:13 Norman Wilson
2010-04-09  2:11 ` Jeremy C. Reed
2010-04-09 10:15   ` Johnny Billquist
2010-04-09  5:49 ` Bob Eager
2010-04-08 13:25 Jeremy C. Reed
2010-04-08 14:49 ` Tim Bradshaw
2010-04-08 15:16 ` Brantley Coile
2010-04-08 17:09 ` Bob Eager
2010-04-09  5:11 ` Warren Toomey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004090240.o392eigZ402010@psychwarp.psych.usyd.edu.au \
    --to=johnh@psych.usyd.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).