1
0
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:
Mark Pizzolato
2015-08-03 12:35:08 -07:00
parent a747c0f860
commit 7c7b44e409
3 changed files with 17 additions and 4 deletions

12
scp.c
View File

@@ -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 */