]> icculus.org git repositories - icculus/xz.git/blob - src/lzma/args.h
Made the preset numbering more logical in liblzma API.
[icculus/xz.git] / src / lzma / args.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       args.h
4 /// \brief      Argument parsing
5 //
6 //  Copyright (C) 2007 Lasse Collin
7 //
8 //  This program is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU Lesser General Public
10 //  License as published by the Free Software Foundation; either
11 //  version 2.1 of the License, or (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 //  Lesser General Public License for more details.
17 //
18 ///////////////////////////////////////////////////////////////////////////////
19
20 #ifndef ARGS_H
21 #define ARGS_H
22
23 #include "private.h"
24
25
26 enum tool_mode {
27         MODE_COMPRESS,
28         MODE_DECOMPRESS,
29         MODE_TEST,
30         MODE_LIST,
31 };
32
33 // NOTE: The order of these is significant in suffix.c.
34 enum format_type {
35         FORMAT_AUTO,
36         FORMAT_XZ,
37         FORMAT_LZMA,
38         // HEADER_GZIP,
39         FORMAT_RAW,
40 };
41
42
43 extern char *opt_suffix;
44
45 extern char *opt_files_name;
46 extern char opt_files_split;
47 extern FILE *opt_files_file;
48
49 extern bool opt_stdout;
50 extern bool opt_force;
51 extern bool opt_keep_original;
52 extern bool opt_preserve_name;
53 // extern bool opt_recursive;
54 extern enum tool_mode opt_mode;
55 extern enum format_type opt_format;
56
57 extern lzma_check opt_check;
58 extern lzma_filter opt_filters[LZMA_BLOCK_FILTERS_MAX + 1];
59
60 extern const char *stdin_filename;
61
62 extern char **parse_args(int argc, char **argv);
63
64 #endif