cleanup, fix TRUE/FALSE refs: bug 63834 r=bryner sr=brendan@mozilla.org

git-svn-id: svn://10.0.0.236/trunk@84718 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jgmyers%netscape.com 2001-01-10 06:12:15 +00:00
parent e2a761fbca
commit feaa9091d7
42 changed files with 85 additions and 1889 deletions

View File

@ -650,7 +650,7 @@ Wallet_SetKey(PRBool isNewkey) {
Recycle(message1);
Recycle(message2);
gKeyCancel = PR_TRUE;
return FALSE; /* user does not want to try again */
return PR_FALSE; /* user does not want to try again */
}
}
PR_FREEIF(mismatch);
@ -686,7 +686,7 @@ Wallet_SetKey(PRBool isNewkey) {
Recycle(message1);
Recycle(message2);
gKeyCancel = PR_TRUE;
return FALSE; /* user does not want to try again */
return PR_FALSE; /* user does not want to try again */
}
}
} else {

View File

@ -260,10 +260,10 @@ printf( "top %f bottom %f left %f right %f\n", top, bottom, left, right );
mPrintSetup->header = "header";
mPrintSetup->footer = "footer";
mPrintSetup->sizes = NULL;
mPrintSetup->landscape = FALSE; // Rotated output
mPrintSetup->underline = TRUE; // underline links
mPrintSetup->scale_images = TRUE; // Scale unsized images which are too big
mPrintSetup->scale_pre = FALSE; // do the pre-scaling thing
mPrintSetup->landscape = PR_FALSE; // Rotated output
mPrintSetup->underline = PR_TRUE; // underline links
mPrintSetup->scale_images = PR_TRUE; // Scale unsized images which are too big
mPrintSetup->scale_pre = PR_FALSE; // do the pre-scaling thing
// scale margins (specified in inches) to dots.
mPrintSetup->top = (int) (top * mPrintSetup->dpi);

View File

@ -411,7 +411,7 @@ PRInt32 cliptype;
mPSObj->closepath();
mPSObj->clip();
}else{
NS_ASSERTION(FALSE, "illegal clip combination");
NS_ASSERTION(PR_FALSE, "illegal clip combination");
}
#if defined(XP_PC) && !defined(XP_OS2)
@ -1070,7 +1070,7 @@ PRInt32 y = aY;
y += ascent;
mTMatrix->TransformCoord(&x, &y);
PostscriptTextOut(aString, aLength, NS_PIXELS_TO_POINTS(x), NS_PIXELS_TO_POINTS(y), aLength, (const nscoord*) (aSpacing ? dx0 : NULL), FALSE);
PostscriptTextOut(aString, aLength, NS_PIXELS_TO_POINTS(x), NS_PIXELS_TO_POINTS(y), aLength, (const nscoord*) (aSpacing ? dx0 : NULL), PR_FALSE);
if ((nsnull != aSpacing) && (dx0 != dxMem)) {
delete [] dx0;

View File

@ -8,7 +8,6 @@ ctxtfunc.h
edttypes.h
fe_proto.h
libc_r.h
lo_ele.h
merrors.h
minicom.h
mk_cx_fn.h

View File

@ -45,18 +45,5 @@
#include "structs.h"
#include "merrors.h"
#ifndef XP_MAC /* don't include everything in the world */
/* --------------------------------------------------------------------- */
/* include other bits of the Netscape client library */
#include "lo_ele.h" /* Layout structures */
#include "net.h"
#include "gui.h"
#include "shist.h"
#include "glhist.h"
#include "mime.h"
#endif /* !XP_MAC */
#endif /* _CLIENT_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,6 @@
#define _PROTO_H_
#include "ntypes.h"
#include "lo_ele.h"
XP_BEGIN_PROTOS

View File

@ -36,7 +36,6 @@
#include "xp_mcom.h"
#include "il_types.h"
#include "lo_ele.h"
#include "shistele.h"
#include "edttypes.h"

View File

@ -2838,7 +2838,8 @@ char * dir_ConvertDescriptionToPrefName(DIR_Server * server)
numSrcBytes = PL_strlen(descr);
while (srcIndex < numSrcBytes && destIndex < MAX_PREF_NAME_SIZE-1)
{
if (XP_IS_DIGIT(descr[srcIndex]) ||XP_IS_ALPHA(descr[srcIndex]) )
if (isascii(descr[srcIndex]) &&
(isdigit(descr[srcIndex]) || isalpha(descr[srcIndex]) ))
{
fileNameBuf[destIndex] = descr[srcIndex];
destIndex++;
@ -4505,10 +4506,10 @@ char *DIR_Unescape (const char *src, PRBool makeHtml)
*/
PRBool didEscape = PR_FALSE;
char c1 = *(tmpSrc + 1);
if (c1 && (XP_IS_DIGIT(c1) || XP_IS_ALPHA(c1)))
if (c1 && isascii(c1) && (isdigit(c1) || isalpha(c1)))
{
char c2 = *(tmpSrc + 2);
if (c2 && (XP_IS_DIGIT(c2) || XP_IS_ALPHA(c2)))
if (c2 && isascii(c2) && (isdigit(c2) || isalpha(c2)))
{
*tmpDst++ = (UNHEX(c1) << 4) | UNHEX(c2);
tmpSrc +=2;

View File

@ -37,7 +37,7 @@ public:
NS_IMETHOD StartBatch();
NS_IMETHOD EndBatch();
NS_IMETHOD SetSummaryValid(PRBool valid = TRUE);
NS_IMETHOD SetSummaryValid(PRBool valid = PR_TRUE);
NS_IMETHOD DeleteMessages(nsMsgKeyArray* nsMsgKeys, nsIDBChangeListener *instigator);
protected:

View File

@ -122,7 +122,7 @@ nsDBFolderInfo::nsDBFolderInfo(nsMsgDatabase *mdb)
m_totalPendingMessages =0;
m_unreadPendingMessages = 0;
m_mdbTokensInitialized = FALSE;
m_mdbTokensInitialized = PR_FALSE;
// Initialize a default charset to a pref default.
nsresult rv;
@ -610,12 +610,12 @@ nsDBFolderInfo::GetCharacterSet2(nsString *result, PRBool *usedDefault)
{
nsresult rv = GetProperty(kCharacterSetColumnName, result);
*usedDefault = FALSE;
*usedDefault = PR_FALSE;
if (NS_SUCCEEDED(rv) && result->IsEmpty())
{
result->Assign(gDefaultCharacterSet.GetUnicode());
*usedDefault = TRUE;
*usedDefault = PR_TRUE;
}
return rv;

View File

@ -808,7 +808,7 @@ void nsMsgDatabase::UnixToNative(char*& ioPath)
NS_IMETHODIMP nsMsgDatabase::Open(nsIFileSpec *folderName, PRBool create, PRBool upgrading, nsIMsgDatabase** pMessageDB)
{
NS_ASSERTION(FALSE, "must override");
NS_ASSERTION(PR_FALSE, "must override");
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -1408,7 +1408,7 @@ nsMsgDatabase::UndoDelete(nsIMsgDBHdr *msgHdr)
{
if (msgHdr)
{
SetHdrFlag(msgHdr, FALSE, MSG_FLAG_EXPUNGED);
SetHdrFlag(msgHdr, PR_FALSE, MSG_FLAG_EXPUNGED);
// ** do we need to update folder info regarding the message size
}
return NS_OK;
@ -3051,7 +3051,7 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsMsgHdr* newHdr, PRBool &newThread)
{
thread->GetThreadKey(&threadId);
newHdr->SetThreadId(threadId);
result = AddToThread(newHdr, thread, replyToHdr, TRUE);
result = AddToThread(newHdr, thread, replyToHdr, PR_TRUE);
break;
}
}
@ -3071,7 +3071,7 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsMsgHdr* newHdr, PRBool &newThread)
//TRACE("threading based on subject %s\n", (const char *) msgHdr->m_subject);
// if we move this and do subject threading after, ref threading,
// don't thread within children, since we know it won't work. But for now, pass TRUE.
result = AddToThread(newHdr, thread, nsnull, TRUE);
result = AddToThread(newHdr, thread, nsnull, PR_TRUE);
}
}
#endif // SUBJ_THREADING
@ -3080,11 +3080,11 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsMsgHdr* newHdr, PRBool &newThread)
{
// couldn't find any parent articles - msgHdr is top-level thread, for now
result = AddNewThread(newHdr);
newThread = TRUE;
newThread = PR_TRUE;
}
else
{
newThread = FALSE;
newThread = PR_FALSE;
}
return result;
}

View File

@ -3000,7 +3000,7 @@ nsImapService::GetDefaultLocalPath(nsIFileSpec ** aResult)
if (!localFile) {
rv = NS_GetSpecialDirectory(NS_APP_IMAP_MAIL_50_DIR, getter_AddRefs(localFile));
if (NS_FAILED(rv)) return rv;
havePref = FALSE;
havePref = PR_FALSE;
}
PRBool exists;

View File

@ -452,7 +452,7 @@ nsPop3Service::GetDefaultLocalPath(nsIFileSpec ** aResult)
if (!localFile) {
rv = NS_GetSpecialDirectory(NS_APP_MAIL_50_DIR, getter_AddRefs(localFile));
if (NS_FAILED(rv)) return rv;
havePref = FALSE;
havePref = PR_FALSE;
}
PRBool exists;

View File

@ -20,6 +20,7 @@
* Contributor(s):
*/
#include "nsSignedStub.h"
#include "prlog.h"
#include "prmem.h"
#include "plstr.h"
#include "mimexpcom.h"
@ -119,7 +120,7 @@ MimeInlineTextSIGNEDStub_parse_line(char *line, PRInt32 length, MimeObject *obj)
if (!obj->options->write_html_p)
{
return COM_MimeObject_write(obj, line, length, TRUE);
return COM_MimeObject_write(obj, line, length, PR_TRUE);
}
return 0;
@ -149,7 +150,7 @@ MimeInlineTextSIGNEDStub_parse_eof (MimeObject *obj, PRBool abort_p)
if (status < 0)
return status;
status = COM_MimeObject_write(obj, html, PL_strlen(html), TRUE);
status = COM_MimeObject_write(obj, html, PL_strlen(html), PR_TRUE);
PR_FREEIF(html);
if (status < 0)
return status;

View File

@ -20,6 +20,7 @@
* Contributor(s):
*/
#include "nsSMIMEStub.h"
#include "prlog.h"
#include "prmem.h"
#include "plstr.h"
#include "mimexpcom.h"
@ -119,7 +120,7 @@ MimeInlineTextSMIMEStub_parse_line(char *line, PRInt32 length, MimeObject *obj)
if (!obj->options->write_html_p)
{
return COM_MimeObject_write(obj, line, length, TRUE);
return COM_MimeObject_write(obj, line, length, PR_TRUE);
}
return 0;
@ -148,7 +149,7 @@ MimeInlineTextSMIMEStub_parse_eof (MimeObject *obj, PRBool abort_p)
if (status < 0)
return status;
status = COM_MimeObject_write(obj, html, PL_strlen(html), TRUE);
status = COM_MimeObject_write(obj, html, PL_strlen(html), PR_TRUE);
PR_FREEIF(html);
if (status < 0)
return status;

View File

@ -107,15 +107,15 @@ static PRBool needsQuotedPrintable (const char *s)
const unsigned char *p = (const unsigned char *)s;
if (PL_strstr (s, MSG_LINEBREAK))
return TRUE;
return PR_TRUE;
while (*p) {
if (*p & 0x80)
return TRUE;
return PR_TRUE;
p++;
}
return FALSE;
return PR_FALSE;
}
VObject* newVObject_(const char *id)
@ -623,7 +623,7 @@ void printVObjectToFile(nsFileSpec *fname, VObject *o)
fp->close();
}
#else
PR_ASSERT(FALSE);
PR_ASSERT(PR_FALSE);
#endif
}
@ -639,7 +639,7 @@ void printVObjectsToFile(nsFileSpec *fname,VObject *list)
fp->close();
}
#else
PR_ASSERT(FALSE);
PR_ASSERT(PR_FALSE);
#endif
}
@ -1173,9 +1173,9 @@ static void writeQPString(OFile *fp, const char *s)
const unsigned char *p = (const unsigned char *)s;
int current_column = 0;
static const char hexdigits[] = "0123456789ABCDEF";
PRBool white = FALSE;
PRBool contWhite = FALSE;
PRBool mb_p = FALSE;
PRBool white = PR_FALSE;
PRBool contWhite = PR_FALSE;
PRBool mb_p = PR_FALSE;
if (needsQuotedPrintable (s))
{
@ -1205,13 +1205,13 @@ static void writeQPString(OFile *fp, const char *s)
appendcOFile(fp,'=');
appendcOFile(fp,'\n');
appendcOFile(fp,'\t');
contWhite = FALSE;
contWhite = PR_FALSE;
}
/* If its CRLF, swallow two chars instead of one. */
if (*p == CR && *(p+1) == LF)
p++;
white = FALSE;
white = PR_FALSE;
current_column = 0;
}
else
@ -1222,8 +1222,8 @@ static void writeQPString(OFile *fp, const char *s)
{
appendcOFile(fp,*p);
current_column++;
white = FALSE;
contWhite = FALSE;
white = PR_FALSE;
contWhite = PR_FALSE;
}
else if (*p == ' ' || *p == '\t') /* whitespace */
{
@ -1233,14 +1233,14 @@ static void writeQPString(OFile *fp, const char *s)
appendcOFile(fp,hexdigits[*p >> 4]);
appendcOFile(fp,hexdigits[*p & 0xF]);
current_column += 3;
contWhite = FALSE;
contWhite = PR_FALSE;
}
else
{
appendcOFile(fp,*p);
current_column++;
}
white = TRUE;
white = PR_TRUE;
}
else /* print as =FF */
{
@ -1248,8 +1248,8 @@ static void writeQPString(OFile *fp, const char *s)
appendcOFile(fp,hexdigits[*p >> 4]);
appendcOFile(fp,hexdigits[*p & 0xF]);
current_column += 3;
white = FALSE;
contWhite = FALSE;
white = PR_FALSE;
contWhite = PR_FALSE;
}
PR_ASSERT(current_column <= 76); /* Hard limit required by spec */
@ -1261,10 +1261,10 @@ static void writeQPString(OFile *fp, const char *s)
appendcOFile(fp,'\t');
current_column = 0;
if (white)
contWhite = TRUE;
contWhite = PR_TRUE;
else
contWhite = FALSE;
white = FALSE;
contWhite = PR_FALSE;
white = PR_FALSE;
}
}
p++;
@ -1470,7 +1470,7 @@ void writeVObjectToFile(nsFileSpec *fname, VObject *o)
fp->close();
}
#else
PR_ASSERT(FALSE);
PR_ASSERT(PR_FALSE);
#endif
}
@ -1486,7 +1486,7 @@ void writeVObjectsToFile(nsFileSpec *fname, VObject *list)
fp->close();
}
#else
PR_ASSERT(FALSE);
PR_ASSERT(PR_FALSE);
#endif
}

