Mercurial > emacs
comparison src/coding.h @ 17118:dcfb481ee914
(struct iso2022_spec): Member requested_designation is
changed to array of `char' just for saving memory.
(CODING_FLAG_ISO_INIT_AT_BOL, CODING_FLAG_ISO_DESIGNATE_AT_BOL):
New macros.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 27 Feb 1997 11:07:46 +0000 |
parents | 70194012fb3a |
children | 6637001cdb4b |
comparison
equal
deleted
inserted
replaced
17117:f03002ec3404 | 17118:dcfb481ee914 |
---|---|
126 #define CODING_FLAG_ISO_USE_OLDJIS 0x0080 | 126 #define CODING_FLAG_ISO_USE_OLDJIS 0x0080 |
127 | 127 |
128 /* If set, do not produce ISO6429's direction specifying sequence. */ | 128 /* If set, do not produce ISO6429's direction specifying sequence. */ |
129 #define CODING_FLAG_ISO_NO_DIRECTION 0x0100 | 129 #define CODING_FLAG_ISO_NO_DIRECTION 0x0100 |
130 | 130 |
131 /* If set, assume designation states are reset at beginning of line on | |
132 output. */ | |
133 #define CODING_FLAG_ISO_INIT_AT_BOL 0x0200 | |
134 | |
135 /* If set, designation sequence should be placed at beginning of line | |
136 on output. */ | |
137 #define CODING_FLAG_ISO_DESIGNATE_AT_BOL 0x0400 | |
138 | |
131 /* Structure of the field `spec.iso2022' in the structure `coding_system'. */ | 139 /* Structure of the field `spec.iso2022' in the structure `coding_system'. */ |
132 struct iso2022_spec | 140 struct iso2022_spec |
133 { | 141 { |
134 /* The current graphic register invoked to each graphic plane. */ | 142 /* The current graphic register invoked to each graphic plane. */ |
135 int current_invocation[2]; | 143 int current_invocation[2]; |
139 | 147 |
140 /* A charset initially designated to each graphic register. */ | 148 /* A charset initially designated to each graphic register. */ |
141 int initial_designation[4]; | 149 int initial_designation[4]; |
142 | 150 |
143 /* A graphic register to which each charset should be designated. */ | 151 /* A graphic register to which each charset should be designated. */ |
144 int requested_designation[MAX_CHARSET]; | 152 char requested_designation[MAX_CHARSET]; |
145 | 153 |
146 /* Set to 1 temporarily only when graphic register 2 or 3 is invoked | 154 /* Set to 1 temporarily only when graphic register 2 or 3 is invoked |
147 by single-shift while encoding. */ | 155 by single-shift while encoding. */ |
148 int single_shifting; | 156 int single_shifting; |
157 | |
158 /* Set to 1 temporarily only when processing at beginning of line. */ | |
159 int bol; | |
149 }; | 160 }; |
150 | 161 |
151 /* Macros to access each field in the structure `spec.iso2022'. */ | 162 /* Macros to access each field in the structure `spec.iso2022'. */ |
152 #define CODING_SPEC_ISO_INVOCATION(coding, plane) \ | 163 #define CODING_SPEC_ISO_INVOCATION(coding, plane) \ |
153 coding->spec.iso2022.current_invocation[plane] | 164 coding->spec.iso2022.current_invocation[plane] |
155 coding->spec.iso2022.current_designation[reg] | 166 coding->spec.iso2022.current_designation[reg] |
156 #define CODING_SPEC_ISO_INITIAL_DESIGNATION(coding, reg) \ | 167 #define CODING_SPEC_ISO_INITIAL_DESIGNATION(coding, reg) \ |
157 coding->spec.iso2022.initial_designation[reg] | 168 coding->spec.iso2022.initial_designation[reg] |
158 #define CODING_SPEC_ISO_REQUESTED_DESIGNATION(coding, charset) \ | 169 #define CODING_SPEC_ISO_REQUESTED_DESIGNATION(coding, charset) \ |
159 coding->spec.iso2022.requested_designation[charset] | 170 coding->spec.iso2022.requested_designation[charset] |
160 | |
161 /* Set to 1 temporarily only when encoding a character with | |
162 single-shift function. */ | |
163 #define CODING_SPEC_ISO_SINGLE_SHIFTING(coding) \ | 171 #define CODING_SPEC_ISO_SINGLE_SHIFTING(coding) \ |
164 coding->spec.iso2022.single_shifting | 172 coding->spec.iso2022.single_shifting |
173 #define CODING_SPEC_ISO_BOL(coding) \ | |
174 coding->spec.iso2022.bol | |
165 | 175 |
166 /* Return a charset which is currently designated to the graphic plane | 176 /* Return a charset which is currently designated to the graphic plane |
167 PLANE in the coding-system CODING. */ | 177 PLANE in the coding-system CODING. */ |
168 #define CODING_SPEC_ISO_PLANE_CHARSET(coding, plane) \ | 178 #define CODING_SPEC_ISO_PLANE_CHARSET(coding, plane) \ |
169 CODING_SPEC_ISO_DESIGNATION \ | 179 CODING_SPEC_ISO_DESIGNATION \ |