diff options
| author | Steven Fuller <relnev@icculus.org> | 2001-07-28 04:44:27 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:36 +0200 |
| commit | f759e35cd8399d8bffea4d59c5822db8f1002409 (patch) | |
| tree | c0ab401aeb1fdd12bd934107f8a5a647c205ed2a /src/win95/huffman.cpp | |
| parent | 6d5a3cec554f6afc5f075722fba7e2aa464f5676 (diff) | |
More compilation.
Moved windows typedefs to a separate file.
Included public domain md5 routines (from dpkg).
Diffstat (limited to 'src/win95/huffman.cpp')
| -rw-r--r-- | src/win95/huffman.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/win95/huffman.cpp b/src/win95/huffman.cpp index b2a0275..64100e1 100644 --- a/src/win95/huffman.cpp +++ b/src/win95/huffman.cpp @@ -1,7 +1,9 @@ -#include "stdio.h" -#include "stdlib.h" -#include "string.h" -#include "malloc.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "fixer.h" + #include "huffman.hpp" /* KJL 17:12:25 17/09/98 - Huffman compression/decompression routines */ @@ -28,17 +30,17 @@ typedef struct HuffNode // 16-byte node structure struct HuffNode *parent; // the THIRD four bytes, parent node - union - { // the FOURTH four bytes +// union +// { // the FOURTH four bytes unsigned int bits; // the bit pattern of this end node - struct - { - unsigned char flag; - unsigned char curdepth; - unsigned char maxdepth; - unsigned char unused; - }; - }; +// struct +// { +// unsigned char flag; +// unsigned char curdepth; +// unsigned char maxdepth; +// unsigned char unused; +// }; +// }; } HuffNode; @@ -99,7 +101,7 @@ extern HuffmanPackage *HuffmanCompression(unsigned char *sourcePtr, int length) { outpackage->CodelengthCount[n] = Depths[n + 1]; } - for (n = 0; n < 256; n++) + for (int n = 0; n < 256; n++) { outpackage->ByteAssignment[n] = SymbolCensus[n + 1].Symbol; } |
