home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip52.zip / aosvs / aosvs.h < prev    next >
C/C++ Source or Header  |  1995-10-08  |  2KB  |  58 lines

  1. /*---------------------------------------------------------------------------
  2.  
  3.   aosvs.h
  4.  
  5.   AOS/VS-specific header file for use with Info-ZIP's UnZip 5.2 and later.
  6.  
  7.   ---------------------------------------------------------------------------*/
  8.   
  9.  
  10. /* stuff to set up for system calls (?FSTAT & ?SACL) and the extra field */
  11.  
  12. #include <paru.h>                   /* parameter definitions */
  13. #include <packets/filestatus.h>     /* AOS/VS ?FSTAT packet defs */
  14. #include <packets/create.h>         /* AOS/VS ?CREATE packet defs */
  15. #include <sys_calls.h>              /* AOS/VS system call interface */
  16.  
  17. #define ZEXTRA_HEADID   "VS"
  18. #define ZEXTRA_SENTINEL "FCI"
  19. #define ZEXTRA_REV      ((uch)10)   /* change/use this in later revs */
  20.  
  21.  
  22. /* functions defined in zvs_create.c */
  23.  
  24. extern int   zvs_create(char *fname, long cretim, long modtim, long acctim,
  25.                         char *pacl, int ftyp, int eltsize, int maxindlev);
  26. extern int   zvs_credir(char *dname, long cretim, long modtim, long acctim,
  27.                         char *pacl, int ftyp, long maxblocks, int hashfsize,
  28.                         int maxindlev);
  29. extern long  dgdate(short mm, short dd, short yy);
  30. extern char  *ux_to_vs_name(char *outname, char *inname);
  31.   
  32.  
  33. /* could probably avoid the unions - all elements in each one are the same
  34.  * size, and we're going to assume this */
  35.  
  36. typedef union zvsfstat_stru {
  37.     P_FSTAT       norm_fstat_packet;      /* normal fstat packet */
  38.     P_FSTAT_DIR   dir_fstat_packet;       /* DIR/CPD fstat packet */
  39.     P_FSTAT_UNIT  unit_fstat_packet;      /* unit (device) fstat packet */
  40.     P_FSTAT_IPC   ipc_fstat_packet;       /* IPC file fstat packet */
  41. } ZVSFSTAT_STRU;
  42.  
  43. typedef union zvscreate_stru {
  44.     P_CREATE      norm_create_packet;     /* normal create packet */
  45.     P_CREATE_DIR  dir_create_packet;      /* DIR/CPD create packet */
  46.     P_CREATE_IPC  ipc_create_packet;      /* IPC file create packet */
  47. } ZVSCREATE_STRU;
  48.  
  49.  
  50. typedef struct zextrafld {
  51.     char            extra_header_id[2];   /* set to VS - in theory, an int */
  52.     char            extra_data_size[2];   /* size of rest (little-endian) */
  53.     char            extra_sentinel[4];    /* set to FCI w/ trailing null */
  54.     uch             extra_rev;            /* set to 10 for rev 1.0 */
  55.     ZVSFSTAT_STRU   fstat_packet;         /* the fstat packet */
  56.     char            aclbuf[$MXACL];       /* the raw ACL */
  57. } ZEXTRAFLD;
  58.