View File

@ -66,7 +66,6 @@ CPPSRCS = \
mimecom.cpp \
mimemoz2.cpp \
comi18n.cpp \
nsMimeTransition.cpp \
nsMsgHeaderParser.cpp \
nsStreamConverter.cpp \
mimedrft.cpp \
@ -90,7 +89,6 @@ EXPORTS = \
mimemult.h \
mimemsig.h \
mimehdrs.h \
modmime.h \
mimepbuf.h \
modlmime.h \
comi18n.h \

View File

@ -43,7 +43,6 @@ EXPORTS = \
mimemult.h \
mimemsig.h \
mimehdrs.h \
modmime.h \
mimepbuf.h \
modlmime.h \
comi18n.h \
@ -106,9 +105,6 @@ OBJS= \
.\$(OBJDIR)\nsMimeHeaders.obj \
# XP-COM BRIDGES
.\$(OBJDIR)\comi18n.obj \
# EXTERNAL (OLD) DEPENDENCIES - SHOULD EVENTUALLY BE REMOVED
# WHEN NEW WORLD FUNCTIONS ARE FOUND
.\$(OBJDIR)\nsMimeTransition.obj \
$(NULL)

View File

@ -20,7 +20,6 @@
* Contributor(s):
*/
#include "mimei.h"
#include "modmime.h"
#include "mimeobj.h" /* MimeObject (abstract) */
#include "mimecont.h" /* |--- MimeContainer (abstract) */
#include "mimemult.h" /* | |--- MimeMultipart (abstract) */

