On Tuesday, November 05, 2013 at 9:53 AM, Terry Newton wrote:
> Hello,
> 
> The new simh supports substitution using %, a nice feature however it
> breaks scripts that use: set throttle [some number]% A workaround is to use
> \% as in: set throttle 50\% But would be better to ignore % unless a
> parameter is actually supplied, then existing startup scripts (almost all of
> mine) don't have to be modified.
> 
> So, in scp.c I changed...
> 
>         if (*ip == '%') {                               /* sub? */
> 
> ...to...
> 
>         if ((*ip == '%') && (ip[1] != ' ') && (ip[1] != '\0')) { /* sub? */
> 
> ...and set throttle 50% works correctly now, also fixes display commands like
> 'echo Throttle is set to 50% now'. At least provided there's not a non-space
> character after the %, otherwise substitution is triggered.

This is a good idea.  I've generalized it a little.  Only %'s followed by 
digits, alpha or * characters cause substitution, others are left as is.

Thanks.

- Mark

_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to