lpcset.h 736 B

12345678910111213141516171819202122232425262728293031
  1. #if !defined(lpset_h)
  2. #define lpset_h
  3. #include "lpcset.h"
  4. #include "lpcode.h"
  5. #include "lptree.h"
  6. /*
  7. ** Extra information for the result of 'charsettype'. When result is
  8. ** IChar, 'offset' is the character. When result is ISet, 'cs' is the
  9. ** supporting bit array (with offset included), 'offset' is the offset
  10. ** (in bytes), 'size' is the size (in bytes), and 'delt' is the default
  11. ** value for bytes outside the set.
  12. */
  13. typedef struct {
  14. const byte *cs;
  15. int offset;
  16. int size;
  17. int deflt;
  18. } charsetinfo;
  19. int tocharset (TTree *tree, Charset *cs);
  20. Opcode charsettype (const byte *cs, charsetinfo *info);
  21. byte getbytefromcharset (const charsetinfo *info, int index);
  22. void tree2cset (TTree *tree, charsetinfo *info);
  23. #endif