patch 9.1.1291: too many strlen() calls in buffer.c
Problem: too many strlen() calls in buffer.c
Solution: refactor buffer.c and remove strlen() calls
(John Marriott)
closes: #17063
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/proto.h b/src/proto.h
index f04ba05..a5ca9e4 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -140,6 +140,7 @@
int vim_snprintf_add(char *, size_t, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4);
int vim_snprintf(char *, size_t, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4);
+size_t vim_snprintf_safelen(char *, size_t, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4);
int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap)
ATTRIBUTE_FORMAT_PRINTF(3, 0);