diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-14 11:02:47 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-14 11:32:36 -0700 |
commit | 56e149a51562b9d2620bc9037a81735c29ea95af (patch) | |
tree | 3a4bd218f69c5cbfec0dd8dcada34413c0ddc715 /src/io/line.cpp | |
parent | 1a1bfc8fd8a3613bf7d3c320dcaff29a9402f50c (diff) | |
download | tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.gz tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.bz2 tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.xz tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.zip |
Ditch gcc 4.6 support
Diffstat (limited to 'src/io/line.cpp')
-rw-r--r-- | src/io/line.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/io/line.cpp b/src/io/line.cpp index f7470a6..8451b87 100644 --- a/src/io/line.cpp +++ b/src/io/line.cpp @@ -36,26 +36,26 @@ namespace io { MString out; if (column) - out += STRPRINTF("%s:%u:%u: %s: %s\n", + out += STRPRINTF("%s:%u:%u: %s: %s\n"_fmt, filename, line, column, cat, msg); else - out += STRPRINTF("%s:%u: %s: %s\n", + out += STRPRINTF("%s:%u: %s: %s\n"_fmt, filename, line, cat, msg); - out += STRPRINTF("%s\n", text); - out += STRPRINTF("%*c\n", column, '^'); + out += STRPRINTF("%s\n"_fmt, text); + out += STRPRINTF("%*c\n"_fmt, column, '^'); return AString(out); } void Line::message(ZString cat, ZString msg) const { if (column) - FPRINTF(stderr, "%s:%u:%u: %s: %s\n", + FPRINTF(stderr, "%s:%u:%u: %s: %s\n"_fmt, filename, line, column, cat, msg); else - FPRINTF(stderr, "%s:%u: %s: %s\n", + FPRINTF(stderr, "%s:%u: %s: %s\n"_fmt, filename, line, cat, msg); - FPRINTF(stderr, "%s\n", text); - FPRINTF(stderr, "%*c\n", column, '^'); + FPRINTF(stderr, "%s\n"_fmt, text); + FPRINTF(stderr, "%*c\n"_fmt, column, '^'); } AString LineSpan::message_str(ZString cat, ZString msg) const @@ -67,24 +67,24 @@ namespace io MString out; if (begin.line == end.line) { - out += STRPRINTF("%s:%u:%u: %s: %s\n", + out += STRPRINTF("%s:%u:%u: %s: %s\n"_fmt, begin.filename, begin.line, begin.column, cat, msg); - out += STRPRINTF("%s\n", begin.text); - out += STRPRINTF("%*c", begin.column, '^'); + out += STRPRINTF("%s\n"_fmt, begin.text); + out += STRPRINTF("%*c"_fmt, begin.column, '^'); for (unsigned c = begin.column; c != end.column; ++c) out += '~'; out += '\n'; } else { - out += STRPRINTF("%s:%u:%u: %s: %s\n", + out += STRPRINTF("%s:%u:%u: %s: %s\n"_fmt, begin.filename, begin.line, begin.column, cat, msg); - out += STRPRINTF("%s\n", begin.text); - out += STRPRINTF("%*c", begin.column, '^'); + out += STRPRINTF("%s\n"_fmt, begin.text); + out += STRPRINTF("%*c"_fmt, begin.column, '^'); for (unsigned c = begin.column; c != begin.text.size(); ++c) out += '~'; - out += " ...\n"; - out += STRPRINTF("%s\n", end.text); + out += " ...\n"_s; + out += STRPRINTF("%s\n"_fmt, end.text); for (unsigned c = 0; c != end.column; ++c) out += '~'; out += '\n'; @@ -94,7 +94,7 @@ namespace io void LineSpan::message(ZString cat, ZString msg) const { - FPRINTF(stderr, "%s", message_str(cat, msg)); + FPRINTF(stderr, "%s"_fmt, message_str(cat, msg)); } LineReader::LineReader(ZString name) |