Skip to content

Commit

Permalink
logcmd.cc: Move quote stripping to LogPass
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Jun 7, 2024
1 parent a44a066 commit 51c855e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions kernel/register.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args)
if (args.size() == 0 || args[0][0] == '#' || args[0][0] == ':')
return;

if (args.size() == 2 && args[1][0] == '"' && args[1][args[1].size()-1] == '"')
args[1] = args[1].substr(1, args[1].size()-2);

if (echo_mode) {
log("%s", create_prompt(design, 0));
for (size_t i = 0; i < args.size(); i++)
Expand Down
3 changes: 3 additions & 0 deletions passes/cmds/logcmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ struct LogPass : public Pass {
text += args[argidx] + ' ';
if (!text.empty()) text.resize(text.size()-1);

if (text[0] == '"' && text[text.size()-1] == '"')
text = text.substr(1, text.size()-2);

const char *fmtline = newline ? "%s\n" : "%s";

if (to_stdout) fprintf(stdout, fmtline, text.c_str());
Expand Down

0 comments on commit 51c855e

Please sign in to comment.