mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Cleanups.
This commit is contained in:
parent
b11b5a0b5d
commit
0b1db75a44
6
lrzip.c
6
lrzip.c
|
|
@ -102,7 +102,7 @@ void write_magic(rzip_control *control)
|
||||||
control->magic_written = 1;
|
control->magic_written = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static i64 enc_loops(uchar b1, uchar b2)
|
static inline i64 enc_loops(uchar b1, uchar b2)
|
||||||
{
|
{
|
||||||
return (i64)b2 << (i64)b1;
|
return (i64)b2 << (i64)b1;
|
||||||
}
|
}
|
||||||
|
|
@ -299,7 +299,7 @@ void dump_tmpoutfile(rzip_control *control, int fd_out)
|
||||||
|
|
||||||
/* Used if we're unable to read STDIN into the temporary buffer, shunts data
|
/* Used if we're unable to read STDIN into the temporary buffer, shunts data
|
||||||
* to temporary file */
|
* to temporary file */
|
||||||
void write_fdin(struct rzip_control *control)
|
void write_fdin(rzip_control *control)
|
||||||
{
|
{
|
||||||
uchar *offset_buf = control->tmp_inbuf;
|
uchar *offset_buf = control->tmp_inbuf;
|
||||||
i64 len = control->in_len;
|
i64 len = control->in_len;
|
||||||
|
|
@ -408,7 +408,7 @@ static void open_tmpinbuf(rzip_control *control)
|
||||||
fatal("Failed to malloc tmp_inbuf in open_tmpinbuf\n");
|
fatal("Failed to malloc tmp_inbuf in open_tmpinbuf\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear_tmpinbuf(rzip_control *control)
|
inline void clear_tmpinbuf(rzip_control *control)
|
||||||
{
|
{
|
||||||
control->in_len = control->in_ofs = 0;
|
control->in_len = control->in_ofs = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
lrzip.h
4
lrzip.h
|
|
@ -33,10 +33,10 @@ void get_header_info(rzip_control *control, int fd_in, uchar *ctype, i64 *c_len,
|
||||||
void get_fileinfo(rzip_control *control);
|
void get_fileinfo(rzip_control *control);
|
||||||
void compress_file(rzip_control *control);
|
void compress_file(rzip_control *control);
|
||||||
void write_fdout(rzip_control *control, void *buf, i64 len);
|
void write_fdout(rzip_control *control, void *buf, i64 len);
|
||||||
void write_fdin(struct rzip_control *control);
|
void write_fdin(rzip_control *control);
|
||||||
void flush_tmpoutbuf(rzip_control *control);
|
void flush_tmpoutbuf(rzip_control *control);
|
||||||
void close_tmpoutbuf(rzip_control *control);
|
void close_tmpoutbuf(rzip_control *control);
|
||||||
void clear_tmpinbuf(rzip_control *control);
|
void clear_tmpinbuf(rzip_control *control);
|
||||||
void clear_tmpinfile(rzip_control *control);
|
inline void clear_tmpinfile(rzip_control *control);
|
||||||
void close_tmpinbuf(rzip_control *control);
|
void close_tmpinbuf(rzip_control *control);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
2
main.c
2
main.c
|
|
@ -283,7 +283,7 @@ static void show_summary(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void read_config( struct rzip_control *control )
|
static void read_config(rzip_control *control)
|
||||||
{
|
{
|
||||||
/* check for lrzip.conf in ., $HOME/.lrzip and /etc/lrzip */
|
/* check for lrzip.conf in ., $HOME/.lrzip and /etc/lrzip */
|
||||||
char *HOME, *homeconf;
|
char *HOME, *homeconf;
|
||||||
|
|
|
||||||
2
runzip.c
2
runzip.c
|
|
@ -181,7 +181,7 @@ static i64 unzip_literal(rzip_control *control, void *ss, i64 len, int fd_out, u
|
||||||
return stream_read;
|
return stream_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
static i64 read_fdhist(struct rzip_control *control, void *buf, i64 len)
|
static i64 read_fdhist(rzip_control *control, void *buf, i64 len)
|
||||||
{
|
{
|
||||||
if (!TMP_OUTBUF)
|
if (!TMP_OUTBUF)
|
||||||
return read_1g(control, control->fd_hist, buf, len);
|
return read_1g(control, control->fd_hist, buf, len);
|
||||||
|
|
|
||||||
2
rzip.c
2
rzip.c
|
|
@ -973,6 +973,8 @@ retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
close_streamout_threads(control);
|
close_streamout_threads(control);
|
||||||
|
if (likely(st->hash_table))
|
||||||
|
free(st->hash_table);
|
||||||
|
|
||||||
md5_finish_ctx(&control->ctx, md5_resblock);
|
md5_finish_ctx(&control->ctx, md5_resblock);
|
||||||
if (HASH_CHECK || MAX_VERBOSE) {
|
if (HASH_CHECK || MAX_VERBOSE) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue