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