From: Sergei Litvin Date: Fri Nov 3 12:32:28 AM CET 2023 Subject: Fix include <> after macro expansion *** a/src/yylex.c 2023-11-03 00:28:16.546067621 +0100 --- b/src/yylex.c 2023-11-02 23:33:53.413480826 +0100 *************** *** 559,564 **** --- 559,565 ---- FILE *nyyin; char *fname; char *ccc, *cc2; + char fn[MAX_FILE_NAME_SIZE]; int lex,l,h,v,len; S_position pos; GetLexA(lex, cc2); *************** *** 576,589 **** cInput.cc = cc2; /* unget lexem */ lex = yylex(); if (lex == STRING_LITERAL) { ! cInput = macStack[0]; // hack, cut everything pending ! macStacki = 0; processInclude2(ipos, '\"', yytext, nextFlag); } else if (lex == '<') { ! // TODO!!!! ! warning(ERR_ST,"Include <> after macro expansion not yet implemented, sorry\n\tuse \"\" instead"); } - //do lex = yylex(); while (lex != '\n'); } return; endOfMacArg: assert(0); --- 577,603 ---- cInput.cc = cc2; /* unget lexem */ lex = yylex(); if (lex == STRING_LITERAL) { ! if (macStacki != 0) { ! cInput = macStack[0]; // hack, cut everything pending ! macStacki = 0; ! } processInclude2(ipos, '\"', yytext, nextFlag); } else if (lex == '<') { ! ccc = fn; ! lex = yylex(); ! while (lex != '>' && lex != '\n' && lex != 0) { ! strcpy(ccc, yytext); ! ccc += strlen(ccc); ! lex = yylex(); ! } ! if (ccc != fn) { ! if (macStacki != 0) { ! cInput = macStack[0]; // hack, cut everything pending ! macStacki = 0; ! } ! processInclude2(ipos, '<', fn, nextFlag); ! } } } return; endOfMacArg: assert(0);