00001 /** 00002 * vim: set ts=4 : 00003 * ====================================================== 00004 * Metamod:Source Stub Plugin 00005 * Written by AlliedModders LLC. 00006 * ====================================================== 00007 * 00008 * This software is provided 'as-is', without any express or implied warranty. 00009 * In no event will the authors be held liable for any damages arising from 00010 * the use of this software. 00011 * 00012 * This stub plugin is public domain. 00013 * 00014 * Version: $Id$ 00015 */ 00016 00017 #ifndef _INCLUDE_STUB_UTIL_FUNCTIONS_H_ 00018 #define _INCLUDE_STUB_UTIL_FUNCTIONS_H_ 00019 00020 #include <stddef.h> 00021 00022 /** 00023 * This is a platform-safe function which fixes weird idiosyncracies 00024 * in the null-termination and return value of snprintf(). It guarantees 00025 * the terminator on overflow cases, and never returns -1 or a value 00026 * not equal to the number of non-terminating bytes written. 00027 */ 00028 size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...); 00029 00030 #endif //_INCLUDE_STUB_UTIL_FUNCTIONS_H_ 00031
1.5.1