Mercurial > libpst
comparison src/lzfu.c @ 37:ddfb25318812 stable-0-5-8
more valgrind fixes
author | carl |
---|---|
date | Fri, 10 Aug 2007 08:06:13 -0700 |
parents | 6fe121a971c9 |
children | 183ae993b9ad |
comparison
equal
deleted
inserted
replaced
36:6fe121a971c9 | 37:ddfb25318812 |
---|---|
67 unsigned int out_ptr = 0; | 67 unsigned int out_ptr = 0; |
68 | 68 |
69 memcpy(dict, LZFU_INITDICT, LZFU_INITLENGTH); | 69 memcpy(dict, LZFU_INITDICT, LZFU_INITLENGTH); |
70 dict_length = LZFU_INITLENGTH; | 70 dict_length = LZFU_INITLENGTH; |
71 memcpy(&lzfuhdr, rtfcomp, sizeof(lzfuhdr)); | 71 memcpy(&lzfuhdr, rtfcomp, sizeof(lzfuhdr)); |
72 LE32_CPU(lzfuhdr.cbSize); LE32_CPU(lzfuhdr.cbRawSize); | 72 LE32_CPU(lzfuhdr.cbSize); |
73 LE32_CPU(lzfuhdr.dwMagic); LE32_CPU(lzfuhdr.dwCRC); | 73 LE32_CPU(lzfuhdr.cbRawSize); |
74 LE32_CPU(lzfuhdr.dwMagic); | |
75 LE32_CPU(lzfuhdr.dwCRC); | |
74 /* printf("total size: %d\n", lzfuhdr.cbSize+4); | 76 /* printf("total size: %d\n", lzfuhdr.cbSize+4); |
75 printf("raw size : %d\n", lzfuhdr.cbRawSize); | 77 printf("raw size : %d\n", lzfuhdr.cbRawSize); |
76 printf("compressed: %s\n", (lzfuhdr.dwMagic == LZFU_COMPRESSED ? "yes" : "no")); | 78 printf("compressed: %s\n", (lzfuhdr.dwMagic == LZFU_COMPRESSED ? "yes" : "no")); |
77 printf("CRC : %#x\n", lzfuhdr.dwCRC); | 79 printf("CRC : %#x\n", lzfuhdr.dwCRC); |
78 printf("\n");*/ | 80 printf("\n");*/ |
120 } | 122 } |
121 // the compressed version doesn't appear to drop the closing braces onto the doc. | 123 // the compressed version doesn't appear to drop the closing braces onto the doc. |
122 // we should do that | 124 // we should do that |
123 out_buf[out_ptr++] = '}'; | 125 out_buf[out_ptr++] = '}'; |
124 out_buf[out_ptr++] = '}'; | 126 out_buf[out_ptr++] = '}'; |
127 *size = out_ptr; | |
125 out_buf[out_ptr++] = '\0'; | 128 out_buf[out_ptr++] = '\0'; |
126 *size = out_ptr; | |
127 return out_buf; | 129 return out_buf; |
128 } | 130 } |