Partially sync files.el from XEmacs 21.5 for wildcard support.
[sxemacs] / src / rangetab.h
1 /* XEmacs routines to deal with range tables.
2    Copyright (C) 1995 Sun Microsystems, Inc.
3    Copyright (C) 1995 Ben Wing.
4
5 This file is part of SXEmacs
6
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
19
20
21 /* Synched up with: Not in FSF. */
22
23 /* Extracted from rangetab.c by O. Galibert, 1998. */
24
25 #ifndef INCLUDED_rangetab_h_
26 #define INCLUDED_rangetab_h_
27
28 typedef struct range_table_entry range_table_entry;
29 struct range_table_entry {
30         EMACS_INT first;
31         EMACS_INT last;
32         Lisp_Object val;
33 };
34
35 typedef struct {
36         Dynarr_declare(range_table_entry);
37 } range_table_entry_dynarr;
38
39 struct Lisp_Range_Table {
40         struct lcrecord_header header;
41         range_table_entry_dynarr *entries;
42 };
43 typedef struct Lisp_Range_Table Lisp_Range_Table;
44
45 DECLARE_LRECORD(range_table, Lisp_Range_Table);
46 #define XRANGE_TABLE(x) XRECORD (x, range_table, Lisp_Range_Table)
47 #define XSETRANGE_TABLE(x, p) XSETRECORD (x, p, range_table)
48 #define RANGE_TABLEP(x) RECORDP (x, range_table)
49 #define CHECK_RANGE_TABLE(x) CHECK_RECORD (x, range_table)
50
51 #endif                          /* INCLUDED_rangetab_h_ */