View File

@ -31,7 +31,6 @@
#define _MIMECTH_H_
#include "mimei.h"
#include "modmime.h"
#include "mimeobj.h" /* MimeObject (abstract) */
#include "mimecont.h" /* |--- MimeContainer (abstract) */
#include "mimemult.h" /* | |--- MimeMultipart (abstract) */

View File

@ -30,7 +30,6 @@
#include "nsFileSpec.h"
#include "nsEscape.h"
#include "msgCore.h"
#include "nsMimeTransition.h"
#include "nsMimeStringResources.h"
#include "mimemoz2.h"

View File

@ -25,7 +25,6 @@
#include "prmem.h"
#include "plstr.h"
#include "prlog.h"
#include "nsMimeTransition.h"
#include "nsMimeStringResources.h"
#include "mimemoz2.h"
#include "nsCRT.h"

View File

@ -23,7 +23,6 @@
#include "nsCOMPtr.h"
#include "msgCore.h"
#include "mimei.h"
#include "modmime.h"
#include "prmem.h"
#include "plstr.h"
#include "mimebuf.h"
@ -34,7 +33,6 @@
#include "nsCRT.h"
#include "nsIPref.h"
#include "nsEscape.h"
#include "nsMimeTransition.h"
#include "nsMsgMessageFlags.h"
#include "nsMimeAddress.h"
#include "comi18n.h"

