dat.h 801 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. typedef struct MetaBlock MetaBlock;
  2. typedef struct MetaEntry MetaEntry;
  3. #define MaxBlock (1UL<<31)
  4. enum {
  5. BytesPerEntry = 100, /* estimate of bytes per dir entries - determines number of index entries in the block */
  6. FullPercentage = 80, /* don't allocate in block if more than this percentage full */
  7. FlushSize = 200, /* number of blocks to flush */
  8. DirtyPercentage = 50 /* maximum percentage of dirty blocks */
  9. };
  10. struct MetaEntry
  11. {
  12. uchar *p;
  13. ushort size;
  14. };
  15. struct MetaBlock
  16. {
  17. int maxsize; /* size of block */
  18. int size; /* size used */
  19. int free; /* free space within used size */
  20. int maxindex; /* entries allocated for table */
  21. int nindex; /* amount of table used */
  22. int unbotch;
  23. uchar *buf;
  24. };
  25. struct VacDirEnum
  26. {
  27. VacFile *file;
  28. u32int boff;
  29. int i, n;
  30. VacDir *buf;
  31. };