PDP11, VAX: Add or correct help output for some SET commands
As discussed in #1077
This commit is contained in:
parent
746e4b9e59
commit
0bc77c4d90
2 changed files with 37 additions and 3 deletions
|
@ -347,7 +347,7 @@ MTAB dz_mod[] = {
|
||||||
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "LINES", "LINES=n",
|
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "LINES", "LINES=n",
|
||||||
&dz_setnl, &tmxr_show_lines, (void *) &dz_desc, "Display number of lines" },
|
&dz_setnl, &tmxr_show_lines, (void *) &dz_desc, "Display number of lines" },
|
||||||
{ MTAB_XTD|MTAB_VDV|MTAB_NC, 0, NULL, "LOG=n=file",
|
{ MTAB_XTD|MTAB_VDV|MTAB_NC, 0, NULL, "LOG=n=file",
|
||||||
&dz_set_log, NULL, &dz_desc },
|
&dz_set_log, NULL, &dz_desc, "Enables logging on designated line" },
|
||||||
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "NOLOG=n",
|
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "NOLOG=n",
|
||||||
&dz_set_nolog, NULL, &dz_desc, "Disable logging on designated line" },
|
&dz_set_nolog, NULL, &dz_desc, "Disable logging on designated line" },
|
||||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "LOG", NULL,
|
{ MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "LOG", NULL,
|
||||||
|
|
34
scp.c
34
scp.c
|
@ -3404,6 +3404,23 @@ if (dptr->modifiers) {
|
||||||
if (mptr->mstring) {
|
if (mptr->mstring) {
|
||||||
fprint_header (st, &found, header);
|
fprint_header (st, &found, header);
|
||||||
snprintf (buf, sizeof (buf), "set %s %s%s", sim_dname (dptr), mptr->mstring, (strchr(mptr->mstring, '=')) ? "" : (MODMASK(mptr,MTAB_VALR) ? "=val" : (MODMASK(mptr,MTAB_VALO) ? "{=val}" : "")));
|
snprintf (buf, sizeof (buf), "set %s %s%s", sim_dname (dptr), mptr->mstring, (strchr(mptr->mstring, '=')) ? "" : (MODMASK(mptr,MTAB_VALR) ? "=val" : (MODMASK(mptr,MTAB_VALO) ? "{=val}" : "")));
|
||||||
|
if ((mptr->valid != NULL) && (mptr->disp != NULL) && (mptr->help != NULL)) {
|
||||||
|
char gbuf[CBUFSIZE];
|
||||||
|
const char *rem;
|
||||||
|
|
||||||
|
rem = get_glyph (mptr->help, gbuf, 0);
|
||||||
|
if ((strcasecmp (gbuf, "Display") == 0) ||
|
||||||
|
(strcasecmp (gbuf, "Show") == 0)) {
|
||||||
|
char *thelp = (char *)malloc (9 + strlen (rem));
|
||||||
|
|
||||||
|
sprintf (thelp, "Specify %s", rem);
|
||||||
|
fprint_wrapped (st, buf, 30, gap, thelp, 80);
|
||||||
|
free (thelp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fprint_wrapped (st, buf, 30, gap, mptr->help, 80);
|
||||||
|
}
|
||||||
|
else
|
||||||
fprint_wrapped (st, buf, 30, gap, mptr->help, 80);
|
fprint_wrapped (st, buf, 30, gap, mptr->help, 80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3487,6 +3504,23 @@ if ((dptr->modifiers) && (dptr->units)) { /* handle unit specific modifiers */
|
||||||
if (mptr->mstring) {
|
if (mptr->mstring) {
|
||||||
fprint_header (st, &found, header);
|
fprint_header (st, &found, header);
|
||||||
snprintf (buf, sizeof (buf), "set %s %s%s", unit_spec, mptr->mstring, (strchr(mptr->mstring, '=')) ? "" : (MODMASK(mptr,MTAB_VALR) ? "=val" : (MODMASK(mptr,MTAB_VALO) ? "{=val}": "")));
|
snprintf (buf, sizeof (buf), "set %s %s%s", unit_spec, mptr->mstring, (strchr(mptr->mstring, '=')) ? "" : (MODMASK(mptr,MTAB_VALR) ? "=val" : (MODMASK(mptr,MTAB_VALO) ? "{=val}": "")));
|
||||||
|
if ((mptr->valid != NULL) && (mptr->disp != NULL) && (mptr->help != NULL)) {
|
||||||
|
char gbuf[CBUFSIZE];
|
||||||
|
const char *rem;
|
||||||
|
|
||||||
|
rem = get_glyph (mptr->help, gbuf, 0);
|
||||||
|
if ((strcasecmp (gbuf, "Display") == 0) ||
|
||||||
|
(strcasecmp (gbuf, "Show") == 0)) {
|
||||||
|
char *thelp = (char *)malloc (9 + strlen (rem));
|
||||||
|
|
||||||
|
sprintf (thelp, "Specify %s", rem);
|
||||||
|
fprint_wrapped (st, buf, 30, gap, thelp, 80);
|
||||||
|
free (thelp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fprint_wrapped (st, buf, 30, gap, mptr->help, 80);
|
||||||
|
}
|
||||||
|
else
|
||||||
fprint_wrapped (st, buf, 30, gap, mptr->help, 80);
|
fprint_wrapped (st, buf, 30, gap, mptr->help, 80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue