annotate src/lib/printf-format-fix.h @ 22656:1789bf2a1e01

director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 05 Nov 2017 23:51:56 +0200
parents 5ab8dc1a4a6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6410
e4eb71ae8e96 Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
1 #ifndef PRINTF_FORMAT_FIX_H
e4eb71ae8e96 Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
2 #define PRINTF_FORMAT_FIX_H
5679
74e06273985b Renamed printf_string_fix_format() to printf_format_fix() and moved it to
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
74e06273985b Renamed printf_string_fix_format() to printf_format_fix() and moved it to
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 /* Replaces %m in format with strerror(errno) and panics if %n modifier is
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5679
diff changeset
5 used. If the format string was modified, it's returned from data stack. */
6411
6a64e64fa3a3 Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
6 const char *printf_format_fix(const char *format) ATTR_FORMAT_ARG(1);
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5679
diff changeset
7 /* Like printf_format_fix(), except return also the format string's length. */
21322
5ab8dc1a4a6f global: Change string position/length from unsigned int to size_t
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 6411
diff changeset
8 const char *printf_format_fix_get_len(const char *format, size_t *len_r)
6411
6a64e64fa3a3 Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
9 ATTR_FORMAT_ARG(1);
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5679
diff changeset
10 /* Like printf_format_fix(), except the format string is written to data
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5679
diff changeset
11 stack without actually allocating it. Data stack must not be used until
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5679
diff changeset
12 format string is no longer needed. */
6411
6a64e64fa3a3 Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
13 const char *printf_format_fix_unsafe(const char *format) ATTR_FORMAT_ARG(1);
5679
74e06273985b Renamed printf_string_fix_format() to printf_format_fix() and moved it to
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14
74e06273985b Renamed printf_string_fix_format() to printf_format_fix() and moved it to
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
15 #endif