1.1 --- a/sourcemm/ISmmAPI.h Sat Oct 06 15:47:59 2007 +0000
1.2 +++ b/sourcemm/ISmmAPI.h Sat Oct 06 16:47:58 2007 +0000
1.3 @@ -33,6 +33,7 @@
1.4 * @file ISmmAPI.h
1.5 */
1.6
1.7 +#include <stdarg.h>
1.8 #include <interface.h>
1.9 #include <eiface.h>
1.10 #include <sourcehook.h>
1.11 @@ -334,6 +335,38 @@
1.12 * EnableVSPListener().
1.13 */
1.14 virtual IServerPluginCallbacks *GetVSPInfo(int *pVersion) =0;
1.15 +
1.16 + /**
1.17 + * @brief Formats a string. This is a platform safe wrapper around
1.18 + * snprintf/_snprintf.
1.19 + *
1.20 + * @param buffer Buffer to write to.
1.21 + * @param maxlength Maximum length of the buffer.
1.22 + * @param format Format specifiers.
1.23 + * @param ... Format arguments.
1.24 + * @return Number of bytes actually written, not including the
1.25 + * null terminator.
1.26 + */
1.27 + virtual size_t Format(char *buffer,
1.28 + size_t maxlength,
1.29 + const char *format,
1.30 + ...) =0;
1.31 +
1.32 + /**
1.33 + * @brief Formats a string. This is a platform safe wrapper around
1.34 + * vsnprintf/_vsnprintf.
1.35 + *
1.36 + * @param buffer Buffer to write to.
1.37 + * @param maxlength Maximum length of the buffer.
1.38 + * @param format Format specifiers.
1.39 + * @param ap Format argument list.
1.40 + * @return Number of bytes actually written, not including the
1.41 + * null terminator.
1.42 + */
1.43 + virtual size_t FormatArgs(char *buffer,
1.44 + size_t maxlength,
1.45 + const char *format,
1.46 + va_list ap) =0;
1.47 };
1.48
1.49