aboutsummaryrefslogtreecommitdiff
path: root/src/lzma/args.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-11-19 20:46:52 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-11-19 20:46:52 +0200
commite114502b2bc371e4a45449832cb69be036360722 (patch)
tree449c41d0408f99926de202611091747f1fbe2f85 /src/lzma/args.h
parentFixed the test that should have been fixed as part (diff)
downloadxz-e114502b2bc371e4a45449832cb69be036360722.tar.xz
Oh well, big messy commit again. Some highlights:
- Updated to the latest, probably final file format version. - Command line tool reworked to not use threads anymore. Threading will probably go into liblzma anyway. - Memory usage limit is now about 30 % for uncompression and about 90 % for compression. - Progress indicator with --verbose - Simplified --help and full --long-help - Upgraded to the last LGPLv2.1+ getopt_long from gnulib. - Some bug fixes
Diffstat (limited to '')
-rw-r--r--src/lzma/args.h42
1 files changed, 17 insertions, 25 deletions
diff --git a/src/lzma/args.h b/src/lzma/args.h
index 8d9cd306..6d4e8282 100644
--- a/src/lzma/args.h
+++ b/src/lzma/args.h
@@ -23,42 +23,34 @@
#include "private.h"
-enum tool_mode {
- MODE_COMPRESS,
- MODE_DECOMPRESS,
- MODE_TEST,
- MODE_LIST,
-};
+typedef struct {
+ /// Filenames from command line
+ char **arg_names;
-// NOTE: The order of these is significant in suffix.c.
-enum format_type {
- FORMAT_AUTO,
- FORMAT_XZ,
- FORMAT_LZMA,
- // HEADER_GZIP,
- FORMAT_RAW,
-};
+ /// Number of filenames from command line
+ size_t arg_count;
+ /// Name of the file from which to read filenames. This is NULL
+ /// if --files or --files0 was not used.
+ char *files_name;
-extern char *opt_suffix;
+ /// File opened for reading from which filenames are read. This is
+ /// non-NULL only if files_name is non-NULL.
+ FILE *files_file;
+
+ /// Delimiter for filenames read from files_file
+ char files_delim;
+
+} args_info;
-extern char *opt_files_name;
-extern char opt_files_split;
-extern FILE *opt_files_file;
extern bool opt_stdout;
extern bool opt_force;
extern bool opt_keep_original;
-extern bool opt_preserve_name;
// extern bool opt_recursive;
-extern enum tool_mode opt_mode;
-extern enum format_type opt_format;
-
-extern lzma_check opt_check;
-extern lzma_filter opt_filters[LZMA_BLOCK_FILTERS_MAX + 1];
extern const char *stdin_filename;
-extern char **parse_args(int argc, char **argv);
+extern void args_parse(args_info *args, int argc, char **argv);
#endif