Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed Mar 23, 2020
1 parent 5b02132 commit f527984
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/xinterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,21 @@ namespace xcpp
va_start(args, format);

int ret;
if (stream == stdout || stream == stderr) {
if (stream == stdout || stream == stderr)
{
std::string buf = c_format(format, args);
if (stream == stdout) {
if (stream == stdout)
{
std::cout << buf;
} else if (stream == stderr) {
}
else if (stream == stderr)
{
std::cerr << buf;
}

ret = buf.size();
} else {
}
else
{
// Just forward to vfprintf.
ret = vfprintf(stream, format, args);
}
Expand Down

0 comments on commit f527984

Please sign in to comment.