Lines Matching refs:xbuf
138 #define INS_CHAR_NR(xbuf, ch) do { \ argument
139 smart_str_appendc(xbuf, ch); \
142 #define INS_STRING(xbuf, s, slen) do { \ argument
143 smart_str_appendl(xbuf, s, slen); \
146 #define INS_CHAR(xbuf, ch) \ argument
147 INS_CHAR_NR(xbuf, ch)
153 #define PAD(xbuf, count, ch) do { \ argument
156 smart_str_alloc(xbuf, (count), 0); \
157 memset(xbuf->c + xbuf->len, ch, (count)); \
158 xbuf->len += (count); \
203 static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list ap) /* {{{ */ in xbuf_format_converter() argument
245 INS_CHAR(xbuf, *fmt); in xbuf_format_converter()
720 *(va_arg(ap, int *)) = xbuf->len; in xbuf_format_converter()
784 INS_CHAR(xbuf, *s); in xbuf_format_converter()
789 PAD(xbuf, min_width - s_len, pad_char); in xbuf_format_converter()
794 INS_STRING(xbuf, s, s_len); in xbuf_format_converter()
797 PAD(xbuf, min_width - s_len, pad_char); in xbuf_format_converter()
814 smart_str xbuf = {0}; in vspprintf() local
821 xbuf_format_converter(&xbuf, format, ap); in vspprintf()
823 if (max_len && xbuf.len > max_len) { in vspprintf()
824 xbuf.len = max_len; in vspprintf()
826 smart_str_0(&xbuf); in vspprintf()
828 *pbuf = xbuf.c; in vspprintf()
830 return xbuf.len; in vspprintf()