Go to the source code of this file.
◆ FTLZW_STACK_PUSH
Value: FT_BEGIN_STMNT \
\
static int ft_lzwstate_stack_grow(FT_LzwState state)
Definition at line 245 of file ftzopen.c.
◆ ft_lzwstate_done()
Definition at line 228 of file ftzopen.c.
229 {
231
232
234
237
240
242 }
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
ft_lzwstate_reset(FT_LzwState state)
static char memory[1024 *256]
◆ ft_lzwstate_get_code()
static FT_Int32 ft_lzwstate_get_code |
( |
FT_LzwState |
state | ) |
|
|
static |
Definition at line 60 of file ftzopen.c.
61 {
66
67
68 if (
state->buf_clear ||
71 {
73 {
74 state->num_bits = ++num_bits;
76 return -1;
77
79 ? (
FT_UInt)( ( 1UL << num_bits ) - 256 )
80 :
state->max_free + 1;
81 }
82
83 if (
state->buf_clear )
84 {
86 state->free_bits = (
FT_UInt)( ( 1UL << num_bits ) - 256 );
88 }
89
91 return -1;
92
94 }
95
97
103
104 if ( num_bits >= 8 )
105 {
108 num_bits -= 8;
109 }
110 if ( num_bits > 0 )
112
114 }
static int ft_lzwstate_refill(FT_LzwState state)
Referenced by ft_lzwstate_io().
◆ ft_lzwstate_init()
Definition at line 208 of file ftzopen.c.
210 {
212
215
218 state->prefix_size = 0;
219
221 state->stack_size =
sizeof (
state->stack_0 );
222
224 }
◆ ft_lzwstate_io()
Definition at line 256 of file ftzopen.c.
259 {
261
265
266
269
270 switch (
state->phase )
271 {
273 {
276
277
278
282
286
289
293 in_code = 0;
294
297 :
state->max_free + 1;
298
300 if ( c < 0 || c > 255 )
302
304
307
310
312 }
313
314
316 {
319
320
321 NextCode:
325
327
329 {
330
332 state->buf_clear = 1;
333
334
335 old_code = 0;
336 old_char = 0;
337
338 goto NextCode;
339 }
340
342
344 {
345
347 {
348
351
354 }
355
356 while (
code >= 256U )
357 {
358 if ( !
state->prefix )
360
363 }
364 }
365
368
370 }
371
372
374 {
375 while (
state->stack_top > 0 )
376 {
378
381
384 }
385
386
388 {
392
394
397
398 state->free_ent += 1;
399 }
400
401 old_code = in_code;
402
404 goto NextCode;
405 }
406
407 default:
408 ;
409 }
410
412 state->old_code = old_code;
413 state->old_char = old_char;
414 state->in_code = in_code;
415
417
421 }
#define FT_ASSERT(condition)
FT_Stream_TryRead(FT_Stream stream, FT_Byte *buffer, FT_ULong count)
FT_Stream_Seek(FT_Stream stream, FT_ULong pos)
#define FTLZW_STACK_PUSH(c)
static int ft_lzwstate_prefix_grow(FT_LzwState state)
static FT_Int32 ft_lzwstate_get_code(FT_LzwState state)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID ULONG out_size
◆ ft_lzwstate_prefix_grow()
Definition at line 156 of file ftzopen.c.
157 {
162
163
166 else
168
169
170
171
172
173
174
175
176
179 return -1;
180
181
183
187
189 return 0;
190 }
#define FT_REALLOC_MULT(ptr, oldcnt, newcnt, itmsz)
#define FT_MEM_MOVE(dest, source, count)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
Referenced by ft_lzwstate_io().
◆ ft_lzwstate_refill()
Definition at line 29 of file ftzopen.c.
30 {
32
33
35 return -1;
36
40
44 state->buf_offset = 0;
45
46 state->buf_size <<= 3;
49 else
50 return -1;
51
53 return -1;
54
55 return 0;
56 }
GLuint GLuint GLsizei count
Referenced by ft_lzwstate_get_code().
◆ ft_lzwstate_reset()
◆ ft_lzwstate_stack_grow()
Definition at line 119 of file ftzopen.c.
120 {
122 {
127
129
131 {
134 }
135
136
137
139 {
142 return -1;
143 }
144
146 return -1;
147
149 }
150 return 0;
151 }
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)