@@ -73,13 +73,16 @@ typedef struct cnc_pny_encode_state_t {
73
73
size_t __is_initialized : 1 ;
74
74
// ////
75
75
// / @brief Private. Do not access.
76
+ size_t __assume_valid : 1 ;
77
+ // ////
78
+ // / @brief Private. Do not access.
76
79
size_t __idna : 1 ;
77
80
// ////
78
81
// / @brief Private. Do not access.
79
82
size_t __action_state : 2 ;
80
83
// ////
81
84
// / @brief Private. Do not access.
82
- size_t __padding : (sizeof (size_t ) * CHAR_BIT) - 6 ;
85
+ size_t __padding : (sizeof (size_t ) * CHAR_BIT) - 7 ;
83
86
// ////
84
87
// / @brief Private. Do not access.
85
88
size_t __has_seen_non_basic;
@@ -102,6 +105,9 @@ typedef struct cnc_pny_decode_state_t {
102
105
size_t input_is_complete : 1 ;
103
106
// ////
104
107
// / @brief Private. Do not access.
108
+ size_t __assume_valid : 1 ;
109
+ // ////
110
+ // / @brief Private. Do not access.
105
111
size_t __is_initialized : 1 ;
106
112
// ////
107
113
// / @brief Private. Do not access.
@@ -117,7 +123,7 @@ typedef struct cnc_pny_decode_state_t {
117
123
size_t __action_state : 2 ;
118
124
// ////
119
125
// / @brief Private. Do not access.
120
- size_t __padding : (sizeof (size_t ) * CHAR_BIT) - 7 ;
126
+ size_t __padding : (sizeof (size_t ) * CHAR_BIT) - 8 ;
121
127
// ////
122
128
// / @brief Private. Do not access.
123
129
alignas (void *) unsigned char __storage[(sizeof (void *) * 3 ) + (256 * sizeof (char ))
@@ -128,34 +134,90 @@ typedef struct cnc_pny_decode_state_t {
128
134
// / @brief Returns whether or not the given cnc_pny_encode_state_t has no more data that needs to be
129
135
// / output.
130
136
// /
131
- // / @param[in] __state The state to inspect
137
+ // / @param[in] __state The state to inspect.
132
138
ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ bool cnc_pny_encode_state_is_complete (
133
139
const cnc_pny_encode_state_t * __state);
134
140
135
141
// ////
136
142
// / @brief Returns whether or not the given cnc_pny_decode_state_t has no more data that needs to be
137
143
// / output.
138
144
// /
139
- // / @param[in] __state The state to inspect
145
+ // / @param[in] __state The state to inspect.
140
146
ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ bool cnc_pny_decode_state_is_complete (
141
147
const cnc_pny_decode_state_t * __state);
142
148
143
149
// ////
144
- // / @brief Returns whether or not the given cnc_pny_encode_state_t has no more data that needs to be
145
- // / output.
150
+ // / @brief Tells the state that input should still be expected.
146
151
// /
147
- // / @param[in, out] __state The state to trigger the completion on .
152
+ // / @param[in, out] __state The state to remove the expectation that input is complete from .
148
153
ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ void cnc_pny_encode_state_set_input_complete (
149
154
cnc_pny_encode_state_t * __state);
150
155
151
156
// ////
152
- // / @brief Returns whether or not the given cnc_pny_decode_state_t has no more data that needs to be
153
- // / output.
157
+ // / @brief Tells the state that input should still be expected.
158
+ // /
159
+ // / @param[in, out] __state The state to remove the expectation that input is complete from.
160
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ void
161
+ cnc_pny_decode_state_set_input_incomplete (cnc_pny_decode_state_t * __state);
162
+
163
+ // ////
164
+ // / @brief Tells the state that input should still be expected.
165
+ // /
166
+ // / @param[in, out] __state The state to turn off its current completion state.
167
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ void
168
+ cnc_pny_encode_state_set_input_incomplete (cnc_pny_encode_state_t * __state);
169
+
170
+ // ////
171
+ // / @brief Returns whether or not the given cnc_pny_decode_state_t is expecting anymore input.
154
172
// /
155
173
// / @param[in, out] __state The state to trigger the completion on.
156
174
ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ void cnc_pny_decode_state_set_input_complete (
157
175
cnc_pny_decode_state_t * __state);
158
176
177
+ // ////
178
+ // / @brief Returns whether or not the given cnc_pny_encode_state_t is expecting anymore input.
179
+ // /
180
+ // / @param[in, out] __state The state to inspect.
181
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ bool cnc_pny_encode_state_is_input_complete (
182
+ const cnc_pny_encode_state_t * __state);
183
+
184
+ // ////
185
+ // / @brief Returns whether or not the given cnc_pny_decode_state_t is expecting anymore input.
186
+ // /
187
+ // / @param[in, out] __state The state to to inspect.
188
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ bool cnc_pny_decode_state_is_input_complete (
189
+ const cnc_pny_decode_state_t * __state);
190
+
191
+ // ////
192
+ // / @brief Returns whether or not the given cnc_pny_encode_state_t has no more data that needs to be
193
+ // / output.
194
+ // /
195
+ // / @param[in, out] __state The state to make operations assume the input is valid.
196
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ void cnc_pny_encode_state_set_assume_valid (
197
+ cnc_pny_encode_state_t * __state, bool __value);
198
+
199
+ // ////
200
+ // / @brief Returns whether or not the given cnc_pny_decode_state_t has no more data that needs to be
201
+ // / output.
202
+ // /
203
+ // / @param[in, out] __state The state to make operations assume the input is valid.
204
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ void cnc_pny_decode_state_set_assume_valid (
205
+ cnc_pny_decode_state_t * __state, bool __value);
206
+
207
+ // ////
208
+ // / @brief Returns whether or not the given cnc_pny_encode_state_t is assuming input data is valid.
209
+ // /
210
+ // / @param[in, out] __state The state to inspect.
211
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ bool cnc_pny_encode_state_is_assuming_valid (
212
+ const cnc_pny_encode_state_t * __state);
213
+
214
+ // ////
215
+ // / @brief Returns whether or not the given cnc_pny_decode_state_t is assuming input data is valid.
216
+ // /
217
+ // / @param[in, out] __state The state to inspect.
218
+ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ bool cnc_pny_decode_state_is_assuming_valid (
219
+ const cnc_pny_decode_state_t * __state);
220
+
159
221
// ////
160
222
// / @}
161
223
0 commit comments