diff --git a/scp.c b/scp.c index 47f17ba..ac1b0e7 100644 --- a/scp.c +++ b/scp.c @@ -32,26 +32,26 @@ REG "maxval" field now determines maximum allowed value 08-Mar-16 RMS Added shutdown flag for detach_all 20-Mar-12 MP Fixes to "SHOW SHOW" commands - 06-Jan-12 JDB Fixed "SHOW DEVICE" with only one enabled unit (Dave Bryan) - 25-Sep-11 MP Added the ability for a simulator built with + 06-Jan-12 JDB Fixed "SHOW DEVICE" with only one enabled unit (Dave Bryan) + 25-Sep-11 MP Added the ability for a simulator built with SIM_ASYNCH_IO to change whether I/O is actually done - asynchronously by the new scp command SET ASYNCH and + asynchronously by the new scp command SET ASYNCH and SET NOASYNCH - 22-Sep-11 MP Added signal catching of SIGHUP and SIGTERM to cause + 22-Sep-11 MP Added signal catching of SIGHUP and SIGTERM to cause simulator STOP. This allows an externally signalled event (i.e. system shutdown, or logoff) to signal a - running simulator of these events and to allow - reasonable actions to be taken. This will facilitate - running a simulator as a 'service' on *nix platforms, - given a sufficiently flexible simulator .ini file. + running simulator of these events and to allow + reasonable actions to be taken. This will facilitate + running a simulator as a 'service' on *nix platforms, + given a sufficiently flexible simulator .ini file. 20-Apr-11 MP Added expansion of %STATUS% and %TSTATUS% in do command - arguments. STATUS is the numeric value of the last + arguments. STATUS is the numeric value of the last command error status and TSTATUS is the text message relating to the last command error status 17-Apr-11 MP Changed sim_rest to defer attaching devices until after device register contents have been restored since some attach activities may reference register contained info. - 29-Jan-11 MP Adjusted sim_debug to: + 29-Jan-11 MP Adjusted sim_debug to: - include the simulator timestamp (sim_gtime) as part of the prefix for each line of output - write complete lines at a time (avoid asynch I/O issues). @@ -260,7 +260,7 @@ #define MIN(a,b) (((a) <= (b)) ? (a) : (b)) #endif /* Max width of a value expressed as a formatted string */ -#define MAX_WIDTH ((int) ((CHAR_BIT * sizeof (t_value) * 4 + 3)/3)) +#define MAX_WIDTH ((CHAR_BIT * sizeof (t_value) * 4 + 3) / 3) /* search logical and boolean ops */ @@ -360,10 +360,10 @@ return "SCP Event and Internal Command Processing and Testing"; static UNIT scp_test_units[4]; DEVICE sim_scp_dev = { - "SCP-PROCESS", scp_test_units, NULL, NULL, - 4, 0, 0, 0, 0, 0, - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, DEV_NOSAVE|DEV_DEBUG, 0, + "SCP-PROCESS", scp_test_units, NULL, NULL, + 4, 0, 0, 0, 0, 0, + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, DEV_NOSAVE|DEV_DEBUG, 0, scp_debug, NULL, NULL, NULL, NULL, NULL, sim_scp_description}; @@ -449,13 +449,13 @@ t_bool sim_asynch_enabled = FALSE; #endif /* The per-simulator init routine is a weak global that defaults to NULL - The other per-simulator pointers can be overrriden by the init routine + The other per-simulator pointers can be overridden by the init routine WEAK void (*sim_vm_init) (void); This routine is no longer invoked this way since it doesn't work reliably - on all simh supported compile environments. A simulator that needs these - initializations can perform them in the CPU device reset routine which will + on all simh supported compile environments. A simulator that needs these + initializations can perform them in the CPU device reset routine which will always be called before anything else can be processed. */ @@ -695,10 +695,10 @@ return "Step/Next facility"; static UNIT sim_step_unit = { UDATA (&step_svc, UNIT_IDLE, 0) }; DEVICE sim_step_dev = { - "INT-STEP", &sim_step_unit, NULL, NULL, - 1, 0, 0, 0, 0, 0, - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, DEV_NOSAVE, 0, + "INT-STEP", &sim_step_unit, NULL, NULL, + 1, 0, 0, 0, 0, 0, + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, DEV_NOSAVE, 0, NULL, NULL, NULL, NULL, NULL, NULL, sim_int_step_description}; @@ -720,10 +720,10 @@ return SCPE_OK; static UNIT sim_runlimit_unit = { UDATA (&runlimit_svc, UNIT_IDLE, 0) }; DEVICE sim_runlimit_dev = { - "INT-RUNLIMIT", &sim_runlimit_unit, NULL, NULL, - 1, 0, 0, 0, 0, 0, - NULL, NULL, &sim_int_runlimit_reset, NULL, NULL, NULL, - NULL, DEV_NOSAVE, 0, + "INT-RUNLIMIT", &sim_runlimit_unit, NULL, NULL, + 1, 0, 0, 0, 0, 0, + NULL, NULL, &sim_int_runlimit_reset, NULL, NULL, NULL, + NULL, DEV_NOSAVE, 0, NULL, NULL, NULL, NULL, NULL, NULL, sim_int_runlimit_description}; @@ -734,10 +734,10 @@ return "Expect facility"; static UNIT sim_expect_unit = { UDATA (&expect_svc, 0, 0) }; DEVICE sim_expect_dev = { - "INT-EXPECT", &sim_expect_unit, NULL, NULL, - 1, 0, 0, 0, 0, 0, - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, DEV_NOSAVE, 0, + "INT-EXPECT", &sim_expect_unit, NULL, NULL, + 1, 0, 0, 0, 0, 0, + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, DEV_NOSAVE, 0, NULL, NULL, NULL, NULL, NULL, NULL, sim_int_expect_description}; @@ -754,10 +754,10 @@ static REG sim_flush_reg[] = { static UNIT sim_flush_unit = { UDATA (&flush_svc, UNIT_IDLE, 0) }; DEVICE sim_flush_dev = { - "INT-FLUSH", &sim_flush_unit, sim_flush_reg, NULL, - 1, 0, 0, 0, 0, 0, - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, DEV_NOSAVE, 0, + "INT-FLUSH", &sim_flush_unit, sim_flush_reg, NULL, + 1, 0, 0, 0, 0, 0, + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, DEV_NOSAVE, 0, NULL, NULL, NULL, NULL, NULL, NULL, sim_int_flush_description}; @@ -1410,7 +1410,7 @@ static const char simh_help1[] = " RADIX-50 characters.\n" "5-F\n" " The -F switch causes duplicate successive lines of debug NOT to be\n" - " summarized to reduce repetative noise from the debug data stream.\n" + " summarized to reduce repetitive noise from the debug data stream.\n" "5-E\n" " The -E switch causes data blob output to also display the data as\n" " EBCDIC characters.\n" @@ -1575,16 +1575,16 @@ static const char simh_help2[] = "+sh{ow} cons{ole} {arg} show console options\n" "+sh{ow} {-ei} dev{ices} show devices\n" "+sh{ow} fea{tures} show system devices with descriptions\n" - "+sh{ow} m{odifiers} show modifiers for all devices\n" - "+sh{ow} s{how} show SHOW commands for all devices\n" + "+sh{ow} m{odifiers} show modifiers for all devices\n" + "+sh{ow} s{how} show SHOW commands for all devices\n" "+sh{ow} n{ames} show logical names\n" "+sh{ow} q{ueue} show event queue\n" "+sh{ow} ti{me} show simulated time\n" "+sh{ow} th{rottle} show simulation rate\n" - "+sh{ow} a{synch} show asynchronous I/O state\n" + "+sh{ow} a{synch} show asynchronous I/O state\n" "+sh{ow} ve{rsion} show simulator version\n" - "+sh{ow} def{ault} show current directory\n" - "+sh{ow} re{mote} show remote console configuration\n" + "+sh{ow} def{ault} show current directory\n" + "+sh{ow} re{mote} show remote console configuration\n" "+sh{ow} RADIX show device display radix\n" "+sh{ow} DEBUG show device debug flags\n" "+sh{ow} MODIFIERS show device modifiers\n" @@ -1636,7 +1636,7 @@ static const char simh_help2[] = /***************** 80 character line width template *************************/ "2HELP\n" "+h{elp} type this message\n" - "+h{elp} type help for command\n" + "+h{elp} type help for command\n" "+h{elp} type help for device\n" "+h{elp} registers type help for device register variables\n" "+h{elp} attach type help for device specific ATTACH command\n" @@ -1707,7 +1707,7 @@ static const char simh_help2[] = "+The input sequence \"%%%%\" represents a literal \"%%\". All other\n" "+character combinations are rendered literally.\n\n" "+Omitted parameters result in null-string substitutions.\n\n" - "+Tokens preceeded and followed by %% characters are expanded as environment\n" + "+Tokens preceded and followed by %% characters are expanded as environment\n" "+variables, and if an environment variable isn't found then it can be one of\n" "+several special variables:\n\n" "++%%DATE%% yyyy-mm-dd\n" @@ -1747,10 +1747,10 @@ static const char simh_help2[] = "++%%SIM_OSTYPE%% The Operating System running the current simulator\n\n" "+Environment variable lookups are done first with the precise name between\n" "+the %% characters and if that fails, then the name between the %% characters\n" - "+is upcased and a lookup of that valus is attempted.\n\n" + "+is upcased and a lookup of that value is attempted.\n\n" "+The first Space delimited token on the line is extracted in uppercase and\n" "+then looked up as an environment variable. If found it the value is\n" - "+supstituted for the original string before expanding everything else. If\n" + "+substituted for the original string before expanding everything else. If\n" "+it is not found, then the original beginning token on the line is left\n" "+untouched.\n\n" "+Environment variable string substitution:\n\n" @@ -1789,7 +1789,7 @@ static const char simh_help2[] = "++%%~nxI%% - expands the value of %%I%% to a file name and extension only\n\n" " In the above example above %%I%% can be replaced by other\n" " environment variables or numeric parameters to a DO command\n" - " invokation.\n" + " invocation.\n" " Examples:\n\n" "++sim> set env FNAME='xyzzy.ini'\n" "++sim> echo ~FNAME=%%~FNAME%%\n" @@ -1804,7 +1804,7 @@ static const char simh_help2[] = "3GOTO\n" " Commands in a command file execute in sequence until either an error\n" " trap occurs (when a command completes with an error status), or when an\n" - " explict request is made to start command execution elsewhere with the\n" + " explicit request is made to start command execution elsewhere with the\n" " GOTO command:\n\n" "++GOTO