switch to using PR_FALSE/PR_TRUE and some nsCRT string routines
git-svn-id: svn://10.0.0.236/trunk@46291 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "nsNNTPHost.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#include "nsMsgNewsCID.h"
|
||||
|
||||
@@ -984,7 +985,7 @@ nsNNTPHost::AddGroup(const char *name,
|
||||
nsCOMPtr <nsINNTPCategoryContainer> categoryContainer;
|
||||
char* containerName = nsnull;
|
||||
PRBool needpaneupdate = PR_FALSE;
|
||||
PRBool isSubscribed=FALSE;
|
||||
PRBool isSubscribed=PR_FALSE;
|
||||
|
||||
nsMsgGroupRecord* group = (inGroupRecord) ? inGroupRecord : FindOrCreateGroup(name);
|
||||
if (!group) goto DONE; // Out of memory.
|
||||
@@ -1443,7 +1444,7 @@ PRBool nsNNTPHost::NeedsExtension (const char * /*extension*/)
|
||||
nsresult
|
||||
nsNNTPHost::AddExtension (const char *ext)
|
||||
{
|
||||
PRBool alreadyHasExtension=FALSE;
|
||||
PRBool alreadyHasExtension=PR_FALSE;
|
||||
QueryExtension(ext, &alreadyHasExtension);
|
||||
if (!alreadyHasExtension)
|
||||
{
|
||||
@@ -2531,11 +2532,11 @@ nsNNTPHost::AddNewNewsgroup(const char *name,
|
||||
switch (flag)
|
||||
{
|
||||
case 'C':
|
||||
bIsCategoryContainer = TRUE;
|
||||
bIsCategoryContainer = PR_TRUE;
|
||||
break;
|
||||
case 'P': // profile
|
||||
case 'V':
|
||||
bIsVirtual = TRUE;
|
||||
bIsVirtual = PR_TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2585,7 +2586,7 @@ nsNNTPHost::DisplaySubscribedGroup(nsINNTPNewsgroup *newsgroup,
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
SetGroupSucceeded(TRUE);
|
||||
SetGroupSucceeded(PR_TRUE);
|
||||
if (!newsgroup && visit_now) // let's try autosubscribe...
|
||||
{
|
||||
#if SETH_HACK
|
||||
@@ -2604,7 +2605,7 @@ nsNNTPHost::DisplaySubscribedGroup(nsINNTPNewsgroup *newsgroup,
|
||||
rv = newsgroup->GetSubscribed(&subscribed);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!subscribed) {
|
||||
rv = newsgroup->SetSubscribed(TRUE);
|
||||
rv = newsgroup->SetSubscribed(PR_TRUE);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(
|
||||
#ifdef HAVE_PANES
|
||||
if (m_pane != NULL && !m_finishingXover && !m_startedUpdate)
|
||||
{
|
||||
m_startedUpdate = TRUE;
|
||||
m_startedUpdate = PR_TRUE;
|
||||
m_pane->StartingUpdate(MSG_NotifyNone, 0, 0);
|
||||
}
|
||||
#endif
|
||||
@@ -249,7 +249,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(
|
||||
return rv;
|
||||
}
|
||||
if (last_possible < ((PRInt32)mark))
|
||||
newsGroupInfo->SetHighWater(last_possible, TRUE);
|
||||
newsGroupInfo->SetHighWater(last_possible, PR_TRUE);
|
||||
if (m_knownArts.set) {
|
||||
delete m_knownArts.set;
|
||||
}
|
||||
@@ -293,7 +293,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(
|
||||
|
||||
if (maxextra <= 0 || last_possible < first_possible || last_possible < 1)
|
||||
{
|
||||
emptyGroup_p = TRUE;
|
||||
emptyGroup_p = PR_TRUE;
|
||||
}
|
||||
|
||||
// this is just a temporary hack. these used to be parameters
|
||||
@@ -397,7 +397,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(
|
||||
}
|
||||
else
|
||||
*first = *last = 0;
|
||||
m_promptedAlready = TRUE;
|
||||
m_promptedAlready = PR_TRUE;
|
||||
}
|
||||
else if (m_promptedAlready && !m_downloadAll)
|
||||
*first = *last - m_maxArticles + 1;
|
||||
@@ -495,7 +495,7 @@ nsNNTPNewsgroupList::InitXOVER(PRInt32 first_msg, PRInt32 last_msg)
|
||||
/* Given a string and a length, removes any "Re:" strings from the front.
|
||||
It also deals with that "Re[2]:" thing that some mailers do.
|
||||
|
||||
Returns TRUE if it made a change, FALSE otherwise.
|
||||
Returns PR_TRUE if it made a change, PR_FALSE otherwise.
|
||||
|
||||
The string is not altered: the pointer to its head is merely advanced,
|
||||
and the length correspondingly decreased.
|
||||
@@ -544,7 +544,7 @@ nsNNTPNewsgroupList::msg_StripRE(const char **stringP, PRUint32 *lengthP)
|
||||
if ((s2[0] == ']' || s2[0] == ')') && s2[1] == ':')
|
||||
{
|
||||
s = s2+2; /* Skip over "]:" */
|
||||
result = TRUE; /* Yes, we stripped it. */
|
||||
result = PR_TRUE; /* Yes, we stripped it. */
|
||||
goto AGAIN; /* Skip whitespace and try again. */
|
||||
}
|
||||
}
|
||||
@@ -868,7 +868,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus)
|
||||
// calls which happen when the fe selects a message as a result of getting EndingUpdate,
|
||||
// which interrupts this url right before it was going to finish and causes FinishXOver
|
||||
// to get called again.
|
||||
m_finishingXover = TRUE;
|
||||
m_finishingXover = PR_TRUE;
|
||||
// if we haven't started an update, start one so the fe
|
||||
// will know to update the size of the view.
|
||||
if (!m_startedUpdate)
|
||||
@@ -876,7 +876,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus)
|
||||
#ifdef HAVE_PANES
|
||||
m_pane->StartingUpdate(MSG_NotifyNone, 0, 0);
|
||||
#endif
|
||||
m_startedUpdate = TRUE;
|
||||
m_startedUpdate = PR_TRUE;
|
||||
}
|
||||
#ifdef HAVE_PANES
|
||||
m_pane->EndingUpdate(MSG_NotifyNone, 0, 0);
|
||||
|
||||
@@ -112,7 +112,7 @@ nsNNTPNewsgroupPost::MakeControlCancel(const char *messageID)
|
||||
PL_strcpy(new_subject, "CANCEL ");
|
||||
PL_strcat(new_subject, messageID);
|
||||
|
||||
m_isControl = TRUE;
|
||||
m_isControl = PR_TRUE;
|
||||
SetSubject(new_subject);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
@@ -299,7 +299,7 @@ HG25430
|
||||
(the object that is going to manage the NNTP connections. it would keep track of the connection list.)
|
||||
*/
|
||||
/* PRIVATE XP_List * nntp_connection_list=0; */
|
||||
PRIVATE PRBool net_news_last_username_probably_valid=PR_FALSE;
|
||||
static PRBool net_news_last_username_probably_valid=PR_FALSE;
|
||||
PRInt32 net_NewsChunkSize=DEFAULT_NEWS_CHUNK_SIZE;
|
||||
/* PRIVATE PRInt32 net_news_timeout = 170; */
|
||||
/* seconds that an idle NNTP conn can live */
|
||||
@@ -541,10 +541,10 @@ nsresult nsNNTPProtocol::Initialize(nsIURI * aURL)
|
||||
|
||||
nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer)
|
||||
{
|
||||
PRBool bVal = FALSE;
|
||||
PRBool bVal = PR_FALSE;
|
||||
char *group = nsnull;
|
||||
char *commandSpecificData = nsnull;
|
||||
PRBool cancel = FALSE;
|
||||
PRBool cancel = PR_FALSE;
|
||||
nsCOMPtr <nsINNTPNewsgroupPost> message;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
@@ -627,7 +627,7 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer)
|
||||
goto FAIL;
|
||||
|
||||
if (m_messageID && commandSpecificData && !PL_strcmp (commandSpecificData, "?cancel"))
|
||||
cancel = TRUE;
|
||||
cancel = PR_TRUE;
|
||||
|
||||
NET_SACopy(&m_path, m_messageID);
|
||||
|
||||
@@ -798,7 +798,7 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer)
|
||||
|
||||
if (NET_IsOffline() || (NS_SUCCEEDED(rv) && articleIsOffline))
|
||||
{
|
||||
ce->local_file = TRUE;
|
||||
ce->local_file = PR_TRUE;
|
||||
cd->articleIsOffline = articleIsOffline;
|
||||
ce->socket = NULL;
|
||||
|
||||
@@ -1833,7 +1833,7 @@ PRInt32 nsNNTPProtocol::SendFirstNNTPCommandResponse()
|
||||
printf("group not found!\n");
|
||||
#endif
|
||||
#ifdef UNREADY_CODE
|
||||
MSG_GroupNotFound(cd->pane, cd->host, cd->control_con->current_group, TRUE /* opening group */);
|
||||
MSG_GroupNotFound(cd->pane, cd->host, cd->control_con->current_group, PR_TRUE /* opening group */);
|
||||
#else
|
||||
m_newsHost->GroupNotFound(m_currentGroup,
|
||||
PR_TRUE /* opening */);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPref.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#include "msgCore.h" // precompiled header...
|
||||
|
||||
@@ -916,7 +917,7 @@ NS_IMETHODIMP nsMsgNewsFolder::RememberPassword(const char *password)
|
||||
{
|
||||
#ifdef HAVE_DB
|
||||
NewsDB *newsDb = nsnull;
|
||||
NewsDB::Open(m_pathName, TRUE, &newsDb);
|
||||
NewsDB::Open(m_pathName, PR_TRUE, &newsDb);
|
||||
if (newsDb)
|
||||
{
|
||||
newsDb->SetCachedPassword(password);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "msgCore.h" // precompiled header...
|
||||
#include "prlog.h"
|
||||
|
||||
#include "nsIURL.h"
|
||||
#include "nsNntpUrl.h"
|
||||
|
||||
Reference in New Issue
Block a user