chiark / gitweb /
@@ -3,6 +3,9 @@
[chiark-tcl.git] / hbytes / chiark_tcl_hbytes.h
1 /*
2  * hbytes - hex-stringrep efficient byteblocks for Tcl
3  * Copyright 2006 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, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18  * 02110-1301, USA.
19  */
20
21
22 #ifndef CHIARK_TCL_HBYTES_H
23 #define CHIARK_TCL_HBYTES_H
24
25 #include "hbytes.h"
26
27 typedef struct {
28   Byte *start; /* byl bytes */
29   Tcl_Obj *data; /* may be 0 to mean empty */
30 } AddrMap_Entry;
31
32 struct AddrMap_Value {
33   int byl, used, space;
34   AddrMap_Entry *entries;
35   /* Entries are sorted by start.  Each entry gives value (or lack of
36    * it) for all A st START <= A < NEXT-START.  Last entry has value
37    * (or lack of it) for all A >= START.  First entry is always
38    * present and always has start all-bits-0. */
39 }; /* internalRep.otherValuePtr */
40
41 #include "hbytes+tcmdif.h"
42
43 #endif /*CHIARK_TCL_HBYTES_H*/