]> icculus.org git repositories - icculus/xz.git/blob - src/xz/args.h
xz: Use an array instead of pointer for stdin_filename.
[icculus/xz.git] / src / xz / args.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       args.h
4 /// \brief      Argument parsing
5 //
6 //  Author:     Lasse Collin
7 //
8 //  This file has been put into the public domain.
9 //  You can do whatever you want with this file.
10 //
11 ///////////////////////////////////////////////////////////////////////////////
12
13 typedef struct {
14         /// Filenames from command line
15         char **arg_names;
16
17         /// Number of filenames from command line
18         size_t arg_count;
19
20         /// Name of the file from which to read filenames. This is NULL
21         /// if --files or --files0 was not used.
22         char *files_name;
23
24         /// File opened for reading from which filenames are read. This is
25         /// non-NULL only if files_name is non-NULL.
26         FILE *files_file;
27
28         /// Delimiter for filenames read from files_file
29         char files_delim;
30
31 } args_info;
32
33
34 extern bool opt_stdout;
35 extern bool opt_force;
36 extern bool opt_keep_original;
37 // extern bool opt_recursive;
38 extern bool opt_robot;
39
40 extern const char stdin_filename[];
41
42 extern void args_parse(args_info *args, int argc, char **argv);