]> Dogcows Code - chaz/yoink/blob - src/Typesetter.cc
remove some unused stlplus modules
[chaz/yoink] / src / Typesetter.cc
1
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
4 *
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
7 *
8 *****************************************************************************/
9
10 #include <algorithm>
11 #include <cstdarg>
12 #include <cstdio>
13
14 #include "Typesetter.hh"
15
16
17 void Typesetter::print(const std::string& format, ...)
18 {
19 va_list args;
20 char buffer[4096];
21 int nPrinted;
22
23 va_start(args, format);
24 buffer[0] = '\0';
25 nPrinted = vsnprintf(buffer, sizeof(buffer), format.c_str(), args);
26 va_end(args);
27
28 nPrinted = std::min(nPrinted, (int)sizeof(buffer) - 1);
29 }
30
This page took 0.029176 seconds and 4 git commands to generate.