diff options
-rw-r--r-- | src/gallium/auxiliary/util/u_string.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h index 9765aaa0140..42c834fecf9 100644 --- a/src/gallium/auxiliary/util/u_string.h +++ b/src/gallium/auxiliary/util/u_string.h @@ -198,43 +198,6 @@ util_strstr(const char *haystack, const char *needle) #endif -/** - * Printable string buffer - */ -struct util_strbuf -{ - char *str; - char *ptr; - size_t left; -}; - - -static inline void -util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size) -{ - sbuf->str = str; - sbuf->str[0] = 0; - sbuf->ptr = sbuf->str; - sbuf->left = size; -} - - -static inline void -util_strbuf_printf(struct util_strbuf *sbuf, const char *format, ...) -{ - if(sbuf->left > 1) { - size_t written; - va_list ap; - va_start(ap, format); - written = util_vsnprintf(sbuf->ptr, sbuf->left, format, ap); - va_end(ap); - sbuf->ptr += written; - sbuf->left -= written; - } -} - - - #ifdef __cplusplus } #endif |