Bug 1399756 - remove trailing spaces in mailnews/base/util. rs=white-space-only
authorJorg K <jorgk@jorgk.com>
Fri, 15 Sep 2017 11:52:29 +0200
changeset 29716 fd85506c79b1bbf409bd67c73bf4944ee4c2a07d
parent 29715 ebe355c1d925132c3dd4ce6acca6506079518d89
child 29717 4600e944bce2589ca1d4f0881b246b4e8897f7a1
push id378
push userclokep@gmail.com
push dateMon, 13 Nov 2017 18:45:35 +0000
reviewerswhite-space-only
bugs1399756
Bug 1399756 - remove trailing spaces in mailnews/base/util. rs=white-space-only
mailnews/base/util/nsImapMoveCoalescer.cpp
mailnews/base/util/nsMsgCompressIStream.cpp
mailnews/base/util/nsMsgCompressIStream.h
mailnews/base/util/nsMsgCompressOStream.cpp
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/base/util/nsMsgDBFolder.h
mailnews/base/util/nsMsgFileStream.cpp
mailnews/base/util/nsMsgFileStream.h
mailnews/base/util/nsMsgI18N.cpp
mailnews/base/util/nsMsgI18N.h
mailnews/base/util/nsMsgIdentity.h
mailnews/base/util/nsMsgIncomingServer.h
mailnews/base/util/nsMsgKeySet.cpp
mailnews/base/util/nsMsgKeySet.h
mailnews/base/util/nsMsgLineBuffer.cpp
mailnews/base/util/nsMsgLineBuffer.h
mailnews/base/util/nsMsgProtocol.h
mailnews/base/util/nsMsgReadStateTxn.cpp
mailnews/base/util/nsMsgTxn.cpp
mailnews/base/util/nsMsgTxn.h
mailnews/base/util/nsMsgUtils.h
mailnews/base/util/nsStopwatch.cpp
mailnews/base/util/nsStopwatch.h
--- a/mailnews/base/util/nsImapMoveCoalescer.cpp
+++ b/mailnews/base/util/nsImapMoveCoalescer.cpp
@@ -19,17 +19,17 @@
 #include "nsArrayUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/ArrayUtils.h"
 
 NS_IMPL_ISUPPORTS(nsImapMoveCoalescer, nsIUrlListener)
 
 nsImapMoveCoalescer::nsImapMoveCoalescer(nsIMsgFolder *sourceFolder, nsIMsgWindow *msgWindow)
 {
-  m_sourceFolder = sourceFolder; 
+  m_sourceFolder = sourceFolder;
   m_msgWindow = msgWindow;
   m_hasPendingMoves = false;
 }
 
 nsImapMoveCoalescer::~nsImapMoveCoalescer()
 {
 }
 
@@ -160,17 +160,17 @@ nsTArray<nsMsgKey> *nsImapMoveCoalescer:
   NS_ASSERTION(keyArrayIndex < MOZ_ARRAY_LENGTH(m_keyBuckets), "invalid index");
 
   return keyArrayIndex < mozilla::ArrayLength(m_keyBuckets) ?
            &(m_keyBuckets[keyArrayIndex]) : nullptr;
 }
 
 NS_IMPL_ISUPPORTS(nsMoveCoalescerCopyListener, nsIMsgCopyServiceListener)
 
-nsMoveCoalescerCopyListener::nsMoveCoalescerCopyListener(nsImapMoveCoalescer * coalescer, 
+nsMoveCoalescerCopyListener::nsMoveCoalescerCopyListener(nsImapMoveCoalescer * coalescer,
                                                          nsIMsgFolder *destFolder)
 {
   m_destFolder = destFolder;
   m_coalescer = coalescer;
 }
 
 nsMoveCoalescerCopyListener::~nsMoveCoalescerCopyListener()
 {
@@ -208,17 +208,17 @@ NS_IMETHODIMP nsMoveCoalescerCopyListene
     // if the dest folder is imap, update it.
     nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_destFolder);
     if (imapFolder)
     {
       uint32_t folderFlags;
       m_destFolder->GetFlags(&folderFlags);
       if (!(folderFlags & (nsMsgFolderFlags::Junk | nsMsgFolderFlags::Trash)))
       {
-        nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv); 
+        nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
         nsCOMPtr <nsIURI> url;
         nsCOMPtr <nsIUrlListener> listener = do_QueryInterface(m_coalescer);
         rv = imapService->SelectFolder(m_destFolder, listener, nullptr, getter_AddRefs(url));
       }
     }
     else // give junk filters a chance to run on new msgs in destination local folder
     {
--- a/mailnews/base/util/nsMsgCompressIStream.cpp
+++ b/mailnews/base/util/nsMsgCompressIStream.cpp
@@ -41,17 +41,17 @@ nsresult nsMsgCompressIStream::InitInput
   if (!m_databuf)
     return NS_ERROR_OUT_OF_MEMORY;
 
   // set up zlib object
   m_zstream.zalloc = Z_NULL;
   m_zstream.zfree = Z_NULL;
   m_zstream.opaque = Z_NULL;
 
-  // http://zlib.net/manual.html is rather silent on the topic, but 
+  // http://zlib.net/manual.html is rather silent on the topic, but
   // perl's Compress::Raw::Zlib manual says:
   // -WindowBits
   //  To compress an RFC 1951 data stream, set WindowBits to -MAX_WBITS.
   if (inflateInit2(&m_zstream, -MAX_WBITS) != Z_OK)
     return NS_ERROR_FAILURE;
 
   m_iStream = rawStream;
 
@@ -60,31 +60,31 @@ nsresult nsMsgCompressIStream::InitInput
 
 nsresult nsMsgCompressIStream::DoInflation()
 {
   // if there's something in the input buffer of the zstream, process it.
   m_zstream.next_out = (Bytef *) m_databuf.get();
   m_zstream.avail_out = BUFFER_SIZE;
   int zr = inflate(&m_zstream, Z_SYNC_FLUSH);
 
-  // inflate() should normally be called until it returns 
+  // inflate() should normally be called until it returns
   // Z_STREAM_END or an error, and Z_BUF_ERROR just means
   // unable to progress any further (possible if we filled
   // an output buffer exactly)
   if (zr == Z_BUF_ERROR || zr == Z_STREAM_END)
     zr = Z_OK;
 
   // otherwise it's an error
-  if (zr != Z_OK) 
+  if (zr != Z_OK)
     return NS_ERROR_FAILURE;
 
   // http://www.zlib.net/manual.html says:
-  // If inflate returns Z_OK and with zero avail_out, it must be called 
+  // If inflate returns Z_OK and with zero avail_out, it must be called
   // again after making room in the output buffer because there might be
-  // more output pending. 
+  // more output pending.
   m_inflateAgain = m_zstream.avail_out ? false : true;
 
   // set the pointer to the start of the buffer, and the count to how
   // based on how many bytes are left unconsumed.
   m_dataptr = m_databuf.get();
   m_dataleft = BUFFER_SIZE - m_zstream.avail_out;
 
   return NS_OK;
@@ -119,67 +119,67 @@ NS_IMETHODIMP nsMsgCompressIStream::Clos
   m_dataleft = 0;
 
   return rv;
 }
 
 /* unsigned long long available (); */
 NS_IMETHODIMP nsMsgCompressIStream::Available(uint64_t *aResult)
 {
-  if (!m_iStream) 
+  if (!m_iStream)
     return NS_BASE_STREAM_CLOSED;
 
   // check if there's anything still in flight
   if (!m_dataleft && m_inflateAgain)
   {
     nsresult rv = DoInflation();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // we'll be returning this many to the next read, guaranteed
   if (m_dataleft)
   {
     *aResult = m_dataleft;
     return NS_OK;
   }
 
-  // this value isn't accurate, but will give a good true/false 
+  // this value isn't accurate, but will give a good true/false
   // indication for idle purposes, and next read will fill
   // m_dataleft, so we'll have an accurate count for the next call.
   return m_iStream->Available(aResult);
 }
 
 /* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */
 NS_IMETHODIMP nsMsgCompressIStream::Read(char * aBuf, uint32_t aCount, uint32_t *aResult)
 {
-  if (!m_iStream) 
+  if (!m_iStream)
   {
     *aResult = 0;
     return NS_OK;
   }
-  
+
   // There are two stages of buffering:
   // * m_zbuf contains the compressed data from the remote server
   // * m_databuf contains the uncompressed raw bytes for consumption
   //   by the local client.
-  // 
+  //
   // Each buffer will only be filled when the following buffers
   // have been entirely consumed.
   //
   // m_dataptr and m_dataleft are respectively a pointer to the
   // unconsumed portion of m_databuf and the number of bytes
   // of uncompressed data remaining in m_databuf.
   //
   // both buffers have a maximum size of BUFFER_SIZE, so it is
   // possible that multiple inflate passes will be required to
   // consume all of m_zbuf.
   while (!m_dataleft)
   {
     // get some more data if we don't already have any
-    if (!m_inflateAgain) 
+    if (!m_inflateAgain)
     {
       uint32_t bytesRead;
       nsresult rv = m_iStream->Read(m_zbuf.get(), (uint32_t)BUFFER_SIZE, &bytesRead);
       NS_ENSURE_SUCCESS(rv, rv);
       if (!bytesRead)
         return NS_BASE_STREAM_CLOSED;
       m_zstream.next_in = (Bytef *) m_zbuf.get();
       m_zstream.avail_in = bytesRead;
--- a/mailnews/base/util/nsMsgCompressIStream.h
+++ b/mailnews/base/util/nsMsgCompressIStream.h
@@ -10,17 +10,17 @@
 #include "zlib.h"
 
 class NS_MSG_BASE nsMsgCompressIStream final : public nsIAsyncInputStream
 {
 public:
   nsMsgCompressIStream();
 
   NS_DECL_THREADSAFE_ISUPPORTS
-    
+
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
 
   nsresult InitInputStream(nsIInputStream *rawStream);
 
 protected:
   ~nsMsgCompressIStream();
   nsresult DoInflation();
--- a/mailnews/base/util/nsMsgCompressOStream.cpp
+++ b/mailnews/base/util/nsMsgCompressOStream.cpp
@@ -35,17 +35,17 @@ nsresult nsMsgCompressOStream::InitOutpu
   m_zstream.zalloc = Z_NULL;
   m_zstream.zfree = Z_NULL;
   m_zstream.opaque = Z_NULL;
 
   // http://zlib.net/manual.html is rather silent on the topic, but
   // perl's Compress::Raw::Zlib manual says:
   // -WindowBits [...]
   //  To compress an RFC 1951 data stream, set WindowBits to -MAX_WBITS.
-  if (deflateInit2(&m_zstream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, 
+  if (deflateInit2(&m_zstream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
                    -MAX_WBITS, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK)
     return NS_ERROR_FAILURE;
 
   m_oStream = rawStream;
 
   return NS_OK;
 }
 
@@ -99,33 +99,33 @@ nsMsgCompressOStream::Write(const char *
       NS_ENSURE_SUCCESS(rv, rv);
       if (!out_result)
 	return NS_BASE_STREAM_CLOSED;
       out_size -= out_result;
       out_buf += out_result;
     }
 
   // http://www.zlib.net/manual.html says:
-  // If deflate returns with avail_out == 0, this function must be 
+  // If deflate returns with avail_out == 0, this function must be
   // called again with the same value of the flush parameter and
-  // more output space (updated avail_out), until the flush is 
-  // complete (deflate returns with non-zero avail_out). 
+  // more output space (updated avail_out), until the flush is
+  // complete (deflate returns with non-zero avail_out).
   } while (!m_zstream.avail_out);
 
   *result = count;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgCompressOStream::Flush(void)
 {
   if (!m_oStream)
     return NS_BASE_STREAM_CLOSED;
-  
+
   return m_oStream->Flush();
 }
 
 NS_IMETHODIMP
 nsMsgCompressOStream::WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -361,17 +361,17 @@ NS_IMETHODIMP nsMsgDBFolder::RemoveBacku
 
   if (mBackupDatabase)
   {
     mBackupDatabase->ForceClosed();
     mBackupDatabase = nullptr;
   }
 
   return backupDBFile->Remove(false);
-}  
+}
 
 NS_IMETHODIMP nsMsgDBFolder::StartFolderLoading(void)
 {
   if(mDatabase)
     mDatabase->RemoveListener(this);
   mAddListener = false;
   return NS_OK;
 }
@@ -1009,17 +1009,17 @@ nsMsgDBFolder::OnReadChanged(nsIDBChange
 NS_IMETHODIMP
 nsMsgDBFolder::OnJunkScoreChanged(nsIDBChangeListener * aInstigator)
 {
   NotifyFolderEvent(kJunkStatusChanged);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsMsgDBFolder::OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus, 
+nsMsgDBFolder::OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus,
                                    nsIDBChangeListener *aInstigator)
 {
   /* do nothing.  if you care about this, override it.*/
   return NS_OK;
 }
 
 // 1.  When the status of a message changes.
 NS_IMETHODIMP nsMsgDBFolder::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags, uint32_t aNewFlags,
@@ -2453,17 +2453,17 @@ nsMsgDBFolder::OnMessageClassified(const
 NS_IMETHODIMP
 nsMsgDBFolder::OnMessageTraitsClassified(const char *aMsgURI,
                                          uint32_t aTraitCount,
                                          uint32_t *aTraits,
                                          uint32_t *aPercents)
 {
   if (!aMsgURI) // This signifies end of batch
     return NS_OK; // We are not handling batching
-  
+
   nsresult rv;
   nsCOMPtr <nsIMsgDBHdr> msgHdr;
   rv = GetMsgDBHdrFromURI(aMsgURI, getter_AddRefs(msgHdr));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsMsgKey msgKey;
   rv = msgHdr->GetMessageKey(&msgKey);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -4170,17 +4170,17 @@ NS_IMETHODIMP nsMsgDBFolder::UpdateSumma
 {
   if (!mNotifyCountChanges)
     return NS_OK;
 
   int32_t oldUnreadMessages = mNumUnreadMessages + mNumPendingUnreadMessages;
   int32_t oldTotalMessages = mNumTotalMessages + mNumPendingTotalMessages;
   //We need to read this info from the database
   nsresult rv = ReadDBFolderInfo(force);
-  
+
   if (NS_SUCCEEDED(rv))
   {
     int32_t newUnreadMessages = mNumUnreadMessages + mNumPendingUnreadMessages;
     int32_t newTotalMessages = mNumTotalMessages + mNumPendingTotalMessages;
 
     //Need to notify listeners that total count changed.
     if(oldTotalMessages != newTotalMessages)
       NotifyIntPropertyChanged(kTotalMessages, oldTotalMessages, newTotalMessages);
@@ -4634,17 +4634,17 @@ NS_IMETHODIMP nsMsgDBFolder::SetBiffStat
 
 NS_IMETHODIMP nsMsgDBFolder::GetNumNewMessages(bool deep, int32_t *aNumNewMessages)
 {
   NS_ENSURE_ARG_POINTER(aNumNewMessages);
 
   int32_t numNewMessages = (!deep || ! (mFlags & nsMsgFolderFlags::Virtual))
     ? mNumNewBiffMessages : 0;
   if (deep)
-  { 
+  {
     int32_t count = mSubFolders.Count();
     for (int32_t i = 0; i < count; i++)
     {
       int32_t num;
       mSubFolders[i]->GetNumNewMessages(deep, &num);
       if (num > 0) // it's legal for counts to be negative if we don't know
         numNewMessages += num;
     }
@@ -5394,17 +5394,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetSortKey(
   orderString.Append(folderName);
   return CreateCollationKey(orderString, aKey, aLength);
 }
 
 nsresult
 nsMsgDBFolder::CreateCollationKey(const nsString &aSource,  uint8_t **aKey, uint32_t *aLength)
 {
   NS_ENSURE_TRUE(gCollationKeyGenerator, NS_ERROR_NULL_POINTER);
-  return gCollationKeyGenerator->AllocateRawSortKey(nsICollation::kCollationCaseInSensitive, aSource, 
+  return gCollationKeyGenerator->AllocateRawSortKey(nsICollation::kCollationCaseInSensitive, aSource,
                                                     aKey, aLength);
 }
 
 NS_IMETHODIMP nsMsgDBFolder::CompareSortKeys(nsIMsgFolder *aFolder, int32_t *sortOrder)
 {
   uint8_t *sortKey1=nullptr;
   uint8_t *sortKey2=nullptr;
   uint32_t sortKey1Length;
@@ -5751,17 +5751,17 @@ NS_IMETHODIMP nsMsgDBFolder::ConvertMsgS
 
 nsresult nsMsgDBFolder::GetMsgPreviewTextFromStream(nsIMsgDBHdr *msgHdr, nsIInputStream *stream)
 {
   nsCString msgBody;
   nsAutoCString charset;
   msgHdr->GetCharset(getter_Copies(charset));
   nsAutoCString contentType;
   nsresult rv = GetMsgTextFromStream(stream, charset, 4096, 255, true, true, contentType, msgBody);
-  // replaces all tabs and line returns with a space, 
+  // replaces all tabs and line returns with a space,
   // then trims off leading and trailing white space
   MsgCompressWhitespace(msgBody);
   msgHdr->SetStringProperty("preview", msgBody.get());
   return rv;
 }
 
 void nsMsgDBFolder::UpdateTimestamps(bool allowUndo)
 {
@@ -5830,17 +5830,17 @@ NS_IMETHODIMP nsMsgDBFolder::AddKeywords
           keywords.Append(keywordArray[j]);
           addCount++;
         }
       }
       // avoid using the message key to set the string property, because
       // in the case of filters running on incoming pop3 mail with quarantining
       // turned on, the message key is wrong.
       mDatabase->SetStringPropertyByHdr(message, "keywords", keywords.get());
-      
+
       if (addCount)
         NotifyPropertyFlagChanged(message, kKeywords, 0, addCount);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::RemoveKeywordsFromMessages(nsIArray *aMessages, const nsACString& aKeywords)
@@ -5915,25 +5915,25 @@ NS_IMETHODIMP nsMsgDBFolder::GetCustomId
 NS_IMETHODIMP nsMsgDBFolder::GetProcessingFlags(nsMsgKey aKey, uint32_t *aFlags)
 {
   NS_ENSURE_ARG_POINTER(aFlags);
   *aFlags = 0;
   for (uint32_t i = 0; i < nsMsgProcessingFlags::NumberOfFlags; i++)
     if (mProcessingFlag[i].keys && mProcessingFlag[i].keys->IsMember(aKey))
       *aFlags |= mProcessingFlag[i].bit;
   return NS_OK;
-}  
+}
 
 NS_IMETHODIMP nsMsgDBFolder::OrProcessingFlags(nsMsgKey aKey, uint32_t mask)
 {
   for (uint32_t i = 0; i < nsMsgProcessingFlags::NumberOfFlags; i++)
     if (mProcessingFlag[i].bit & mask && mProcessingFlag[i].keys)
       mProcessingFlag[i].keys->Add(aKey);
   return NS_OK;
-}  
+}
 
 NS_IMETHODIMP nsMsgDBFolder::AndProcessingFlags(nsMsgKey aKey, uint32_t mask)
 {
   for (uint32_t i = 0; i < nsMsgProcessingFlags::NumberOfFlags; i++)
     if (!(mProcessingFlag[i].bit & mask) && mProcessingFlag[i].keys)
       mProcessingFlag[i].keys->Remove(aKey);
   return NS_OK;
 }
--- a/mailnews/base/util/nsMsgDBFolder.h
+++ b/mailnews/base/util/nsMsgDBFolder.h
@@ -3,17 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsMsgDBFolder_h__
 #define nsMsgDBFolder_h__
 
 #include "mozilla/Attributes.h"
 #include "msgCore.h"
-#include "nsIMsgFolder.h" 
+#include "nsIMsgFolder.h"
 #include "nsRDFResource.h"
 #include "nsIDBFolderInfo.h"
 #include "nsIMsgDatabase.h"
 #include "nsIMsgIncomingServer.h"
 #include "nsCOMPtr.h"
 #include "nsIDBChangeListener.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsIURL.h"
@@ -67,41 +67,41 @@ extern const nsLiteralCString kFolderCre
 extern const nsLiteralCString kFolderLoaded;
 extern const nsLiteralCString kNumNewBiffMessages;
 extern const nsLiteralCString kRenameCompleted;
 
 class nsIMsgFolderCacheElement;
 class nsICollation;
 class nsMsgKeySetU;
 
- /* 
+ /*
   * nsMsgDBFolder
   * class derived from nsMsgFolder for those folders that use an nsIMsgDatabase
-  */ 
+  */
 
 #undef IMETHOD_VISIBILITY
 #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
 
 class NS_MSG_BASE nsMsgDBFolder: public nsRDFResource,
                                  public nsSupportsWeakReference,
                                  public nsIMsgFolder,
                                  public nsIDBChangeListener,
                                  public nsIUrlListener,
                                  public nsIJunkMailClassificationListener,
                                  public nsIMsgTraitClassificationListener
 {
-public: 
+public:
   nsMsgDBFolder(void);
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIMSGFOLDER
   NS_DECL_NSIDBCHANGELISTENER
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIJUNKMAILCLASSIFICATIONLISTENER
   NS_DECL_NSIMSGTRAITCLASSIFICATIONLISTENER
-  
+
   NS_IMETHOD WriteToFolderCacheElem(nsIMsgFolderCacheElement *element);
   NS_IMETHOD ReadFromFolderCacheElem(nsIMsgFolderCacheElement *element);
 
   // nsRDFResource overrides
   NS_IMETHOD Init(const char* aURI) override;
 
   nsresult CreateDirectoryForFolder(nsIFile **result);
   nsresult CreateBackupDirectory(nsIFile **result);
@@ -219,33 +219,33 @@ protected:
   nsTObserverArray<nsIFolderListener*> mListeners;
 
   bool mInitializedFromCache;
   nsISupports *mSemaphoreHolder; // set when the folder is being written to
                                  //Due to ownership issues, this won't be AddRef'd.
 
   nsWeakPtr mServer;
 
-  // These values are used for tricking the front end into thinking that we have more 
+  // These values are used for tricking the front end into thinking that we have more
   // messages than are really in the DB.  This is usually after and IMAP message copy where
   // we don't want to do an expensive select until the user actually opens that folder
   int32_t mNumPendingUnreadMessages;
   int32_t mNumPendingTotalMessages;
   int64_t mFolderSize;
 
   int32_t mNumNewBiffMessages;
 
   // these are previous set of new msgs, which we might
   // want to run junk controls on. This is in addition to "new" hdrs
   // in the db, which might get cleared because the user clicked away
   // from the folder.
   nsTArray<nsMsgKey> m_saveNewMsgs;
 
   // These are the set of new messages for a folder who has had
-  // its db closed, without the user reading the folder. This 
+  // its db closed, without the user reading the folder. This
   // happens with pop3 mail filtered to a different local folder.
   nsTArray<nsMsgKey> m_newMsgs;
 
   //
   // stuff from the uri
   //
   bool mHaveParsedURI;        // is the URI completely parsed?
   bool mIsServerIsValid;
--- a/mailnews/base/util/nsMsgFileStream.cpp
+++ b/mailnews/base/util/nsMsgFileStream.cpp
@@ -26,17 +26,17 @@ ErrorAccordingToNSPR()
       case PR_NO_DEVICE_SPACE_ERROR:            return NS_ERROR_FILE_NO_DEVICE_SPACE;
       case PR_NAME_TOO_LONG_ERROR:              return NS_ERROR_FILE_NAME_TOO_LONG;
       case PR_DIRECTORY_NOT_EMPTY_ERROR:        return NS_ERROR_FILE_DIR_NOT_EMPTY;
       case PR_NO_ACCESS_RIGHTS_ERROR:           return NS_ERROR_FILE_ACCESS_DENIED;
       default:                                  return NS_ERROR_FAILURE;
     }
 }
 
-nsMsgFileStream::nsMsgFileStream() 
+nsMsgFileStream::nsMsgFileStream()
 {
   mFileDesc = nullptr;
   mSeekedToEnd = false;
 }
 
 nsMsgFileStream::~nsMsgFileStream()
 {
   if (mFileDesc)
@@ -69,17 +69,17 @@ nsMsgFileStream::Seek(int32_t whence, in
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgFileStream::Tell(int64_t *result)
 {
   if (mFileDesc == nullptr)
     return NS_BASE_STREAM_CLOSED;
-  
+
   int64_t cnt = PR_Seek64(mFileDesc, 0, PR_SEEK_CUR);
   if (cnt == int64_t(-1)) {
     return ErrorAccordingToNSPR();
   }
   *result = cnt;
   return NS_OK;
 }
 
@@ -99,40 +99,40 @@ NS_IMETHODIMP nsMsgFileStream::Close()
         rv = NS_BASE_STREAM_OSERROR;
     mFileDesc = nullptr;
   return rv;
 }
 
 /* unsigned long long available (); */
 NS_IMETHODIMP nsMsgFileStream::Available(uint64_t *aResult)
 {
-  if (!mFileDesc) 
+  if (!mFileDesc)
     return NS_BASE_STREAM_CLOSED;
-  
+
   int64_t avail = PR_Available64(mFileDesc);
   if (avail == -1)
     return ErrorAccordingToNSPR();
 
   *aResult = avail;
   return NS_OK;
 }
 
 /* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */
 NS_IMETHODIMP nsMsgFileStream::Read(char * aBuf, uint32_t aCount, uint32_t *aResult)
 {
-  if (!mFileDesc) 
+  if (!mFileDesc)
   {
     *aResult = 0;
     return NS_OK;
   }
-  
+
   int32_t bytesRead = PR_Read(mFileDesc, aBuf, aCount);
   if (bytesRead == -1)
     return ErrorAccordingToNSPR();
-  
+
   *aResult = bytesRead;
   return NS_OK;
 }
 
 /* [noscript] unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */
 NS_IMETHODIMP nsMsgFileStream::ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, uint32_t aCount, uint32_t *_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
@@ -145,33 +145,33 @@ NS_IMETHODIMP nsMsgFileStream::IsNonBloc
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgFileStream::Write(const char *buf, uint32_t count, uint32_t *result)
 {
   if (mFileDesc == nullptr)
     return NS_BASE_STREAM_CLOSED;
-  
+
   int32_t cnt = PR_Write(mFileDesc, buf, count);
   if (cnt == -1) {
     return ErrorAccordingToNSPR();
   }
   *result = cnt;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgFileStream::Flush(void)
 {
   if (mFileDesc == nullptr)
     return NS_BASE_STREAM_CLOSED;
-  
+
   int32_t cnt = PR_Sync(mFileDesc);
-  if (cnt == -1) 
+  if (cnt == -1)
     return ErrorAccordingToNSPR();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgFileStream::WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval)
 {
--- a/mailnews/base/util/nsMsgFileStream.h
+++ b/mailnews/base/util/nsMsgFileStream.h
@@ -13,18 +13,18 @@ class nsMsgFileStream final : public nsI
                                   public nsIOutputStream,
                                   public nsISeekableStream
 {
 public:
   nsMsgFileStream();
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHOD Available(uint64_t *_retval) override; 
-  NS_IMETHOD Read(char * aBuf, uint32_t aCount, uint32_t *_retval) override; 
+  NS_IMETHOD Available(uint64_t *_retval) override;
+  NS_IMETHOD Read(char * aBuf, uint32_t aCount, uint32_t *_retval) override;
   NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, uint32_t aCount, uint32_t *_retval) override;
   NS_DECL_NSIOUTPUTSTREAM
   NS_DECL_NSISEEKABLESTREAM
 
   nsresult InitWithFile(nsIFile *localFile);
 protected:
   ~nsMsgFileStream();
 
--- a/mailnews/base/util/nsMsgI18N.cpp
+++ b/mailnews/base/util/nsMsgI18N.cpp
@@ -59,17 +59,17 @@ nsresult nsMsgI18NConvertFromUnicode(con
   if (rv == NS_OK_HAD_REPLACEMENTS) {
     rv = aReportUencNoMapping ? NS_ERROR_UENC_NOMAPPING : NS_OK;
   }
 
   return rv;
 }
 
 nsresult nsMsgI18NConvertToUnicode(const char* aCharset,
-                                   const nsCString& inString, 
+                                   const nsCString& inString,
                                    nsAString& outString)
 {
   if (inString.IsEmpty()) {
     outString.Truncate();
     return NS_OK;
   }
   else if (!*aCharset) {
     // Despite its name, it also works for Latin-1.
@@ -125,26 +125,26 @@ nsresult CopyMUTF7toUTF16(const nsCStrin
 }
 
 // Charset used by the file system.
 const char * nsMsgI18NFileSystemCharset()
 {
   /* Get a charset used for the file. */
   static nsAutoCString fileSystemCharset;
 
-  if (fileSystemCharset.IsEmpty()) 
+  if (fileSystemCharset.IsEmpty())
   {
     nsresult rv;
     nsCOMPtr <nsIPlatformCharset> platformCharset = do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);
         if (NS_SUCCEEDED(rv)) {
           rv = platformCharset->GetCharset(kPlatformCharsetSel_FileName,
                                            fileSystemCharset);
         }
 
-    if (NS_FAILED(rv)) 
+    if (NS_FAILED(rv))
       fileSystemCharset.Assign("ISO-8859-1");
   }
   return fileSystemCharset.get();
 }
 
 // Charset used by the text file.
 void nsMsgI18NTextFileCharset(nsACString& aCharset)
 {
@@ -157,17 +157,17 @@ void nsMsgI18NTextFileCharset(nsACString
   }
 
   if (NS_FAILED(rv))
     aCharset.Assign("ISO-8859-1");
 }
 
 // MIME encoder, output string should be freed by PR_FREE
 // XXX : fix callers later to avoid allocation and copy
-char * nsMsgI18NEncodeMimePartIIStr(const char *header, bool structured, const char *charset, int32_t fieldnamelen, bool usemime) 
+char * nsMsgI18NEncodeMimePartIIStr(const char *header, bool structured, const char *charset, int32_t fieldnamelen, bool usemime)
 {
   // No MIME, convert to the outgoing mail charset.
   if (false == usemime) {
     nsAutoCString convertedStr;
     if (NS_SUCCEEDED(ConvertFromUnicode(charset, NS_ConvertUTF8toUTF16(header),
                                         convertedStr)))
       return PL_strdup(convertedStr.get());
     else
@@ -237,85 +237,85 @@ bool nsMsgI18Ncheck_data_in_charset_rang
       // Didn't use all the input but the outout isn't full, hence
       // there was an unencodable character.
       res = false;
       break;
     }
     src = src.From(read);
     // dst = dst.From(written); // Just overwrite output since we don't need it.
   }
-  
+
   return res;
 }
 
-// Simple parser to parse META charset. 
-// It only supports the case when the description is within one line. 
-const char * 
-nsMsgI18NParseMetaCharset(nsIFile* file) 
-{ 
+// Simple parser to parse META charset.
+// It only supports the case when the description is within one line.
+const char *
+nsMsgI18NParseMetaCharset(nsIFile* file)
+{
   static char charset[nsIMimeConverter::MAX_CHARSET_NAME_LENGTH+1];
 
-  *charset = '\0'; 
+  *charset = '\0';
 
   bool isDirectory = false;
   file->IsDirectory(&isDirectory);
   if (isDirectory) {
     NS_ERROR("file is a directory");
-    return charset; 
+    return charset;
   }
 
   nsresult rv;
   nsCOMPtr <nsIFileInputStream> fileStream = do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, charset);
-  
+
   rv = fileStream->Init(file, PR_RDONLY, 0664, false);
   nsCOMPtr <nsILineInputStream> lineStream = do_QueryInterface(fileStream, &rv);
 
   nsCString curLine;
   bool more = true;
-  while (NS_SUCCEEDED(rv) && more) { 
-    rv = lineStream->ReadLine(curLine, &more); 
-    if (curLine.IsEmpty()) 
-      continue; 
+  while (NS_SUCCEEDED(rv) && more) {
+    rv = lineStream->ReadLine(curLine, &more);
+    if (curLine.IsEmpty())
+      continue;
 
     ToUpperCase(curLine);
 
-    if (curLine.Find("/HEAD") != -1) 
-      break; 
+    if (curLine.Find("/HEAD") != -1)
+      break;
 
-    if (curLine.Find("META") != -1 && 
-       curLine.Find("HTTP-EQUIV") != -1 && 
-        curLine.Find("CONTENT-TYPE") != -1 && 
-       curLine.Find("CHARSET") != -1) { 
+    if (curLine.Find("META") != -1 &&
+        curLine.Find("HTTP-EQUIV") != -1 &&
+        curLine.Find("CONTENT-TYPE") != -1 &&
+        curLine.Find("CHARSET") != -1) {
       char *cp = (char *) PL_strchr(PL_strstr(curLine.get(), "CHARSET"), '=');
       char *token = nullptr;
       if (cp)
       {
         char *newStr = cp + 1;
         token = NS_strtok(" \"\'", &newStr);
       }
-      if (token) { 
+      if (token) {
         PL_strncpy(charset, token, sizeof(charset));
         charset[sizeof(charset)-1] = '\0';
 
         // this function cannot parse a file if it is really
         // encoded by one of the following charsets
         // so we can say that the charset label must be incorrect for
         // the .html if we actually see those charsets parsed
         // and we should ignore them
-        if (!PL_strncasecmp("UTF-16", charset, sizeof("UTF-16")-1) || 
+        if (!PL_strncasecmp("UTF-16", charset, sizeof("UTF-16")-1) ||
             !PL_strncasecmp("UTF-32", charset, sizeof("UTF-32")-1))
           charset[0] = '\0';
 
         break;
-      } 
-    } 
-  } 
+      }
+    }
+  }
 
-  return charset; 
+  return charset;
 }
 
 nsresult nsMsgI18NShrinkUTF8Str(const nsCString &inString,
                                 uint32_t aMaxLength,
                                 nsACString &outString)
 {
   if (inString.IsEmpty()) {
     outString.Truncate();
@@ -341,17 +341,17 @@ nsresult nsMsgI18NShrinkUTF8Str(const ns
     outString.Truncate();
     return NS_OK;
   }
   uint32_t len = prev - start;
   outString.Assign(Substring(inString, 0, len));
   return NS_OK;
 }
 
-void nsMsgI18NConvertRawBytesToUTF16(const nsCString& inString, 
+void nsMsgI18NConvertRawBytesToUTF16(const nsCString& inString,
                                      const char* charset,
                                      nsAString& outString)
 {
   if (MsgIsUTF8(inString))
   {
     CopyUTF8toUTF16(inString, outString);
     return;
   }
@@ -367,17 +367,17 @@ void nsMsgI18NConvertRawBytesToUTF16(con
     char c = *cur++;
     if (c & char(0x80))
       outString.Append(UCS2_REPLACEMENT_CHAR);
     else
       outString.Append(c);
   }
 }
 
-void nsMsgI18NConvertRawBytesToUTF8(const nsCString& inString, 
+void nsMsgI18NConvertRawBytesToUTF8(const nsCString& inString,
                                     const char* charset,
                                     nsACString& outString)
 {
   if (MsgIsUTF8(inString))
   {
     outString.Assign(inString);
     return;
   }
--- a/mailnews/base/util/nsMsgI18N.h
+++ b/mailnews/base/util/nsMsgI18N.h
@@ -42,17 +42,17 @@ NS_MSG_BASE bool nsMsgI18Nmultibyte_char
 /**
  * Check the input (unicode) string is in a range of the given charset after the conversion.
  * Note, do not use this for large string (e.g. message body) since this actually applies the conversion to the buffer.
  *
  * @param charset     [IN] Charset to be converted.
  * @param inString    [IN] Input unicode string to be examined.
  * @param fallbackCharset [OUT]
  *                         null if fallback charset is not needed.
- *                         Otherwise, a fallback charset name may be set if that was used for the conversion. 
+ *                         Otherwise, a fallback charset name may be set if that was used for the conversion.
  *                         Caller is responsible for freeing the memory.
  * @return            True if the string can be converted within the charset range.
  *                    False if one or more characters cannot be converted to the target charset.
  */
 NS_MSG_BASE bool      nsMsgI18Ncheck_data_in_charset_range(const char *charset, const char16_t* inString);
 
 /**
  * Return charset name of file system (OS dependent).
@@ -119,27 +119,27 @@ NS_MSG_BASE nsresult nsMsgI18NShrinkUTF8
                                             nsACString &outString);
 
 /*
  * Convert raw bytes in header to UTF-16
  *
  * @param inString   [IN] Input raw octets
  * @param outString  [OUT] Output UTF-16 string
  */
-NS_MSG_BASE void nsMsgI18NConvertRawBytesToUTF16(const nsCString& inString, 
+NS_MSG_BASE void nsMsgI18NConvertRawBytesToUTF16(const nsCString& inString,
                                                  const char* charset,
                                                  nsAString& outString);
 
 /*
  * Convert raw bytes in header to UTF-8
  *
  * @param inString   [IN] Input raw octets
  * @param outString  [OUT] Output UTF-8 string
  */
-NS_MSG_BASE void nsMsgI18NConvertRawBytesToUTF8(const nsCString& inString, 
+NS_MSG_BASE void nsMsgI18NConvertRawBytesToUTF8(const nsCString& inString,
                                                 const char* charset,
                                                 nsACString& outString);
 
 // Convert between UTF-16 and modified UTF-7 used for IMAP.
 NS_MSG_BASE nsresult CopyUTF16toMUTF7(const nsString &aSrc, nsACString& aDest);
 NS_MSG_BASE nsresult CopyMUTF7toUTF16(const nsCString& aSrc, nsAString& aDest);
 
 inline nsresult ConvertToUnicode(const char* charset,
@@ -155,29 +155,29 @@ inline nsresult ConvertToUnicode(const c
 }
 
 inline nsresult ConvertFromUnicode(const char* charset,
                                    const nsString &aSrc, nsACString& aDest)
 {
     return nsMsgI18NConvertFromUnicode(charset, aSrc, aDest);
 }
 
-inline void ConvertRawBytesToUTF16(const nsCString& inString, 
+inline void ConvertRawBytesToUTF16(const nsCString& inString,
                                    const char* charset, nsAString& outString)
 {
     return nsMsgI18NConvertRawBytesToUTF16(inString, charset, outString);
 }
 
-inline void ConvertRawBytesToUTF16(const char* inString, 
+inline void ConvertRawBytesToUTF16(const char* inString,
                                    const char* charset, nsAString& outString)
 {
     return nsMsgI18NConvertRawBytesToUTF16(nsDependentCString(inString),
                                            charset,
                                            outString);
 }
 
-inline void ConvertRawBytesToUTF8(const nsCString& inString, 
+inline void ConvertRawBytesToUTF8(const nsCString& inString,
                                   const char* charset, nsACString& outString)
 {
     return nsMsgI18NConvertRawBytesToUTF8(inString, charset, outString);
 }
 
 #endif /* _nsMsgI18N_H_ */
--- a/mailnews/base/util/nsMsgIdentity.h
+++ b/mailnews/base/util/nsMsgIdentity.h
@@ -12,17 +12,17 @@
 #include "nsCOMPtr.h"
 #include "nsString.h"
 
 class NS_MSG_BASE nsMsgIdentity final : public nsIMsgIdentity
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGIDENTITY
-  
+
 private:
   ~nsMsgIdentity() {}
   nsCString mKey;
   nsCOMPtr<nsIPrefBranch> mPrefBranch;
   nsCOMPtr<nsIPrefBranch> mDefPrefBranch;
 
 protected:
   nsresult getFolderPref(const char *pref, nsCString&, const char *, uint32_t);
--- a/mailnews/base/util/nsMsgIncomingServer.h
+++ b/mailnews/base/util/nsMsgIncomingServer.h
@@ -43,17 +43,17 @@ class NS_MSG_BASE nsMsgIncomingServer : 
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGINCOMINGSERVER
 
 protected:
   virtual ~nsMsgIncomingServer();
   nsCString m_serverKey;
 
-  // Sets m_password, if password found. Can return NS_ERROR_ABORT if the 
+  // Sets m_password, if password found. Can return NS_ERROR_ABORT if the
   // user cancels the master password dialog.
   nsresult GetPasswordWithoutUI();
 
   nsresult ConfigureTemporaryReturnReceiptsFilter(nsIMsgFilterList *filterList);
   nsresult ConfigureTemporaryServerSpamFilters(nsIMsgFilterList *filterList);
 
   nsCOMPtr <nsIMsgFolder> m_rootFolder;
   nsCOMPtr <nsIMsgDownloadSettings> m_downloadSettings;
--- a/mailnews/base/util/nsMsgKeySet.cpp
+++ b/mailnews/base/util/nsMsgKeySet.cpp
@@ -260,17 +260,17 @@ nsMsgKeySet::FirstNonMember ()
     } else {
       /* handle "M,..." where M >= 2. */
       return 1;
     }
   }
 }
 
 
-nsresult 
+nsresult
 nsMsgKeySet::Output(char **outputStr)
 {
   NS_ENSURE_ARG(outputStr);
   int32_t size;
   int32_t *head;
   int32_t *tail;
   int32_t *end;
   int32_t s_size;
@@ -342,17 +342,17 @@ nsMsgKeySet::Output(char **outputStr)
   }
 
   *s = 0;
 
   *outputStr = s_head;
   return NS_OK;
 }
 
-int32_t 
+int32_t
 nsMsgKeySet::GetLastMember()
 {
   if (m_length > 1)
   {
     int32_t nextToLast = m_data[m_length - 2];
     if (nextToLast < 0)  // is range at end?
     {
       int32_t last = m_data[m_length - 1];
@@ -381,17 +381,17 @@ void nsMsgKeySet::SetLastMember(int32_t 
         int32_t curHighWater;
         if (nextToLast < 0)  // is range at end?
         {
           int32_t rangeStart = m_data[m_length - 1];
           int32_t rangeLength = -nextToLast;
           curHighWater = (rangeLength + rangeStart - 1);
           if (curHighWater > newHighWaterMark)
           {
-            if (rangeStart > newHighWaterMark)  
+            if (rangeStart > newHighWaterMark)
             {
               m_length -= 2;  // throw away whole range
             }
             else if (rangeStart == newHighWaterMark)
             {
               // turn range into single element.
               m_data[m_length - 2] = newHighWaterMark;
               m_length--;
@@ -402,38 +402,38 @@ void nsMsgKeySet::SetLastMember(int32_t 
               m_data[m_length - 2] = -(newHighWaterMark - rangeStart);
               break;
             }
           }
           else {
             // prevent the infinite loop
             // see bug #13062
             break;
-          }  
+          }
         }
         else if (m_data[m_length - 1] > newHighWaterMark)  // no, so last number must be last member
         {
           m_length--;
         }
         else
           break;
       }
-      else 
+      else
         break;
     }
-    // well, the whole range is probably invalid, because the server probably re-ordered ids, 
+    // well, the whole range is probably invalid, because the server probably re-ordered ids,
     // but what can you do?
 #ifdef NEWSRC_DOES_HOST_STUFF
-    if (m_host) 
+    if (m_host)
       m_host->MarkDirty();
 #endif
   }
 }
 
-int32_t 
+int32_t
 nsMsgKeySet::GetFirstMember()
 {
   if (m_length > 1)
   {
     int32_t first = m_data[0];
     if (first < 0)  // is range at start?
     {
       int32_t second = m_data[1];
@@ -496,17 +496,17 @@ nsMsgKeySet::Optimize()
 
     if (range_p) {
       /* it's a range */
       from = input_tail[1];
       to = from + (-(input_tail[0]));
 
       /* Copy it over */
       *output_tail++ = *input_tail++;
-      *output_tail++ = *input_tail++;        
+      *output_tail++ = *input_tail++;
     } else {
       /* it's a literal */
       from = *input_tail;
       to = from;
 
       /* Copy it over */
       *output_tail++ = *input_tail++;
     }
@@ -644,17 +644,17 @@ nsMsgKeySet::Add(int32_t number)
   int32_t size;
   int32_t *head;
   int32_t *tail;
   int32_t *end;
 
 #ifdef DEBUG_MSGKEYSET
     printf("add %d\n",number);
 #endif
-    
+
   size = m_length;
   head = m_data;
   tail = head;
   end = head + size;
 
   NS_ASSERTION (number >= 0, "can't have negative items");
   if (number < 0)
     return 0;
@@ -699,17 +699,17 @@ nsMsgKeySet::Add(int32_t number)
     }
   }
 
   /* At this point, `tail' points to a position in the set which represents
      a value greater than `new'; or it is at `end'. In the interest of
      avoiding massive duplication of code, simply insert a literal here and
      then run the optimizer.
      */
-  int mid = (tail - head); 
+  int mid = (tail - head);
 
   if (m_data_size <= m_length + 1) {
     int endo = end - head;
     if (!Grow()) {
       // out of memory
       return -1;
     }
     head = m_data;
@@ -1022,17 +1022,17 @@ nsMsgKeySet::CountMissingInRange(int32_t
       tail++;
     }
     NS_ASSERTION (count >= 0, "invalid count");
   }
   return count;
 }
 
 
-int 
+int
 nsMsgKeySet::FirstMissingRange(int32_t min, int32_t max,
                   int32_t* first, int32_t* last)
 {
   int32_t size;
   int32_t *head;
   int32_t *tail;
   int32_t *end;
   int32_t from = 0;
@@ -1069,30 +1069,30 @@ nsMsgKeySet::FirstMissingRange(int32_t m
        intersects the [min,max] range we were given. */
     if (a > max) return 0;  /* It's hopeless; there are none. */
     if (a <= b && b >= min) {
       /* Ah-hah!  We found an intersection. */
       *first = a > min ? a : min;
       *last = b < max ? b : max;
       return 0;
     }
-  } 
+  }
   /* We found no holes in the newsrc that overlaps the range, nor did we hit
      something read beyond the end of the range.  So, the great infinite
      range of unread articles at the end of any newsrc line intersects the
      range we want, and we just need to return that. */
   a = to + 1;
   *first = a > min ? a : min;
   *last = max;
   return 0;
 }
 
 // I'm guessing we didn't include this because we didn't think we're going
 // to need it. I'm not so sure. I'm putting it in for now.
-int 
+int
 nsMsgKeySet::LastMissingRange(int32_t min, int32_t max,
                   int32_t* first, int32_t* last)
 {
   int32_t size;
   int32_t *head;
   int32_t *tail;
   int32_t *end;
   int32_t from = 0;
--- a/mailnews/base/util/nsMsgKeySet.h
+++ b/mailnews/base/util/nsMsgKeySet.h
@@ -23,51 +23,51 @@ class NS_MSG_BASE nsMsgKeySet {
 public:
   // Creates an empty set.
   static nsMsgKeySet* Create(/* MSG_NewsHost* host = NULL*/);
 
   // Creates a set from the list of numbers, as might be found in a
   // newsrc file.
   static nsMsgKeySet* Create(const char* str/* , MSG_NewsHost* host = NULL*/);
   ~nsMsgKeySet();
-  
+
   // FirstNonMember() returns the lowest non-member of the set that is
   // greater than 0.
   int32_t FirstNonMember();
 
   // Output() converts to a string representation suitable for writing to a
-  // .newsrc file.  
-  nsresult Output(char **outputStr);    
+  // .newsrc file.
+  nsresult Output(char **outputStr);
 
   // IsMember() returns whether the given article is a member of this set.
   bool IsMember(int32_t art);
-  
+
   // Add() adds the given article to the set.  (Returns 1 if a change was
   // made, 0 if it was already there, and negative on error.)
   int Add(int32_t art);
-  
-  // Remove() removes the given article from the set. 
+
+  // Remove() removes the given article from the set.
   int Remove(int32_t art);
-  
+
   // AddRange() adds the (inclusive) given range of articles to the set.
   int AddRange(int32_t first, int32_t last);
-  
+
   // CountMissingInRange() takes an inclusive range of articles and returns
   // the number of articles in that range which are not in the set.
   int32_t CountMissingInRange(int32_t start, int32_t end);
-  
+
   // FirstMissingRange() takes an inclusive range and finds the first range
-  // of articles that are not in the set.  If none, return zeros. 
+  // of articles that are not in the set.  If none, return zeros.
   int FirstMissingRange(int32_t min, int32_t max, int32_t* first, int32_t* last);
-  
+
 
   // LastMissingRange() takes an inclusive range and finds the last range
-  // of articles that are not in the set.  If none, return zeros. 
+  // of articles that are not in the set.  If none, return zeros.
   int LastMissingRange(int32_t min, int32_t max, int32_t* first, int32_t* last);
-  
+
   int32_t GetLastMember();
   int32_t GetFirstMember();
   void  SetLastMember(int32_t highWaterMark);
   // For debugging only...
   int32_t getLength() {return m_length;}
 
 /**
  * Fill the passed in aArray with the keys in the message key set.
@@ -78,28 +78,28 @@ public:
   static void RunTests();
 #endif
 
 protected:
   nsMsgKeySet(/* MSG_NewsHost* host */);
   nsMsgKeySet(const char* /* , MSG_NewsHost* host */);
   bool Grow();
   bool Optimize();
-  
+
 #ifdef DEBUG
   static void test_decoder(const char*);
   static void test_adder();
   static void test_ranges();
   static void test_member(bool with_cache);
 #endif
-  
+
   int32_t *m_data;          /* the numbers composing the `chunks' */
   int32_t m_data_size;        /* size of that malloc'ed block */
   int32_t m_length;        /* active area */
-  
+
   int32_t m_cached_value;      /* a potential set member, or -1 if unset*/
   int32_t m_cached_value_index;    /* the index into `data' at which a search
                      to determine whether `cached_value' was
                      a member of the set ended. */
 #ifdef NEWSRC_DOES_HOST_STUFF
   MSG_NewsHost* m_host;
 #endif
 };
--- a/mailnews/base/util/nsMsgLineBuffer.cpp
+++ b/mailnews/base/util/nsMsgLineBuffer.cpp
@@ -29,34 +29,33 @@ nsByteArray::~nsByteArray()
 nsresult nsByteArray::GrowBuffer(uint32_t desired_size, uint32_t quantum)
 {
   if (m_bufferSize < desired_size)
   {
     char *new_buf;
     uint32_t increment = desired_size - m_bufferSize;
     if (increment < quantum) /* always grow by a minimum of N bytes */
       increment = quantum;
-    
-    
+
     new_buf = (m_buffer
       ? (char *) PR_REALLOC (m_buffer, (m_bufferSize + increment))
       : (char *) PR_MALLOC (m_bufferSize + increment));
     if (! new_buf)
       return NS_ERROR_OUT_OF_MEMORY;
     m_buffer = new_buf;
     m_bufferSize += increment;
   }
   return NS_OK;
 }
 
 nsresult nsByteArray::AppendString(const char *string)
 {
   uint32_t strLength = (string) ? PL_strlen(string) : 0;
   return AppendBuffer(string, strLength);
-  
+
 }
 
 nsresult nsByteArray::AppendBuffer(const char *buffer, uint32_t length)
 {
   nsresult ret = NS_OK;
   if (m_bufferPos + length > m_bufferSize)
     ret = GrowBuffer(m_bufferPos + length, 1024);
   if (NS_SUCCEEDED(ret))
@@ -137,45 +136,45 @@ nsresult nsMsgLineBuffer::BufferInput(co
             /* if not looking for a CRLF, stop at CR or LF.  (for example, when parsing the newsrc file).  this fixes #9896, where we'd lose the last line of anything we'd parse that used CR as the line break. */
             if (*s == '\r' || *s == '\n') {
               newline = s;
               newline++;
               break;
             }
           }
         }
-        
+
         /* Ensure room in the net_buffer and append some or all of the current
            chunk of data to it. */
         {
             const char *end = (newline ? newline : net_buffer_end);
             uint32_t desired_size = (end - net_buffer) + m_bufferPos + 1;
-            
+
             if (desired_size >= m_bufferSize)
             {
                 status = GrowBuffer (desired_size, 1024);
                 if (NS_FAILED(status))
                     return status;
             }
             memcpy (m_buffer + m_bufferPos, net_buffer, (end - net_buffer));
             m_bufferPos += (end - net_buffer);
         }
-        
+
         /* Now m_buffer contains either a complete line, or as complete
            a line as we have read so far.
-           
+
            If we have a line, process it, and then remove it from `m_buffer'.
            Then go around the loop again, until we drain the incoming data.
-           */
+         */
         if (!newline)
             return NS_OK;
 
         if (NS_FAILED(ConvertAndSendBuffer()))
           return NS_ERROR_FAILURE;
-        
+
         net_buffer_size -= (newline - net_buffer);
         net_buffer = newline;
         m_bufferPos = 0;
     }
     return NS_OK;
 }
 
 nsresult nsMsgLineBuffer::HandleLine(const char *line, uint32_t line_length)
@@ -188,26 +187,26 @@ nsresult nsMsgLineBuffer::ConvertAndSend
 {
     /* Convert the line terminator to the native form.
      */
 
     char *buf = m_buffer;
     int32_t length = m_bufferPos;
 
     char* newline;
-    
+
     PR_ASSERT(buf && length > 0);
-    if (!buf || length <= 0) 
+    if (!buf || length <= 0)
         return NS_ERROR_FAILURE;
     newline = buf + length;
-    
+
     PR_ASSERT(newline[-1] == '\r' || newline[-1] == '\n');
     if (newline[-1] != '\r' && newline[-1] != '\n')
         return NS_ERROR_FAILURE;
-    
+
     if (m_convertNewlinesP)
     {
 #if (MSG_LINEBREAK_LEN == 1)
       if ((newline - buf) >= 2 &&
            newline[-2] == '\r' &&
            newline[-1] == '\n')
       {
         /* CRLF -> CR or LF */
@@ -225,37 +224,37 @@ nsresult nsMsgLineBuffer::ConvertAndSend
                ((newline - buf) >= 1 && newline[-1] != '\n'))
       {
         /* LF -> CRLF or CR -> CRLF */
         length++;
         buf[length - 2] = MSG_LINEBREAK[0];
         buf[length - 1] = MSG_LINEBREAK[1];
       }
 #endif
-    }    
+    }
     return (m_handler) ? m_handler->HandleLine(buf, length) : HandleLine(buf, length);
 }
 
 // If there's still some data (non CRLF terminated) flush it out
 nsresult nsMsgLineBuffer::FlushLastLine()
 {
   char *buf = m_buffer + m_bufferPos;
   int32_t length = m_bufferPos - 1;
   if (length > 0)
     return (m_handler) ? m_handler->HandleLine(buf, length) : HandleLine(buf, length);
   else
     return NS_OK;
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // This is a utility class used to efficiently extract lines from an input stream by buffering
-// read but unprocessed stream data in a buffer. 
+// read but unprocessed stream data in a buffer.
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-nsMsgLineStreamBuffer::nsMsgLineStreamBuffer(uint32_t aBufferSize, bool aAllocateNewLines, bool aEatCRLFs, char aLineToken) 
+nsMsgLineStreamBuffer::nsMsgLineStreamBuffer(uint32_t aBufferSize, bool aAllocateNewLines, bool aEatCRLFs, char aLineToken)
            : m_eatCRLFs(aEatCRLFs), m_allocateNewLines(aAllocateNewLines), m_lineToken(aLineToken)
 {
   NS_PRECONDITION(aBufferSize > 0, "invalid buffer size!!!");
   m_dataBuffer = nullptr;
   m_startPos = 0;
     m_numBytesInBuffer = 0;
 
   // used to buffer incoming data by ReadNextLineFromInput
@@ -291,33 +290,33 @@ void nsMsgLineStreamBuffer::ClearBuffer(
 // aInputStream - the input stream we want to read a line from
 // aPauseForMoreData is returned as true if the stream does not yet contain a line and we must wait for more
 // data to come into the stream.
 // Note to people wishing to modify this function: Be *VERY CAREFUL* this is a critical function used by all of
 // our mail protocols including imap, nntp, and pop. If you screw it up, you could break a lot of stuff.....
 
 char * nsMsgLineStreamBuffer::ReadNextLine(nsIInputStream * aInputStream, uint32_t &aNumBytesInLine, bool &aPauseForMoreData, nsresult *prv, bool addLineTerminator)
 {
-  // try to extract a line from m_inputBuffer. If we don't have an entire line, 
+  // try to extract a line from m_inputBuffer. If we don't have an entire line,
   // then read more bytes out from the stream. If the stream is empty then wait
   // on the monitor for more data to come in.
-  
+
   NS_PRECONDITION(m_dataBuffer && m_dataBufferSize > 0, "invalid input arguments for read next line from input");
 
   if (prv)
     *prv = NS_OK;
   // initialize out values
   aPauseForMoreData = false;
   aNumBytesInLine = 0;
   char * endOfLine = nullptr;
   char * startOfLine = m_dataBuffer+m_startPos;
-  
+
   if (m_numBytesInBuffer > 0) // any data in our internal buffer?
     endOfLine = PL_strchr(startOfLine, m_lineToken); // see if we already have a line ending...
-  
+
   // it's possible that we got here before the first time we receive data from the server
   // so aInputStream will be nullptr...
   if (!endOfLine && aInputStream) // get some more data from the server
   {
     nsresult rv;
     uint64_t numBytesInStream = 0;
     uint32_t numBytesCopied = 0;
     bool nonBlockingStream;
@@ -361,17 +360,17 @@ char * nsMsgLineStreamBuffer::ReadNextLi
         // if we can't grow the buffer, we have to bail.
         if (NS_FAILED(rv))
           return nullptr;
         startOfLine = m_dataBuffer;
         numFreeBytesInBuffer += growBy;
       }
       NS_ASSERTION(m_startPos == 0, "m_startPos should be 0 .....\n");
     }
-    
+
     uint32_t numBytesToCopy = std::min(uint64_t(numFreeBytesInBuffer - 1) /* leave one for a null terminator */, numBytesInStream);
     if (numBytesToCopy > 0)
     {
       // read the data into the end of our data buffer
       char *startOfNewData = startOfLine + m_numBytesInBuffer;
       rv = aInputStream->Read(startOfNewData, numBytesToCopy, &numBytesCopied);
       if (prv)
         *prv = rv;
@@ -384,57 +383,57 @@ char * nsMsgLineStreamBuffer::ReadNextLi
       m_numBytesInBuffer += numBytesCopied;
       m_dataBuffer[m_startPos + m_numBytesInBuffer] = '\0';
 
       // okay, now that we've tried to read in more data from the stream,
       // look for another end of line character in the new data
       endOfLine = PL_strchr(startOfNewData, m_lineToken);
     }
   }
-  
+
   // okay, now check again for endOfLine.
   if (endOfLine)
   {
     if (!m_eatCRLFs)
       endOfLine += 1; // count for LF or CR
-    
+
     aNumBytesInLine = endOfLine - startOfLine;
-    
+
     if (m_eatCRLFs && aNumBytesInLine > 0 && startOfLine[aNumBytesInLine-1] == '\r') // Remove the CR in a CRLF sequence
       aNumBytesInLine--;
-    
+
     // PR_CALLOC zeros out the allocated line
     char* newLine = (char*) PR_CALLOC(aNumBytesInLine + (addLineTerminator ? MSG_LINEBREAK_LEN : 0) + 1);
     if (!newLine)
     {
       aNumBytesInLine = 0;
       aPauseForMoreData = true;
       return nullptr;
     }
-    
+
     memcpy(newLine, startOfLine, aNumBytesInLine); // copy the string into the new line buffer
     if (addLineTerminator)
     {
       memcpy(newLine + aNumBytesInLine, MSG_LINEBREAK, MSG_LINEBREAK_LEN);
       aNumBytesInLine += MSG_LINEBREAK_LEN;
     }
-    
+
     if (m_eatCRLFs)
       endOfLine += 1; // advance past LF or CR if we haven't already done so...
-    
-    // now we need to update the data buffer to go past the line we just read out. 
+
+    // now we need to update the data buffer to go past the line we just read out.
     m_numBytesInBuffer -= (endOfLine - startOfLine);
     if (m_numBytesInBuffer)
       m_startPos = endOfLine - m_dataBuffer;
     else
       m_startPos = 0;
-    
+
     return newLine;
   }
-  
+
   aPauseForMoreData = true;
   return nullptr; // if we somehow got here. we don't have another line in the buffer yet...need to wait for more data...
 }
 
 bool nsMsgLineStreamBuffer::NextLineAvailable()
 {
   return (m_numBytesInBuffer > 0 && PL_strchr(m_dataBuffer+m_startPos, m_lineToken));
 }
--- a/mailnews/base/util/nsMsgLineBuffer.h
+++ b/mailnews/base/util/nsMsgLineBuffer.h
@@ -6,17 +6,17 @@
 #define _nsMsgLineBuffer_H
 
 #include "msgCore.h"    // precompiled header...
 
 // I can't believe I have to have this stupid class, but I can't find
 // anything suitable (nsStrImpl might be, when it's done). nsIByteBuffer
 // would do, if I had a stream for input, which I don't.
 
-class NS_MSG_BASE nsByteArray 
+class NS_MSG_BASE nsByteArray
 {
 public:
   nsByteArray();
   virtual ~nsByteArray();
   uint32_t  GetSize() {return m_bufferSize;}
   uint32_t  GetBufferPos() {return m_bufferPos;}
   nsresult  GrowBuffer(uint32_t desired_size, uint32_t quantum = 1024);
   nsresult  AppendString(const char *string);
@@ -35,61 +35,61 @@ class NS_MSG_BASE nsMsgLineBufferHandler
 public:
   virtual nsresult HandleLine(const char *line, uint32_t line_length) = 0;
 };
 
 class NS_MSG_BASE nsMsgLineBuffer : public nsMsgLineBufferHandler
 {
 public:
   nsMsgLineBuffer(nsMsgLineBufferHandler *handler, bool convertNewlinesP);
-  
+
   virtual    ~nsMsgLineBuffer();
   nsresult    BufferInput(const char *net_buffer, int32_t net_buffer_size);
   // Not sure why anyone cares, by NNTPHost seems to want to know the buf pos.
   uint32_t    GetBufferPos() {return m_bufferPos;}
-  
+
   virtual nsresult HandleLine(const char *line, uint32_t line_length);
   // flush last line, though it won't be CRLF terminated.
   virtual nsresult FlushLastLine();
 protected:
   nsMsgLineBuffer(bool convertNewlinesP);
-  
+
   nsresult ConvertAndSendBuffer();
   void SetLookingForCRLF(bool b);
-  
+
   nsMsgLineBufferHandler *m_handler;
   bool        m_convertNewlinesP;
-  bool        m_lookingForCRLF; 
+  bool        m_lookingForCRLF;
 };
 
 // I'm adding this utility class here for lack of a better place. This utility class is similar to nsMsgLineBuffer
 // except it works from an input stream. It is geared towards efficiently parsing new lines out of a stream by storing
 // read but unprocessed bytes in a buffer. I envision the primary use of this to be our mail protocols such as imap, news and
 // pop which need to process line by line data being returned in the form of a proxied stream from the server.
 
 class nsIInputStream;
 
 class NS_MSG_BASE nsMsgLineStreamBuffer
 {
 public:
   // aBufferSize -- size of the buffer you want us to use for buffering stream data
-  // aEndOfLinetoken -- The delimiter string to be used for determining the end of line. This 
+  // aEndOfLinetoken -- The delimiter string to be used for determining the end of line. This
   //              allows us to parse platform specific end of line endings by making it
   //            a parameter.
-  // aAllocateNewLines -- true if you want calls to ReadNextLine to allocate new memory for the line. 
+  // aAllocateNewLines -- true if you want calls to ReadNextLine to allocate new memory for the line.
   //            if false, the char * returned is just a ptr into the buffer. Subsequent calls to
   //            ReadNextLine will alter the data so your ptr only has a life time of a per call.
-  // aEatCRLFs  -- true if you don't want to see the CRLFs on the lines returned by ReadNextLine. 
+  // aEatCRLFs  -- true if you don't want to see the CRLFs on the lines returned by ReadNextLine.
   //         false if you do want to see them.
   // aLineToken -- Specify the line token to look for, by default is LF ('\n') which cover as well CRLF. If
   //            lines are terminated with a CR only, you need to set aLineToken to CR ('\r')
-  nsMsgLineStreamBuffer(uint32_t aBufferSize, bool aAllocateNewLines, 
+  nsMsgLineStreamBuffer(uint32_t aBufferSize, bool aAllocateNewLines,
                         bool aEatCRLFs = true, char aLineToken = '\n'); // specify the size of the buffer you want the class to use....
   virtual ~nsMsgLineStreamBuffer();
-  
+
   // Caller must free the line returned using PR_Free
   // aEndOfLinetoken -- delimiter used to denote the end of a line.
   // aNumBytesInLine -- The number of bytes in the line returned
   // aPauseForMoreData -- There is not enough data in the stream to make a line at this time...
   char * ReadNextLine(nsIInputStream * aInputStream, uint32_t &anumBytesInLine, bool &aPauseForMoreData, nsresult *rv = nullptr, bool addLineTerminator = false);
   nsresult GrowBuffer(int32_t desiredSize);
   void ClearBuffer();
   bool NextLineAvailable();
--- a/mailnews/base/util/nsMsgProtocol.h
+++ b/mailnews/base/util/nsMsgProtocol.h
@@ -46,23 +46,23 @@ class NS_MSG_BASE nsMsgProtocol : public
 {
 public:
   nsMsgProtocol(nsIURI * aURL);
 
   NS_DECL_THREADSAFE_ISUPPORTS
   // nsIChannel support
   NS_DECL_NSICHANNEL
   NS_DECL_NSIREQUEST
-  
+
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSITRANSPORTEVENTSINK
 
   // LoadUrl -- A protocol typically overrides this function, sets up any local state for the url and
-  // then calls the base class which opens the socket if it needs opened. If the socket is 
+  // then calls the base class which opens the socket if it needs opened. If the socket is
   // already opened then we just call ProcessProtocolState to start the churning process.
   // aConsumer is the consumer for the url. It can be null if this argument is not appropriate
   virtual nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer = nullptr);
 
   virtual nsresult SetUrl(nsIURI * aURL); // sometimes we want to set the url before we load it
 
   // Flag manipulators
   virtual bool TestFlag  (uint32_t flag) {return flag & m_flags;}
@@ -89,48 +89,48 @@ protected:
 
   nsresult GetTopmostMsgWindow(nsIMsgWindow **aWindow);
 
   virtual const char* GetType() {return nullptr;}
   nsresult GetQoSBits(uint8_t *aQoSBits);
 
   // a Protocol typically overrides this method. They free any of their own connection state and then
   // they call up into the base class to free the generic connection objects
-  virtual nsresult CloseSocket(); 
+  virtual nsresult CloseSocket();
 
   virtual nsresult SetupTransportState(); // private method used by OpenNetworkSocket and OpenFileSocket
 
-  // ProcessProtocolState - This is the function that gets churned by calls to OnDataAvailable. 
+  // ProcessProtocolState - This is the function that gets churned by calls to OnDataAvailable.
   // As data arrives on the socket, OnDataAvailable calls ProcessProtocolState.
-  
-  virtual nsresult ProcessProtocolState(nsIURI * url, nsIInputStream * inputStream, 
+
+  virtual nsresult ProcessProtocolState(nsIURI * url, nsIInputStream * inputStream,
                                         uint64_t sourceOffset, uint32_t length) = 0;
 
-  // SendData -- Writes the data contained in dataBuffer into the current output stream. 
+  // SendData -- Writes the data contained in dataBuffer into the current output stream.
   // It also informs the transport layer that this data is now available for transmission.
   // Returns a positive number for success, 0 for failure (not all the bytes were written to the
-  // stream, etc). 
+  // stream, etc).
     // aSuppressLogging is a hint that sensitive data is being sent and should not be logged
   virtual nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false);
 
   virtual nsresult PostMessage(nsIURI* url, nsIFile* aPostFile);
 
   virtual nsresult InitFromURI(nsIURI *aUrl);
 
   nsresult DoNtlmStep1(const char *username, const char *password, nsCString &response);
   nsresult DoNtlmStep2(nsCString &commandResponse, nsCString &response);
 
   nsresult DoGSSAPIStep1(const char *service, const char *username, nsCString &response);
   nsresult DoGSSAPIStep2(nsCString &commandResponse, nsCString &response);
-  // Ouput stream for writing commands to the socket  
+  // Ouput stream for writing commands to the socket
   nsCOMPtr<nsIOutputStream>   m_outputStream;   // this will be obtained from the transport interface
   nsCOMPtr<nsIInputStream>    m_inputStream;
 
   // Ouput stream for writing commands to the socket
-  nsCOMPtr<nsITransport>  m_transport; 
+  nsCOMPtr<nsITransport>  m_transport;
   nsCOMPtr<nsIRequest>    m_request;
   nsCOMPtr<nsICancelable> m_proxyRequest;
 
   bool          m_socketIsOpen; // mscott: we should look into keeping this state in the nsSocketTransport...
                                   // I'm using it to make sure I open the socket the first time a URL is loaded into the connection
   uint32_t      m_flags; // used to store flag information
   //uint32_t  m_startPosition;
   int32_t       m_readCount;
@@ -154,17 +154,17 @@ protected:
   nsCString                   mContentType;
   nsCString                   mCharset;
   int64_t                     mContentLength;
   nsCOMPtr<nsILoadInfo>       m_loadInfo;
 
   nsCString m_lastPasswordSent; // used to prefill the password prompt
 
   // private helper routine used by subclasses to quickly get a reference to the correct prompt dialog
-  // for a mailnews url. 
+  // for a mailnews url.
   nsresult GetPromptDialogFromUrl(nsIMsgMailNewsUrl * aMsgUrl, nsIPrompt ** aPromptDialog);
 
   // if a url isn't going to result in any content then we want to suppress calls to
   // OnStartRequest, OnDataAvailable and OnStopRequest
   bool mSuppressListenerNotifications;
 };
 
 
@@ -175,67 +175,67 @@ class NS_MSG_BASE nsMsgAsyncWriteProtoco
                                           , public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD Cancel(nsresult status) override;
 
   nsMsgAsyncWriteProtocol(nsIURI * aURL);
-  
+
   // temporary over ride...
   virtual nsresult PostMessage(nsIURI* url, nsIFile *postFile) override;
-  
+
   // over ride the following methods from the base class
   virtual nsresult SetupTransportState() override;
   virtual nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false) override;
   nsCString mAsyncBuffer;
 
   // if we suspended the asynch write while waiting for more data to write then this will be TRUE
   bool mSuspendedWrite;
   nsCOMPtr<nsIRequest>     m_WriteRequest;
   nsCOMPtr<nsIAsyncOutputStream>    mAsyncOutStream;
   nsCOMPtr<nsIOutputStreamCallback> mProvider;
   nsCOMPtr<nsIThread>               mProviderThread;
 
-  // because we are reading the post data in asychronously, it's possible that we aren't sending it 
-  // out fast enough and the reading gets blocked. The following set of state variables are used to 
+  // because we are reading the post data in asychronously, it's possible that we aren't sending it
+  // out fast enough and the reading gets blocked. The following set of state variables are used to
   // track this.
   bool    mSuspendedRead;
   bool    mInsertPeriodRequired; // do we need to insert a '.' as part of the unblocking process
-   
+
   nsresult ProcessIncomingPostData(nsIInputStream *inStr, uint32_t count);
   nsresult UnblockPostReader();
   nsresult UpdateSuspendedReadBytes(uint32_t aNewBytes, bool aAddToPostPeriodByteCount);
   nsresult PostDataFinished(); // this is so we'll send out a closing '.' and release any state related to the post
 
 
   // these two routines are used to pause and resume our loading of the file containing the contents
   // we are trying to post. We call these routines when we aren't sending the bits out fast enough
-  // to keep up with the file read. 
+  // to keep up with the file read.
   nsresult SuspendPostFileRead();
-  nsresult ResumePostFileRead(); 
-  nsresult UpdateSuspendedReadBytes(uint32_t aNewBytes); 
+  nsresult ResumePostFileRead();
+  nsresult UpdateSuspendedReadBytes(uint32_t aNewBytes);
   void UpdateProgress(uint32_t aNewBytes);
   nsMsgFilePostHelper * mFilePostHelper; // needs to be a weak reference
 protected:
   virtual ~nsMsgAsyncWriteProtocol();
 
   // the streams for the pipe used to queue up data for the async write calls to the server.
   // we actually re-use the same mOutStream variable in our parent class for the output
   // stream to the socket channel. So no need for a new variable here.
-  nsCOMPtr<nsIInputStream>  mInStream;    
+  nsCOMPtr<nsIInputStream>  mInStream;
   nsCOMPtr<nsIInputStream>  mPostDataStream;
-  uint32_t                  mSuspendedReadBytes;   // remaining # of bytes we need to read before   
+  uint32_t                  mSuspendedReadBytes;   // remaining # of bytes we need to read before
                                                    // the input stream becomes unblocked
-  uint32_t                  mSuspendedReadBytesPostPeriod; // # of bytes which need processed after we insert a '.' before 
+  uint32_t                  mSuspendedReadBytesPostPeriod; // # of bytes which need processed after we insert a '.' before
                                                            // the input stream becomes unblocked.
   int64_t   mFilePostSize; // used for file size, we post a single message in a file
   uint32_t  mNumBytesPosted; // used for determining progress on posting files
   bool      mGenerateProgressNotifications; // set during a post operation after we've started sending the post data...
 
-  virtual nsresult CloseSocket() override; 
+  virtual nsresult CloseSocket() override;
 };
 
 #undef  IMETHOD_VISIBILITY
 #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
 
 #endif /* nsMsgProtocol_h__ */
--- a/mailnews/base/util/nsMsgReadStateTxn.cpp
+++ b/mailnews/base/util/nsMsgReadStateTxn.cpp
@@ -26,40 +26,40 @@ nsMsgReadStateTxn::Init(nsIMsgFolder *aP
   NS_ENSURE_ARG_POINTER(aParentFolder);
 
   mParentFolder = aParentFolder;
   mMarkedMessages.AppendElements(aMsgKeyArray, aNumKeys);
 
   return nsMsgTxn::Init();
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsMsgReadStateTxn::UndoTransaction()
 {
   return MarkMessages(false);
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsMsgReadStateTxn::RedoTransaction()
 {
   return MarkMessages(true);
 }
 
 NS_IMETHODIMP
 nsMsgReadStateTxn::MarkMessages(bool aAsRead)
 {
   nsresult rv;
-  nsCOMPtr<nsIMutableArray> messageArray = 
+  nsCOMPtr<nsIMutableArray> messageArray =
     do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   uint32_t length = mMarkedMessages.Length();
   for (uint32_t i = 0; i < length; i++) {
     nsCOMPtr<nsIMsgDBHdr> curMsgHdr;
-    rv = mParentFolder->GetMessageHeader(mMarkedMessages[i], 
+    rv = mParentFolder->GetMessageHeader(mMarkedMessages[i],
                                          getter_AddRefs(curMsgHdr));
     if (NS_SUCCEEDED(rv) && curMsgHdr) {
       messageArray->AppendElement(curMsgHdr, false);
     }
   }
 
   return mParentFolder->MarkMessagesRead(messageArray, aAsRead);
 }
--- a/mailnews/base/util/nsMsgTxn.cpp
+++ b/mailnews/base/util/nsMsgTxn.cpp
@@ -20,17 +20,17 @@ NS_INTERFACE_MAP_BEGIN(nsMsgTxn)
   NS_INTERFACE_MAP_ENTRY(nsIWritablePropertyBag)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIPropertyBag, nsIWritablePropertyBag)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWritablePropertyBag)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsIPropertyBag2)
   NS_INTERFACE_MAP_ENTRY(nsIWritablePropertyBag2)
 NS_INTERFACE_MAP_END
 
-nsMsgTxn::nsMsgTxn() 
+nsMsgTxn::nsMsgTxn()
 {
   m_txnType = 0;
 }
 
 nsMsgTxn::~nsMsgTxn()
 {
 }
 
@@ -72,17 +72,17 @@ NS_IMETHODIMP nsMsgTxn::DeleteProperty(c
   return mPropertyHash.Get(name, nullptr) ? NS_ERROR_FAILURE : NS_OK;
 }
 
 //
 // nsMailSimpleProperty class and impl; used for GetEnumerator
 // This is same as nsSimpleProperty but for external API use.
 //
 
-class nsMailSimpleProperty final : public nsIProperty 
+class nsMailSimpleProperty final : public nsIProperty
 {
 public:
   nsMailSimpleProperty(const nsAString& aName, nsIVariant* aValue)
       : mName(aName), mValue(aValue)
   {
   }
 
   NS_DECL_ISUPPORTS
@@ -141,35 +141,35 @@ nsMsgTxn::SetPropertyAs ## Name (const n
 
 IMPL_GETSETPROPERTY_AS(Int32, int32_t)
 IMPL_GETSETPROPERTY_AS(Uint32, uint32_t)
 IMPL_GETSETPROPERTY_AS(Int64, int64_t)
 IMPL_GETSETPROPERTY_AS(Uint64, uint64_t)
 IMPL_GETSETPROPERTY_AS(Double, double)
 IMPL_GETSETPROPERTY_AS(Bool, bool)
 
-NS_IMETHODIMP nsMsgTxn::GetPropertyAsAString(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::GetPropertyAsAString(const nsAString & prop,
                                              nsAString & _retval)
 {
   nsIVariant* v = mPropertyHash.GetWeak(prop);
   if (!v)
     return NS_ERROR_NOT_AVAILABLE;
   return v->GetAsAString(_retval);
 }
 
-NS_IMETHODIMP nsMsgTxn::GetPropertyAsACString(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::GetPropertyAsACString(const nsAString & prop,
                                               nsACString & _retval)
 {
   nsIVariant* v = mPropertyHash.GetWeak(prop);
   if (!v)
     return NS_ERROR_NOT_AVAILABLE;
   return v->GetAsACString(_retval);
 }
 
-NS_IMETHODIMP nsMsgTxn::GetPropertyAsAUTF8String(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::GetPropertyAsAUTF8String(const nsAString & prop,
                                                  nsACString & _retval)
 {
   nsIVariant* v = mPropertyHash.GetWeak(prop);
   if (!v)
     return NS_ERROR_NOT_AVAILABLE;
   return v->GetAsAUTF8String(_retval);
 }
 
@@ -187,41 +187,41 @@ NS_IMETHODIMP nsMsgTxn::GetPropertyAsInt
   if (!val) {
     // We have a value, but it's null
     *_retval = nullptr;
     return NS_OK;
   }
   return val->QueryInterface(aIID, _retval);
 }
 
-NS_IMETHODIMP nsMsgTxn::SetPropertyAsAString(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::SetPropertyAsAString(const nsAString & prop,
                                              const nsAString & value)
 {
   nsCOMPtr<nsIWritableVariant> var = new nsVariant();
   var->SetAsAString(value);
   return SetProperty(prop, var);
 }
 
-NS_IMETHODIMP nsMsgTxn::SetPropertyAsACString(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::SetPropertyAsACString(const nsAString & prop,
                                               const nsACString & value)
 {
   nsCOMPtr<nsIWritableVariant> var = new nsVariant();
   var->SetAsACString(value);
   return SetProperty(prop, var);
 }
 
-NS_IMETHODIMP nsMsgTxn::SetPropertyAsAUTF8String(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::SetPropertyAsAUTF8String(const nsAString & prop,
                                                  const nsACString & value)
 {
   nsCOMPtr<nsIWritableVariant> var = new nsVariant();
   var->SetAsAUTF8String(value);
   return SetProperty(prop, var);
 }
 
-NS_IMETHODIMP nsMsgTxn::SetPropertyAsInterface(const nsAString & prop, 
+NS_IMETHODIMP nsMsgTxn::SetPropertyAsInterface(const nsAString & prop,
                                                nsISupports* value)
 {
   nsCOMPtr<nsIWritableVariant> var = new nsVariant();
   var->SetAsISupports(value);
   return SetProperty(prop, var);
 }
 
 /////////////////////// Transaction Stuff //////////////////
@@ -261,19 +261,19 @@ nsresult nsMsgTxn::SetMsgWindow(nsIMsgWi
 
 
 nsresult
 nsMsgTxn::SetTransactionType(uint32_t txnType)
 {
   return SetPropertyAsUint32(NS_LITERAL_STRING("type"), txnType);
 }
 
-/*none of the callers pass null aFolder, 
+/*none of the callers pass null aFolder,
   we always initialize aResult (before we pass in) for the case where the key is not in the db*/
-nsresult 
+nsresult
 nsMsgTxn::CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey, bool *aResult)
 {
   NS_ENSURE_ARG(aResult);
   nsCOMPtr<nsIMsgDBHdr> message;
   nsCOMPtr<nsIMsgDatabase> db;
   nsresult rv = aFolder->GetMsgDatabase(getter_AddRefs(db));
   if (db)
   {
--- a/mailnews/base/util/nsMsgTxn.h
+++ b/mailnews/base/util/nsMsgTxn.h
@@ -23,39 +23,39 @@
   { 0xab, 0xe4, 0x00, 0x80, 0x5f, 0x8a, 0xc9, 0x68 } }
 /**
  * base class for all message undo/redo transactions.
  */
 
 #undef  IMETHOD_VISIBILITY
 #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
 
-class NS_MSG_BASE nsMsgTxn : public nsITransaction, 
+class NS_MSG_BASE nsMsgTxn : public nsITransaction,
                              public nsIWritablePropertyBag,
                              public nsIWritablePropertyBag2
 {
 public:
     nsMsgTxn();
 
     nsresult Init();
 
     NS_IMETHOD DoTransaction(void) override;
 
     NS_IMETHOD UndoTransaction(void) override = 0;
 
     NS_IMETHOD RedoTransaction(void) override = 0;
-    
+
     NS_IMETHOD GetIsTransient(bool *aIsTransient) override;
 
     NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) override;
 
     nsresult GetMsgWindow(nsIMsgWindow **msgWindow);
     nsresult SetMsgWindow(nsIMsgWindow *msgWindow);
     nsresult SetTransactionType(uint32_t txnType);
- 
+
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPROPERTYBAG
     NS_DECL_NSIPROPERTYBAG2
     NS_DECL_NSIWRITABLEPROPERTYBAG
     NS_DECL_NSIWRITABLEPROPERTYBAG2
 
 protected:
     virtual ~nsMsgTxn();
--- a/mailnews/base/util/nsMsgUtils.h
+++ b/mailnews/base/util/nsMsgUtils.h
@@ -72,36 +72,36 @@ NS_MSG_BASE nsresult FormatFileSize(int6
 /**
  * given a folder uri, return the path to folder in the user profile directory.
  *
  * @param aFolderURI uri of folder we want the path to, without the scheme
  * @param[out] aPathString result path string
  * @param aScheme scheme of the uri
  * @param[optional] aIsNewsFolder is this a news folder?
  */
-NS_MSG_BASE nsresult 
+NS_MSG_BASE nsresult
 NS_MsgCreatePathStringFromFolderURI(const char *aFolderURI,
                                     nsCString& aPathString,
                                     const nsCString &aScheme,
                                     bool aIsNewsFolder=false);
 
 /**
  * Given a string and a length, removes any "Re:" strings from the front.
  * It also deals with that dumbass "Re[2]:" thing that some losing mailers do.
  *
  * If mailnews.localizedRe is set, it will also remove localized "Re:" strings.
  *
  * @return true if it made a change (in which case the caller should look to
  *         modifiedSubject for the result) and false otherwise (in which
- *         case the caller should look at stringp/length for the result) 
+ *         case the caller should look at stringp/length for the result)
  *
  * @note In the case of a true return value, the string is not altered:
  *       the pointer to its head is merely advanced, and the length
  *       correspondingly decreased.
- * 
+ *
  * @note This API is insane and should be fixed.
  */
 NS_MSG_BASE bool NS_MsgStripRE(const char **stringP, uint32_t *lengthP, char **modifiedSubject=nullptr);
 
 NS_MSG_BASE char * NS_MsgSACopy(char **destination, const char *source);
 
 NS_MSG_BASE char * NS_MsgSACat(char **destination, const char *source);
 
@@ -215,17 +215,17 @@ NS_MSG_BASE bool MsgIsUTF8(const nsACStr
 
 /*
  * Utility functions that call functions from nsINetUtil
  */
 
 NS_MSG_BASE nsresult MsgEscapeString(const nsACString &aStr,
                                      uint32_t aType, nsACString &aResult);
 
-NS_MSG_BASE nsresult MsgUnescapeString(const nsACString &aStr, 
+NS_MSG_BASE nsresult MsgUnescapeString(const nsACString &aStr,
                                        uint32_t aFlags, nsACString &aResult);
 
 NS_MSG_BASE nsresult MsgEscapeURL(const nsACString &aStr, uint32_t aFlags,
                                   nsACString &aResult);
 
 // Converts an nsTArray of nsMsgKeys plus a database, to an array of nsIMsgDBHdrs.
 NS_MSG_BASE nsresult MsgGetHeadersFromKeys(nsIMsgDatabase *aDB,
                                            const nsTArray<nsMsgKey> &aKeys,
--- a/mailnews/base/util/nsStopwatch.cpp
+++ b/mailnews/base/util/nsStopwatch.cpp
@@ -14,21 +14,21 @@
 #elif defined(XP_WIN)
 #include "windows.h"
 #endif // elif defined(XP_WIN)
 
 #include "nsMemory.h"
 /*
  * This basis for the logic in this file comes from (will used to come from):
  *  (mozilla/)modules/libutil/public/stopwatch.cpp.
- *  
+ *
  * It was no longer used in the mozilla tree, and is being migrated to
  * comm-central where we actually have a need for it.  ("Being" in the sense
  * that it will not be removed immediately from mozilla-central.)
- * 
+ *
  * Simplification and general clean-up has been performed and the fix for
  * bug 96669 has been integrated.
  */
 
 NS_IMPL_ISUPPORTS(nsStopwatch, nsIStopwatch)
 
 #if defined(XP_UNIX)
 /** the number of ticks per second */
--- a/mailnews/base/util/nsStopwatch.h
+++ b/mailnews/base/util/nsStopwatch.h
@@ -30,21 +30,21 @@ private:
   /// Wall-clock start time in seconds since unix epoch.
   double fStartRealTimeSecs;
   /// Wall-clock stop time in seconds since unix epoch.
   double fStopRealTimeSecs;
   /// CPU-clock start time in seconds (of CPU time used since app start)
   double fStartCpuTimeSecs;
   /// CPU-clock stop time in seconds (of CPU time used since app start)
   double fStopCpuTimeSecs;
-  /// Total wall-clock time elapsed in seconds. 
+  /// Total wall-clock time elapsed in seconds.
   double fTotalRealTimeSecs;
   /// Total CPU time elapsed in seconds.
   double fTotalCpuTimeSecs;
 
   /// Is the timer running?
   bool fRunning;
-  
+
   static double GetRealTime();
   static double GetCPUTime();
 };
 
 #endif // _nsStopwatch_h_