Handle %% in $display

This commit is contained in:
Nick Gasson 2008-08-08 20:07:22 +01:00
parent 090ae5fa56
commit 0985158090
1 changed files with 7 additions and 2 deletions

View File

@ -141,10 +141,15 @@ int draw_stask_display(vhdl_procedural *proc, stmt_container *container,
ss << ch;
p += 3;
}
else if (*p == '%') {
else if (*p == '%' && *(++p) != '%') {
flush_string(ss, container);
p++; // Ignore the format (!)
// TODO: This needs to be re-written
// ...it does not handle format codes at all!
// Unfortunately, there is no printf-like
// function in VHDL
assert(i < count);
ivl_expr_t net = ivl_stmt_parm(stmt, i++);
assert(net);