mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
fix a comment bug reported by gnounc.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4577 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
90d981d8ef
commit
705e9ac9e8
1 changed files with 8 additions and 9 deletions
|
@ -1959,9 +1959,10 @@ void QCC_PR_LexWhitespace (pbool inhibitpreprocessor)
|
|||
// skip /* */ comments
|
||||
if (c=='/' && pr_file_p[1] == '*')
|
||||
{
|
||||
pr_file_p+=2;
|
||||
pr_file_p+=1;
|
||||
do
|
||||
{
|
||||
pr_file_p++;
|
||||
if (pr_file_p[0]=='\n')
|
||||
{
|
||||
if (!inhibitpreprocessor)
|
||||
|
@ -1973,7 +1974,6 @@ void QCC_PR_LexWhitespace (pbool inhibitpreprocessor)
|
|||
pr_file_p++;
|
||||
return;
|
||||
}
|
||||
pr_file_p++;
|
||||
} while (pr_file_p[0] != '*' || pr_file_p[1] != '/');
|
||||
pr_file_p+=2;
|
||||
continue;
|
||||
|
@ -3309,27 +3309,26 @@ pbool QCC_PR_CheckTokenComment(char *string, char **comment)
|
|||
// parse /* comments
|
||||
else if (c=='/' && pr_file_p[1] == '*' && replace)
|
||||
{
|
||||
pr_file_p+=2;
|
||||
start = pr_file_p;
|
||||
pr_file_p+=1;
|
||||
start = pr_file_p+1;
|
||||
|
||||
do
|
||||
{
|
||||
pr_file_p++;
|
||||
if (pr_file_p[0]=='\n')
|
||||
{
|
||||
pr_file_p++;
|
||||
QCC_PR_NewLine(true);
|
||||
}
|
||||
else if (pr_file_p[1] == 0)
|
||||
{
|
||||
QCC_PR_ParseError(0, "EOF inside comment\n");
|
||||
pr_file_p++;
|
||||
pr_file_p-=2;
|
||||
break;
|
||||
}
|
||||
else
|
||||
pr_file_p++;
|
||||
} while (pr_file_p[0] != '*' || pr_file_p[1] != '/');
|
||||
|
||||
if (pr_file_p[1] == 0)
|
||||
break;
|
||||
|
||||
old = replace?NULL:*comment;
|
||||
replace = false;
|
||||
oldlen = old?strlen(old):0;
|
||||
|
|
Loading…
Reference in a new issue