diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-11-19 20:46:52 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-11-19 20:46:52 +0200 |
commit | e114502b2bc371e4a45449832cb69be036360722 (patch) | |
tree | 449c41d0408f99926de202611091747f1fbe2f85 /src/lzma/args.h | |
parent | Fixed the test that should have been fixed as part (diff) | |
download | xz-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 'src/lzma/args.h')
-rw-r--r-- | src/lzma/args.h | 42 |
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 |