This repository was archived by the owner on Jun 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-45
lines changed Expand file tree Collapse file tree 1 file changed +1
-45
lines changed Original file line number Diff line number Diff line change @@ -150,56 +150,12 @@ extern void fcrestore(Fcin_t *fp)
150
150
_Fcin = * fp ;
151
151
}
152
152
153
- /* for testing purposes with small buffers */
154
- #if defined(IOBSIZE ) && (IOBSIZE < 2 * MB_LEN_MAX )
155
- # undef MB_LEN_MAX
156
- # define MB_LEN_MAX (IOBSIZE/2)
157
- #endif
158
-
159
- struct Extra
160
- {
161
- unsigned char buff [2 * MB_LEN_MAX ];
162
- unsigned char * next ;
163
- };
164
-
165
153
int _fcmbget (short * len )
166
154
{
167
- static struct Extra extra ;
168
- register int i , c , n ;
169
- if (_Fcin .fcleft )
170
- {
171
- if ((c = mbsize (extra .next )) < 0 )
172
- c = 1 ;
173
- if ((_Fcin .fcleft -= c ) <=0 )
174
- {
175
- _Fcin .fcptr = (unsigned char * )fcfirst () - _Fcin .fcleft ;
176
- _Fcin .fcleft = 0 ;
177
- }
178
- * len = c ;
179
- if (c == 1 )
180
- c = * extra .next ++ ;
181
- else if (c == 0 )
182
- _Fcin .fcleft = 0 ;
183
- else
184
- c = mbchar (extra .next );
185
- return (c );
186
- }
155
+ register int c ;
187
156
switch (* len = mbsize (_Fcin .fcptr ))
188
157
{
189
158
case -1 :
190
- if (_Fcin ._fcfile && (n = (_Fcin .fclast - _Fcin .fcptr )) < MB_LEN_MAX )
191
- {
192
- memcpy (extra .buff , _Fcin .fcptr , n );
193
- _Fcin .fcptr = _Fcin .fclast ;
194
- for (i = n ; i < MB_LEN_MAX + n ; i ++ )
195
- {
196
- if ((extra .buff [i ] = fcgetc (c ))== 0 )
197
- break ;
198
- }
199
- _Fcin .fcleft = n ;
200
- extra .next = extra .buff ;
201
- return (fcmbget (len ));
202
- }
203
159
* len = 1 ;
204
160
/* fall through */
205
161
case 0 :
You can’t perform that action at this time.
0 commit comments