chiark / gitweb /
bf3cb575822f1ef7c6b5a655d3abc5cb03f8b39f
[chiark-tcl.git] / hbytes / chiark_tcl_hbytes.h
1 /*
2  * hbytes - hex-stringrep efficient byteblocks for Tcl
3  * Copyright 2006-2012 Ian Jackson
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this library; if not, see <http://www.gnu.org/licenses/>.
17  */
18
19
20 #ifndef CHIARK_TCL_HBYTES_H
21 #define CHIARK_TCL_HBYTES_H
22
23 #include "hbytes.h"
24
25 typedef struct {
26   Byte *start; /* byl bytes */
27   Tcl_Obj *data; /* may be 0 to mean empty */
28 } AddrMap_Entry;
29
30 struct AddrMap_Value {
31   int byl, used, space;
32   AddrMap_Entry *entries;
33   /* Entries are sorted by start.  Each entry gives value (or lack of
34    * it) for all A st START <= A < NEXT-START.  Last entry has value
35    * (or lack of it) for all A >= START.  First entry is always
36    * present and always has start all-bits-0. */
37 }; /* internalRep.otherValuePtr */
38
39 #include "hbytes+tcmdif.h"
40
41 #endif /*CHIARK_TCL_HBYTES_H*/