View File

@ -31,7 +31,6 @@
#endif
#include "nsCOMPtr.h"
#include "modmime.h"
#include "mimeobj.h" /* MimeObject (abstract) */
#include "mimecont.h" /* |--- MimeContainer (abstract) */
#include "mimemult.h" /* | |--- MimeMultipart (abstract) */
@ -44,11 +43,6 @@
#include "mimesun.h" /* | | |--- MimeSunAttachment */
#include "mimemsig.h" /* | | |--- MimeMultipartSigned (abstract)*/
#ifdef MOZ_SECURITY
#include HG01921
#include HG01944
#include HG01999
#endif /* MOZ_SECURITY */
#include "mimemsg.h" /* | |--- MimeMessage */
#include "mimeunty.h" /* | |--- MimeUntypedText */
@ -65,6 +59,7 @@
#include "mimeiimg.h" /* | |--- MimeInlineImage */
#include "mimeeobj.h" /* | |--- MimeExternalObject */
#include "mimeebod.h" /* |--- MimeExternalBody */
#include "prlog.h"
#include "prmem.h"
#include "prenv.h"
#include "plstr.h"
@ -81,6 +76,8 @@
#include "nsMimeStringResources.h"
#include "nsMimeTypes.h"
#define IMAP_EXTERNAL_CONTENT_HEADER "X-Mozilla-IMAP-Part"
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
/* ==========================================================================

View File

@ -24,7 +24,6 @@
#include "mimemapl.h"
#include "prmem.h"
#include "plstr.h"
#include "nsMimeTransition.h"
#include "nsMimeStringResources.h"
#include "mimemoz2.h"
#include "nsMimeTypes.h"

View File

@ -43,7 +43,6 @@
#include "nsIPref.h"
#include "nsIServiceManager.h"
#include "nsFileSpec.h"
#include "nsMimeTransition.h"
#include "comi18n.h"
#include "nsIStringBundle.h"
#include "nsString.h"

View File

@ -117,7 +117,6 @@
#include "prlog.h"
#include "plstr.h"
#include "mimemoz2.h"
#include "nsMimeTransition.h"
#include "nsString.h"
#include "nsIURL.h"
#include "nsCRT.h"

View File

@ -22,7 +22,6 @@
#include "msgCore.h"
#include "mimemult.h"
#include "modmime.h"
#include "mimemoz2.h"
#include "prmem.h"

View File

@ -25,7 +25,6 @@
#include "mimebuf.h"
#include "prmem.h"
#include "plstr.h"
#include "nsMimeTransition.h"
#include "mozITXTToHTMLConv.h"
#include "nsString.h"
#include "nsMimeStringResources.h"

View File

@ -25,7 +25,6 @@
#include "mimebuf.h"
#include "prmem.h"
#include "plstr.h"
#include "nsMimeTransition.h"
#include "mozITXTToHTMLConv.h"
#include "nsCOMPtr.h"
#include "nsIComponentManager.h"

View File

@ -1,97 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef MIME_H
#define MIME_H
#include "ntypes.h"
XP_BEGIN_PROTOS
extern PUBLIC const char *FE_UsersOrganization(void);
/* Returns the appropriate contents of a From: field of a mail message
originating from the current user. This calls FE_UsersFullName()
and FE_UsersMailAddress() and correctly munges the values, using
MSG_MakeFullAddress()
A new string is returned, which you must free when you're done with it.
*/
extern PUBLIC char *MIME_MakeFromField (PRInt16 csid);
/* Convert a block of text to the MIME quoted-printable encoding.
Returns a new string and its size, or NULL if it couldn't allocate.
*/
extern PUBLIC void MIME_EncodeQuotedPrintableString(const unsigned char *input,
PRUint32 input_size,
unsigned char **output,
PRUint32 *output_size);
/* Convert a block of text to the MIME base64 encoding.
Returns a new string and its size, or NULL if it couldn't allocate.
*/
extern PUBLIC void MIME_EncodeBase64String(const unsigned char *input,
PRUint32 input_size,
unsigned char **output,
PRUint32 *output_size);
/* build a mailto: url address given a to field
*
* returns a malloc'd string
*/
extern char *
MIME_BuildMailtoURLAddress(const char * to);
/* build a news: url address to post to, given a partial news-post
* URL and the newsgroups line
*
* returns a malloc'd string
*/
extern char *
MIME_BuildNewspostURLAddress(const char *partial_newspost_url,
const char *newsgroups);
/* If the argument is true, we use quoted-printable encoding on mail and
news messages which have 8bit characters in them. Otherwise, we assume
that the mail and news transport will not strip the eighth bit (a bad
assumption.) */
extern void MIME_ConformToStandard (PRBool conform_p);
/* for right now, only the XFE uses this */
extern PRBool Get_MIME_ConformToStandard();
/* Generate headers for a form post to a mailto: URL.
This lets the URL specify additional headers, but is careful to
ignore headers which would be dangerous. It may modify the URL
(because of CC) so a new URL to actually post to is returned.
*/
extern int MIME_GenerateMailtoFormPostHeaders (const char *old_post_url,
const char *referer,
char **new_post_url_return,
char **headers_return);
#define IMAP_EXTERNAL_CONTENT_HEADER "X-Mozilla-IMAP-Part"
XP_END_PROTOS
#endif /* mime.h */

