mirror of
https://github.com/open-simh/simh.git
synced 2026-02-11 18:55:09 +00:00
SCP: Remove ASCII source code character set dependency
Provide reasonable behavior on any platform which doesn't use ASCII as a character set. Method suggested by Dave G4UGM.
This commit is contained in:
12
scp.c
12
scp.c
@@ -1845,6 +1845,18 @@ 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 */
|
||||
|
||||
Reference in New Issue
Block a user