Revise check for '.probe alli' and event nodes:

Bail out, don't run any sim, don't change variable
'auto_bridge'.
This commit is contained in:
Holger Vogt 2024-12-01 15:55:59 +01:00
parent 96a6d8d58f
commit 4589821df3
2 changed files with 8 additions and 7 deletions

View File

@ -8697,9 +8697,7 @@ static void inp_check_syntax(struct card *deck)
for (card = deck; card; card = card->nextcard) {
char* cut_line = card->line;
if (ciprefix(".probe", cut_line) && search_plain_identifier(cut_line, "alli")) {
int i = 0;
bool bi = TRUE;
cp_vset("auto_bridge", CP_NUM, &i);
cp_vset("probe_alli_given", CP_BOOL, &bi);
break;
}

View File

@ -700,6 +700,14 @@ bool Evtcheck_nodes(
* an event node. Failure is fatal.
*/
if (ckt->evt->info.node_list && cp_getvar("probe_alli_given", CP_BOOL, NULL, 0)) {
fprintf(stderr,
"\nError: Dot command '.probe alli' and "
"digital nodes are not compatible.\n");
fprintf(stderr, " Simulation will fail!\n\n");
controlled_exit(EXIT_FAILURE);
}
for (event_node = ckt->evt->info.node_list;
event_node;
event_node = event_node->next) {
@ -707,13 +715,8 @@ bool Evtcheck_nodes(
analog_node;
analog_node = analog_node->next) {
int nl;
if (strcmp(event_node->name, analog_node->name) == 0) {
if (show == AB_OFF) {
if (cp_getvar("probe_alli_given", CP_BOOL, NULL, 0))
fprintf(stderr,
"\nDot command '.probe alli' and "
"digital nodes are not compatible.\n");
FREE(errMsg);
errMsg = tprintf("Auto bridging is switched off "
"but node %s is mixed-type.\n",