fns.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Source *sourceAlloc(Cache*, Lump *u, ulong block, int elem, int readonly);
  2. Source *sourceOpen(Source*, ulong entry, int readOnly);
  3. Source *sourceCreate(Source*, int psize, int dsize, int isdir, ulong entry);
  4. Lump *sourceGetLump(Source*, ulong block, int readOnly, int lock);
  5. Lump *sourceWalk(Source *r, ulong block, int readOnly, int *);
  6. int sourceSetDepth(Source *r, uvlong size);
  7. int sourceSetSize(Source *r, uvlong size);
  8. uvlong sourceGetSize(Source *r);
  9. int sourceSetDirSize(Source *r, ulong size);
  10. ulong sourceGetDirSize(Source *r);
  11. void sourceRemove(Source*);
  12. void sourceFree(Source*);
  13. int sourceGetVtEntry(Source *r, VtEntry *dir);
  14. ulong sourceGetNumBlocks(Source *r);
  15. Lump *lumpWalk(Lump *u, int offset, int type, int size, int readOnly, int lock);
  16. int lumpGetScore(Lump *u, int offset, uchar score[VtScoreSize]);
  17. void lumpDecRef(Lump*, int unlock);
  18. Lump *lumpIncRef(Lump*);
  19. void lumpFreeEntry(Lump *u, int entry);
  20. Cache *cacheAlloc(VtSession *z, int blockSize, long nblocks);
  21. Lump *cacheAllocLump(Cache *c, int type, int size, int dir);
  22. void cacheFree(Cache *c);
  23. long cacheGetSize(Cache*);
  24. int cacheSetSize(Cache*, long);
  25. int cacheGetBlockSize(Cache *c);
  26. Lump *cacheGetLump(Cache *c, uchar score[VtScoreSize], int type, int size);
  27. void cacheCheck(Cache*);
  28. int mbUnpack(MetaBlock *mb, uchar *p, int n);
  29. void mbInsert(MetaBlock *mb, int i, MetaEntry*);
  30. void mbDelete(MetaBlock *mb, int i, MetaEntry*);
  31. void mbPack(MetaBlock *mb);
  32. uchar *mbAlloc(MetaBlock *mb, int n);
  33. int meUnpack(MetaEntry*, MetaBlock *mb, int i);
  34. int meCmp(MetaEntry*, char *s);
  35. int meCmpNew(MetaEntry*, char *s);
  36. int vdSize(VacDir *dir);
  37. int vdUnpack(VacDir *dir, MetaEntry*);
  38. void vdPack(VacDir *dir, MetaEntry*);
  39. VacFile *vfRoot(VacFS *fs, uchar *score);