robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 9a29622b3b00ddb601

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