public/ISourceMod.h
changeset 2555 ce70871a404b
parent 2289 44045ead61cd
child 2562 af4b3f9a8168
     1.1 --- a/public/ISourceMod.h	Sun Feb 01 19:56:24 2009 -0500
     1.2 +++ b/public/ISourceMod.h	Sun Feb 01 19:57:09 2009 -0500
     1.3 @@ -43,7 +43,7 @@
     1.4  #include <time.h>
     1.5  
     1.6  #define SMINTERFACE_SOURCEMOD_NAME		"ISourceMod"
     1.7 -#define SMINTERFACE_SOURCEMOD_VERSION	7
     1.8 +#define SMINTERFACE_SOURCEMOD_VERSION	8
     1.9  
    1.10  /**
    1.11  * @brief Forward declaration of the KeyValues class.
    1.12 @@ -248,6 +248,28 @@
    1.13  		 * @param hook		Hook function.
    1.14  		 */
    1.15  		virtual void RemoveGameFrameHook(GAME_FRAME_HOOK hook) =0;
    1.16 +
    1.17 +		/**
    1.18 +		 * @brief Platform-safe wrapper around snprintf().
    1.19 +		 *
    1.20 +		 * @param buffer	String buffer.
    1.21 +		 * @param maxlength	Maximum length of buffer.
    1.22 +		 * @param fmt		Format specifier string.
    1.23 +		 * @param ...		Format arguments.
    1.24 +		 * @return			Number of bytes (not including null terminator) written.
    1.25 +		 */
    1.26 +		virtual size_t Format(char *buffer, size_t maxlength, const char *fmt, ...) = 0;
    1.27 +
    1.28 +		/**
    1.29 +		 * @brief Platform-safe wrapper around vsnprintf().
    1.30 +		 *
    1.31 +		 * @param buffer	String buffer.
    1.32 +		 * @param maxlength	Maximum length of buffer.
    1.33 +		 * @param fmt		Format specifier string.
    1.34 +		 * @param ap		Format arguments.
    1.35 +		 * @return			Number of bytes (not including null terminator) written.
    1.36 +		 */
    1.37 +		virtual size_t FormatArgs(char *buffer, size_t maxlength, const char *fmt, va_list ap) = 0;
    1.38  	};
    1.39  }
    1.40