Skip to content

Commit c7174bf

Browse files
draft a ROC.STATUS that shows all active rocs
1 parent 1cb627c commit c7174bf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/tool/roc.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,12 @@ static void roc(const std::string& cmd, Target* pft) {
139139
: " taken out of RUNMODE");
140140
}
141141
if (cmd == "STATUS") {
142-
std::cout << "ROC" << pftool::state.iroc
143-
<< " with RUNMODE: " << (roc.isRunMode() ? "ON" : "OFF")
144-
<< std::endl;
142+
for (const auto& i: pft->roc_ids()) {
143+
printf("ROC%d is %3s%s\n",
144+
i,
145+
(pft->roc(i).isRunMode() ? "ON" : "OFF"),
146+
(i == pftool::state.iroc ? " <- selected" : ""));
147+
}
145148
}
146149
if (cmd == "PAGE") {
147150
auto page = pftool::readline("Page? ", pftool::state.roc_page_names());

0 commit comments

Comments
 (0)