message.h (215187) | message.h (223935) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file message.h 4/// \brief Printing messages to stderr 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 31 unchanged lines hidden (view full) --- 40/// Get the current verbosity level. 41extern enum message_verbosity message_verbosity_get(void); 42 43 44/// \brief Print a message if verbosity level is at least "verbosity" 45/// 46/// This doesn't touch the exit status. 47extern void message(enum message_verbosity verbosity, const char *fmt, ...) | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file message.h 4/// \brief Printing messages to stderr 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 31 unchanged lines hidden (view full) --- 40/// Get the current verbosity level. 41extern enum message_verbosity message_verbosity_get(void); 42 43 44/// \brief Print a message if verbosity level is at least "verbosity" 45/// 46/// This doesn't touch the exit status. 47extern void message(enum message_verbosity verbosity, const char *fmt, ...) |
48 lzma_attribute((format(printf, 2, 3))); | 48 lzma_attribute((__format__(__printf__, 2, 3))); |
49 50 51/// \brief Prints a warning and possibly sets exit status 52/// 53/// The message is printed only if verbosity level is at least V_WARNING. 54/// The exit status is set to WARNING unless it was already at ERROR. 55extern void message_warning(const char *fmt, ...) | 49 50 51/// \brief Prints a warning and possibly sets exit status 52/// 53/// The message is printed only if verbosity level is at least V_WARNING. 54/// The exit status is set to WARNING unless it was already at ERROR. 55extern void message_warning(const char *fmt, ...) |
56 lzma_attribute((format(printf, 1, 2))); | 56 lzma_attribute((__format__(__printf__, 1, 2))); |
57 58 59/// \brief Prints an error message and sets exit status 60/// 61/// The message is printed only if verbosity level is at least V_ERROR. 62/// The exit status is set to ERROR. 63extern void message_error(const char *fmt, ...) | 57 58 59/// \brief Prints an error message and sets exit status 60/// 61/// The message is printed only if verbosity level is at least V_ERROR. 62/// The exit status is set to ERROR. 63extern void message_error(const char *fmt, ...) |
64 lzma_attribute((format(printf, 1, 2))); | 64 lzma_attribute((__format__(__printf__, 1, 2))); |
65 66 67/// \brief Prints an error message and exits with EXIT_ERROR 68/// 69/// The message is printed only if verbosity level is at least V_ERROR. 70extern void message_fatal(const char *fmt, ...) | 65 66 67/// \brief Prints an error message and exits with EXIT_ERROR 68/// 69/// The message is printed only if verbosity level is at least V_ERROR. 70extern void message_fatal(const char *fmt, ...) |
71 lzma_attribute((format(printf, 1, 2))) 72 lzma_attribute((noreturn)); | 71 lzma_attribute((__format__(__printf__, 1, 2))) 72 lzma_attribute((__noreturn__)); |
73 74 75/// Print an error message that an internal error occurred and exit with 76/// EXIT_ERROR. | 73 74 75/// Print an error message that an internal error occurred and exit with 76/// EXIT_ERROR. |
77extern void message_bug(void) lzma_attribute((noreturn)); | 77extern void message_bug(void) lzma_attribute((__noreturn__)); |
78 79 80/// Print a message that establishing signal handlers failed, and exit with 81/// exit status ERROR. | 78 79 80/// Print a message that establishing signal handlers failed, and exit with 81/// exit status ERROR. |
82extern void message_signal_handler(void) lzma_attribute((noreturn)); | 82extern void message_signal_handler(void) lzma_attribute((__noreturn__)); |
83 84 85/// Convert lzma_ret to a string. 86extern const char *message_strm(lzma_ret code); 87 88 89/// Display how much memory was needed and how much the limit was. 90extern void message_mem_needed(enum message_verbosity v, uint64_t memusage); --- 20 unchanged lines hidden (view full) --- 111 enum message_verbosity v, const lzma_filter *filters); 112 113 114/// Print a message that user should try --help. 115extern void message_try_help(void); 116 117 118/// Prints the version number to stdout and exits with exit status SUCCESS. | 83 84 85/// Convert lzma_ret to a string. 86extern const char *message_strm(lzma_ret code); 87 88 89/// Display how much memory was needed and how much the limit was. 90extern void message_mem_needed(enum message_verbosity v, uint64_t memusage); --- 20 unchanged lines hidden (view full) --- 111 enum message_verbosity v, const lzma_filter *filters); 112 113 114/// Print a message that user should try --help. 115extern void message_try_help(void); 116 117 118/// Prints the version number to stdout and exits with exit status SUCCESS. |
119extern void message_version(void) lzma_attribute((noreturn)); | 119extern void message_version(void) lzma_attribute((__noreturn__)); |
120 121 122/// Print the help message. | 120 121 122/// Print the help message. |
123extern void message_help(bool long_help) lzma_attribute((noreturn)); | 123extern void message_help(bool long_help) lzma_attribute((__noreturn__)); |
124 125 126/// \brief Set the total number of files to be processed 127/// 128/// Standard input is counted as a file here. This is used when printing 129/// the filename via message_filename(). 130extern void message_set_files(unsigned int files); 131 --- 36 unchanged lines hidden --- | 124 125 126/// \brief Set the total number of files to be processed 127/// 128/// Standard input is counted as a file here. This is used when printing 129/// the filename via message_filename(). 130extern void message_set_files(unsigned int files); 131 --- 36 unchanged lines hidden --- |