2008-11-19 19:46:52 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
/// \file main.h
|
2010-02-12 12:16:15 +01:00
|
|
|
/// \brief Miscellaneous declarations
|
2008-11-19 19:46:52 +01:00
|
|
|
//
|
2009-04-13 10:27:40 +02:00
|
|
|
// Author: Lasse Collin
|
2008-11-19 19:46:52 +01:00
|
|
|
//
|
2009-04-13 10:27:40 +02:00
|
|
|
// This file has been put into the public domain.
|
|
|
|
// You can do whatever you want with this file.
|
2008-11-19 19:46:52 +01:00
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/// Possible exit status values. These are the same as used by gzip and bzip2.
|
|
|
|
enum exit_status_type {
|
|
|
|
E_SUCCESS = 0,
|
|
|
|
E_ERROR = 1,
|
|
|
|
E_WARNING = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Sets the exit status after a warning or error has occurred. If new_status
|
2009-05-22 13:27:40 +02:00
|
|
|
/// is E_WARNING and the old exit status was already E_ERROR, the exit
|
2008-11-19 19:46:52 +01:00
|
|
|
/// status is not changed.
|
|
|
|
extern void set_exit_status(enum exit_status_type new_status);
|
|
|
|
|
|
|
|
|
2009-05-22 13:43:00 +02:00
|
|
|
/// Use E_SUCCESS instead of E_WARNING if something worth a warning occurs
|
|
|
|
/// but nothing worth an error has occurred. This is called when --no-warn
|
|
|
|
/// is specified.
|
|
|
|
extern void set_exit_no_warn(void);
|