]> git.tdb.fi Git - gldbg.git/blob - source/strformat.cpp
Remove dependencies to MSP libraries to make compiling on embedded platforms easier
[gldbg.git] / source / strformat.cpp
1 /* $Id$
2
3 This file is part of gldbg
4 Copyright © 2011  Mikko Rasa, Mikkosoft Productions
5 Distributed under the GPL
6 */
7
8 #include <stdio.h>
9 #include <stdarg.h>
10 #include "strformat.h"
11
12 using namespace std;
13
14 string strformat(const char *fmt, ...)
15 {
16         va_list args;
17         va_start(args, fmt);
18         char buf[2048];
19         vsnprintf(buf, sizeof(buf), fmt, args);
20         va_end(args);
21         return buf;
22 }