Rizin
unix-like reverse engineering framework and cli tools
message.h
Go to the documentation of this file.
1 //
5 //
6 // Author: Lasse Collin
7 //
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
10 //
12 
20 };
21 
22 
24 extern const int message_progress_sigs[];
25 
26 
31 extern void message_init(void);
32 
33 
35 extern void message_verbosity_increase(void);
36 
38 extern void message_verbosity_decrease(void);
39 
42 
43 
47 extern void message(enum message_verbosity verbosity, const char *fmt, ...)
48  lzma_attribute((__format__(__printf__, 2, 3)));
49 
50 
55 extern void message_warning(const char *fmt, ...)
56  lzma_attribute((__format__(__printf__, 1, 2)));
57 
58 
63 extern void message_error(const char *fmt, ...)
64  lzma_attribute((__format__(__printf__, 1, 2)));
65 
66 
70 extern void message_fatal(const char *fmt, ...)
71  lzma_attribute((__format__(__printf__, 1, 2)))
72  lzma_attribute((__noreturn__));
73 
74 
77 extern void message_bug(void) lzma_attribute((__noreturn__));
78 
79 
82 extern void message_signal_handler(void) lzma_attribute((__noreturn__));
83 
84 
86 extern const char *message_strm(lzma_ret code);
87 
88 
90 extern void message_mem_needed(enum message_verbosity v, uint64_t memusage);
91 
92 
94 #define FILTERS_STR_SIZE 512
95 
96 
106  const lzma_filter *filters, bool all_known);
107 
108 
110 extern void message_filters_show(
111  enum message_verbosity v, const lzma_filter *filters);
112 
113 
115 extern void message_try_help(void);
116 
117 
119 extern void message_version(void) lzma_attribute((__noreturn__));
120 
121 
123 extern void message_help(bool long_help) lzma_attribute((__noreturn__));
124 
125 
130 extern void message_set_files(unsigned int files);
131 
132 
139 extern void message_filename(const char *src_name);
140 
141 
154  bool is_passthru, uint64_t in_size);
155 
156 
160 extern void message_progress_update(void);
161 
162 
168 extern void message_progress_end(bool finished);
const lzma_allocator const uint8_t size_t in_size
Definition: block.h:527
const lzma_filter * filters
Definition: container.h:315
const char * v
Definition: dsignal.c:12
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n output MIME type special files
Definition: file_opts.h:46
static lzma_stream strm
Definition: full_flush.c:20
voidpf void * buf
Definition: ioapi.h:138
#define const
Definition: ansidecl.h:240
static enum message_verbosity verbosity
Verbosity level.
Definition: message.c:25
const int message_progress_sigs[]
Signals used for progress message handling.
void void void void lzma_attribute((__noreturn__))
Definition: xzdec.c:84
void message_bug(void) lzma_attribute((__noreturn__))
Definition: message.c:789
void message_verbosity_increase(void)
Increase verbosity level by one step unless it was at maximum.
Definition: message.c:161
void message_set_files(unsigned int files)
Set the total number of files to be processed.
Definition: message.c:188
message_verbosity
Verbosity levels.
Definition: message.h:14
@ V_DEBUG
Very verbose.
Definition: message.h:19
@ V_WARNING
Errors and warnings.
Definition: message.h:17
@ V_VERBOSE
Errors, warnings, and verbose statistics.
Definition: message.h:18
@ V_ERROR
Only error messages.
Definition: message.h:16
@ V_SILENT
No messages.
Definition: message.h:15
void message_help(bool long_help) lzma_attribute((__noreturn__))
Print the help message.
Definition: message.c:1091
void message_version(void) lzma_attribute((__noreturn__))
Prints the version number to stdout and exits with exit status SUCCESS.
Definition: message.c:1074
void message_signal_handler(void) lzma_attribute((__noreturn__))
Definition: message.c:796
void message_filename(const char *src_name)
Set the name of the current file and possibly print it too.
Definition: message.c:232
void void void message_error(const char *fmt,...) lzma_attribute((__format__(__printf__
Prints an error message and sets exit status.
void message_mem_needed(enum message_verbosity v, uint64_t memusage)
Display how much memory was needed and how much the limit was.
Definition: message.c:846
void void message_warning(const char *fmt,...) lzma_attribute((__format__(__printf__
Prints a warning and possibly sets exit status.
void message_init(void)
Initializes the message functions.
Definition: message.c:114
void message_verbosity_decrease(void)
Decrease verbosity level by one step unless it was at minimum.
Definition: message.c:171
void message(enum message_verbosity verbosity, const char *fmt,...) lzma_attribute((__format__(__printf__
Print a message if verbosity level is at least "verbosity".
void message_progress_end(bool finished)
Finishes the progress message if we were in verbose mode.
Definition: message.c:707
void message_filters_show(enum message_verbosity v, const lzma_filter *filters)
Print the filter chain.
Definition: message.c:1050
void message_progress_start(lzma_stream *strm, bool is_passthru, uint64_t in_size)
Start progress info handling.
Definition: message.c:249
void message_filters_to_str(char buf[FILTERS_STR_SIZE], const lzma_filter *filters, bool all_known)
Get the filter chain as a string.
Definition: message.c:917
void message_try_help(void)
Print a message that user should try –help.
Definition: message.c:1063
void message_progress_update(void)
Definition: message.c:545
const char * message_strm(lzma_ret code)
Convert lzma_ret to a string.
Definition: message.c:803
enum message_verbosity message_verbosity_get(void)
Get the current verbosity level.
Definition: message.c:181
#define FILTERS_STR_SIZE
Buffer size for message_filters_to_str()
Definition: message.h:94
void void void void message_fatal(const char *fmt,...) lzma_attribute((__format__(__printf__
Prints an error message and exits with EXIT_ERROR.
unsigned long uint64_t
Definition: sftypes.h:28
Definition: inftree9.h:24
Filter options.
Definition: filter.h:43
Passing data to and from liblzma.
Definition: base.h:485
lzma_ret
Return values used by several functions in liblzma.
Definition: base.h:57