Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/archival/lzop.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/archival/lzop.c
r2725 r3232 15 15 This program is distributed in the hope that it will be useful, 16 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 18 GNU General Public License for more details. 19 19 … … 26 26 */ 27 27 28 //usage:#define lzop_trivial_usage 29 //usage: "[-cfvd123456789CF] [FILE]..." 30 //usage:#define lzop_full_usage "\n\n" 31 //usage: " -1..9 Compression level" 32 //usage: "\n -d Decompress" 33 //usage: "\n -c Write to stdout" 34 //usage: "\n -f Force" 35 //usage: "\n -v Verbose" 36 //usage: "\n -F Don't store or verify checksum" 37 //usage: "\n -C Also write checksum of compressed block" 38 //usage: 39 //usage:#define lzopcat_trivial_usage 40 //usage: "[-vCF] [FILE]..." 41 //usage:#define lzopcat_full_usage "\n\n" 42 //usage: " -v Verbose" 43 //usage: "\n -F Don't store or verify checksum" 44 //usage: 45 //usage:#define unlzop_trivial_usage 46 //usage: "[-cfvCF] [FILE]..." 47 //usage:#define unlzop_full_usage "\n\n" 48 //usage: " -c Write to stdout" 49 //usage: "\n -f Force" 50 //usage: "\n -v Verbose" 51 //usage: "\n -F Don't store or verify checksum" 52 28 53 #include "libbb.h" 29 #include " archive.h"54 #include "bb_archive.h" 30 55 #include "liblzo_interface.h" 31 56 … … 92 117 unsigned long o_m1_a = 0, o_m1_b = 0, o_m2 = 0, o_m3_a = 0, o_m3_b = 0; 93 118 94 // 119 // LZO_UNUSED(wrkmem); 95 120 96 121 *out_len = 0; … … 177 202 *litp &= ~3; 178 203 /* copy over the 2 literals that replace the match */ 179 copy2(ip-3+1, m_pos,pd(op,m_pos));204 copy2(ip-3+1, m_pos, pd(op, m_pos)); 180 205 /* move literals 1 byte ahead */ 181 206 litp += 2; … … 187 212 188 213 o_m1_b++; 189 *op++ = *m_pos++; *op++ = *m_pos++; 214 *op++ = *m_pos++; 215 *op++ = *m_pos++; 190 216 goto copy_literal_run; 191 217 } … … 216 242 t = *ip++; 217 243 /* copy over the 3 literals that replace the match */ 218 copy3(ip-1-2, m_pos,pd(op,m_pos));244 copy3(ip-1-2, m_pos, pd(op, m_pos)); 219 245 /* set new length of previous literal run */ 220 246 lit += 3 + t + 3; … … 265 291 *litp = (unsigned char)((*litp & ~3) | lit); 266 292 /* copy over the 3 literals that replace the match */ 267 copy3(ip-3, m_pos,pd(op,m_pos));293 copy3(ip-3, m_pos, pd(op, m_pos)); 268 294 o_m3_a++; 269 295 } … … 276 302 *litp &= ~3; 277 303 /* copy over the 3 literals that replace the match */ 278 copy3(ip-4+1, m_pos,pd(op,m_pos));304 copy3(ip-4+1, m_pos, pd(op, m_pos)); 279 305 /* move literals 1 byte ahead */ 280 306 litp += 2; … … 321 347 322 348 eof_found: 323 // 324 // 349 // LZO_UNUSED(o_m1_a); LZO_UNUSED(o_m1_b); LZO_UNUSED(o_m2); 350 // LZO_UNUSED(o_m3_a); LZO_UNUSED(o_m3_b); 325 351 *out_len = pd(op, out); 326 352 return (ip == ip_end ? LZO_E_OK : 327 (ip < ip_end? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));353 (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); 328 354 } 329 355 … … 402 428 //#define G (*ptr_to_globals) 403 429 //#define INIT_G() do { 404 // 430 // SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); 405 431 //} while (0) 406 432 … … 1052 1078 } 1053 1079 1054 static IF_DESKTOP(long long) int FAST_FUNC pack_lzop( unpack_info_t *infoUNUSED_PARAM)1080 static IF_DESKTOP(long long) int FAST_FUNC pack_lzop(transformer_aux_data_t *aux UNUSED_PARAM) 1055 1081 { 1056 1082 if (option_mask32 & OPT_DECOMPRESS)
Note:
See TracChangeset
for help on using the changeset viewer.