vul_printf.cxx
Go to the documentation of this file.
1 // This is core/vul/vul_printf.cxx
2 //
3 // Author: Andrew W. Fitzgibbon, Oxford RRG
4 // Created: 03 Jul 97
5 //
6 //-----------------------------------------------------------------------------
7 
8 #include <cstdarg>
9 #include <iostream>
10 #include <cstdio>
11 #include "vul_printf.h"
12 
13 #ifdef _MSC_VER
14 # include <vcl_msvc_warnings.h>
15 #endif
16 
17 std::ostream& vul_printf(std::ostream& s, char const * fmt, ...)
18 {
19  char buf[65536];
20 
21  std::va_list ap;
22  va_start(ap, fmt);
23  std::vsprintf(buf, fmt, ap);
24  va_end(ap);
25 
26  return s << buf;
27 }
Contains vul_printf function.
std::ostream & vul_printf(std::ostream &s, char const *fmt,...)
Print using printf format specifiers to an ostream.
Definition: vul_printf.cxx:17