no white space removal in echo ' '

This commit is contained in:
h_vogt 2010-07-01 20:29:53 +00:00
parent 3369d860b4
commit 2edf6bafd2
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2010-07-01 Holger Vogt
* src/frontend/inpcom.c : no removal of white spaces in echo lines
inside a control section
2010-07-01 Robert Larice
* src/frontend/com_sysinfo.c ,
* src/frontend/display.c ,

View File

@ -1957,6 +1957,14 @@ inp_remove_excess_ws(struct line *deck )
struct line *c = deck;
while ( c != NULL ) {
if ( *c->li_line == '*' ) { c = c->li_next; continue; }
/* exclude echo lines between .control and .endc from removing white spaces */
if ( ciprefix( ".control", c->li_line ) ) found_control = TRUE;
if ( ciprefix( ".endc", c->li_line ) ) found_control = FALSE;
if ((found_control) && (ciprefix( "echo", c->li_line ))) {
c = c->li_next;
continue;
}
c->li_line = inp_remove_ws(c->li_line); /* freed in fcn */
c = c->li_next;
}
@ -4102,7 +4110,7 @@ static void inp_bsource_compat(struct line *deck)
{
/* allow 100p, 5MEG etc. */
dvalue = INPevaluate(&str_ptr, &error1, 1);
cvalue = tmalloc(19);
cvalue = (char*) tmalloc(19);
sprintf(cvalue,"%18.10e", dvalue);
/* unary -, change sign */
if (ustate == 2) {