]> icculus.org git repositories - icculus/xz.git/blob - src/lzma/args.h
Oh well, big messy commit again. Some highlights:
[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 typedef struct {
27         /// Filenames from command line
28         char **arg_names;
29
30         /// Number of filenames from command line
31         size_t arg_count;
32
33         /// Name of the file from which to read filenames. This is NULL
34         /// if --files or --files0 was not used.
35         char *files_name;
36
37         /// File opened for reading from which filenames are read. This is
38         /// non-NULL only if files_name is non-NULL.
39         FILE *files_file;
40
41         /// Delimiter for filenames read from files_file
42         char files_delim;
43
44 } args_info;
45
46
47 extern bool opt_stdout;
48 extern bool opt_force;
49 extern bool opt_keep_original;
50 // extern bool opt_recursive;
51
52 extern const char *stdin_filename;
53
54 extern void args_parse(args_info *args, int argc, char **argv);
55
56 #endif