1 // SPDX-License-Identifier: 0BSD 2 3 /////////////////////////////////////////////////////////////////////////////// 4 // 5 /// \file main.h 6 /// \brief Miscellaneous declarations 7 // 8 // Author: Lasse Collin 9 // 10 /////////////////////////////////////////////////////////////////////////////// 11 12 /// Possible exit status values. These are the same as used by gzip and bzip2. 13 enum exit_status_type { 14 E_SUCCESS = 0, 15 E_ERROR = 1, 16 E_WARNING = 2, 17 }; 18 19 20 /// Sets the exit status after a warning or error has occurred. If new_status 21 /// is E_WARNING and the old exit status was already E_ERROR, the exit 22 /// status is not changed. 23 extern void set_exit_status(enum exit_status_type new_status); 24 25 26 /// Use E_SUCCESS instead of E_WARNING if something worth a warning occurs 27 /// but nothing worth an error has occurred. This is called when --no-warn 28 /// is specified. 29 extern void set_exit_no_warn(void); 30