View File

@ -1,179 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "prtypes.h"
#include "prmem.h"
#include "plstr.h"
#include "nsCRT.h"
#include "nsMimeTransition.h"
#include "msgCore.h"
#include "mimebuf.h"
/*
* This is a transitional file that will help with the various message
* ID definitions and the functions to retrieve the error string
*/
#if 0
extern "C" NET_cinfo *
NET_cinfo_find_type (char *uri)
{
return NULL;
}
extern "C" NET_cinfo *
NET_cinfo_find_info_by_type (char *uri)
{
return NULL;
}
#endif
/////////////////////////////////////////////////////////////////////
// THIS IS ONLY HERE UNTIL I CAN GET THE INTERNAL EMITTER OUT OF
// LIBMIME
/////////////////////////////////////////////////////////////////////
#include "nsIMimeEmitter.h"
#include "nsMailHeaders.h"
extern "C" PRBool
EmitThisHeaderForPrefSetting(PRInt32 dispType, const char *header)
{
if (nsMimeHeaderDisplayTypes::AllHeaders == dispType)
return PR_TRUE;
if ((!header) || (!*header))
return PR_FALSE;
if (nsMimeHeaderDisplayTypes::MicroHeaders == dispType)
{
if (
(!nsCRT::strcmp(header, HEADER_SUBJECT)) ||
(!nsCRT::strcmp(header, HEADER_FROM)) ||
(!nsCRT::strcmp(header, HEADER_DATE))
)
return PR_TRUE;
else
return PR_FALSE;
}
if (nsMimeHeaderDisplayTypes::NormalHeaders == dispType)
{
if (
(!nsCRT::strcmp(header, HEADER_TO)) ||
(!nsCRT::strcmp(header, HEADER_SUBJECT)) ||
(!nsCRT::strcmp(header, HEADER_SENDER)) ||
(!nsCRT::strcmp(header, HEADER_RESENT_TO)) ||
(!nsCRT::strcmp(header, HEADER_RESENT_SENDER)) ||
(!nsCRT::strcmp(header, HEADER_RESENT_FROM)) ||
(!nsCRT::strcmp(header, HEADER_RESENT_CC)) ||
(!nsCRT::strcmp(header, HEADER_REPLY_TO)) ||
(!nsCRT::strcmp(header, HEADER_REFERENCES)) ||
(!nsCRT::strcmp(header, HEADER_NEWSGROUPS)) ||
(!nsCRT::strcmp(header, HEADER_MESSAGE_ID)) ||
(!nsCRT::strcmp(header, HEADER_FROM)) ||
(!nsCRT::strcmp(header, HEADER_FOLLOWUP_TO)) ||
(!nsCRT::strcmp(header, HEADER_CC)) ||
(!nsCRT::strcmp(header, HEADER_BCC))
)
return PR_TRUE;
else
return PR_FALSE;
}
return PR_TRUE;
}
#include "nsMimeRebuffer.h"
#include "prmem.h"
MimeRebuffer::MimeRebuffer(void)
{
mSize = 0;
mBuf = NULL;
}
MimeRebuffer::~MimeRebuffer(void)
{
if (mBuf)
{
PR_FREEIF(mBuf);
mBuf = NULL;
}
}
PRUint32
MimeRebuffer::GetSize()
{
return mSize;
}
PRUint32
MimeRebuffer::IncreaseBuffer(const char *addBuf, PRUint32 size)
{
if ( (!addBuf) || (size == 0) )
return mSize;
mBuf = (char *)PR_Realloc(mBuf, size + mSize);
if (!mBuf)
{
mSize = 0;
return mSize;
}
nsCRT::memcpy(mBuf+mSize, addBuf, size);
mSize += size;
return mSize;
}
PRUint32
MimeRebuffer::ReduceBuffer(PRUint32 numBytes)
{
if (numBytes == 0)
return mSize;
if (!mBuf)
{
mSize = 0;
return mSize;
}
if (numBytes >= mSize)
{
PR_FREEIF(mBuf);
mBuf = NULL;
mSize = 0;
return mSize;
}
nsCRT::memcpy(mBuf, mBuf+numBytes, (mSize - numBytes));
mSize -= numBytes;
return mSize;
}
char *
MimeRebuffer::GetBuffer()
{
return mBuf;
}

