]> icculus.org git repositories - icculus/xz.git/blob - src/lzma/args.h
Imported to git.
[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 enum header_type {
34         HEADER_AUTO,
35         HEADER_NATIVE,
36         HEADER_SINGLE,
37         HEADER_MULTI,
38         HEADER_ALONE,
39         // HEADER_GZIP,
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 header_type opt_header;
56
57 extern lzma_check_type opt_check;
58 extern lzma_options_filter opt_filters[8];
59
60 extern const char *stdin_filename;
61
62 extern char **parse_args(int argc, char **argv);
63
64 #endif