mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-06 06:43:51 +00:00
header-mangling-part-X-move-all-headers-defines-into
This commit is contained in:
parent
e9eee5656b
commit
1a7c409e10
10 changed files with 128 additions and 87 deletions
38
main.c
38
main.c
|
|
@ -22,9 +22,32 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_CTYPE_H
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "rzip.h"
|
||||
#include "lrzip.h"
|
||||
#include "util.h"
|
||||
|
||||
/* needed for CRC routines */
|
||||
#include "lzma/C/7zCrc.h"
|
||||
|
||||
/* Macros for testing parameters */
|
||||
#define isparameter( parmstring, value ) (!strcasecmp( parmstring, value ))
|
||||
#define iscaseparameter( parmvalue, value ) (!strcmp( parmvalue, value ))
|
||||
|
||||
/* main() defines, different from liblrzip defines */
|
||||
#define FLAG_VERBOSE (FLAG_VERBOSITY | FLAG_VERBOSITY_MAX)
|
||||
#define FLAG_NOT_LZMA (FLAG_NO_COMPRESS | FLAG_LZO_COMPRESS | FLAG_BZIP2_COMPRESS | FLAG_ZLIB_COMPRESS | FLAG_ZPAQ_COMPRESS)
|
||||
|
|
@ -73,7 +96,18 @@
|
|||
print_output(format, ##args); \
|
||||
} while (0)
|
||||
|
||||
rzip_control control;
|
||||
|
||||
#if defined(NOTHREAD) || !defined(_SC_NPROCESSORS_ONLN)
|
||||
# define PROCESSORS (1)
|
||||
#else
|
||||
# define PROCESSORS (sysconf(_SC_NPROCESSORS_ONLN))
|
||||
#endif
|
||||
|
||||
#ifdef _SC_PAGE_SIZE
|
||||
# define PAGE_SIZE (sysconf(_SC_PAGE_SIZE))
|
||||
#else
|
||||
# define PAGE_SIZE (4096)
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <sys/sysctl.h>
|
||||
|
|
@ -118,6 +152,8 @@ static inline i64 get_ram(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static rzip_control control;
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
print_output("lrzip version %d.%d%d\n", LRZIP_MAJOR_VERSION, LRZIP_MINOR_VERSION, LRZIP_MINOR_SUBVERSION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue