Partially sync files.el from XEmacs 21.5 for wildcard support.
[sxemacs] / src / casetab.h
1 /* XEmacs routines to deal with case tables.
2    Copyright (C) 2000 Yoshiki Hayashi.
3 This file is part of SXEmacs
4
5 SXEmacs is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 SXEmacs is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
17
18
19 /* Synched up with: Not in FSF. */
20
21 #ifndef INCLUDED_casetab_h_
22 #define INCLUDED_casetab_h_
23
24 struct Lisp_Case_Table {
25         struct lcrecord_header header;
26         Lisp_Object downcase_table;
27         Lisp_Object upcase_table;
28         Lisp_Object case_canon_table;
29         Lisp_Object case_eqv_table;
30 };
31 typedef struct Lisp_Case_Table Lisp_Case_Table;
32
33 DECLARE_LRECORD(case_table, Lisp_Case_Table);
34 #define XCASE_TABLE(x) XRECORD (x, case_table, Lisp_Case_Table)
35 #define XSETCASE_TABLE(x, p) XSETRECORD (x, p, case_table)
36 #define CASE_TABLEP(x) RECORDP (x, case_table)
37 #define CHECK_CASE_TABLE(x) CHECK_RECORD (x, case_table)
38 #define CONCHECK_CASE_TABLE(x) CONCHECK_RECORD (x, case_table)
39
40 #define CASE_TABLE_DOWNCASE(ct) ((ct)->downcase_table)
41 #define CASE_TABLE_UPCASE(ct) ((ct)->upcase_table)
42 #define CASE_TABLE_CANON(ct) ((ct)->case_canon_table)
43 #define CASE_TABLE_EQV(ct) ((ct)->case_eqv_table)
44 #define XCASE_TABLE_DOWNCASE(ct) (XCASE_TABLE (ct)->downcase_table)
45 #define XCASE_TABLE_UPCASE(ct) (XCASE_TABLE (ct)->upcase_table)
46 #define XCASE_TABLE_CANON(ct) (XCASE_TABLE (ct)->case_canon_table)
47 #define XCASE_TABLE_EQV(ct) (XCASE_TABLE (ct)->case_eqv_table)
48
49 #define SET_CASE_TABLE_DOWNCASE(ct, p) ((ct)->downcase_table = p)
50 #define SET_CASE_TABLE_UPCASE(ct, p) ((ct)->upcase_table = p)
51 #define SET_CASE_TABLE_CANON(ct, p) ((ct)->case_canon_table = p)
52 #define SET_CASE_TABLE_EQV(ct, p) ((ct)->case_eqv_table = p)
53 #define XSET_CASE_TABLE_DOWNCASE(ct, p) \
54   SET_CASE_TABLE_DOWNCASE (XCASE_TABLE (ct), p)
55 #define XSET_CASE_TABLE_UPCASE(ct, p)   \
56   SET_CASE_TABLE_UPCASE (XCASE_TABLE (ct), p)
57 #define XSET_CASE_TABLE_CANON(ct, p)    \
58   SET_CASE_TABLE_CANON (XCASE_TABLE (ct),  p)
59 #define XSET_CASE_TABLE_EQV(ct, p)      \
60   SET_CASE_TABLE_EQV (XCASE_TABLE (ct),  p)
61
62 extern Lisp_Object Vstandard_case_table;
63
64 #endif                          /* INCLUDED_casetab_h_ */