(insert-char-data): Fix format of `iso-10646-comment'; swap order of
[chise/xemacs-chise.git] / src / char-1byte.h
1 /* Header for UCS-4 character representation.
2    Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
3    Licensed to the Free Software Foundation.
4
5 This file is part of XEmacs.
6
7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
10 later version.
11
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with XEmacs; see the file COPYING.  If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 /* Rewritten by MORIOKA Tomohiko <tomo@m17n.org>. */
23
24 #ifndef _XEMACS_CHAR_1BYTE_H
25 #define _XEMACS_CHAR_1BYTE_H
26
27 #define valid_char_p(ch) ((unsigned int) (ch) <= 0xff)
28
29 \f
30 /************************************************************************/
31 /*                    Definition of leading bytes                       */
32 /************************************************************************/
33
34 typedef int Charset_ID;
35
36 #define MIN_LEADING_BYTE 0x80
37 #define LEADING_BYTE_ASCII 0x80
38 #define NUM_LEADING_BYTES 1
39
40 \f
41 /************************************************************************/
42 /*            Information about a particular character set              */
43 /************************************************************************/
44
45 #define CHARSETP(cs) 1
46 #define CHARSET_BY_LEADING_BYTE(lb) Vcharset_ascii
47 #define XCHARSET_LEADING_BYTE(cs) LEADING_BYTE_ASCII
48 #define XCHARSET_GRAPHIC(cs) -1
49 #define XCHARSET_COLUMNS(cs) 1
50 #define XCHARSET_DIMENSION(cs) 1
51
52 \f
53 /************************************************************************/
54 /*                        Dealing with characters                       */
55 /************************************************************************/
56
57 #define CHAR_CHARSET(ch) Vcharset_ascii
58 #define CHAR_LEADING_BYTE(ch) LEADING_BYTE_ASCII
59
60 #define BREAKUP_CHAR(ch, charset, byte1, byte2) do {    \
61   (charset) = Vcharset_ascii;                           \
62   (byte1) = (ch);                                       \
63   (byte2) = 0;                                          \
64 } while (0)
65
66 \f
67 /************************************************************************/
68 /*                            Exported functions                        */
69 /************************************************************************/
70
71 #define Vcharset_ascii Qnil
72
73 #endif /* _XEMACS_CHAR_1BYTE_H */