MCPcopy Create free account
hub / github.com/diasurgical/devilution / GenDecodeTabs

Function GenDecodeTabs

3rdParty/PKWare/explode.cpp:130–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128// Local functions
129
130static void PKWAREAPI GenDecodeTabs(
131 unsigned char * positions, // [out] Table of positions
132 unsigned char * start_indexes, // [in] Table of start indexes
133 unsigned char * length_bits, // [in] Table of lengths. Each length is stored as number of bits
134 size_t elements) // [in] Number of elements in start_indexes and length_bits
135{
136 unsigned int index;
137 unsigned int length;
138 size_t i;
139
140 for(i = 0; i < elements; i++)
141 {
142 length = 1 << length_bits[i]; // Get the length in bytes
143
144 for(index = start_indexes[i]; index < 0x100; index += length)
145 {
146 positions[index] = (unsigned char)i;
147 }
148 }
149}
150
151static void PKWAREAPI GenAscTabs(TDcmpStruct * pWork)
152{

Callers 1

explodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected