Browse Source

don't transform operators ('&|' -> '&&' '&' -> '&&' etc) pass them *literally*

pre-master-46
rlar 16 years ago
parent
commit
34a6676dc8
  1. 4
      ChangeLog
  2. 12
      src/frontend/inpcom.c

4
ChangeLog

@ -1,3 +1,7 @@
2010-12-11 Robert Larice
* src/frontend/inpcom.c :
don't transform operators ('&|' -> '&&' '&' -> '&&' etc) pass them *literally*
2010-12-11 Holger Vogt
* inpcom.c: && and || in B source, bug no. 3127808
* src/makefile.am: trailing white spaces removed

12
src/frontend/inpcom.c

@ -4354,15 +4354,11 @@ static void inp_bsource_compat(struct line *deck)
}
else if ((actchar == '|') || (actchar == '&'))
{
buf[0] = actchar;
buf[1] = actchar;
buf[2] = '\0';
cwl->wl_word = copy(buf);
str_ptr++;
char *beg = str_ptr++;
if ((*str_ptr == '|') || (*str_ptr == '&'))
str_ptr++;
cwl->wl_word = copy_substring(beg, str_ptr);
ustate = 1; /* we have an operator */
/* just skip the second & or | */
if ((*str_ptr == '|') || (*str_ptr == '&'))
str_ptr++;
}
else if ((actchar == '-') && (ustate == 0)) {
buf[0] = actchar;

Loading…
Cancel
Save