Revert "SCP: Remove ASCII source code character set dependency"
This reverts commit 7c7b44e409
.
The prior commit didn't work for static initializers. There are other ASCII dependencies in simh. They should all be solved together or not at all.
This commit is contained in:
parent
7c7b44e409
commit
bd2f592918
3 changed files with 4 additions and 17 deletions
12
scp.c
12
scp.c
|
@ -1845,18 +1845,6 @@ return 0;
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Convert switch letter to bit mask */
|
||||
|
||||
int32 sim_swmask (int switch_ch)
|
||||
{
|
||||
static char *letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
char *index = strchr (letters, switch_ch);
|
||||
|
||||
if (index)
|
||||
return (1u << (int)(index - letters));
|
||||
return 0; /* shouldn't happen */
|
||||
}
|
||||
|
||||
t_stat process_stdin_commands (t_stat stat, char *argv[]);
|
||||
|
||||
/* Main command loop */
|
||||
|
|
1
scp.h
1
scp.h
|
@ -116,7 +116,6 @@ t_stat sim_run_boot_prep (void);
|
|||
double sim_gtime (void);
|
||||
uint32 sim_grtime (void);
|
||||
int32 sim_qcount (void);
|
||||
int32 sim_swmask (int switch_ch);
|
||||
t_stat attach_unit (UNIT *uptr, char *cptr);
|
||||
t_stat detach_unit (UNIT *uptr);
|
||||
t_stat assign_device (DEVICE *dptr, char *cptr);
|
||||
|
|
|
@ -278,10 +278,6 @@ typedef uint32 t_addr;
|
|||
#define SIM_SW_REG (1u << 28) /* register value */
|
||||
#define SIM_SW_STOP (1u << 29) /* stop message */
|
||||
|
||||
/* Convert switch letter to bit mask */
|
||||
|
||||
#define SWMASK(x) sim_swmask ((int)x)
|
||||
|
||||
/* Simulator status codes
|
||||
|
||||
0 ok
|
||||
|
@ -362,6 +358,10 @@ typedef uint32 t_addr;
|
|||
#define KBD_LIM_WAIT(x) (((x) > KBD_MAX_WAIT)? KBD_MAX_WAIT: (x))
|
||||
#define KBD_WAIT(w,s) ((w)? w: KBD_LIM_WAIT (s))
|
||||
|
||||
/* Convert switch letter to bit mask */
|
||||
|
||||
#define SWMASK(x) (1u << (((int) (x)) - ((int) 'A')))
|
||||
|
||||
/* String match - at least one character required */
|
||||
|
||||
#define MATCH_CMD(ptr,cmd) ((NULL == (ptr)) || (!*(ptr)) || strncmp ((ptr), (cmd), strlen (ptr)))
|
||||
|
|
Loading…
Add table
Reference in a new issue