mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-26 11:21:31 +00:00
Remove .c_str() from stringf parameters
This commit is contained in:
parent
c41ba912d8
commit
c7df6954b9
90 changed files with 773 additions and 773 deletions
|
@ -982,8 +982,8 @@ struct VizPass : public Pass {
|
|||
if (modlist.empty())
|
||||
log_cmd_error("Nothing there to show.\n");
|
||||
|
||||
std::string dot_file = stringf("%s.dot", prefix.c_str());
|
||||
std::string out_file = stringf("%s.%s", prefix.c_str(), format.empty() ? "svg" : format.c_str());
|
||||
std::string dot_file = stringf("%s.dot", prefix);
|
||||
std::string out_file = stringf("%s.%s", prefix, format.empty() ? "svg" : format);
|
||||
|
||||
if (custom_prefix)
|
||||
yosys_output_files.insert(dot_file);
|
||||
|
@ -1026,7 +1026,7 @@ struct VizPass : public Pass {
|
|||
#else
|
||||
#define DOT_CMD "dot -T%s '%s' > '%s.new' && mv '%s.new' '%s'"
|
||||
#endif
|
||||
std::string cmd = stringf(DOT_CMD, format.c_str(), dot_file.c_str(), out_file.c_str(), out_file.c_str(), out_file.c_str());
|
||||
std::string cmd = stringf(DOT_CMD, format, dot_file, out_file, out_file, out_file);
|
||||
#undef DOT_CMD
|
||||
log("Exec: %s\n", cmd.c_str());
|
||||
#if !defined(YOSYS_DISABLE_SPAWN)
|
||||
|
@ -1043,9 +1043,9 @@ struct VizPass : public Pass {
|
|||
// system()/cmd.exe does not understand single quotes nor
|
||||
// background tasks on Windows. So we have to pause yosys
|
||||
// until the viewer exits.
|
||||
std::string cmd = stringf("%s \"%s\"", viewer_exe.c_str(), out_file.c_str());
|
||||
std::string cmd = stringf("%s \"%s\"", viewer_exe, out_file);
|
||||
#else
|
||||
std::string cmd = stringf("%s '%s' %s", viewer_exe.c_str(), out_file.c_str(), background.c_str());
|
||||
std::string cmd = stringf("%s '%s' %s", viewer_exe, out_file, background);
|
||||
#endif
|
||||
log("Exec: %s\n", cmd.c_str());
|
||||
if (run_command(cmd) != 0)
|
||||
|
@ -1053,9 +1053,9 @@ struct VizPass : public Pass {
|
|||
} else
|
||||
if (format.empty()) {
|
||||
#ifdef __APPLE__
|
||||
std::string cmd = stringf("ps -fu %d | grep -q '[ ]%s' || xdot '%s' %s", getuid(), dot_file.c_str(), dot_file.c_str(), background.c_str());
|
||||
std::string cmd = stringf("ps -fu %d | grep -q '[ ]%s' || xdot '%s' %s", getuid(), dot_file, dot_file, background);
|
||||
#else
|
||||
std::string cmd = stringf("{ test -f '%s.pid' && fuser -s '%s.pid' 2> /dev/null; } || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' %s", dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), background.c_str());
|
||||
std::string cmd = stringf("{ test -f '%s.pid' && fuser -s '%s.pid' 2> /dev/null; } || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' %s", dot_file, dot_file, dot_file, dot_file, background);
|
||||
#endif
|
||||
log("Exec: %s\n", cmd.c_str());
|
||||
if (run_command(cmd) != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue