util/dttypes: remove register keyword
[oweals/cde.git] / cde / programs / dtudcfonted / libfal / _fallcGeneric.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* XlcGeneric.h 1.3 - Fujitsu source for CDEnext    95/12/07 10:53:07   */ 
24 /* $XConsortium: _fallcGeneric.h /main/1 1996/04/08 15:17:24 cde-fuj $ */
25 /*
26  * Copyright 1992, 1993 by TOSHIBA Corp.
27  *
28  * Permission to use, copy, modify, and distribute this software and its
29  * documentation for any purpose and without fee is hereby granted, provided
30  * that the above copyright notice appear in all copies and that both that
31  * copyright notice and this permission notice appear in supporting
32  * documentation, and that the name of TOSHIBA not be used in advertising
33  * or publicity pertaining to distribution of the software without specific,
34  * written prior permission. TOSHIBA make no representations about the
35  * suitability of this software for any purpose.  It is provided "as is"
36  * without express or implied warranty.
37  *
38  * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40  * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44  * SOFTWARE.
45  *
46  * Author: Katsuhisa Yano       TOSHIBA Corp.
47  *                              mopi@osa.ilab.toshiba.co.jp
48  */
49 /*
50  * Copyright 1995 by FUJITSU LIMITED
51  * This is source code modified by FUJITSU LIMITED under the Joint
52  * Development Agreement for the CDEnext PST.
53  * This is unpublished proprietry source code of FUJITSU LIMITED
54  *
55  * Modifier: Takanori Tateno   FUJITSU LIMITED
56  *
57  */
58
59 #ifndef _XLCGENERIC_H_
60 #define _XLCGENERIC_H_
61
62 #include "_fallcPubI.h"
63
64 typedef struct _ByteInfo {
65      unsigned char start,end;
66 } ByteInfoRec, *ByteInfo;
67
68 typedef struct _ByteInfoList {
69     int         M;                          /* 1 <= M <= length */
70     int         byteinfo_num;
71     ByteInfo    byteinfo;
72 } ByteInfoListRec, *ByteInfoList;
73
74 /* conversion_type values */
75 #define LOCALCONV      1
76 #define FILECONV       2
77 #define FUNCTIONCONV   4
78
79 typedef struct _Conversion {
80     unsigned long       conversion_type;
81     int                 conv_num;
82     FontScope           convlist;
83     char                *cnv_file;
84     XlcConv             cnvfunc;
85 } ConversionRec, *Conversion;
86
87 typedef struct _ExtdSegment {
88     char        *name;
89     XlcSide     side;
90     FontScope   area;
91     int         area_num;
92     XlcCharSet  charset;
93 } ExtdSegmentRec, *ExtdSegment;
94
95 typedef struct _SegConvRec {
96     int                 length;
97     char                *source_encoding;
98     XlcCharSet          source;
99     char                *destination_encoding;
100     XlcCharSet          dest;
101     FontScopeRec        range;
102     int                 conv_num;
103     FontScope           conv;
104 } SegConvRec, *SegConv;
105
106 typedef struct _ParseInfoRec *ParseInfo;
107
108 typedef struct _CodeSetRec {
109     XlcCharSet          *charset_list;
110     int                 num_charsets;
111     int                 cs_num;
112     XlcSide             side;
113     int                 length;
114     ByteInfoList        byteM;
115     Conversion          mbconv;
116     Conversion          ctconv;
117     ExtdSegment         ctextseg;
118     ParseInfo           parse_info;
119     unsigned long       wc_encoding;
120 } CodeSetRec, *CodeSet;
121
122 typedef enum {
123     E_GL,                       /* GL encoding */
124     E_GR,                       /* GR encoding */
125     E_SS,                       /* single shift */
126     E_LSL,                      /* locking shift left */
127     E_LSR,                      /* locking shift right */
128     E_LAST
129 } EncodingType;
130
131 typedef struct _ParseInfoRec {
132     EncodingType        type;
133     char                *encoding;
134     CodeSet             codeset;
135 } ParseInfoRec;
136
137 /*
138  * XLCd private data
139  */
140
141 #define XLC_GENERIC(lcd, x)     (((XLCdGeneric) lcd->core)->gen.x)
142 #define XLC_GENERIC_PART(lcd)   (&(((XLCdGeneric) lcd->core)->gen))
143
144 typedef struct _XLCdGenericPart {
145     int                 codeset_num;
146     CodeSet             *codeset_list;
147     unsigned char       *mb_parse_table;
148     int                 mb_parse_list_num;
149     ParseInfo           *mb_parse_list;
150     unsigned long       wc_encode_mask;
151     unsigned long       wc_shift_bits;
152     CodeSet             initial_state_GL;
153     CodeSet             initial_state_GR;
154     int                 segment_conv_num;  /* UDC */
155     SegConv             segment_conv;      /* UDC */
156 #ifndef X_NOT_STDC_ENV
157     Bool                use_stdc_env;
158     Bool                force_convert_to_mb;
159 #endif
160 } XLCdGenericPart;
161
162 typedef struct _XLCdGenericRec {
163     XLCdCoreRec         core;   
164     XLCdPublicPart      pub;
165     XLCdGenericPart     gen;    
166 } XLCdGenericRec, *XLCdGeneric;
167
168 extern XLCdMethods _fallcGenericMethods;
169
170 #endif  /* _XLCGENERIC_H_ */