LIB_PatternCollector.h 991 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include "PatternCollector.h"
  3. struct LIB_PatternCollector : public PatternCollector
  4. {
  5. protected:
  6. unsigned long offset;
  7. uint8_t lnum = 0; /* Count of LNAMES so far */
  8. uint8_t segnum = 0; /* Count of SEGDEFs so far */
  9. uint8_t codeLNAMES; /* Index of the LNAMES for "CODE" class */
  10. uint8_t codeSEGDEF; /* Index of the first SEGDEF that has class CODE */
  11. #define NONE 0xFF /* Improbable segment index */
  12. uint8_t *leData; /* Pointer to 64K of alloc'd data. Some .lib files
  13. have the symbols (PUBDEFs) *after* the data
  14. (LEDATA), so you need to keep the data here */
  15. uint16_t maxLeData; /* How much data we have in there */
  16. /* read a length then string to buf[]; make it an asciiz string */
  17. void readString( FILE *fl);
  18. public:
  19. /* Read the .lib file, and put the keys into the array *keys[]. Returns the count */
  20. int readSyms(FILE *fl);
  21. };