mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
Made automatic startup file be named {sim_name}.rc (i.e. hp2100.rc or vax.rc, etc.)
This commit is contained in:
parent
1cb4eb7960
commit
fd702e407b
6
scp.c
6
scp.c
@ -737,6 +737,7 @@ int setenv(const char *envname, const char *envval, int overwrite)
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
char cbuf[CBUFSIZE], gbuf[CBUFSIZE], *cptr;
|
||||
char nbuf[PATH_MAX + 7];
|
||||
int32 i, sw;
|
||||
t_bool lookswitch;
|
||||
t_stat stat, stat_nomessage;
|
||||
@ -814,11 +815,12 @@ if (!sim_quiet) {
|
||||
if (sim_dflt_dev == NULL) /* if no default */
|
||||
sim_dflt_dev = sim_devices[0];
|
||||
|
||||
stat = do_cmd (-1, "simh.rc"); /* proc cmd file */
|
||||
sprintf(nbuf, "%s.rc", sim_name);
|
||||
stat = do_cmd (-1, nbuf); /* {sim_name}.rc proc cmd file */
|
||||
if (*cbuf) /* cmd file arg? */
|
||||
stat = do_cmd (0, cbuf); /* proc cmd file */
|
||||
else if (*argv[0]) { /* sim name arg? */
|
||||
char nbuf[PATH_MAX + 7], *np; /* "path.ini" */
|
||||
char *np; /* "path.ini" */
|
||||
nbuf[0] = '"'; /* starting " */
|
||||
strncpy (nbuf + 1, argv[0], PATH_MAX + 1); /* copy sim name */
|
||||
if (np = match_ext (nbuf, "EXE")) /* remove .exe */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user