File: mchar_define_charset.3m17n

package info (click to toggle)
m17n-docs 1.6.2-2
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 22,492 kB
  • ctags: 1,495
  • sloc: sh: 1,032; makefile: 406; ansic: 206; perl: 108
file content (282 lines) | stat: -rw-r--r-- 5,509 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA)
.\" Copyright (C) 2001-2011
.\"   National Institute of Advanced Industrial Science and Technology (AIST)
.\" This file is part of the m17n library documentation.
.\" Permission is granted to copy, distribute and/or modify this document
.\" under the terms of the GNU Free Documentation License, Version 1.2 or
.\" any later version published by the Free Software Foundation; with no
.\" Invariant Section, no Front-Cover Texts,
.\" and no Back-Cover Texts.  A copy of the license is included in the
.\" appendix entitled "GNU Free Documentation License".
.TH "mchar_define_charset" 3m17n "12 Jan 2011" "Version 1.6.2" "The m17n Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
mchar_define_charset \- Define a charset. 


.SH SYNOPSIS
\fBMSymbol\fP
\fBmchar_define_charset\fP (const char *
\fIname\fP, \fBMPlist\fP *
\fIplist\fP)


.SH DESCRIPTION
Define a charset. The
.ft B
mchar_define_charset()
.ft R
function defines a new charset and makes it accessible via a symbol whose name is
.ft B
name\fP.
.ft R
.ft B
plist
.ft R
specifies parameters of the charset as below:
.PP
.PD 0
.IP "\(bu" 2
Key is
.ft B
Mmethod\fP,
.ft R
value is a symbol.
.PP
The value specifies the method for decoding/encoding code\-points in the charset. It must be
.ft B
Moffset\fP,
.ft R
.ft B
Mmap
.ft R
(default),
.ft B
Munify\fP,
.ft R
.ft B
Msubset\fP,
.ft R
or
.ft B
Msuperset\fP.
.ft R
.PP

.IP "\(bu" 2
Key is
.ft B
Mdimension\fP,
.ft R
value is an integer
.PP
The value specifies the dimension of code\-points of the charset. It must be 1 (default), 2, 3, or 4.
.PP

.IP "\(bu" 2
Key is
.ft B
Mmin_range\fP,
.ft R
value is an unsigned integer
.PP
The value specifies the minimum range of a code\-point, which means that the Nth byte of the value is the minimum Nth byte of code\-points of the charset. The default value is 0.
.PP

.IP "\(bu" 2
Key is
.ft B
Mmax_range\fP,
.ft R
value is an unsigned integer
.PP
The value specifies the maximum range of a code\-point, which means that the Nth byte of the value is the maximum Nth byte of code\-points of the charset. The default value is 0xFF, 0xFFFF, 0xFFFFFF, or 0xFFFFFFFF if the dimension is 1, 2, 3, or 4 respectively.
.PP

.IP "\(bu" 2
Key is
.ft B
Mmin_code\fP,
.ft R
value is an unsigned integer
.PP
The value specifies the minimum code\-point of the charset. The default value is the minimum range.
.PP

.IP "\(bu" 2
Key is
.ft B
Mmax_code\fP,
.ft R
value is an unsigned integer
.PP
The value specifies the maximum code\-point of the charset. The default value is the maximum range.
.PP

.IP "\(bu" 2
Key is
.ft B
Mascii_compatible\fP,
.ft R
value is a symbol
.PP
The value specifies whether the charset is ASCII compatible or not. If the value is
.ft B
Mnil
.ft R
(default), it is not ASCII compatible, else compatible.
.PP

.IP "\(bu" 2
Key is
.ft B
Mfinal_byte\fP,
.ft R
value is an integer
.PP
The value specifies the
.ft I
final
.ft R
.ft I
byte
.ft R
of the charset registered in The International Registry. It must be 0 (default) or 32..127. The value 0 means that the charset is not in the registry.
.PP

.IP "\(bu" 2
Key is
.ft B
Mrevision\fP,
.ft R
value is an integer
.PP
The value specifies the
.ft I
revision
.ft R
.ft I
number
.ft R
of the charset registered in The International Registry. It must be 0..127. If the charset is not in The International Registry, the value is ignored. The value 0 means that the charset has no revision number.
.PP

.IP "\(bu" 2
Key is
.ft B
Mmin_char\fP,
.ft R
value is an integer
.PP
The value specifies the minimum character code of the charset. The default value is 0.
.PP

.IP "\(bu" 2
Key is
.ft B
Mmapfile\fP,
.ft R
value is an M\-text
.PP
If the method is
.ft B
Mmap
.ft R
or
.ft B
Munify\fP,
.ft R
a data that contains mapping information is added to the m17n database by calling the function
.ft B
mdatabase_define()
.ft R
with the value as an argument
.ft B
extra_info\fP,
.ft R
i.e. the value is used as a file name of the data.
.PP
Otherwise, this parameter is ignored.
.PP

.IP "\(bu" 2
Key is
.ft B
Mparents\fP,
.ft R
value is a plist
.PP
If the method is
.ft B
Msubset\fP,
.ft R
the value must is a plist of length 1, and the value of the plist must be a symbol representing a parent charset.
.PP
If the method is
.ft B
Msuperset\fP,
.ft R
the value must be a plist of length less than 9, and the values of the plist must be symbols representing subset charsets.
.PP
Otherwise, this parameter is ignored.
.PP

.IP "\(bu" 2
Key is
.ft B
Mdefine_coding\fP,
.ft R
value is a symbol
.PP
If the dimension of the charset is 1, the value specifies whether or not to define a coding system of the same name whose type is
.ft B
Mcharset\fP.
.ft R
A coding system is defined if the value is not
.ft B
Mnil\fP.
.ft R
.PP
Otherwise, this parameter is ignored.
.PP

.PP
.PP
.SH RETURN VALUE
.PP
.RS 4
If the operation was successful,
.ft B
mchar_define_charset()
.ft R
returns a symbol whose name is
.ft B
name\fP.
.ft R
Otherwise it returns
.ft B
Mnil
.ft R
and assigns an error code to the external variable
.ft B
merror_code\fP.
.ft R
.RE
.PP
.SH ERRORS
.PP
.RS 4
\fCMERROR_CHARSET
.ft R
.RE
.PP

.SH COPYRIGHT
Copyright (C) 2001 Information\-technology Promotion Agency (IPA)
.br
Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST)
.br
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License 
<http://www.gnu.org/licenses/fdl.html>.