Tools: map generator maintenance; added SVG output driver (from Jan Lönnberg, bug #1100); attempt to load fonts with various filename capitalization
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3665 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -20,3 +20,25 @@ strupr (char *str)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// MSVC does not have snprintf() and vsnprintf(). It does have a _snprintf()
|
||||
// and _vsnprintf(), but these do not terminate a truncated string as
|
||||
// the C standard prescribes.
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int
|
||||
snprintf(char *str, size_t size, const char *format, ...)
|
||||
{
|
||||
int result;
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
result = _vsnprintf (str, size, format, args);
|
||||
if (str != NULL && size != 0)
|
||||
str[size - 1] = '\0';
|
||||
va_end (args);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
Reference in New Issue
Block a user