]> icculus.org git repositories - icculus/xz.git/blob - src/lzma/args.h
Update the code to mostly match the new simpler file format
[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_ALONE,
37         // HEADER_GZIP,
38 };
39
40
41 extern char *opt_suffix;
42
43 extern char *opt_files_name;
44 extern char opt_files_split;
45 extern FILE *opt_files_file;
46
47 extern bool opt_stdout;
48 extern bool opt_force;
49 extern bool opt_keep_original;
50 extern bool opt_preserve_name;
51 // extern bool opt_recursive;
52 extern enum tool_mode opt_mode;
53 extern enum header_type opt_header;
54
55 extern lzma_check_type opt_check;
56 extern lzma_options_filter opt_filters[8];
57
58 extern const char *stdin_filename;
59
60 extern char **parse_args(int argc, char **argv);
61
62 #endif