home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1999 February / MACPOWER-1999-02.ISO.7z / MACPOWER-1999-02.ISO / 9902⁄AMUG / UTILITY / mac06-0.95.sit / mac06-0.95 / usr / include / tar.h < prev    next >
Text File  |  1998-10-18  |  2KB  |  67 lines

  1. /* mac06ゥ1997,1998 by HNS/DSITRI hns@computer.org
  2. ** tar.h
  3. ** Tape ARchive record format
  4. */
  5.  
  6. #pragma once
  7.  
  8. #define BLKLEN    512
  9.  
  10. #define TMAGIC        "ustar  "
  11. #define TMAGICV        "ustar¥000"    /* with version */
  12. #define TMAGLEN        8
  13.  
  14. #define NAMELEN        100
  15.  
  16. typedef union tarblk
  17.     {
  18.     struct header
  19.         {
  20.         char name[NAMELEN];        /* entry name */
  21.         char mode[8];            /* octal string */
  22.         char uid[8];            /* octal string */
  23.         char gid[8];            /* octal string */
  24.         char size[12];            /* octal string */
  25.         char mtime[12];            /* octal string */
  26.         char cksum[8];            /* octal string */
  27.         char type;                /* file type */
  28.         char linkname[NAMELEN];    /* linked to ... */
  29.         char magic[TMAGLEN];    /* magic string */
  30.         char uname[32];            /* full user name */
  31.         char gname[32];            /* full group name */
  32.         char devmajor[8];        /* octal string */
  33.         char devminor[8];        /* octal string */
  34.         } h;
  35.     unsigned char data[BLKLEN];
  36.     } TARBLK;
  37.  
  38. #define TARHSZ sizeof(TARBLK)
  39.  
  40. /* file types */
  41.  
  42. #define REGTYPE        0        /* regular file */
  43. #define AREGTYPE    '0'        /* regular file */
  44. #define LNKTYPE        '1'        /* link */
  45. #define SYMTYPE        '2'        /* symbolic link */
  46. #define CHRTYPE        '3'        /* character device */
  47. #define BLKTYPE        '4'        /* block device */
  48. #define DIRTYPE        '5'        /* directory */
  49. #define FIFOTYPE    '6'        /* FIFO file */
  50. #define CONTTYPE    '7'        /* contiguous */
  51.  
  52. /* file mode definitions */
  53.  
  54. #define TSETUID        04000
  55. #define TSETGID        02000
  56. #define TSTICKY        01000
  57. #define TUREAD        00400
  58. #define TUWRITE        00200
  59. #define TUEXEC        00100
  60. #define TGREAD        00040
  61. #define TGWRITE        00020
  62. #define TGEXEC        00010
  63. #define TOREAD        00004
  64. #define TOWRITE        00002
  65. #define TOEXEC        00001
  66.  
  67. /* EOF */