186d7f5d3SJohn Marino /////////////////////////////////////////////////////////////////////////////// 286d7f5d3SJohn Marino // 386d7f5d3SJohn Marino /// \file main.h 486d7f5d3SJohn Marino /// \brief Miscellaneous declarations 586d7f5d3SJohn Marino // 686d7f5d3SJohn Marino // Author: Lasse Collin 786d7f5d3SJohn Marino // 886d7f5d3SJohn Marino // This file has been put into the public domain. 986d7f5d3SJohn Marino // You can do whatever you want with this file. 1086d7f5d3SJohn Marino // 1186d7f5d3SJohn Marino /////////////////////////////////////////////////////////////////////////////// 1286d7f5d3SJohn Marino 1386d7f5d3SJohn Marino /// Possible exit status values. These are the same as used by gzip and bzip2. 1486d7f5d3SJohn Marino enum exit_status_type { 1586d7f5d3SJohn Marino E_SUCCESS = 0, 1686d7f5d3SJohn Marino E_ERROR = 1, 1786d7f5d3SJohn Marino E_WARNING = 2, 1886d7f5d3SJohn Marino }; 1986d7f5d3SJohn Marino 2086d7f5d3SJohn Marino 2186d7f5d3SJohn Marino /// Sets the exit status after a warning or error has occurred. If new_status 2286d7f5d3SJohn Marino /// is E_WARNING and the old exit status was already E_ERROR, the exit 2386d7f5d3SJohn Marino /// status is not changed. 2486d7f5d3SJohn Marino extern void set_exit_status(enum exit_status_type new_status); 2586d7f5d3SJohn Marino 2686d7f5d3SJohn Marino 2786d7f5d3SJohn Marino /// Use E_SUCCESS instead of E_WARNING if something worth a warning occurs 2886d7f5d3SJohn Marino /// but nothing worth an error has occurred. This is called when --no-warn 2986d7f5d3SJohn Marino /// is specified. 3086d7f5d3SJohn Marino extern void set_exit_no_warn(void); 31