Source code of Windows XP (NT5)
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.

39 lines
1.0 KiB

  1. /*
  2. * ring16.h
  3. */
  4. /* ring buffer configuration */
  5. #define BUFFER_SIZE (512) /* must be 2^Nth */
  6. #define MIN_BUFFERS 3 /* minimum number we want */
  7. #define NUM_OUTPUT_BUFFER_PAGES (CHUNK_SIZE/BUFFER_SIZE)
  8. typedef struct aBuffer
  9. {
  10. struct aBuffer FAR *pLinkNewer; /* link to more recently used */
  11. struct aBuffer FAR *pLinkOlder; /* link to less recently used */
  12. int BufferPage; /* what page this is, -1 -> invalid */
  13. int BufferDirty; /* NZ -> needs to be written */
  14. BYTE Buffer[BUFFER_SIZE]; /* content */
  15. } BUFFER, FAR *PBUFFER;
  16. typedef struct
  17. {
  18. PBUFFER pBuffer; /* pointer to buffer, NULL if not present */
  19. int last_chance_ptr; /* index to last chance buffer table, or -1 */
  20. int fDiskValid; /* NZ -> this page has been written to disk */
  21. } PAGETABLEENTRY;
  22. typedef struct
  23. {
  24. short Len;
  25. long Dist;
  26. } MATCH;
  27. typedef struct
  28. {
  29. char wildName[2];
  30. unsigned long fileSize;
  31. } RINGNAME, FAR *PRINGNAME;