Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
1.1 KiB

  1. /* this header file comes from libowfat, http://www.fefe.de/libowfat/ */
  2. #ifndef CDB_MAKE_H
  3. #define CDB_MAKE_H
  4. #include "buffer.h"
  5. #include "uint64.h"
  6. #include "uint32.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #define CDB_HPLIST 1000
  11. struct cdb_hp { uint32 h; uint32 p; } ;
  12. struct cdb_hplist {
  13. struct cdb_hp hp[CDB_HPLIST];
  14. struct cdb_hplist *next;
  15. int num;
  16. } ;
  17. struct cdb_make {
  18. char bspace[8192];
  19. char final[2048];
  20. uint32 count[256];
  21. uint32 start[256];
  22. struct cdb_hplist *head;
  23. struct cdb_hp *split; /* includes space for hash */
  24. struct cdb_hp *hash;
  25. uint32 numentries;
  26. buffer b;
  27. uint32 pos;
  28. int64 fd;
  29. } ;
  30. extern int cdb_make_start(struct cdb_make *,int64);
  31. extern int cdb_make_addbegin(struct cdb_make *,unsigned long int,unsigned long int);
  32. extern int cdb_make_addend(struct cdb_make *,unsigned long int,unsigned long int,uint32);
  33. extern int cdb_make_add(struct cdb_make *,const unsigned char *,unsigned long int,const unsigned char *,unsigned long int);
  34. extern int cdb_make_finish(struct cdb_make *);
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif