smartened printing even further

This commit is contained in:
mes5k 2004-08-18 19:34:28 +00:00
parent 65fd6009a2
commit b34918c2fe

View File

@ -48,14 +48,24 @@ void spacePrint( ostream& os,
s[stringLen+start] != ',' &&
s[stringLen+start] != '|' )
stringLen--;
// check for newlines
for ( int i = 0; i < stringLen; i++ )
if ( s[start+i] == '\n' )
stringLen = i+1;
// print the indent
for ( int i = 0; i < indentSpaces; i++ )
os << " ";
// handle second line offsets
if ( start == 0 )
{
// handle second line offsets
indentSpaces += secondLineOffset;
// adjust allowed len
allowedLen -= secondLineOffset;
}
os << s.substr(start,stringLen) << endl;