diff --git a/src/xinterpreter.cpp b/src/xinterpreter.cpp index 2a8084f8..b2d9c686 100644 --- a/src/xinterpreter.cpp +++ b/src/xinterpreter.cpp @@ -339,29 +339,6 @@ __get_cxx_version () restore_output(); } - static std::string c_format(const char* format, std::va_list args) - { - // Call vsnprintf once to determine the required buffer length. The - // return value is the number of characters _excluding_ the null byte. - std::va_list args_bufsz; - va_copy(args_bufsz, args); - std::size_t bufsz = vsnprintf(NULL, 0, format, args_bufsz); - va_end(args_bufsz); - - // Create an empty string of that size. - std::string s(bufsz, 0); - - // Now format the data into this string and return it. - std::va_list args_format; - va_copy(args_format, args); - // The second parameter is the maximum number of bytes that vsnprintf - // will write _including_ the terminating null byte. - vsnprintf(&s[0], s.size() + 1, format, args_format); - va_end(args_format); - - return s; - } - void interpreter::redirect_output() { p_cout_strbuf = std::cout.rdbuf();