251cced1f8
Various minor things done to project files Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way) Updated regex project file and makefile --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
23 lines
331 B
C++
23 lines
331 B
C++
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include "stub_util.h"
|
|
|
|
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
|
|
{
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
size_t len = vsnprintf(buffer, maxlength, fmt, ap);
|
|
va_end(ap);
|
|
|
|
if (len >= maxlength)
|
|
{
|
|
len = maxlength - 1;
|
|
buffer[len] = '\0';
|
|
}
|
|
|
|
return len;
|
|
}
|
|
|
|
|