1 /* Exit status related declarations.
2    Copyright (C) 2009-2012, 2015, 2018-2021 Free Software Foundation,
3    Inc.
4 
5 This file is part of GNU Wget.
6 
7 GNU Wget is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11 
12 GNU Wget is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Wget.  If not, see <http://www.gnu.org/licenses/>.  */
19 
20 #ifndef WGET_EXITS_H
21 #define WGET_EXITS_H
22 
23 #include "wget.h"
24 
25 /* Final exit code possibilities. Exit codes 1 and 2 are reserved
26  * for situations that lead to direct exits from Wget, not using the
27  * value of final_exit_status. */
28 enum
29   {
30     WGET_EXIT_SUCCESS = 0,
31     WGET_EXIT_GENERIC_ERROR = 1,
32     WGET_EXIT_PARSE_ERROR = 2,
33     WGET_EXIT_IO_FAIL = 3,
34     WGET_EXIT_NETWORK_FAIL = 4,
35     WGET_EXIT_SSL_AUTH_FAIL = 5,
36     WGET_EXIT_SERVER_AUTH_FAIL = 6,
37     WGET_EXIT_PROTOCOL_ERROR = 7,
38     WGET_EXIT_SERVER_ERROR = 8,
39 
40     WGET_EXIT_UNKNOWN
41   };
42 
43 void inform_exit_status (uerr_t err);
44 
45 int get_exit_status (void);
46 
47 
48 #endif /* WGET_EXITS_H */
49