View File

@ -1,40 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsMimeTransition_h_
#define nsMimeTransition_h
#include "prtypes.h"
#include "plstr.h"
/*
* This is a transitional file that will help with the various message
* ID definitions and the functions to retrieve the error string
*/
#if 0
extern "C" NET_cinfo *
NET_cinfo_find_type (char *uri);
extern "C" NET_cinfo *
NET_cinfo_find_info_by_type (char *uri);
#endif
#endif /* nsMimeTransition_h_ */

View File

@ -568,7 +568,7 @@ il_gif_init_transparency(il_container *ic, int index)
if (!src_trans_pixel) {
src_trans_pixel = PR_NEWZAP(IL_IRGB);
if (!src_trans_pixel)
return FALSE;
return PR_FALSE;
ic->src_header->transparent_pixel = src_trans_pixel;
/* Initialize the destination image's transparent pixel. */
@ -588,7 +588,7 @@ il_gif_init_transparency(il_container *ic, int index)
from frame to frame in an animated gif. */
src_trans_pixel->index = index;
return TRUE;
return PR_TRUE;
}
@ -680,7 +680,7 @@ process_buffered_gif_input_data(gif_struct* gs)
/* test, stop loopers if error */
if( state == gif_error){
ic->loop_count = 0;
gs->destroy_pending =TRUE;
gs->destroy_pending = PR_TRUE;
ic->state = IC_ABORT_PENDING;
}
if (gs->destroy_pending &&
@ -1151,13 +1151,13 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
ILTRACE(2,("il:gif: transparent pixel %d", gs->tpixel));
if (!il_gif_init_transparency(ic, gs->tpixel))
return MK_OUT_OF_MEMORY;
gs->is_transparent = TRUE;
gs->is_transparent = PR_TRUE;
}
else
{
ILTRACE(2,("il:gif: ignoring gfx control extension"));
}
gs->control_extension = TRUE;
gs->control_extension = PR_TRUE;
gs->disposal_method = (gdispose)(((*q) >> 2) & 0x7);
gs->delay_time = GETINT16(q + 1) * 10;
GETN(1,gif_consume_block);
@ -1367,10 +1367,10 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
if ( *(q+8) & 0x40 )
{
ILTRACE(2,("il:gif: interlaced"));
gs->interlaced = TRUE;
gs->interlaced = PR_TRUE;
gs->ipass = 1;
} else {
gs->interlaced = FALSE;
gs->interlaced = PR_FALSE;
gs->ipass = 0;
}
@ -1417,7 +1417,7 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
if(ic->imgdcb)
ic->imgdcb->ImgDCBResetPalette();
gs->is_local_colormap_defined = TRUE;
gs->is_local_colormap_defined = PR_TRUE;
GETN(gs->local_colormap_size * 3, gif_image_colormap);
}
else
@ -1427,7 +1427,7 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
if(ic->imgdcb)
ic->imgdcb->ImgDCBResetPalette();
gs->is_local_colormap_defined = FALSE;
gs->is_local_colormap_defined = PR_FALSE;
GETN(1, gif_lzw_start);
}
}
@ -1503,8 +1503,8 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
gs->images_decoded++;
/* Clear state from this image */
gs->control_extension = FALSE;
gs->is_transparent = FALSE;
gs->control_extension = PR_FALSE;
gs->is_transparent = PR_FALSE;
if(ic->animate_request == eImageAnimation_None){
/* This is not really an error, but a mechanism
@ -1637,11 +1637,11 @@ il_gif_complete(il_container *ic)
so don't actually free any of the data structures. */
if (gs->delay_timeout) {
/* We will free the data structures when image display completes. */
gs->destroy_pending = TRUE;
gs->destroy_pending = PR_TRUE;
return;
} else if (gs->requested_buffer_fullness) {
/* We will free the data structures when image display completes. */
gs->destroy_pending = TRUE;
gs->destroy_pending = PR_TRUE;
process_buffered_gif_input_data(gs);
return;
}

View File

@ -312,7 +312,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr)
#endif
ic->image->header.alpha_bits = 1;
ic->image->header.alpha_shift = 0;
ic->image->header.is_interleaved_alpha = TRUE;
ic->image->header.is_interleaved_alpha = PR_TRUE;
}
ic->imgdcb->ImgDCBImageSize();

