1
0
mirror of https://github.com/simh/simh.git synced 2026-01-26 12:02:14 +00:00

SIMH: Fix spelling errors in comments and strings

This commit is contained in:
Peter Schorn
2024-07-16 12:04:53 -10:00
committed by Mark Pizzolato
parent 32d6b09c8e
commit c7df248f09
32 changed files with 2021 additions and 2021 deletions

View File

@@ -25,33 +25,33 @@
02-Jan-14 RMS Added tab stop routines
18-Mar-12 RMS Removed unused reference to sim_switches (Dave Bryan)
07-Dec-11 MP Added sim_ttisatty to support reasonable behaviour (i.e.
07-Dec-11 MP Added sim_ttisatty to support reasonable behaviour (i.e.
avoid in infinite loop) in the main command input
loop when EOF is detected and input is coming from
loop when EOF is detected and input is coming from
a file (or a null device: /dev/null or NUL:) This may
happen when a simulator is running in a background
happen when a simulator is running in a background
process.
17-Apr-11 MP Cleaned up to support running in a background/detached
process
20-Jan-11 MP Fixed support for BREAK key on Windows to account
20-Jan-11 MP Fixed support for BREAK key on Windows to account
for/ignore other keyboard Meta characters.
18-Jan-11 MP Added log file reference count support
17-Jan-11 MP Added support for a "Buffered" behaviors which include:
- If Buffering is enabled and Telnet is enabled, a
telnet connection is not required for simulator
telnet connection is not required for simulator
operation (instruction execution).
- If Buffering is enabled, all console output is
- If Buffering is enabled, all console output is
written to the buffer at all times (deleting the
oldest buffer contents on overflow).
- when a connection is established on the console
- when a connection is established on the console
telnet port, the whole contents of the Buffer is
presented on the telnet session and connection
presented on the telnet session and connection
will then proceed as if the connection had always
been there.
This concept allows a simulator to run in the background
and when needed a console session to be established.
The "when needed" case usually will be interested in
what already happened before looking to address what
and when needed a console session to be established.
The "when needed" case usually will be interested in
what already happened before looking to address what
to do, hence the buffer contents being presented.
28-Dec-10 MP Added support for BREAK key on Windows
30-Sep-06 RMS Fixed non-printable characters in KSR mode
@@ -85,7 +85,7 @@
25-Jan-97 RMS Added POSIX terminal I/O support
02-Jan-97 RMS Fixed bug in sim_poll_kbd
This module implements the following routines to support terminal and
This module implements the following routines to support terminal and
Remote Console I/O:
sim_poll_kbd poll for keyboard input
@@ -145,7 +145,7 @@
int setenv(const char *envname, const char *envval, int overwrite);
#endif
/* Forward Declaraations of Platform specific routines */
/* Forward Declarations of Platform specific routines */
static t_stat sim_os_poll_kbd (void);
static t_bool sim_os_poll_kbd_ready (int ms_timeout);
@@ -243,9 +243,9 @@ return "Console telnet support";
}
DEVICE sim_con_telnet = {
"CON-TELNET", sim_con_units, sim_con_reg, sim_con_mod,
2, 0, 0, 0, 0, 0,
NULL, NULL, sim_con_reset, NULL, sim_con_attach, sim_con_detach,
"CON-TELNET", sim_con_units, sim_con_reg, sim_con_mod,
2, 0, 0, 0, 0, 0,
NULL, NULL, sim_con_reset, NULL, sim_con_attach, sim_con_detach,
NULL, DEV_DEBUG | DEV_NOSAVE, 0, sim_con_debug,
NULL, NULL, NULL, NULL, NULL, sim_con_telnet_description};
TMLN sim_con_ldsc = { 0 }; /* console line descr */
@@ -490,9 +490,9 @@ return "Remote Console Facility";
}
DEVICE sim_remote_console = {
"REM-CON", NULL, NULL, sim_rem_con_mod,
0, 0, 0, 0, 0, 0,
NULL, NULL, sim_rem_con_reset, NULL, NULL, NULL,
"REM-CON", NULL, NULL, sim_rem_con_mod,
0, 0, 0, 0, 0, 0,
NULL, NULL, sim_rem_con_reset, NULL, NULL, NULL,
NULL, DEV_DEBUG | DEV_NOSAVE, 0, sim_rem_con_debug,
NULL, NULL, NULL, NULL, NULL, sim_rem_con_description};
@@ -593,7 +593,7 @@ while (*cptr != 0) { /* do all mods */
if (r != SCPE_OK)
return r;
}
else
else
return sim_messagef (SCPE_NOPARAM, "Invalid remote console parameter: %s\n", gbuf);
}
return SCPE_OK;
@@ -698,7 +698,7 @@ if (c >= 0) { /* poll connect */
tmxr_linemsgf (lp, "%s Remote Console\r\n"
"Enter single commands or to enter multiple command mode enter the %s character\r"
"%s",
sim_name, wru_name,
sim_name, wru_name,
((sim_rem_master_mode && (c == 0)) ? "" : "\nSimulator Running..."));
if (sim_rem_master_mode && (c == 0)) /* Master Mode session? */
rem->single_mode = FALSE; /* start in multi-command mode */
@@ -865,7 +865,7 @@ return SCPE_OK;
static t_stat _sim_rem_message (const char *cmd, t_stat stat)
{
CTAB *cmdp = NULL;
t_stat stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supression flag */
t_stat stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message suppression flag */
cmdp = find_cmd (cmd);
stat = SCPE_BARE_STATUS(stat); /* remove possible flag */
@@ -893,7 +893,7 @@ if ((!sim_oline) && (sim_log)) {
tmxr_linemsgf (lp, "%s", cbuf);
}
sim_oline = NULL;
if ((rem->act == NULL) &&
if ((rem->act == NULL) &&
(!tmxr_input_pending_ln (lp))) {
int32 unwritten;
@@ -989,7 +989,7 @@ if ((ep != NULL) && (*ep != ';')) { /* if a quoted string is present
if (ep [0] == '\\' && ep [1] == quote) /* if an escaped quote sequence follows */
ep = ep + 2; /* then skip over the pair */
else /* otherwise */
ep = ep + 1; /* skip the non-quote character */
ep = ep + 1; /* skip the non-quote character */
ep = strchr (ep, ';'); /* the next semicolon is outside the quotes if it exists */
}
@@ -1013,7 +1013,7 @@ else {
return buf;
}
/*
/*
Parse and setup Remote Console REPEAT command:
REPEAT EVERY nnn USECS Command {; command...}
*/
@@ -1094,7 +1094,7 @@ return stat;
}
/*
/*
Parse and setup Remote Console REPEAT command:
COLLECT nnn SAMPLES EVERY nnn CYCLES reg{,reg...}
*/
@@ -1393,8 +1393,8 @@ t_bool abort_for_debug = FALSE;
if (abort_for_debug) /* Set this in the debugger to abort simulation and cleanly close debug output */
SIM_SCP_ABORT ("Remote-Console-Data");
tmxr_poll_rx (&sim_rem_con_tmxr); /* pickup any new input */
for (i=(was_active_command ? sim_rem_cmd_active_line : 0);
(i < sim_rem_con_tmxr.lines) && (!active_command) && (stat != SCPE_REMOTE);
for (i=(was_active_command ? sim_rem_cmd_active_line : 0);
(i < sim_rem_con_tmxr.lines) && (!active_command) && (stat != SCPE_REMOTE);
i++) {
REMOTE *rem = &sim_rem_consoles[i];
t_bool master_session = (sim_rem_master_mode && (i == 0));
@@ -1559,7 +1559,7 @@ for (i=(was_active_command ? sim_rem_cmd_active_line : 0);
c = tmxr_getc_ln (lp);
if (!(TMXR_VALID & c)) {
tmxr_send_buffered_data (lp); /* flush any buffered data */
if (!master_session &&
if (!master_session &&
rem->read_timeout &&
((sim_os_msec() - read_start_time)/1000 >= rem->read_timeout)) {
while (rem->buf_ptr > 0) { /* Erase current input line */
@@ -1887,7 +1887,7 @@ if (sim_rem_cmd_active_line != -1) {
}
}
else
sim_activate_after(uptr, 100000); /* check again in 100 milliaeconds */
sim_activate_after(uptr, 100000); /* check again in 100 milliseconds */
if (sim_rem_master_was_enabled && !sim_rem_master_mode) { /* Transitioning out of master mode? */
lp = &sim_rem_con_tmxr.ldsc[0];
tmxr_linemsgf (lp, "Non Master Mode Session..."); /* report transition */
@@ -2077,7 +2077,7 @@ return sim_rem_master_mode && /* maste
/* In master mode, commands are subsequently processed from the
primary/initial (master mode) remote console session. Commands
are processed from that source until that source disables master
mode or the simulator exits
mode or the simulator exits
*/
static t_stat sim_set_rem_master (int32 flag, CONST char *cptr)
@@ -2110,7 +2110,7 @@ if (sim_rem_master_mode) {
sim_activate (rem_con_data_unit, -1);
stat = run_cmd (RU_GO, "");
if (stat != SCPE_TTMO) {
stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supression flag */
stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message suppression flag */
stat = _sim_rem_message ("RUN", stat);
}
brk_action = sim_brk_replace_act (NULL);
@@ -2224,7 +2224,7 @@ if (sim_devices[0]->dradix == 16)
else
fprintf (st, "pchar mask = %o", sim_tt_pchar);
if (sim_tt_pchar) {
static const char *pchars[] = {"NUL(^@)", "SOH(^A)", "STX(^B)", "ETX(^C)", "EOT(^D)", "ENQ(^E)", "ACK(^F)", "BEL(^G)",
static const char *pchars[] = {"NUL(^@)", "SOH(^A)", "STX(^B)", "ETX(^C)", "EOT(^D)", "ENQ(^E)", "ACK(^F)", "BEL(^G)",
"BS(^H)" , "HT(^I)", "LF(^J)", "VT(^K)", "FF(^L)", "CR(^M)", "SO(^N)", "SI(^O)",
"DLE(^P)", "DC1(^Q)", "DC2(^R)", "DC3(^S)", "DC4(^T)", "NAK(^U)", "SYN(^V)", "ETB(^W)",
"CAN(^X)", "EM(^Y)", "SUB(^Z)", "ESC", "FS(^\\)", "GS", "RS", "US"};
@@ -2279,14 +2279,14 @@ cptr = get_glyph_nc (cptr, gbuf, 0); /* get file name */
if (*cptr != 0) /* now eol? */
return SCPE_2MARG;
sim_set_logoff (0, NULL); /* close cur log */
r = sim_open_logfile (gbuf, (sim_switches & SWMASK ('B')) == SWMASK ('B'),
r = sim_open_logfile (gbuf, (sim_switches & SWMASK ('B')) == SWMASK ('B'),
&sim_log, &sim_log_ref); /* open log */
if (r != SCPE_OK) /* error? */
return r;
if ((!sim_quiet) && (!(sim_switches & SWMASK ('Q'))))
fprintf (stdout, "Logging to file \"%s\"\n",
fprintf (stdout, "Logging to file \"%s\"\n",
sim_logfile_name (sim_log, sim_log_ref));
fprintf (sim_log, "Logging to file \"%s\"\n",
fprintf (sim_log, "Logging to file \"%s\"\n",
sim_logfile_name (sim_log, sim_log_ref)); /* start of log */
time(&now);
if ((!sim_quiet) && (!(sim_switches & SWMASK ('Q'))))
@@ -2317,7 +2317,7 @@ t_stat sim_show_log (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, CONST char
if (cptr && (*cptr != 0))
return SCPE_2MARG;
if (sim_log)
fprintf (st, "Logging enabled to \"%s\"\n",
fprintf (st, "Logging enabled to \"%s\"\n",
sim_relative_path (sim_logfile_name (sim_log, sim_log_ref)));
else
fprintf (st, "Logging disabled\n");
@@ -2330,9 +2330,9 @@ int32 sim_set_deb_switches (int32 switches)
{
int32 old_deb_switches = sim_deb_switches;
sim_deb_switches = switches &
(SWMASK ('R') | SWMASK ('P') |
SWMASK ('T') | SWMASK ('A') |
sim_deb_switches = switches &
(SWMASK ('R') | SWMASK ('P') |
SWMASK ('T') | SWMASK ('A') |
SWMASK ('F') | SWMASK ('N') |
SWMASK ('B') | SWMASK ('E') |
SWMASK ('D') ); /* save debug switches */
@@ -2393,7 +2393,7 @@ if (sim_deb_switches & SWMASK ('F'))
if (sim_deb_switches & SWMASK ('E'))
sim_messagef (SCPE_OK, " Debug messages containing blob data in EBCDIC will display in readable form\n");
if (sim_deb_switches & SWMASK ('B'))
sim_messagef (SCPE_OK, " Debug messages will be written to a %u MB circular memory buffer\n",
sim_messagef (SCPE_OK, " Debug messages will be written to a %u MB circular memory buffer\n",
(unsigned int)buffer_size);
time(&now);
if (!sim_quiet) {
@@ -2462,7 +2462,7 @@ int32 i;
if (cptr && (*cptr != 0))
return SCPE_2MARG;
if (sim_deb) {
fprintf (st, "Debug output enabled to \"%s\"\n",
fprintf (st, "Debug output enabled to \"%s\"\n",
sim_relative_path (sim_logfile_name (sim_deb, sim_deb_ref)));
if (sim_deb_switches & SWMASK ('P'))
fprintf (st, " Debug messages contain current PC value\n");
@@ -2566,7 +2566,7 @@ t_stat sim_show_telnet (FILE *st, DEVICE *dunused, UNIT *uunused, int32 flag, CO
{
if (cptr && (*cptr != 0))
return SCPE_2MARG;
if ((sim_con_tmxr.master == 0) &&
if ((sim_con_tmxr.master == 0) &&
(sim_con_ldsc.serport == 0))
fprintf (st, "Connected to console window\n");
else {
@@ -2574,7 +2574,7 @@ else {
fprintf (st, "Connected to ");
tmxr_fconns (st, &sim_con_ldsc, -1);
}
else
else
if (sim_con_ldsc.sock == 0)
fprintf (st, "Listening on port %s\n", sim_con_tmxr.port);
else {
@@ -2843,7 +2843,7 @@ if (!ref)
return ref->name;
}
/* Check connection before executing
/* Check connection before executing
(including a remote console which may be required in master mode) */
t_stat sim_check_console (int32 sec)
@@ -2880,7 +2880,7 @@ if (trys == sec) {
return SCPE_TTMO; /* timed out */
}
if (sim_con_ldsc.serport)
if (tmxr_poll_conn (&sim_con_tmxr) >= 0)
if (tmxr_poll_conn (&sim_con_tmxr) >= 0)
sim_con_ldsc.rcve = 1; /* rcv enabled */
if ((sim_con_tmxr.master == 0) || /* serial console or not Telnet? done */
(sim_con_ldsc.serport))
@@ -2984,7 +2984,7 @@ if (!sim_rem_master_mode) {
}
}
tmxr_poll_rx (&sim_con_tmxr); /* poll for input */
if ((c = (t_stat)tmxr_getc_ln (&sim_con_ldsc))) { /* any char? */
if ((c = (t_stat)tmxr_getc_ln (&sim_con_ldsc))) { /* any char? */
sim_debug (DBG_RCV, &sim_con_telnet, "sim_poll_kbd() tmxr_getc_ln() returning: '%c' (0x%02X)\n", sim_isprint (c & 0xFF) ? c & 0xFF : '.', c);
return (c & (SCPE_BREAK | 0377)) | SCPE_KFLAG;
}
@@ -3181,7 +3181,7 @@ if ((md == TTUF_MODE_UC) && (par_mode == TTUF_PAR_MARK))
fprintf (st, "KSR (UC, MARK parity)");
else
fprintf (st, "%s", modes[md]);
if ((md != TTUF_MODE_8B) &&
if ((md != TTUF_MODE_8B) &&
((md != TTUF_MODE_UC) || (par_mode != TTUF_PAR_MARK))) {
if (par_mode != 0)
fprintf (st, ", %s parity", parity[par_mode]);
@@ -3436,11 +3436,11 @@ static DWORD saved_error_mode;
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
/* Note: This routine catches all the potential events which some aspect
of the windows system can generate. The CTRL_C_EVENT won't be
generated by a user typing in a console session since that
/* Note: This routine catches all the potential events which some aspect
of the windows system can generate. The CTRL_C_EVENT won't be
generated by a user typing in a console session since that
session is in RAW mode. In general, Ctrl-C on a simulator's
console terminal is a useful character to be passed to the
console terminal is a useful character to be passed to the
simulator. This code does nothing to disable or affect that. */
#include <signal.h>
@@ -3453,7 +3453,7 @@ ControlHandler(DWORD dwCtrlType)
switch (dwCtrlType)
{
case CTRL_BREAK_EVENT: // Use CTRL-Break or CTRL-C to simulate
case CTRL_BREAK_EVENT: // Use CTRL-Break or CTRL-C to simulate
case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode
int_handler(SIGINT);
return TRUE;
@@ -3888,11 +3888,11 @@ static t_stat sim_os_ttinit (void)
sim_debug (DBG_TRC, &sim_con_telnet, "sim_os_ttinit()\n");
cmdfl = fcntl (fileno (stdin), F_GETFL, 0); /* get old flags and status */
/*
/*
* make sure systems with broken termios (that don't honor
* VMIN=0 and VTIME=0) actually implement non blocking reads.
* This will have no negative effect on other systems since
* this is turned on and off depending on whether simulation
* VMIN=0 and VTIME=0) actually implement non blocking reads.
* This will have no negative effect on other systems since
* this is turned on and off depending on whether simulation
* is running or not.
*/
runfl = cmdfl | O_NONBLOCK;
@@ -4123,7 +4123,7 @@ else {
mbuf2 = (char *)malloc (3 + strlen(cptr));
sprintf (mbuf2, "%s%s%s", (sim_switches & SWMASK ('A')) ? "\n" : "",
mbuf,
mbuf,
(sim_switches & SWMASK ('I')) ? "" : "\n");
free (mbuf);
mbuf = sim_encode_quoted_string ((uint8 *)mbuf2, strlen (mbuf2));