X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Flizard.c;h=e5035e05698827fb0af13e0d3503110bbe79fbd8;hb=16df176fa4667d17146479219ba8816d89d1d78b;hp=b9f80486e45d0648c5ad0c2e3409eff005a6656b;hpb=2701ee1bcfe28449a58be93ba044448d3089d387;p=libucw.git diff --git a/lib/lizard.c b/lib/lizard.c index b9f80486..e5035e05 100644 --- a/lib/lizard.c +++ b/lib/lizard.c @@ -6,7 +6,7 @@ * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. * - * The file format is based on LZO1X and + * The file format is based on LZO1X and * the compression method is based on zlib. */ @@ -35,7 +35,7 @@ hashf(byte *string) } static inline byte * -locate_string(byte *string, uns record_id, uns head) +locate_string(byte *string, int record_id, int head) /* The strings are recorded into the hash-table regularly, hence there is no * need to store the pointer there. */ { @@ -177,7 +177,7 @@ lizard_compress(byte *in, uns in_len, byte *out) while (in < in_end) { uns hash = hashf(in); - byte *best; + byte *best = NULL; uns len = find_match(hash_tab[hash], hash_rec, in, in_end, &best, head); if (len < 3) #if 0 // TODO: now, our routine does not detect matches of length 2 @@ -450,7 +450,7 @@ long. Decode sequences of these types until the EOF or END marker is read. C following characters will be copied from the compressed text to the output. The number CC is always stored in the 2 least significant bits of the second last byte of the sequence. - + If END is read, the algorithm switches to the copy mode. pattern length position