Strophe 0.13
XMPP client library
|
A snprintf implementation. More...
Macros | |
#define | VA_LOCAL_DECL va_list ap |
#define | VA_START(f) va_start(ap, f) |
#define | VA_END va_end(ap) |
#define | LDOUBLE double |
#define | DP_S_DEFAULT 0 |
#define | DP_S_FLAGS 1 |
#define | DP_S_MIN 2 |
#define | DP_S_DOT 3 |
#define | DP_S_MAX 4 |
#define | DP_S_MOD 5 |
#define | DP_S_CONV 6 |
#define | DP_S_DONE 7 |
#define | DP_F_MINUS (1 << 0) |
#define | DP_F_PLUS (1 << 1) |
#define | DP_F_SPACE (1 << 2) |
#define | DP_F_NUM (1 << 3) |
#define | DP_F_ZERO (1 << 4) |
#define | DP_F_UP (1 << 5) |
#define | DP_F_UNSIGNED (1 << 6) |
#define | DP_C_SHORT 1 |
#define | DP_C_LONG 2 |
#define | DP_C_LDOUBLE 3 |
#define | char_to_int(p) (p - '0') |
#define | MAX(p, q) ((p >= q) ? p : q) |
#define | MIN(p, q) ((p <= q) ? p : q) |
Functions | |
static int | dopr (char *buffer, size_t maxlen, const char *format, va_list args) |
static int | fmtstr (char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max) |
static int | fmtint (char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) |
static int | fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags) |
static int | dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) |
static LDOUBLE | abs_val (LDOUBLE value) |
static LDOUBLE | _snp_pow10 (int exp) |
static long | _snp_round (LDOUBLE value) |
int | strophe_vsnprintf (char *str, size_t count, const char *fmt, va_list args) |
int | strophe_snprintf (char *str, size_t count, const char *fmt,...) |
A snprintf implementation.
#define VA_LOCAL_DECL va_list ap |
#define VA_START | ( | f | ) | va_start(ap, f) |
#define VA_END va_end(ap) |
#define LDOUBLE double |
#define DP_S_DEFAULT 0 |
#define DP_S_FLAGS 1 |
#define DP_S_MIN 2 |
#define DP_S_DOT 3 |
#define DP_S_MAX 4 |
#define DP_S_MOD 5 |
#define DP_S_CONV 6 |
#define DP_S_DONE 7 |
#define DP_F_MINUS (1 << 0) |
#define DP_F_PLUS (1 << 1) |
#define DP_F_SPACE (1 << 2) |
#define DP_F_NUM (1 << 3) |
#define DP_F_ZERO (1 << 4) |
#define DP_F_UP (1 << 5) |
#define DP_F_UNSIGNED (1 << 6) |
#define DP_C_SHORT 1 |
#define DP_C_LONG 2 |
#define DP_C_LDOUBLE 3 |
#define char_to_int | ( | p | ) | (p - '0') |
#define MAX | ( | p, | |
q | |||
) | ((p >= q) ? p : q) |
#define MIN | ( | p, | |
q | |||
) | ((p <= q) ? p : q) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int strophe_vsnprintf | ( | char * | str, |
size_t | count, | ||
const char * | fmt, | ||
va_list | args | ||
) |
int strophe_snprintf | ( | char * | str, |
size_t | count, | ||
const char * | fmt, | ||
... | |||
) |