From 576f5b39e5c32d06eb2dcec68d56db7f530cc483 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 7 May 2016 15:21:40 -0700 Subject: [PATCH] SCP: Add ability to display device description if -D specified on SHOW DEVICE The SHOW FEATURES will enumerate all devices in a simulator and for each of them display the device specific description if one is available. This change allows the description to be optionally visible for a single device displayed with SHOW DEVICE. --- scp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scp.c b/scp.c index c9d647bd..3dbb14d8 100644 --- a/scp.c +++ b/scp.c @@ -4197,6 +4197,10 @@ fprintf (st, "%s", sim_dname (dptr)); /* print dev name */ if ((flag == 2) && dptr->description) { fprintf (st, "\t%s\n", dptr->description(dptr)); } +else { + if ((sim_switches & SWMASK ('D')) && dptr->description) + fprintf (st, "\t%s\n", dptr->description(dptr)); + } if (qdisable (dptr)) { /* disabled? */ fprintf (st, "\tdisabled\n"); return SCPE_OK; @@ -7659,6 +7663,8 @@ DEVICE *find_dev (const char *cptr) int32 i; DEVICE *dptr; +if (cptr == NULL) + return NULL; for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { if ((strcmp (cptr, dptr->name) == 0) || (dptr->lname &&