diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-18 21:18:45 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-18 21:18:45 -0800 |
commit | e4edb9aff778c683d81892cca705013dbe5dcc58 (patch) | |
tree | 5fcac11e6101a7347e79661e413495485b9f417a | |
parent | 1c78271501424b45dd4c676806690595ac7e5410 (diff) | |
download | txr-e4edb9aff778c683d81892cca705013dbe5dcc58.tar.gz txr-e4edb9aff778c683d81892cca705013dbe5dcc58.tar.bz2 txr-e4edb9aff778c683d81892cca705013dbe5dcc58.zip |
Fix total breakage of yyerror and yyerrorf.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | parser.l | 5 |
2 files changed, 10 insertions, 2 deletions
@@ -1,5 +1,12 @@ 2009-11-18 Kaz Kylheku <kkylheku@gmail.com> + parser.l (yyerror): Total breakage: can't take auto_str of char * + string. + (yyerrorf): Total breakage: arguments of wrong types. Detected + by vformat as garbage. + +2009-11-18 Kaz Kylheku <kkylheku@gmail.com> + txr.1: Clarified handling of UTF-8, now that it's precise and portable. 2009-11-18 Kaz Kylheku <kkylheku@gmail.com> @@ -67,7 +67,7 @@ int errors; void yyerror(const char *s) { - yyerrorf(lit("~a"), auto_str(s), nao); + yyerrorf(lit("~a"), string_utf8(s), nao); } void yyerrorf(obj_t *fmt, ...) @@ -75,7 +75,8 @@ void yyerrorf(obj_t *fmt, ...) if (opt_loglevel >= 1) { va_list vl; va_start (vl, fmt); - format(std_error, lit("~a: (~a:~a): "), progname, spec_file, lineno); + format(std_error, lit("~a: (~a:~a): "), prog_string, + spec_file_str, num(lineno), nao); vformat(std_error, fmt, vl); put_char(std_error, chr('\n')); va_end (vl); |