From b15c465c2238a4414925c8f6bce15c89bdd93e44 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Tue, 13 Oct 2009 14:44:29 +0200 Subject: PR10257: Add support for sprint[ln](@hist_*). * parse.cxx (parser::parse_symbol): Add sprint[ln] to @hist_* hack. * runtime/stat-common.c: Replace reprint with new reprint_buf, add more generic _stp_stat_print_histogram_buf and call it from the older one. Also correct some formatting issues. * translate.cxx (c_unparser::visit_print_format): Add sprint case. --- parse.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'parse.cxx') diff --git a/parse.cxx b/parse.cxx index 5b3506f8..1496e9b8 100644 --- a/parse.cxx +++ b/parse.cxx @@ -2422,7 +2422,8 @@ parser::parse_symbol () fmt->print_char = pf_char; expect_op("("); - if ((name == "print" || name == "println") && + if ((name == "print" || name == "println" || + name == "sprint" || name == "sprintln") && (peek_kw("@hist_linear") || peek_kw("@hist_log"))) { // We have a special case where we recognize -- cgit