home *** CD-ROM | disk | FTP | other *** search
/ ftp.eri.u-tokyo.ac.jp / 2014.03.ftp.eri.u-tokyo.ac.jp.zip / ftp.eri.u-tokyo.ac.jp / pub / DOS / tools / kmtar.lzh / TAR.H < prev    next >
Text File  |  1990-10-10  |  2KB  |  76 lines

  1. /*
  2.  * tar header block definition
  3.  *
  4.  * From IEEE Std 1003.1-1988, pp.156
  5.  */
  6.  
  7.  
  8. #define    TMAGIC        "ustar"
  9. #define    TMAGLEN        6
  10.  
  11. #define    TOMAGIC        "ustar  "
  12. #define    TOMAGLEN    8
  13.  
  14. #define    TVERSION    "00"
  15. #define    TVERSLEN    2
  16.  
  17. #define    REGTYPE        '0'    /* Regular file */
  18. #define    AREGTYPE    '\0'    /* Regular file; old V7 format */
  19. #define    LNKTYPE        '1'    /* Link */
  20. #define    SYMTYPE        '2'    /* Symbolic link */
  21. #define    CHRTYPE        '3'    /* Character special */
  22. #define    BLKTYPE        '4'    /* Block special */
  23. #define    DIRTYPE        '5'    /* Directory */
  24. #define    FIFOTYPE    '6'    /* FIFO special */
  25. #define    CONTTYPE    '7'    /* Continguous file */
  26.  
  27.  
  28. #define    MULTYPE        'M'    /* Added by GNUtar, not POSIX */
  29. #define    VOLTYPE        'V'    /* Added by GNUtar, not POSIX */
  30.  
  31.  
  32. #define    TSUID        04000    /* Set UID on execution */
  33. #define    TSGID        02000    /* Set GID on execution */
  34. #define    TSVTX        01000    /* Reserved */
  35.                 /* File permissions */
  36. #define    TUREAD        00400    /* read by owner */
  37. #define    TUWRITE        00200    /* write by owner */
  38. #define    TUEXEC        00100    /* execute/search by owner */
  39. #define    TGREAD        00040    /* read by group */
  40. #define    TGWRITE        00020    /* write by group */
  41. #define    TGEXEC        00010    /* execute/search by group */
  42. #define    TOREAD        00004    /* read by other */
  43. #define    TOWRITE        00002    /* write by other */
  44. #define    TOEXEC        00001    /* execute/search by other */
  45.  
  46.  
  47. #define    TBLOCK    512
  48. #define    NAMSIZ    100
  49.  
  50. typedef    union    hblock    {
  51.     char    dummy[TBLOCK];
  52.     struct    {
  53.         char    name[NAMSIZ];
  54.         char    mode[8];
  55.         char    uid[8];
  56.         char    gid[8];
  57.         char    size[12];
  58.         char    mtime[12];
  59.         char    chksum[8];
  60.         char    typeflag;
  61.         char    linkname[NAMSIZ];
  62.         char    magic[6];
  63.         char    version[2];
  64.         char    uname[32];
  65.         char    gname[32];
  66.         char    devmajor[8];
  67.         char    devminor[8];
  68.     /* Following fields were added by GNUtar */
  69.         char    atime[12];
  70.         char    ctime[12];
  71.         char    offset[12];
  72.     } dbuf;
  73. } HEADER;
  74.  
  75.  
  76.