home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 November / VPR0311.ISO / OLS / TAR32223 / tar32223.lzh / tar32_2 / src / ar.h next >
C/C++ Source or Header  |  2003-01-17  |  512b  |  27 lines

  1. /*
  2.     ar.h
  3.     archives format (for a.out/b.out/COFF)
  4. */
  5. #ifndef ___AR_H
  6. #define ___AR_H
  7.  
  8. /* Reference: GNU ar,  include/aout/ar.h */
  9. struct ar_hdr{
  10.     char name[16];
  11.     char date[12];
  12.     char uid[6];
  13.     char gid[6];
  14.     char mode[8];
  15.     char size[10];
  16.     char fmag[2];        /* should contain "`\012" */
  17.     int magic_check(){
  18.         return memcmp(fmag, "`\012",2) == 0;
  19.     };
  20. };
  21.  
  22. struct ar_first_hdr{
  23.     char magic[8];    /* shoud conjtain "!<arch>\012"(a.out) or "!<bout>\012"(b.out)*/
  24.     ar_hdr hdr;
  25. };
  26. #endif /* ___AR_H */
  27.