Skip to content

Commit 7ba6bb7

Browse files
committed
When having a source file with a lot of #define wit normale C-style comments like:
``` #define c_function_symbol(F) T_Sym(c_function_data(F)->sam.c_sym) /* f is c_function or c_macro, but not c_function* -- doesn't fit current checks */ ``` There is a chance of getting an error like: ``` input buffer overflow, can't enlarge buffer because scanner uses REJECT lexical analyzer: .../doxygen/src/pre.l (for: .../s7.c) ``` this type of comment is of no interest to the `#define` / doxygen and should not be copied into the "define" buffer.
1 parent ccf2ec4 commit 7ba6bb7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/pre.l

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,14 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER}
14931493
yyextra->insideComment=FALSE;
14941494
}
14951495
*/
1496-
<DefineText>{CCS}[!*]? {
1496+
<DefineText>{CCS}[^!*] {
1497+
yyextra->defLitText+=' ';
1498+
outputArray(yyscanner,yytext,yyleng);
1499+
yyextra->lastCContext=YY_START;
1500+
yyextra->commentCount=1;
1501+
BEGIN(SkipCComment);
1502+
}
1503+
<DefineText>{CCS}[!*] {
14971504
yyextra->defText+=yytext;
14981505
yyextra->defLitText+=yytext;
14991506
yyextra->lastCContext=YY_START;

0 commit comments

Comments
 (0)