SCP: Add simulator binary name in a SIM_BIN_NAME environment variable

This commit is contained in:
Mark Pizzolato 2016-06-19 22:10:17 -07:00
parent f2656acb38
commit e158408268

4
scp.c
View file

@ -2006,8 +2006,12 @@ else if (*argv[0]) { /* sim name arg? */
if (np == NULL) if (np == NULL)
np = strrchr (nbuf, ']'); /* VMS path separator */ np = strrchr (nbuf, ']'); /* VMS path separator */
if (np != NULL) { if (np != NULL) {
char *sim_bin_name = np; /* Save name pointer */
*np = '"'; *np = '"';
stat = do_cmd (-1, np) & ~SCPE_NOMESSAGE; /* proc default cmd file */ stat = do_cmd (-1, np) & ~SCPE_NOMESSAGE; /* proc default cmd file */
np[strlen (np) - 4] = '\0'; /* strip .ini" */
setenv ("SIM_BIN_NAME", sim_bin_name+1, 1); /* Publish simulator binary name */
} }
} }
} }