mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
continue long values using \linebreak notation; this is done
This commit is contained in:
parent
595e5e9462
commit
afdd395a17
@ -356,6 +356,7 @@ morkWriter::WriteYarn(morkEnv* ev, const mdbYarn* inYarn)
|
|||||||
// than the entire yarn's size, since only part goes on a last line).
|
// than the entire yarn's size, since only part goes on a last line).
|
||||||
{
|
{
|
||||||
mork_size outSize = 0;
|
mork_size outSize = 0;
|
||||||
|
mork_size lineSize = mWriter_LineSize;
|
||||||
morkStream* stream = mWriter_Stream;
|
morkStream* stream = mWriter_Stream;
|
||||||
|
|
||||||
const mork_u1* b = (const mork_u1*) inYarn->mYarn_Buf;
|
const mork_u1* b = (const mork_u1*) inYarn->mYarn_Buf;
|
||||||
@ -364,8 +365,14 @@ morkWriter::WriteYarn(morkEnv* ev, const mdbYarn* inYarn)
|
|||||||
register int c;
|
register int c;
|
||||||
mork_fill fill = inYarn->mYarn_Fill;
|
mork_fill fill = inYarn->mYarn_Fill;
|
||||||
const mork_u1* end = b + fill;
|
const mork_u1* end = b + fill;
|
||||||
while ( b < end )
|
while ( b < end && ev->Good() )
|
||||||
{
|
{
|
||||||
|
if ( lineSize + outSize >= mWriter_MaxLine ) // continue line?
|
||||||
|
{
|
||||||
|
stream->PutByteThenNewline(ev, '\\');
|
||||||
|
mWriter_LineSize = lineSize = outSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
c = *b++; // next byte to print
|
c = *b++; // next byte to print
|
||||||
if ( morkCh_IsValue(c) )
|
if ( morkCh_IsValue(c) )
|
||||||
{
|
{
|
||||||
|
@ -356,6 +356,7 @@ morkWriter::WriteYarn(morkEnv* ev, const mdbYarn* inYarn)
|
|||||||
// than the entire yarn's size, since only part goes on a last line).
|
// than the entire yarn's size, since only part goes on a last line).
|
||||||
{
|
{
|
||||||
mork_size outSize = 0;
|
mork_size outSize = 0;
|
||||||
|
mork_size lineSize = mWriter_LineSize;
|
||||||
morkStream* stream = mWriter_Stream;
|
morkStream* stream = mWriter_Stream;
|
||||||
|
|
||||||
const mork_u1* b = (const mork_u1*) inYarn->mYarn_Buf;
|
const mork_u1* b = (const mork_u1*) inYarn->mYarn_Buf;
|
||||||
@ -364,8 +365,14 @@ morkWriter::WriteYarn(morkEnv* ev, const mdbYarn* inYarn)
|
|||||||
register int c;
|
register int c;
|
||||||
mork_fill fill = inYarn->mYarn_Fill;
|
mork_fill fill = inYarn->mYarn_Fill;
|
||||||
const mork_u1* end = b + fill;
|
const mork_u1* end = b + fill;
|
||||||
while ( b < end )
|
while ( b < end && ev->Good() )
|
||||||
{
|
{
|
||||||
|
if ( lineSize + outSize >= mWriter_MaxLine ) // continue line?
|
||||||
|
{
|
||||||
|
stream->PutByteThenNewline(ev, '\\');
|
||||||
|
mWriter_LineSize = lineSize = outSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
c = *b++; // next byte to print
|
c = *b++; // next byte to print
|
||||||
if ( morkCh_IsValue(c) )
|
if ( morkCh_IsValue(c) )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user