summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-11-02 18:48:40 (GMT)
committerGitHub <noreply@github.com>2020-11-02 18:48:40 (GMT)
commitced095f191b53587a277cb75c6908e47f4dee3f4 (patch)
treec548162071cb2c9ba8d52334fd127c0a5af9895e /src
parent8fea20a26d2b4994708556028bcf26b582146836 (diff)
parent72b01f47e9529fd61e843a454dadf27083cb2847 (diff)
downloadDoxygen-ced095f191b53587a277cb75c6908e47f4dee3f4.zip
Doxygen-ced095f191b53587a277cb75c6908e47f4dee3f4.tar.gz
Doxygen-ced095f191b53587a277cb75c6908e47f4dee3f4.tar.bz2
Merge pull request #8149 from albert-github/feature/bug_warn_doctokinizer
64-bit Windows compiler warnings doctokinizer.l
Diffstat (limited to 'src')
-rw-r--r--src/doctokenizer.l21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 69f650d..48fdec0 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -75,7 +75,7 @@ struct DocLexerContext
TokenInfo *token;
int rule;
int autoListLevel;
- int inputPos;
+ yy_size_t inputPos;
const char *inputString;
YY_BUFFER_STATE state;
};
@@ -342,6 +342,7 @@ static QCString stripEmptyLines(const QCString &s)
return s.mid(start,end-start);
}
+#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
//--------------------------------------------------------------------------
#undef YY_INPUT
@@ -841,7 +842,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
<St_CodeOpt>"\\ilinebr" |
<St_CodeOpt>\n |
<St_CodeOpt>. {
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
BEGIN(St_Code);
}
<St_Code>{WS}*{CMD}"endcode" {
@@ -867,7 +868,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
BEGIN(St_HtmlOnly);
}
<St_HtmlOnlyOption>"\\ilinebr" {
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
BEGIN(St_HtmlOnly);
}
<St_HtmlOnly>{CMD}"endhtmlonly" {
@@ -978,7 +979,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
<St_PlantUMLOpt>"\n" |
<St_PlantUMLOpt>. {
g_token->sectionId = "";
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return RetVal_OK;
}
<St_PlantUML>{CMD}"enduml" {
@@ -1006,7 +1007,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return 0;
}
<St_Title>"\\ilinebr" {
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return 0;
}
<St_TitleN>"&"{ID}";" { /* symbol */
@@ -1021,7 +1022,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return 0;
}
<St_TitleN>"\\ilinebr" { /* new line => end of title */
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return 0;
}
<St_TitleN>{SPCMD1} |
@@ -1056,7 +1057,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return TK_SYMBOL;
}
<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return 0;
}
<St_TitleQ>{SPCMD1} |
@@ -1094,7 +1095,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return 0;
}
<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return 0;
}
@@ -1124,7 +1125,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return 0;
}
<St_Cite>(\n|"\\ilinebr") { // new line
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return 0;
}
<St_Cite>. { // any other character
@@ -1152,7 +1153,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
BEGIN(St_Ref2);
}
<St_Ref>(\n|"\\ilinebr") { // new line
- for (int i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ unput_string(yytext,yyleng);
return 0;
}
<St_Ref>. { // any other character