summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/src2html.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-02-29 09:13:22 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-02-29 09:13:22 +0000
commitbef76826c9ec14aa4f08da532bc01f6411efa011 (patch)
tree8106f9e2432368bd90d7d7969e75b578c6f13e89 /src/tools/src2html.c
parentc33fba77f0d07abf1c48cd9393596dd63fe22815 (diff)
fixed several Visual Studio compiler warnings and 64-bit libflac compilation by Firewave, and idectrl change from Carl (no whatsnew)
Diffstat (limited to 'src/tools/src2html.c')
-rw-r--r--src/tools/src2html.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/src2html.c b/src/tools/src2html.c
index 7ac8b9bd5a2..c5ce5699fd8 100644
--- a/src/tools/src2html.c
+++ b/src/tools/src2html.c
@@ -585,6 +585,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
bool last_token_was_include = false;
bool last_was_token = false;
bool quotes_are_linked = false;
+ UINT8 curquote = 0;
int curcol = 0;
for (char *srcptr = srcline; *srcptr != 0; )
{
@@ -673,7 +674,8 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
dstline.catprintf("<span class=\"string\">%c", ch);
else
dstline.cat(ch);
- in_quotes = ch;
+ in_quotes = true;
+ curquote = ch;
// handle includes
if (last_token_was_include)
@@ -693,7 +695,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
}
// track closing quotes
- else if (!in_comment && !in_inline_comment && in_quotes && ch == in_quotes && !escape)
+ else if (!in_comment && !in_inline_comment && in_quotes && (ch == curquote) && !escape)
{
if (quotes_are_linked)
dstline.catprintf("</a>");
@@ -701,7 +703,8 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
dstline.catprintf("%c</span>", ch);
else
dstline.cat(ch);
- in_quotes = 0;
+ in_quotes = false;
+ curquote = 0;
quotes_are_linked = false;
}
@@ -719,7 +722,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
// Update escape state
if (in_quotes)
- escape = (ch == '\\' && type == FILE_TYPE_C) ? !escape : 0;
+ escape = (ch == '\\' && type == FILE_TYPE_C) ? !escape : false;
}
// finish inline comments