fix morkParser::ReadValue() so it will notice '$' when reading values,

This commit is contained in:
davidmc%netscape.com 1999-04-19 22:17:10 +00:00
parent 2ec4376228
commit 7f60bdbf15
2 changed files with 32 additions and 0 deletions

View File

@ -828,6 +828,22 @@ morkBuf* morkParser::ReadValue(morkEnv* ev)
if ( (c = s->Getc(ev)) == EOF || ev->Bad() )
break; // end while loop
}
else if ( c == '$' ) // "$" escapes next two hex digits?
{
if ( (c = s->Getc(ev)) != EOF && ev->Good() )
{
mork_ch first = (mork_ch) c; // first hex digit
if ( (c = s->Getc(ev)) != EOF && ev->Good() )
{
mork_ch second = (mork_ch) c; // second hex digit
c = ev->HexToByte(first, second);
}
else
break;
}
else
break;
}
spool->Putc(ev, c);
}

View File

@ -828,6 +828,22 @@ morkBuf* morkParser::ReadValue(morkEnv* ev)
if ( (c = s->Getc(ev)) == EOF || ev->Bad() )
break; // end while loop
}
else if ( c == '$' ) // "$" escapes next two hex digits?
{
if ( (c = s->Getc(ev)) != EOF && ev->Good() )
{
mork_ch first = (mork_ch) c; // first hex digit
if ( (c = s->Getc(ev)) != EOF && ev->Good() )
{
mork_ch second = (mork_ch) c; // second hex digit
c = ev->HexToByte(first, second);
}
else
break;
}
else
break;
}
spool->Putc(ev, c);
}