From caeb3361764ce8f642251c3778f842bf1b330a73 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 15 Feb 2009 19:53:38 -0400 Subject: The format code %C is now equal to %(fmt_C) --- src/format.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/format.cc') diff --git a/src/format.cc b/src/format.cc index 335bbc52..70365e7f 100644 --- a/src/format.cc +++ b/src/format.cc @@ -198,16 +198,12 @@ format_t::element_t * format_t::parse_elements(const string& fmt) break; } - default: { + default: current->type = element_t::EXPR; - char buf[2]; - buf[0] = *p; - buf[1] = '\0'; - current->chars = buf; - current->expr.parse(buf); + current->chars = string(FMT_PREFIX) + *p; + current->expr.parse(current->chars); break; } - } } if (q != buf) { -- cgit v1.2.3