X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/dff2f7bc143397a35e8c67bbf2848283b6764dda..c85503d1a07d56f61d4fb85696212118c0c470cd:/src/statichuff/statichuff.c diff --git a/src/statichuff/statichuff.c b/src/statichuff/statichuff.c index b6da6f4..7503511 100644 --- a/src/statichuff/statichuff.c +++ b/src/statichuff/statichuff.c @@ -26,7 +26,7 @@ void cpynode(HUFFNODE *node1, HUFFNODE *node2) int compnode(HUFFNODE *node1, HUFFNODE *node2) { if (node1->freq < node2->freq) return 1; - if (node1->freq > node2->freq) return -11; + if (node1->freq > node2->freq) return -1; return 0; } @@ -189,6 +189,7 @@ int main(int argc, char* argv[]) /* Armo el input list y genero el arbol de huffman */ inputlist = buildlist(freqtable, &freqcount); codetree = buildtree(inputlist,freqcount); + /* Armo la tabla de codigos prefijos para el encoder */ zerocodes(codetable); buildcodes(codetable,codetree,0,0); printcodes(codetable,freqtable);