2007-12-08 17:42:33 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
/// \file args.h
|
|
|
|
/// \brief Argument parsing
|
|
|
|
//
|
|
|
|
// Copyright (C) 2007 Lasse Collin
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef ARGS_H
|
|
|
|
#define ARGS_H
|
|
|
|
|
|
|
|
#include "private.h"
|
|
|
|
|
|
|
|
|
|
|
|
enum tool_mode {
|
|
|
|
MODE_COMPRESS,
|
|
|
|
MODE_DECOMPRESS,
|
|
|
|
MODE_TEST,
|
|
|
|
MODE_LIST,
|
|
|
|
};
|
|
|
|
|
2008-10-02 15:51:46 -04:00
|
|
|
// NOTE: The order of these is significant in suffix.c.
|
|
|
|
enum format_type {
|
|
|
|
FORMAT_AUTO,
|
|
|
|
FORMAT_XZ,
|
|
|
|
FORMAT_LZMA,
|
2007-12-08 17:42:33 -05:00
|
|
|
// HEADER_GZIP,
|
2008-10-02 15:51:46 -04:00
|
|
|
FORMAT_RAW,
|
2007-12-08 17:42:33 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern char *opt_suffix;
|
|
|
|
|
|
|
|
extern char *opt_files_name;
|
|
|
|
extern char opt_files_split;
|
|
|
|
extern FILE *opt_files_file;
|
|
|
|
|
|
|
|
extern bool opt_stdout;
|
|
|
|
extern bool opt_force;
|
|
|
|
extern bool opt_keep_original;
|
|
|
|
extern bool opt_preserve_name;
|
|
|
|
// extern bool opt_recursive;
|
|
|
|
extern enum tool_mode opt_mode;
|
2008-10-02 15:51:46 -04:00
|
|
|
extern enum format_type opt_format;
|
2007-12-08 17:42:33 -05:00
|
|
|
|
2008-08-28 15:53:15 -04:00
|
|
|
extern lzma_check opt_check;
|
2008-10-07 02:40:31 -04:00
|
|
|
extern lzma_filter opt_filters[LZMA_BLOCK_FILTERS_MAX + 1];
|
2007-12-08 17:42:33 -05:00
|
|
|
|
|
|
|
extern const char *stdin_filename;
|
|
|
|
|
|
|
|
extern char **parse_args(int argc, char **argv);
|
|
|
|
|
|
|
|
#endif
|