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

Function FlushBuf

3rdParty/PKWare/implode.cpp:185–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185static void PKWAREAPI FlushBuf(TCmpStruct * pWork)
186{
187 unsigned char save_ch1;
188 unsigned char save_ch2;
189 unsigned int size = 0x800;
190
191 pWork->write_buf(pWork->out_buff, &size, pWork->param);
192
193 save_ch1 = pWork->out_buff[0x800];
194 save_ch2 = pWork->out_buff[pWork->out_bytes];
195 pWork->out_bytes -= 0x800;
196
197 memset(pWork->out_buff, 0, sizeof(pWork->out_buff));
198
199 if(pWork->out_bytes != 0)
200 pWork->out_buff[0] = save_ch1;
201 if(pWork->out_bits != 0)
202 pWork->out_buff[pWork->out_bytes] = save_ch2;
203}
204
205static void PKWAREAPI OutputBits(TCmpStruct * pWork, unsigned int nbits, unsigned long bit_buff)
206{

Callers 1

OutputBitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected