(svn r2754) Move str_fmt into string.[ch]

This commit is contained in:
tron
2005-07-29 21:52:20 +00:00
parent 1736566e22
commit 3a162799fd
4 changed files with 20 additions and 17 deletions

View File

@@ -93,22 +93,6 @@ void CDECL ShowInfoF(const char *str, ...)
ShowInfo(buf);
}
char * CDECL str_fmt(const char *str, ...)
{
char buf[4096];
va_list va;
int len;
char *p;
va_start(va, str);
len = vsprintf(buf, str, va);
va_end(va);
p = malloc(len + 1);
if (p)
memcpy(p, buf, len + 1);
return p;
}
void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize)
{