]>
Dogcows Code - chaz/tar/blob - src/warning.c
1 /* This file is part of GNU tar.
3 Copyright (C) 2009 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 3, or (at your option) any later
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13 Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program. If not, see <http://www.gnu.org/licenses/>. */
23 static char const *const warning_args
[] = {
47 static int warning_types
[] = {
49 WARN_ALONE_ZERO_BLOCK
,
58 WARN_FILENAME_WITH_NULS
,
62 WARN_RENAME_DIRECTORY
,
70 ARGMATCH_VERIFY (warning_args
, warning_types
);
72 int warning_option
= WARN_ALL
;
75 set_warning_option (const char *arg
)
80 if (strcmp (arg
, "none") == 0)
85 if (strlen (arg
) > 2 && memcmp (arg
, "no-", 3) == 0)
91 option
= XARGMATCH ("--warning", arg
,
92 warning_args
, warning_types
);
94 warning_option
&= ~option
;
96 warning_option
|= option
;
This page took 0.035656 seconds and 4 git commands to generate.