[Mesa-dev] [PATCH 2/4] gallium/util: remove unused util_strbuf*
Timothy Arceri
tarceri at itsqueeze.com
Wed Mar 8 03:36:15 UTC 2017
Looks like they have been unused since 2008 b8a7eef242f6bb97d90f.
---
src/gallium/auxiliary/util/u_string.h | 37 -----------------------------------
1 file changed, 37 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h
index 9765aaa..42c834f 100644
--- a/src/gallium/auxiliary/util/u_string.h
+++ b/src/gallium/auxiliary/util/u_string.h
@@ -191,52 +191,15 @@ util_strstr(const char *haystack, const char *needle)
#define util_strchr strchr
#define util_strcmp strcmp
#define util_strncmp strncmp
#define util_strncat strncat
#define util_strstr strstr
#define util_strcasecmp strcasecmp
#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
#endif /* U_STRING_H_ */
--
2.9.3
More information about the mesa-dev
mailing list