зеркало из https://github.com/mozilla/pjs.git
Fix build bustage on Unix when MOZ_ENDER_MIME is defined by checking for
MOZ_MAIL_COMPOSE.
This commit is contained in:
Родитель
193679d3f7
Коммит
9b5cc1c903
|
@ -29,6 +29,7 @@ CSRCS = \
|
|||
appledbl.c \
|
||||
bh_strm.c \
|
||||
m_binhex.c \
|
||||
mprmime.c \
|
||||
msgutils.c \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ CSRCS = \
|
|||
appledbl.c \
|
||||
bh_strm.c \
|
||||
m_binhex.c \
|
||||
mprmime.c \
|
||||
msgutils.c \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -252,7 +252,8 @@ MSG_MimeRelatedSubpart::MSG_MimeRelatedSubpart(MSG_MimeRelatedSaver *parent,
|
|||
char *pMime, int16 part_csid, char *pFilename)
|
||||
: MSG_SendPart(NULL, part_csid), m_pOriginalURL(NULL),
|
||||
m_pLocalURL(NULL), m_pParentFS(parent),
|
||||
m_pContentID(NULL), m_pContentName(NULL), m_rootPart(FALSE) , m_pStreamOut(NULL), m_pEncoding(NULL)
|
||||
m_pContentID(NULL), m_pEncoding(NULL), m_pContentName(NULL),
|
||||
m_pStreamOut(NULL), m_rootPart(FALSE)
|
||||
{
|
||||
m_filetype = xpFileToPost;
|
||||
|
||||
|
@ -335,10 +336,10 @@ MSG_MimeRelatedSubpart::WriteEncodedMessageBody(const char *buf, int32 size,
|
|||
int returnVal = 0;
|
||||
|
||||
XP_ASSERT(subpart->m_state != NULL);
|
||||
#ifndef MOZ_ENDER_MIME
|
||||
#if !defined(MOZ_ENDER_MIME) || defined(MOZ_MAIL_COMPOSE)
|
||||
if (subpart->m_state)
|
||||
returnVal = mime_write_message_body(subpart->m_state, (char *) buf, size);
|
||||
#endif
|
||||
#endif /* !MOZ_ENDER_MIME || MOZ_MAIL_COMPOSE */
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
|
@ -432,7 +433,7 @@ MSG_MimeRelatedSubpart::Write(void)
|
|||
// that isn't text.
|
||||
if (m_type && (!m_rootPart))
|
||||
{
|
||||
#ifndef MOZ_ENDER_MIME
|
||||
#if !defined(MOZ_ENDER_MIME) || defined(MOZ_MAIL_COMPOSE)
|
||||
// Uuencode only if we have to, otherwise use base64
|
||||
if (m_pParentFS->m_pPane->
|
||||
GetCompBoolHeader(MSG_UUENCODE_BINARY_BOOL_HEADER_MASK))
|
||||
|
@ -455,7 +456,7 @@ MSG_MimeRelatedSubpart::Write(void)
|
|||
WriteEncodedMessageBody,
|
||||
this));
|
||||
}
|
||||
#endif /*MOZ_ENDER_MAIL*/
|
||||
#endif /* !MOZ_ENDER_MIME || MOZ_MAIL_COMPOSE */
|
||||
}
|
||||
|
||||
// Horrible hack: if we got a local filename then we're the root lump,
|
||||
|
@ -561,6 +562,7 @@ extern "C" int mimer_output_func(const char *p_buffer,int32 p_size,void *closure
|
|||
void
|
||||
MSG_MimeRelatedStreamSaver::Complete( Bool bSuccess, EDT_ITapeFileSystemComplete *pfComplete, void *pArg )
|
||||
{
|
||||
int32 i;
|
||||
m_pEditorCompletionFunc = pfComplete;
|
||||
m_pEditorCompletionArg = pArg;
|
||||
|
||||
|
@ -575,7 +577,7 @@ MSG_MimeRelatedStreamSaver::Complete( Bool bSuccess, EDT_ITapeFileSystemComplete
|
|||
{
|
||||
t_file = XP_FileOpen(m_pFilename,xpTemporary,XP_FILE_WRITE);
|
||||
GenericMimeRelatedData *t_data = GenericMime_Init(mime_make_separator(""),mimer_output_func,t_file);
|
||||
for (int32 i=0;i< m_pPart->GetNumChildren();i++)
|
||||
for (i=0;i< m_pPart->GetNumChildren();i++)
|
||||
{
|
||||
MSG_MimeRelatedSubpart *t_part;
|
||||
t_part = (MSG_MimeRelatedSubpart *)m_pPart->GetChild(i);
|
||||
|
@ -628,7 +630,7 @@ MSG_MimeRelatedSaver
|
|||
*/
|
||||
|
||||
extern char * msg_generate_message_id(void);
|
||||
#ifdef MOZ_ENDER_MIME
|
||||
#if defined(MOZ_ENDER_MIME) && !defined(MOZ_MAIL_COMPOSE)
|
||||
char *
|
||||
msg_generate_message_id (void)
|
||||
{
|
||||
|
@ -663,7 +665,7 @@ msg_generate_message_id (void)
|
|||
return PR_smprintf("<%lX.%lX@%s>",
|
||||
(unsigned long) now, (unsigned long) salt, host);
|
||||
}
|
||||
#endif //MOZ_ENDER_MIME
|
||||
#endif //MOZ_ENDER_MIME && !MOZ_MAIL_COMPOSE
|
||||
// Constructor
|
||||
MSG_MimeRelatedSaver::MSG_MimeRelatedSaver(MSG_CompositionPane *pane,
|
||||
MWContext *context,
|
||||
|
@ -675,10 +677,10 @@ MSG_MimeRelatedSaver::MSG_MimeRelatedSaver(MSG_CompositionPane *pane,
|
|||
MSG_AttachedFile *attachedFiles,
|
||||
DeliveryDoneCallback cb,
|
||||
char **ppOriginalRootURL)
|
||||
: m_pContext(context), m_pBaseURL(NULL), m_pPane(pane),
|
||||
m_pFields(fields), m_digest(digest_p), m_deliverMode(deliver_mode),
|
||||
m_pBody(body), m_bodyLength(body_length),
|
||||
m_pAttachedFiles(attachedFiles), m_cbDeliveryDone(cb), m_pSourceBaseURL(NULL)
|
||||
: m_pContext(context), m_pBaseURL(NULL), m_pSourceBaseURL(NULL),
|
||||
m_pPane(pane), m_pFields(fields), m_digest(digest_p),
|
||||
m_deliverMode(deliver_mode), m_pBody(body), m_bodyLength(body_length),
|
||||
m_pAttachedFiles(attachedFiles), m_cbDeliveryDone(cb)
|
||||
|
||||
{
|
||||
// Generate the message ID.
|
||||
|
@ -960,9 +962,10 @@ MSG_MimeRelatedSaver::CopyURLInfo(intn iFileIndex, const URL_Struct *pURL)
|
|||
// FALSE if it failed.
|
||||
void
|
||||
MSG_MimeRelatedSaver::Complete(Bool bSuccess,
|
||||
EDT_ITapeFileSystemComplete *pfComplete, void *pArg )
|
||||
EDT_ITapeFileSystemComplete *pfComplete,
|
||||
void *pArg )
|
||||
{
|
||||
#ifndef MOZ_ENDER_MIME
|
||||
#if !defined(MOZ_ENDER_MIME) || defined(MOZ_MAIL_COMPOSE)
|
||||
m_pEditorCompletionFunc = pfComplete;
|
||||
m_pEditorCompletionArg = pArg;
|
||||
|
||||
|
@ -1001,7 +1004,7 @@ MSG_MimeRelatedSaver::Complete(Bool bSuccess,
|
|||
// Call our UrlExit routine to perform cleanup.
|
||||
UrlExit(m_pPane->GetContext(), this, MK_INTERRUPTED, NULL);
|
||||
}
|
||||
#endif //#ifndef MOZ_ENDER_MIME
|
||||
#endif /* !MOZ_ENDER_MIME || MOZ_MAIL_COMPOSE */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifdef MOZ_ENDER_MIME
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "mprmime.h"
|
||||
#include "mimeenc.h"
|
||||
|
@ -20,9 +40,9 @@
|
|||
/*
|
||||
prototypes
|
||||
*/
|
||||
XP_Bool output_text_file(GenericMimeRelatedData *p_genmime, int16 p_index);
|
||||
XP_Bool output_text_body(GenericMimeRelatedData *p_genmime, int16 p_index);
|
||||
XP_Bool output_base64_file(GenericMimeRelatedData *p_genmime, int16 p_index);
|
||||
static XP_Bool output_text_file(GenericMimeRelatedData *p_genmime, int16 p_index);
|
||||
static XP_Bool output_text_body(GenericMimeRelatedData *p_genmime, int16 p_index);
|
||||
static XP_Bool output_base64_file(GenericMimeRelatedData *p_genmime, int16 p_index);
|
||||
|
||||
|
||||
|
||||
|
@ -380,6 +400,5 @@ GenericMime_AddBase64File(GenericMimeRelatedData *p_gendata, AttachmentFields *p
|
|||
return p_gendata->m_iNumBase64Files;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* MOZ_ENDER_MIME */
|
||||
|
||||
|
|
|
@ -1,6 +1,26 @@
|
|||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _MPRMIME_H
|
||||
#define _MPRMIME_H
|
||||
|
||||
#ifdef MOZ_ENDER_MIME
|
||||
|
||||
XP_BEGIN_PROTOS
|
||||
|
||||
typedef struct _AttachmentFields
|
||||
|
@ -57,5 +77,7 @@ typedef
|
|||
typedef int (*MPR_MIME_OUTPUTFUNC) (const char *, int32, void *);
|
||||
XP_END_PROTOS
|
||||
|
||||
#endif /* MOZ_ENDER_MIME */
|
||||
|
||||
#endif //_MPRMIME_H
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ MSG_SendPart* MSG_SendPart::GetChild(int32 which)
|
|||
|
||||
int MSG_SendPart::PushBody(char* buffer, int32 length)
|
||||
{
|
||||
#ifndef MOZ_ENDER_MIME
|
||||
#if !defined(MOZ_ENDER_MIME) || defined(MOZ_MAIL_COMPOSE)
|
||||
int status = 0;
|
||||
char* encoded_data = buffer;
|
||||
|
||||
|
@ -346,7 +346,7 @@ int MSG_SendPart::PushBody(char* buffer, int32 length)
|
|||
return status;
|
||||
#else
|
||||
return 0;
|
||||
#endif //MOZ_ENDER_MIME
|
||||
#endif /* !MOZ_ENDER_MIME || MOZ_MAIL_COMPOSE */
|
||||
}
|
||||
|
||||
|
||||
|
@ -486,7 +486,7 @@ static int divide_content_headers(const char *headers,
|
|||
extern "C" {
|
||||
extern char *mime_make_separator(const char *prefix);
|
||||
}
|
||||
#ifdef MOZ_ENDER_MIME
|
||||
#if defined(MOZ_ENDER_MIME) && ! defined(MOZ_MAIL_COMPOSE)
|
||||
//moved this here
|
||||
extern "C" char *
|
||||
mime_make_separator(const char *prefix)
|
||||
|
@ -502,12 +502,12 @@ mime_make_separator(const char *prefix)
|
|||
rand_buf[4], rand_buf[5], rand_buf[6], rand_buf[7],
|
||||
rand_buf[8], rand_buf[9], rand_buf[10], rand_buf[11]);
|
||||
}
|
||||
#endif
|
||||
#endif //MOZ_ENDER_MIME && !MOZ_MAIL_COMPOSE
|
||||
|
||||
|
||||
int MSG_SendPart::Write()
|
||||
{
|
||||
#ifndef MOZ_ENDER_MIME
|
||||
#if !defined(MOZ_ENDER_MIME) || defined(MOZ_MAIL_COMPOSE)
|
||||
int status = 0;
|
||||
char *separator = 0;
|
||||
XP_File file = NULL;
|
||||
|
@ -804,5 +804,5 @@ FAIL:
|
|||
return status;
|
||||
#else
|
||||
return 0;
|
||||
#endif //MOZ_ENDER_MIME
|
||||
#endif //!MOZ_ENDER_MIME || MOZ_MAIL_COMPOSE
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@ typedef int (*MSG_SendPartWriteFunc)(const char* line, int32 size,
|
|||
XP_Bool isheader, void* closure);
|
||||
|
||||
|
||||
#ifndef MOZ_ENDER_MIME
|
||||
#if !defined(MOZ_ENDER_MIME) || defined(MOZ_MAIL_COMPOSE)
|
||||
class MSG_SendPart : public MSG_ZapIt {
|
||||
#else
|
||||
class MSG_SendPart {
|
||||
#endif //MOZ_ENDER_MIME
|
||||
#endif /* !MOZ_ENDER_MIME || MOZ_MAIL_COMPOSE */
|
||||
public:
|
||||
MSG_SendPart(MSG_SendMimeDeliveryState* state, int16 part_csid = 0);
|
||||
virtual ~MSG_SendPart(); // Note that the destructor also destroys
|
||||
|
|
Загрузка…
Ссылка в новой задаче