* here is to store the line of the first character after skipping
* the initial whitespace in lex->sline, this happens in lex_do.
*/
-static int lex_skipwhite(lex_file *lex)
+static int lex_skipwhite(lex_file *lex, bool hadwhite)
{
int ch = 0;
- bool haswhite = false;
+ bool haswhite = hadwhite;
do
{
int lex_do(lex_file *lex)
{
int ch, nextch, thirdch;
+ bool hadwhite = false;
lex_token_new(lex);
#if 0
#endif
while (true) {
- ch = lex_skipwhite(lex);
+ ch = lex_skipwhite(lex, hadwhite);
+ hadwhite = true;
if (!lex->flags.mergelines || ch != '\\')
break;
ch = lex_getch(lex);
while (!lex->flags.preprocessing && lex->tok.ttype == TOKEN_STRINGCONST)
{
/* Allow c style "string" "continuation" */
- ch = lex_skipwhite(lex);
+ ch = lex_skipwhite(lex, false);
if (ch != '"') {
lex_ungetch(lex, ch);
break;