comparison macro.c @ 162:82cc6fa54b01

newline during a macro invocation counts as space. Behavior differs from GCC in that empty lines in the argument list are still suppressed.
author Joerg Sonnenberger <joerg@bec.de>
date Fri, 27 Feb 2015 02:53:12 +0100
parents 4a4b3d5c41fa
children e1dfa3f90b6c
comparison
equal deleted inserted replaced
161:4a4b3d5c41fa 162:82cc6fa54b01
1256 1256
1257 void 1257 void
1258 macro_sendline(struct place *p, char *buf, size_t len) 1258 macro_sendline(struct place *p, char *buf, size_t len)
1259 { 1259 {
1260 doexpand(&mainstate, p, buf, len); 1260 doexpand(&mainstate, p, buf, len);
1261 output(p, "\n", 1); 1261 switch (mainstate.state) {
1262 case ES_NORMAL:
1263 output(p, "\n", 1);
1264 break;
1265 case ES_WANTLPAREN:
1266 case ES_NOARG:
1267 case ES_HAVEARG:
1268 expand_got_ws(&mainstate, p, " ", 1);
1269 break;
1270 }
1262 } 1271 }
1263 1272
1264 void 1273 void
1265 macro_sendeof(struct place *p) 1274 macro_sendeof(struct place *p)
1266 { 1275 {