From 32784362de8e2cfc686ce98557dd261003aff2ff Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 12 Nov 2007 21:55:53 +0000 Subject: 2007-11-12 Martin Hunt * translate.cxx (visit_print_format): Strings without a format or formatted with "%s" or "%s\n" should be printed with calls to _stp_print(). Call _stp_print_char() if printing a char. * staptree.cxx (parse_print): Check for "print_char". * staptree.h (struct print_format): Add print_char. (parse_print): Update prototype. * parse.cxx (parse_symbol): Set print_char bool in print_format. --- parse.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'parse.cxx') diff --git a/parse.cxx b/parse.cxx index 0b465aa8..173639b3 100644 --- a/parse.cxx +++ b/parse.cxx @@ -2234,7 +2234,7 @@ parser::parse_symbol () // now scrutinize this identifier for the various magic forms of identifier // (printf, @stat_op, and $var...) - bool pf_stream, pf_format, pf_delim, pf_newline; + bool pf_stream, pf_format, pf_delim, pf_newline, pf_char; if (name.size() > 0 && name[0] == '@') { @@ -2259,7 +2259,7 @@ parser::parse_symbol () } else if (print_format::parse_print(name, - pf_stream, pf_format, pf_delim, pf_newline)) + pf_stream, pf_format, pf_delim, pf_newline, pf_char)) { print_format *fmt = new print_format; fmt->tok = t; @@ -2267,6 +2267,7 @@ parser::parse_symbol () fmt->print_with_format = pf_format; fmt->print_with_delim = pf_delim; fmt->print_with_newline = pf_newline; + fmt->print_char = pf_char; expect_op("("); if ((name == "print" || name == "println") && -- cgit