aosvs.h 2.7 KB

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