View File

@ -38,7 +38,7 @@
Includes dithering for B&W displays, but not dithering
for PseudoColor displays which can be found in dither.c.
$Id: color.cpp,v 3.16 2000-07-10 07:13:27 cls%seawood.org Exp $
$Id: color.cpp,v 3.17 2001-01-10 06:12:10 jgmyers%netscape.com Exp $
*/
@ -664,7 +664,7 @@ il_init_rgb_depth_tables(IL_ColorSpace *color_space)
if (private_data->r8torgbn &&
private_data->g8torgbn &&
private_data->b8torgbn)
return TRUE;
return PR_TRUE;
red_bits = rgb->red_bits;
red_shift = rgb->red_shift;
@ -686,7 +686,7 @@ il_init_rgb_depth_tables(IL_ColorSpace *color_space)
private_data->g8torgbn &&
private_data->b8torgbn)) {
ILTRACE(0,("il: MEM il_init_rgb_tables"));
return FALSE;
return PR_FALSE;
}
/* XXXM12N These could be optimized. */
@ -722,7 +722,7 @@ il_init_rgb_depth_tables(IL_ColorSpace *color_space)
private_data->g8torgbn &&
private_data->b8torgbn)) {
ILTRACE(0,("il: MEM il_init_rgb_tables"));
return FALSE;
return PR_FALSE;
}
/* Compensate for Win95's sometimes-weird color quantization. */
@ -768,7 +768,7 @@ il_init_rgb_depth_tables(IL_ColorSpace *color_space)
private_data->g8torgbn &&
private_data->b8torgbn)) {
ILTRACE(0,("il: MEM il_init_rgb_tables"));
return FALSE;
return PR_FALSE;
}
tmp_map = (PRUint32*)private_data->r8torgbn;
@ -793,7 +793,7 @@ il_init_rgb_depth_tables(IL_ColorSpace *color_space)
PR_ASSERT(0);
}
return TRUE;
return PR_TRUE;
}

