mirror of
https://github.com/holub/mame
synced 2025-06-07 21:33:45 +03:00
Remove dead code in nL_parser.c
This commit is contained in:
parent
51646dab7a
commit
3ff8e23a53
@ -42,54 +42,6 @@ void ptokenizer::skipeol()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ptokenizer::skipws()
|
|
||||||
{
|
|
||||||
while (unsigned char c = getc())
|
|
||||||
{
|
|
||||||
switch (c)
|
|
||||||
{
|
|
||||||
case ' ':
|
|
||||||
case 9:
|
|
||||||
case 10:
|
|
||||||
case 13:
|
|
||||||
break;
|
|
||||||
case '#':
|
|
||||||
skipeol(); // treat preprocessor defines as comments
|
|
||||||
break;
|
|
||||||
case '/':
|
|
||||||
c = getc();
|
|
||||||
if (c == '/')
|
|
||||||
{
|
|
||||||
skipeol();
|
|
||||||
}
|
|
||||||
else if (c == '*')
|
|
||||||
{
|
|
||||||
int f=0;
|
|
||||||
while (!eof() )
|
|
||||||
{
|
|
||||||
c = getc();
|
|
||||||
if (f == 0 && c == '*')
|
|
||||||
f=1;
|
|
||||||
else if (f == 1 && c== '/' )
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
f=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ungetc();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char ptokenizer::peekc()
|
|
||||||
{
|
|
||||||
unsigned char c = getc();
|
|
||||||
ungetc();
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char ptokenizer::getc()
|
unsigned char ptokenizer::getc()
|
||||||
{
|
{
|
||||||
|
@ -113,9 +113,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void skipeol();
|
void skipeol();
|
||||||
void skipws();
|
|
||||||
|
|
||||||
unsigned char peekc();
|
|
||||||
unsigned char getc();
|
unsigned char getc();
|
||||||
void ungetc();
|
void ungetc();
|
||||||
bool eof() { return *m_px == 0; }
|
bool eof() { return *m_px == 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user