18 #define xmalloc(size) xrealloc(NULL, size)
97 bool always_also_bytes,
uint32_t slot);
#define lzma_attribute(attr)
#define lzma_attr_alloc_size(x)
void * xrealloc(void *ptr, size_t size) lzma_attribute((__malloc__)) lzma_attr_alloc_size(2)
Safe realloc() that never returns NULL.
uint64_t str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
Fancy version of strtoull()
const char * uint64_to_str(uint64_t value, uint32_t slot)
Convert uint64_t to a string.
void bool is_empty_filename(const char *filename)
Check if filename is empty and print an error message.
bool is_tty_stdin(void)
Test if stdin is a terminal.
const char * uint64_to_nicestr(uint64_t value, enum nicestr_unit unit_min, enum nicestr_unit unit_max, bool always_also_bytes, uint32_t slot)
Convert uint64_t to a nice human readable string.
char * xstrdup(const char *src) lzma_attribute((__malloc__))
Safe strdup() that never returns NULL.
void my_snprintf(char **pos, size_t *left, const char *fmt,...) lzma_attribute((__format__(__printf__
Wrapper for snprintf() to help constructing a string in pieces.
bool is_tty_stdout(void)
Test if stdout is a terminal.
uint64_t round_up_to_mib(uint64_t n)
Round an integer up to the next full MiB and convert to MiB.