24 RCSIDH(print_h,
"$Id: 37f51ebc623b2a2b04f434c897d23e19eae1d401 $")
30 #include <freeradius-devel/build.h>
31 #include <freeradius-devel/missing.h>
32 #include <freeradius-devel/util/talloc.h>
48 #define is_truncated(_ret, _max) ((_ret) >= (size_t)(_max))
49 #define truncate_len(_ret, _max) (((_ret) >= (size_t)(_max)) ? (((size_t)(_max)) - 1) : _ret)
static int const char * fmt
size_t fr_snprint(char *out, size_t outlen, char const *in, ssize_t inlen, char quote)
Escape any non printable or non-UTF8 characters in the input string.
char * fr_vasprintf(TALLOC_CTX *ctx, char const *fmt, va_list ap)
ssize_t fr_fprintf(FILE *stream, char const *fmt,...))
Special version of fprintf which implements custom format specifiers.
char * fr_asprint(TALLOC_CTX *ctx, char const *in, ssize_t inlen, char quote)
Escape string that may contain binary data, and write it to a new buffer.
ssize_t fr_utf8_str(uint8_t const *str, ssize_t inlen)
Validate a complete UTF8 string.
size_t fr_utf8_char(uint8_t const *str, ssize_t inlen)
Checks for utf-8, taken from http://www.w3.org/International/questions/qa-forms-utf-8.
size_t fr_snprint_len(char const *in, ssize_t inlen, char quote)
Find the length of the buffer required to fully escape a string with fr_prints.
char const * fr_utf8_strchr(int *chr_len, char const *str, ssize_t inlen, char const *chr)
Return a pointer to the first UTF8 char in a string.
char * fr_vasprintf_secure(TALLOC_CTX *ctx, char const *fmt, va_list ap)
char * fr_asprintf(TALLOC_CTX *ctx, char const *fmt,...))
Special version of asprintf which implements custom format specifiers.
static size_t char fr_sbuff_t size_t inlen
int format(printf, 5, 0))
static size_t char ** out