void CMailViewTpl::processHeaders( IWriteSink & f ) { PKludges Kludges = m_origMsg->GetKludges(); for ( int i = 0; i < Kludges->Count(); i ++ ) { FarString kludge = Kludges->At( i ); m_origMsg->DecodeKludge( kludge.GetBuffer() ); kludge.ReleaseBuffer(); int pos = 1; while ( ( pos = kludge.IndexOf( '\t', pos ) ) != -1 ) { FarString ss = kludge.Left( pos ); if (ss.Length() > 0 && ss[ss.Length() - 1] == ':') { pos ++; continue; } f.write( ss.c_str(), ss.Length() ); f.write( "\r\n", 2 ); kludge = kludge.Right( kludge.Length() - pos ); } f.write( kludge.c_str(), kludge.Length() ); if ( i < Kludges->Count() - 1 ) f.write( "\r\n", 2 ); } }
void CMailViewTpl::processMessageId( int len, int fill, IWriteSink & f ) { FarString s = m_origMsg->GetId(); if ( s.Length() > 2 && s[ 0 ] == '<' ) { s = s.Mid( 1 ); int pos = s.IndexOf( '>' ); if ( pos != -1 ) s = s.Left( pos ); } writeFormatted( s, len, fill, f ); }