View File

@ -23,7 +23,7 @@
/* -*- Mode: C; tab-width: 4 -*-
* colormap.c
*
* $Id: colormap.cpp,v 3.3 1999-11-06 03:31:26 dmose%mozilla.org Exp $
* $Id: colormap.cpp,v 3.4 2001-01-10 06:12:10 jgmyers%netscape.com Exp $
*/
@ -51,8 +51,8 @@ il_reset_palette(il_container *ic)
}
ic->colormap_serial_num = -1;
ic->dont_use_custom_palette = FALSE;
ic->rendered_with_custom_palette = FALSE;
ic->dont_use_custom_palette = PR_FALSE;
ic->rendered_with_custom_palette = PR_FALSE;
return ret;

View File

@ -101,7 +101,7 @@ il_partial(
if (!ic->new_data_for_fe) {
ic->update_start_row = row;
ic->update_end_row = row + row_count - 1;
ic->new_data_for_fe = TRUE;
ic->new_data_for_fe = PR_TRUE;
} else {
if (row < ic->update_start_row)
ic->update_start_row = row;
@ -216,7 +216,7 @@ il_flush_image_data(il_container *ic)
/* Notify observers of image progress. */
il_progress_notify(ic);
ic->new_data_for_fe = FALSE;
ic->new_data_for_fe = PR_FALSE;
ic->update_end_row = ic->update_start_row = 0;
}
@ -1223,7 +1223,7 @@ il_emit_row(
#ifndef M12N /* Clean this up */
if (ic->image->pixmap_depth == 1)
do_dither = TRUE;
do_dither = PR_TRUE;
else
do_dither = ic->converter && (row_count <= 4) &&
((ic->dither_mode == IL_Dither) ||
@ -1233,7 +1233,7 @@ il_emit_row(
if ((nsCRT::strncasecmp(ic->type, "image/gif",9)==0)||
(nsCRT::strncasecmp(ic->type, "image/png",9)==0) &&
(!ic->converter || (row_count > 4)))
do_dither = FALSE;
do_dither = PR_FALSE;
#endif /* M12N */

View File

@ -265,7 +265,7 @@ XP_RegExpMatch(char *str, char *xp, PRBool case_insensitive) {
break;
}
}
if(_shexp_match(str,expr, FALSE) == MATCH) {
if(_shexp_match(str,expr, PR_FALSE) == MATCH) {
PR_Free(expr);
return 0;
}
@ -289,7 +289,7 @@ XP_RegExpSearch(char *str, char *expr)
case NON_SXP:
return (strcmp(expr,str) ? 1 : 0);
default:
return XP_RegExpMatch(str, expr, FALSE);
return XP_RegExpMatch(str, expr, PR_FALSE);
}
}

View File

@ -1999,7 +1999,7 @@ nsBookmarksService::FireTimer(nsITimer* aTimer, void* aClosure)
}
if (NS_SUCCEEDED(rv = channel->AsyncRead(bmks, nsnull)))
{
bmks->busySchedule = TRUE;
bmks->busySchedule = PR_TRUE;
}
}
}

View File

@ -635,7 +635,7 @@ InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure)
if (NS_SUCCEEDED(rv = channel->AsyncRead(search, engineContext)))
{
search->busySchedule = TRUE;
search->busySchedule = PR_TRUE;
#ifdef DEBUG_SEARCH_UPDATES
printf(" InternetSearchDataSource::FireTimer - Pinging '%s'\n", (char *)updateURL);