slight name changes to better fit the "standard"

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4877 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-01-24 13:25:44 +00:00
parent 94fc6745fa
commit 92229d0a82
3 changed files with 11 additions and 11 deletions

View file

@ -22,7 +22,7 @@
LineParser::LineParser(bool bCommentBlock) LineParser::LineParser(bool bCommentBlock)
{ {
m_bCommentBlock=bCommentBlock; m_incommentblock=bCommentBlock;
m_incomment=false; m_incomment=false;
m_nt=m_eat=0; m_nt=m_eat=0;
m_tokens=0; m_tokens=0;
@ -38,20 +38,20 @@ bool LineParser::inComment()
return m_incomment; return m_incomment;
} }
bool LineParser::InCommentBlock() bool LineParser::inCommentBlock()
{ {
return m_bCommentBlock; return m_incommentblock;
} }
int LineParser::parse(char *line, int ignore_escaping/*=0*/) // returns -1 on error int LineParser::parse(char *line, int ignore_escaping/*=0*/) // returns -1 on error
{ {
freetokens(); freetokens();
bool bPrevCB=m_bCommentBlock; bool bPrevCB=m_incommentblock;
int n=doline(line, ignore_escaping); int n=doline(line, ignore_escaping);
if (n) return n; if (n) return n;
if (m_nt) if (m_nt)
{ {
m_bCommentBlock=bPrevCB; m_incommentblock=bPrevCB;
m_tokens=(char**)malloc(sizeof(char*)*m_nt); m_tokens=(char**)malloc(sizeof(char*)*m_nt);
n=doline(line, ignore_escaping); n=doline(line, ignore_escaping);
if (n) if (n)
@ -150,13 +150,13 @@ int LineParser::doline(char *line, int ignore_escaping/*=0*/)
while (*line == ' ' || *line == '\t') line++; while (*line == ' ' || *line == '\t') line++;
while (*line) while (*line)
{ {
if ( m_bCommentBlock ) if ( m_incommentblock )
{ {
while ( *line ) while ( *line )
{ {
if ( *line == '*' && *(line+1) == '/' ) if ( *line == '*' && *(line+1) == '/' )
{ {
m_bCommentBlock=false; // Found end of comment block m_incommentblock=false; // Found end of comment block
line+=2; line+=2;
while (*line == ' ' || *line == '\t') line++; while (*line == ' ' || *line == '\t') line++;
break; break;
@ -173,7 +173,7 @@ int LineParser::doline(char *line, int ignore_escaping/*=0*/)
} }
if (*line == '/' && *(line+1) == '*') if (*line == '/' && *(line+1) == '*')
{ {
m_bCommentBlock = true; m_incommentblock = true;
line+=2; line+=2;
} }
else { else {

View file

@ -24,7 +24,7 @@ class LineParser {
virtual ~LineParser(); virtual ~LineParser();
bool inComment(); bool inComment();
bool InCommentBlock(); bool inCommentBlock();
int parse(char *line, int ignore_escaping=0); // returns -1 on error int parse(char *line, int ignore_escaping=0); // returns -1 on error
int getnumtokens(); int getnumtokens();
void eattoken(); void eattoken();
@ -40,7 +40,7 @@ class LineParser {
int m_eat; int m_eat;
int m_nt; int m_nt;
bool m_bCommentBlock; bool m_incommentblock;
bool m_incomment; bool m_incomment;
char **m_tokens; char **m_tokens;
}; };

View file

@ -299,7 +299,7 @@ int CEXEBuild::doParse(const char *str)
// parse before checking if the line should be ignored, so block comments won't be missed // parse before checking if the line should be ignored, so block comments won't be missed
res=line.parse((char*)m_linebuild.get(),!strnicmp((char*)m_linebuild.get(),"!define",7)); res=line.parse((char*)m_linebuild.get(),!strnicmp((char*)m_linebuild.get(),"!define",7));
inside_comment = line.InCommentBlock(); inside_comment = line.inCommentBlock();
// if ignoring, ignore all lines that don't begin with an exclamation mark // if ignoring, ignore all lines that don't begin with an exclamation mark
{ {