23#include FT_INTERNAL_MEMORY_H
24#include FT_INTERNAL_STREAM_H
25#include FT_INTERNAL_DEBUG_H
44 state->buf_offset = 0;
46 state->buf_size <<= 3;
68 if (
state->buf_clear ||
74 state->num_bits = ++num_bits;
79 ? (
FT_UInt)( ( 1UL << num_bits ) - 256 )
80 :
state->max_free + 1;
83 if (
state->buf_clear )
86 state->free_bits = (
FT_UInt)( ( 1UL << num_bits ) - 256 );
128 new_size = new_size + ( new_size >> 1 ) + 4;
141 if ( new_size == old_size )
148 state->stack_size = new_size;
167 new_size += new_size >> 2;
185 state->prefix + old_size,
188 state->prefix_size = new_size;
197 state->buf_offset = 0;
199 state->buf_clear = 0;
200 state->buf_total = 0;
201 state->stack_top = 0;
218 state->prefix_size = 0;
221 state->stack_size =
sizeof (
state->stack_0 );
245#define FTLZW_STACK_PUSH( c ) \
247 if ( state->stack_top >= state->stack_size && \
248 ft_lzwstate_stack_grow( state ) < 0 ) \
251 state->stack[state->stack_top++] = (FT_Byte)(c); \
270 switch (
state->phase )
297 :
state->max_free + 1;
300 if ( c < 0 || c > 255 )
332 state->buf_clear = 1;
356 while (
code >= 256U )
358 if ( !
state->prefix )
375 while (
state->stack_top > 0 )
398 state->free_ent += 1;
412 state->old_code = old_code;
413 state->old_char = old_char;
414 state->in_code = in_code;
#define FT_ASSERT(condition)
#define FT_REALLOC_MULT(ptr, oldcnt, newcnt, itmsz)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
#define FT_MEM_MOVE(dest, source, count)
FT_Stream_TryRead(FT_Stream stream, FT_Byte *buffer, FT_ULong count)
FT_Stream_Seek(FT_Stream stream, FT_ULong pos)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
ft_lzwstate_init(FT_LzwState state, FT_Stream source)
#define FTLZW_STACK_PUSH(c)
ft_lzwstate_io(FT_LzwState state, FT_Byte *buffer, FT_ULong out_size)
static int ft_lzwstate_prefix_grow(FT_LzwState state)
ft_lzwstate_reset(FT_LzwState state)
static int ft_lzwstate_stack_grow(FT_LzwState state)
static FT_Int32 ft_lzwstate_get_code(FT_LzwState state)
static int ft_lzwstate_refill(FT_LzwState state)
ft_lzwstate_done(FT_LzwState state)
GLuint GLuint GLsizei count
static char memory[1024 *256]
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID ULONG out_size
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList