From 84d31c2f715a343ec39abbea30b39e7f015f5f5b Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 11 Apr 2006 04:24:49 +0000 Subject: [PATCH] 2006-04-10 Martin Hunt * vsprintf.c (_stp_snprintf): New function. --- runtime/ChangeLog | 2 ++ runtime/vsprintf.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 930a17097..59de53323 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,5 +1,7 @@ 2006-04-10 Martin Hunt + * vsprintf.c (_stp_snprintf): New function. + * stat-common.c (_stp_stat_print_histogram): Write a newline at the end of the histogram. diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 45e15ce5e..048437583 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -386,4 +386,15 @@ int _stp_vscnprintf(char *buf, size_t size, const char *fmt, va_list args) return (i >= size) ? (size - 1) : i; } +int _stp_snprintf(char *buf, size_t size, const char *fmt, ...) +{ + va_list args; + int i; + + va_start(args, fmt); + i=_stp_vsnprintf(buf,size,fmt,args); + va_end(args); + return i; +} + #endif /* _VSPRINTF_C_ */ -- 2.43.5