Remove dead code. Bug 63834 r=bryner sr=scc

This commit is contained in:
jgmyers%netscape.com 2000-12-29 15:40:49 +00:00
Родитель 0c563561c3
Коммит 6867dc5e6a
21 изменённых файлов: 5 добавлений и 499 удалений

Просмотреть файл

@ -29,7 +29,6 @@
#include "nscore.h"
#include "nsPostScriptObj.h"
#include "xp_mem.h"
#include "libi18n.h"
#include "isotab.c"
#include "nsFont.h"
#include "nsIImage.h"
@ -397,15 +396,7 @@ char* charset_name = NULL;
#ifdef NOTYET
XP_FilePrintf(f, "\n%% MozillaURL: %s\n", mPrintContext->prSetup->url->address);
#endif
// get charset name of non-latin1 fonts
// for external filters, supply information
if (mPrintContext->prSetup->otherFontName[0] || mPrintContext->prSetup->otherFontInfo[0]){
INTL_CharSetIDToName(mPrintContext->prSetup->otherFontCharSetID, charset_name);
XP_FilePrintf(f, "%% MozillaCharsetName: %s\n\n", charset_name);
}else{
// default: iso-8859-1
XP_FilePrintf(f, "%% MozillaCharsetName: iso-8859-1\n\n");
}
XP_FilePrintf(f, "%% MozillaCharsetName: iso-8859-1\n\n");
// now begin prolog
XP_FilePrintf(f, "%%%%BeginProlog\n");

Просмотреть файл

@ -9,9 +9,7 @@ edttypes.h
fe_proto.h
glhist.h
gui.h
intl_csi.h
libc_r.h
libi18n.h
lo_ele.h
merrors.h
mime.h

Просмотреть файл

@ -26,8 +26,6 @@ VPATH = @srcdir@
EXPORTS = \
csid.h \
intl_csi.h \
libi18n.h \
merrors.h \
msgtypes.h \
net.h \

Просмотреть файл

@ -1,258 +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):
*/
/* csid.h */
#ifndef _CSID_H_
#define _CSID_H_
/* Codeset type */
#define SINGLEBYTE 0x0000 /* 0000 0000 0000 0000 = 0 */
#define MULTIBYTE 0x0100 /* 0000 0001 0000 0000 = 256 */
#define STATEFUL 0x0200 /* 0000 0010 0000 0000 = 512 */
#define WIDECHAR 0x0300 /* 0000 0011 0000 0000 = 768 */
#define CODESET_MASK 0x0F00 /* 0000 1111 0000 0000 = 3840 */
/*
* Check for double byte encodings
* (should distinguish 2 byte from true multibyte)
*/
#define IS_16BIT_ENCODING(x) (((x)&CODESET_MASK) == MULTIBYTE)
/* line-break on spaces */
#define CS_SPACE 0x0400 /* 0000 0100 0000 0000 = 1024 */
/* Auto Detect Mode */
#define CS_AUTO 0x0800 /* 0000 1000 0000 0000 = 2048 */
/* Code Set IDs */
/* CS_DEFAULT: used if no charset param in header */
/* CS_UNKNOWN: used for unrecognized charset */
/* type id */
#define CS_DEFAULT (SINGLEBYTE | 0) /* 0 */
#define CS_ASCII (SINGLEBYTE | 1) /* 1 */
#define CS_LATIN1 (SINGLEBYTE | 2) /* 2 */
#define CS_JIS (STATEFUL | 3) /* 515 */
#define CS_SJIS (MULTIBYTE | 4) /* 260 */
#define CS_EUCJP (MULTIBYTE | 5) /* 261 */
#define CS_JIS_AUTO (CS_AUTO|STATEFUL | 3) /* 2563 */
#define CS_SJIS_AUTO (CS_AUTO|MULTIBYTE | 4) /* 2308 */
#define CS_EUCJP_AUTO (CS_AUTO|MULTIBYTE | 5) /* 2309 */
#define CS_MAC_ROMAN (SINGLEBYTE | 6) /* 6 */
#define CS_BIG5 (MULTIBYTE | 7) /* 263 */
#define CS_GB_8BIT (MULTIBYTE | 8) /* 264 */
#define CS_CNS_8BIT (MULTIBYTE | 9) /* 265 */
#define CS_LATIN2 (SINGLEBYTE | 10) /* 10 */
#define CS_MAC_CE (SINGLEBYTE | 11) /* 11 */
#define CS_KSC_8BIT (MULTIBYTE|CS_SPACE | 12) /* 1292 */
#define CS_KSC_8BIT_AUTO (CS_AUTO | MULTIBYTE|CS_SPACE | 12)
#define CS_2022_KR (STATEFUL | 13) /* 525 */
#define CS_8859_3 (SINGLEBYTE | 14) /* 14 */
#define CS_8859_4 (SINGLEBYTE | 15) /* 15 */
#define CS_8859_5 (SINGLEBYTE | 16) /* 16 ISO Cyrillic */
#define CS_8859_6 (SINGLEBYTE | 17) /* 17 ISO Arabic */
#define CS_8859_7 (SINGLEBYTE | 18) /* 18 ISO Greek */
#define CS_8859_8 (SINGLEBYTE | 19) /* 19 ISO Hebrew */
#define CS_8859_9 (SINGLEBYTE | 20) /* 20 */
#define CS_SYMBOL (SINGLEBYTE | 21) /* 21 */
#define CS_DINGBATS (SINGLEBYTE | 22) /* 22 */
#define CS_DECTECH (SINGLEBYTE | 23) /* 23 */
#define CS_CNS11643_1 (MULTIBYTE | 24) /* 280 */
#define CS_CNS11643_2 (MULTIBYTE | 25) /* 281 */
#define CS_JISX0208 (MULTIBYTE | 26) /* 282 */
#define CS_JISX0201 (SINGLEBYTE | 27) /* 27 */
#define CS_KSC5601 (MULTIBYTE | 28) /* 284 */
#define CS_TIS620 (SINGLEBYTE | 29) /* 29 */
#define CS_JISX0212 (MULTIBYTE | 30) /* 286 */
#define CS_GB2312 (MULTIBYTE | 31) /* 287 */
#define CS_UCS2 (WIDECHAR | 32) /* 810 */
#define CS_UCS4 (WIDECHAR | 33) /* 811 */
#define CS_UTF8 (MULTIBYTE | 34) /* 290 */
#define CS_UTF7 (STATEFUL | 35) /* 35 */
#define CS_NPC (MULTIBYTE | 36) /* 292 */
#define CS_X_BIG5 (MULTIBYTE | 37) /* 293 */
#define CS_USRDEF2 (SINGLEBYTE | 38) /* 38 */
#define CS_KOI8_R (SINGLEBYTE | 39) /* 39 */
#define CS_MAC_CYRILLIC (SINGLEBYTE | 40) /* 40 */
#define CS_CP_1251 (SINGLEBYTE | 41) /* 41 */
#define CS_MAC_GREEK (SINGLEBYTE | 42) /* 42 */
#define CS_CP_1253 (SINGLEBYTE | 43) /* 43 */
#define CS_CP_1250 (SINGLEBYTE | 44) /* 44 */
#define CS_CP_1254 (SINGLEBYTE | 45) /* 45 */
#define CS_MAC_TURKISH (SINGLEBYTE | 46) /* 46 */
#define CS_GB2312_11 (MULTIBYTE | 47) /* 303 */
#define CS_JISX0208_11 (MULTIBYTE | 48) /* 304 */
#define CS_KSC5601_11 (MULTIBYTE | 49) /* 305 */
#define CS_CNS11643_1110 (MULTIBYTE | 50) /* 306 */
#define CS_UCS2_SWAP (WIDECHAR | 51) /* 819 */
#define CS_IMAP4_UTF7 (STATEFUL | 52) /* 564 */
#define CS_CP_850 (SINGLEBYTE | 53) /* 53 PC Latin 1 */
#define CS_CP_852 (SINGLEBYTE | 54) /* 54 PC Latin 2 */
#define CS_CP_855 (SINGLEBYTE | 55) /* 55 PC Cyrillic */
#define CS_CP_857 (SINGLEBYTE | 56) /* 56 PC Turkish */
#define CS_CP_862 (SINGLEBYTE | 57) /* 57 PC Hebrew */
#define CS_CP_864 (SINGLEBYTE | 58) /* 58 PC Arabic */
#define CS_CP_866 (SINGLEBYTE | 59) /* 59 PC Russian */
#define CS_CP_874 (SINGLEBYTE | 60) /* 60 PC Thai */
#define CS_CP_1257 (SINGLEBYTE | 61) /* 61 Windows Baltic */
#define CS_CP_1258 (SINGLEBYTE | 62) /* 62 Windows Vietnamese */
#define CS_ARMSCII8 (SINGLEBYTE | 63) /* 63 Armenian ArmSCII-8 */
#define CS_HZ (STATEFUL | 64) /* 576 */
#define CS_ISO_2022_CN (STATEFUL | 65) /* 577 */
#define CS_GB13000 (MULTIBYTE | 66) /* 322 */
#define CS_BIG5_PLUS (MULTIBYTE | 67) /* 323 */
#define CS_UHC (MULTIBYTE|CS_SPACE | 68) /* 1348 cp949 */
#define CS_CNS11643_3 (MULTIBYTE | 69) /* 325 */
#define CS_CNS11643_4 (MULTIBYTE | 70) /* 326 */
#define CS_CNS11643_5 (MULTIBYTE | 71) /* 327 */
#define CS_CNS11643_6 (MULTIBYTE | 72) /* 328 */
#define CS_CNS11643_7 (MULTIBYTE | 73) /* 329 */
#define CS_CNS11643_8 (MULTIBYTE | 74) /* 330 */
#define CS_CNS11643_9 (MULTIBYTE | 75) /* 331 */
#define CS_CNS11643_10 (MULTIBYTE | 76) /* 332 */
#define CS_CNS11643_11 (MULTIBYTE | 77) /* 333 */
#define CS_CNS11643_12 (MULTIBYTE | 78) /* 334 */
#define CS_CNS11643_13 (MULTIBYTE | 79) /* 335 */
#define CS_CNS11643_14 (MULTIBYTE | 80) /* 336 */
#define CS_CNS11643_15 (MULTIBYTE | 81) /* 337 */
#define CS_CNS11643_16 (MULTIBYTE | 82) /* 338 */
#define CS_VIET_VISCII (SINGLEBYTE | 83) /* 83 Vietnamese VISCII */
#define CS_VIET_VIQR ( 84) /* 84 Vietnamese VIQR */
#define CS_KOI8_U (SINGLEBYTE | 85) /* 85 */
#define CS_ISO_IR_111 (SINGLEBYTE | 86) /* 86 */
#define CS_8859_6_I ( 87) /* 87 */
#define CS_8859_6_E ( 88) /* 88 */
#define CS_8859_8_I ( 89) /* 89 */
#define CS_8859_8_E ( 90) /* 90 */
#define CS_JOHAB (MULTIBYTE | 91) /* 91 cp1361 */
#define CS_JOHABFONT (MULTIBYTE | 92) /* 92 hangterm font*/
#define CS_VIET_VPS (SINGLEBYTE | 93) /* 93 Vietnamese VPS */
#define CS_VIET_TCVN (SINGLEBYTE | 94) /* 94 Vietnamese TCVN */
#define CS_VIET_VNI ( 95) /* 95 Vietnamese VNI */
#define CS_T61 (MULTIBYTE | 96) /* 96 T61 */
#define INTL_CHAR_SET_MAX 97 /* must be highest + 1 */
#define CS_USER_DEFINED_ENCODING (SINGLEBYTE | 254) /* 254 */
#define CS_UNKNOWN (SINGLEBYTE | 255) /* 255 */
#define IS_UTF8_CSID(x) (((x)&0xFF)== (CS_UTF8&0xFF))
#define IS_UNICODE_CSID(x) \
( (((x)&0xFF)== (CS_UCS2&0xFF)) \
|| (((x)&0xFF)== (CS_UTF8&0xFF)) \
|| (((x)&0xFF)== (CS_UTF7&0xFF)) )
/* The trigger is passing the parameter to
PA_FetchParamValue() to satisfy its signature */
#ifdef XP_MAC
#define CS_FE_ASCII CS_MAC_ROMAN
#else
#define CS_FE_ASCII CS_LATIN1
#endif
/* Codeset # sorted by number */
#if 0
0 CS_DEFAULT 0
1 CS_ASCII 1
2 CS_LATIN1 2
6 CS_MAC_ROMAN 6
10 CS_LATIN2 10
11 CS_MAC_CE 11
14 CS_8859_3 14
15 CS_8859_4 15
16 CS_8859_5 16
17 CS_8859_6 17
18 CS_8859_7 18
19 CS_8859_8 19
20 CS_8859_9 20
21 CS_SYMBOL 21
22 CS_DINGBATS 22
23 CS_DECTECH 23
27 CS_JISX0201 27
29 CS_TIS620 29
35 CS_UTF7 35
38 CS_USRDEF2 38
39 CS_KOI8_R 39
40 CS_MAC_CYRILLIC 40
41 CS_CP_1251 41
42 CS_MAC_GREEK 42
43 CS_CP_1253 43
44 CS_CP_1250 44
45 CS_CP_1254 45
46 CS_MAC_TURKISH 46
53 CS_CP_850 53
54 CS_CP_852 54
55 CS_CP_855 55
56 CS_CP_857 56
57 CS_CP_862 57
58 CS_CP_864 58
59 CS_CP_866 59
60 CS_CP_874 60
61 CS_CP_1257 61
62 CS_CP_1258 62
63 CS_ARMSCII8 63
64 INTL_CHAR_SET_MAX 64
254 CS_USER_DEFINED_ENCODING 254
255 CS_UNKNOWN 255
260 CS_SJIS 260
261 CS_EUCJP 261
263 CS_BIG5 263
264 CS_GB_8BIT 264
265 CS_CNS_8BIT 265
280 CS_CNS11643_1 280
281 CS_CNS11643_2 281
282 CS_JISX0208 282
284 CS_KSC5601 284
286 CS_JISX0212 286
287 CS_GB2312 287
290 CS_UTF8 290
292 CS_NPC 292
293 CS_X_BIG5 293
303 CS_GB2312_11 303
304 CS_JISX0208_11 304
305 CS_KSC5601_11 305
306 CS_CNS11643_1110 306
515 CS_JIS 515
525 CS_2022_KR 525
564 CS_IMAP4_UTF7 564
810 CS_UCS2 810
811 CS_UCS4 811
819 CS_UCS2_SWAP 819
1292 CS_KSC_8BIT 1292
2308 CS_SJIS_AUTO 2308
2309 CS_EUCJP_AUTO 2309
2563 CS_JIS_AUTO 2563
#endif
#endif /* _CSID_H_ */

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -50,8 +50,6 @@ DEPTH = ..
#INSTALL_DIR=$(XPDIST)\include
EXPORTS = \
csid.h \
intl_csi.h \
libi18n.h \
merrors.h \
minicom.h \
msgtypes.h \

Просмотреть файл

@ -36,7 +36,7 @@
#include "plstr.h"
#include "prmem.h"
#include "libi18n.h"
#include "csid.h"
#include "xp_str.h"
#include "xp_file.h"
#include "prprf.h"
@ -4375,26 +4375,6 @@ PRBool DIR_IsUriAttribute (DIR_Server *s, const char *attrib)
return PR_FALSE;
}
#if 0
static void dir_PushStringToPrefs (DIR_Server *server, char **curVal, const char *newVal, const char *name)
{
char buf[256];
/* Don't do anything if we already have a value and it's the same as the new one */
if ( !curVal
|| (*curVal && !PL_strcmp(*curVal, newVal)))
return;
if (server->prefName == nsnull)
server->prefName = DIR_CreateServerPrefName(server, nsnull);
PR_FREEIF(*curVal);
*curVal = PL_strdup(newVal);
DIR_SetStringPref (server->prefName, name, buf, *curVal, "");
}
#endif
void DIR_SetAuthDN (DIR_Server *s, const char *dn)
{
char *tmp = nsnull;
@ -4605,25 +4585,5 @@ char *DIR_ConvertFromServerCharSet(DIR_Server *server, char *src, PRInt16 dstCSI
char *DIR_ConvertString(PRInt16 srcCSID, PRInt16 dstCSID, const char *string)
{
if (srcCSID == CS_DEFAULT || dstCSID == CS_DEFAULT)
{
PRInt16 defaultCSID = CS_UTF8;
// PRInt16 defaultCSID = INTL_GetCharSetID(INTL_DefaultTextWidgetCsidSel);
if (srcCSID == CS_DEFAULT)
srcCSID = defaultCSID;
if (dstCSID == CS_DEFAULT)
dstCSID = defaultCSID;
}
if (srcCSID == dstCSID)
return PL_strdup(string);
else
{
// char *cvt = (char *)INTL_ConvertLineWithoutAutoDetect(srcCSID, dstCSID, (unsigned char *)string, PL_strlen(string));
char *cvt = nsnull;
if (!cvt || cvt == string) /* did we fail or was no conversion necessary (cvs == string */
cvt = PL_strdup(string);
return cvt;
}
return PL_strdup(string);
}

Просмотреть файл

@ -74,7 +74,6 @@ nsMsgSendPart::nsMsgSendPart(nsMsgComposeAndSend* state, const char *part_charse
m_firstBlock = PR_FALSE;
m_needIntlConversion = PR_FALSE;
m_intlDocToMailConverter = NULL;
m_mainpart = PR_FALSE;
m_just_hit_CR = PR_FALSE;
@ -631,7 +630,6 @@ nsMsgSendPart::Write()
m_firstBlock = PR_TRUE;
/* only convert if we need to tag charset */
m_needIntlConversion = mime_type_needs_charset(m_type);
m_intlDocToMailConverter = NULL;
if (m_buffer)
{

Просмотреть файл

@ -27,7 +27,6 @@
#include "prprf.h" /* should be defined into msgCore.h? */
#include "xp_core.h"
#include "xp_file.h"
#include "intl_csi.h"
#include "nsMsgZapIt.h"
#include "nsMsgSend.h"
@ -106,7 +105,6 @@ protected:
// Data used while actually writing.
PRBool m_firstBlock;
PRBool m_needIntlConversion;
CCCDataObject m_intlDocToMailConverter;
PRBool m_mainpart;

Просмотреть файл

@ -33,7 +33,6 @@
#include "nsMsgLocalFolderHdrs.h"
#include "nsMsgBaseCID.h"
#include "nsMsgDBCID.h"
#include "libi18n.h"
#include "nsIMailboxUrl.h"
#include "nsCRT.h"
#include "nsFileStream.h"
@ -952,61 +951,14 @@ int nsParseMailMessageState::ParseEnvelope (const char *line, PRUint32 line_size
}
#ifdef WE_CONDENSE_MIME_STRINGS
extern "C"
{
int16 INTL_DefaultMailToWinCharSetID(int16 csid);
char *INTL_EncodeMimePartIIStr_VarLen(char *subject, int16 wincsid, PRBool bUseMime,
int encodedWordLen);
}
static char *
msg_condense_mime2_string(char *sourceStr)
{
int16 string_csid = CS_DEFAULT;
int16 win_csid = CS_DEFAULT;
char *returnVal = nsCRT::strdup(sourceStr);
if (!returnVal)
return nsnull;
// If sourceStr has a MIME-2 encoded word in it, get the charset
// name/ID from the first encoded word. (No, we're not multilingual.)
char *p = PL_strstr(returnVal, "=?");
if (p)
{
p += 2;
char *q = PL_strchr(p, '?');
if (q) *q = '\0';
string_csid = INTL_CharSetNameToID(p);
win_csid = INTL_DocToWinCharSetID(string_csid);
if (q) *q = '?';
// Decode any MIME-2 encoded strings, to save the overhead.
char *cvt = (CS_UTF8 != win_csid) ? INTL_DecodeMimePartIIStr(returnVal, win_csid, PR_FALSE) : nsnull;
if (cvt)
{
if (cvt != returnVal)
{
PR_FREEIF(returnVal);
returnVal = cvt;
}
// MIME-2 decoding occurred, so re-encode into large encoded words
cvt = INTL_EncodeMimePartIIStr_VarLen(returnVal, win_csid, PR_TRUE,
MSG_MAXSUBJECTLENGTH - 2);
if (cvt && (cvt != returnVal))
{
XP_FREE(returnVal); // encoding happened, deallocate decoded text
returnVal = MIME_StripContinuations(cvt); // and remove CR+LF+spaces that occur
}
// else returnVal == cvt, in which case nothing needs to be done
}
else
// no MIME-2 decoding occurred, so strip CR+LF+spaces ourselves
MIME_StripContinuations(returnVal);
}
else if (returnVal)
MIME_StripContinuations(returnVal);
MIME_StripContinuations(returnVal);
return returnVal;
}

Просмотреть файл

@ -30,7 +30,6 @@
#include "prtypes.h"
#include "prmem.h"
#include "plstr.h"
#include "libi18n.h"
#include "nsVCardObj.h"
#include "nsVCard.h"
#include "mimecth.h"

Просмотреть файл

@ -30,8 +30,6 @@ MODULE = mime
LIBRARY_NAME = mime_s
REQUIRES = xpcom msgbase msgbaseutil pref js necko uconv msgcompose editor dom layout widget intl msgimap exthandler rdf rdfutil mailnews locale msgdb chardet mimeemitter caps
CSRCS = oldi18n.c
CPPSRCS = \
nsMimeObjectClassAccess.cpp \
nsMimeConverter.cpp \

Просмотреть файл

@ -52,10 +52,6 @@ static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CI
// BEGIN EXTERNAL DEPENDANCY
extern "C" char * MIME_StripContinuations(char *original);
/* These are needed by other libmime functions */
extern "C" PRInt16 INTL_DefaultWinCharSetID(char a) { return a; }
extern "C" char *INTL_CsidToCharsetNamePt(PRInt16 id) { return "ISO-8859-1"; }
extern "C" PRInt16 INTL_CharSetNameToID(char *charset) { return 0; }
////////////////////////////////////////////////////////////////////////////////
@ -314,37 +310,9 @@ static char * intlmime_encode_qp_buf(char *subject);
static PRBool intlmime_is_mime_part2_header(const char *header);
#if 0
static char * intl_decode_mime_part2_str(const char *, int , char* );
#endif
#if 0
/* We probably should change these into private instead of PUBLIC */
static char *DecodeBase64Buffer(char *subject);
static char *EncodeBase64Buffer(char *subject, size_t size);
#endif
////////////////////////////////////////////////////////////////////////////////
#if 0
/* 4.0: Made Encode & Decode public for use by libpref; added size param.
*/
static char *EncodeBase64Buffer(char *subject, size_t size)
{
/* This function should be obsolete */
/* We should not make this public in libi18n */
/* We should use the new Base64 Encoder wrote by jwz in libmime */
return intlmime_encode_base64_buf(subject, size);
}
static char *DecodeBase64Buffer(char *subject)
{
/* This function should be obsolete */
/* We should not make this public in libi18n */
/* We should use the new Base64 Decoder wrote by jwz in libmime */
return intlmime_decode_base64_buf(subject);
}
#endif
static char basis_64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@ -1456,25 +1424,6 @@ PRBool MimeCharsetConverterClass::NeedCharsetConversion(const nsString& from_cha
// BEGIN PUBLIC INTERFACE
extern "C" {
#define PUBLIC
PUBLIC char *INTL_DecodeMimePartIIStr(const char *header, PRInt16 wincsid, PRBool dontConvert)
{
// Obsolescent
return nsCRT::strdup(header);
}
PUBLIC char *INTL_EncodeMimePartIIStr(char *subject, PRInt16 wincsid, PRBool bUseMime)
{
// Obsolescent
return nsCRT::strdup(subject);
}
/* This is a routine used to re-encode subject lines for use in the summary file.
The reason why we specify a different length here is because we are not encoding
the string for use in a mail message, but rather want to stuff as much content
into the subject string as possible. */
PUBLIC char *INTL_EncodeMimePartIIStr_VarLen(char *subject, PRInt16 wincsid, PRBool bUseMime, int encodedWordSize)
{
// Obsolescent
return nsCRT::strdup(subject);
}
PRInt32 MIME_ConvertString(const char* from_charset, const char* to_charset,
const char* inCstring, char** outCstring)

Просмотреть файл

@ -157,13 +157,6 @@ PRInt32 MIME_ConvertCharset(const PRBool autoDetection, const char* from_charset
*/
char * NextChar_UTF8(char *str);
/*
* To be removed. Existing for the backword compatibility.
*/
char *INTL_DecodeMimePartIIStr(const char *header, PRInt16 wincsid, PRBool dontConvert);
char *INTL_EncodeMimePartIIStr(char *subject, PRInt16 wincsid, PRBool bUseMime);
char *INTL_EncodeMimePartIIStr_VarLen(char *subject, PRInt16 wincsid, PRBool bUseMime, int encodedWordSize);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */

Просмотреть файл

@ -109,7 +109,6 @@ OBJS= \
# EXTERNAL (OLD) DEPENDENCIES - SHOULD EVENTUALLY BE REMOVED
# WHEN NEW WORLD FUNCTIONS ARE FOUND
.\$(OBJDIR)\nsMimeTransition.obj \
.\$(OBJDIR)\oldi18n.obj \
$(NULL)

Просмотреть файл

@ -28,7 +28,6 @@
*/
#include "nsCOMPtr.h"
#include "modmimee.h"
#include "libi18n.h"
#include "mimeobj.h"
#include "modlmime.h"
#include "mimei.h"

Просмотреть файл

@ -23,7 +23,6 @@
#include "nsCOMPtr.h"
#include "msgCore.h"
#include "mimei.h"
#include "libi18n.h"
#include "modmime.h"
#include "prmem.h"
#include "plstr.h"
@ -901,7 +900,6 @@ mime_decode_filename(char *name)
{
char *s = name, *d = name;
char *cvt, *returnVal = NULL;
PRInt16 mail_csid = CS_DEFAULT, win_csid = CS_DEFAULT;
char charsetName[128];
charsetName[0] = 0;
@ -922,12 +920,6 @@ mime_decode_filename(char *name)
s = PL_strstr(returnVal, "=?");
if (s)
{
s += 2;
d = PL_strchr(s, '?');
if (d) *d = '\0';
mail_csid = INTL_CharSetNameToID(s);
if (d) *d = '?';
win_csid = INTL_DocToWinCharSetID(mail_csid);
cvt = MIME_DecodeMimePartIIStr(returnVal, charsetName, PR_TRUE);
@ -947,24 +939,6 @@ mime_decode_filename(char *name)
}
}
//TODO: naoki - We now have a charset name returned and no need for the hack.
// Check if charset is JIS then apply the conversion.
/* Seriously ugly hack. If the first three characters of the filename
are <ESC>$B, then we know the filename is in JIS and should be
converted to either SJIS or EUC-JP. */
if ((nsCRT::strlen(returnVal) > 3) &&
(returnVal[0] == 0x1B) && (returnVal[1] == '$') && (returnVal[2] == 'B'))
{
PRInt16 dest_csid = INTL_DocToWinCharSetID(CS_JIS);
cvt = (char *) INTL_ConvertLineWithoutAutoDetect(CS_JIS, dest_csid, (unsigned char *)returnVal, nsCRT::strlen(returnVal));
if (cvt && cvt != returnVal)
{
if (returnVal != name) PR_Free(returnVal);
returnVal = cvt;
}
}
return returnVal;
}

Просмотреть файл

@ -22,7 +22,7 @@
*/
#include "nsCOMPtr.h"
#include "modlmime.h"
#include "libi18n.h"
#include "xp_core.h"
#include "nsCRT.h"
#include "mimeobj.h"
#include "mimemsg.h"
@ -34,7 +34,6 @@
#include "mimebuf.h"
#include "mimemapl.h"
#include "prprf.h"
#include "intl_csi.h"
#include "mimei.h" /* for moved MimeDisplayData struct */
#include "mimebuf.h"
#include "prmem.h"
@ -1165,38 +1164,6 @@ mime_get_main_object(MimeObject* obj)
return NULL;
}
#if 0
int
MimeGetAttachmentCount(MWContext* context)
{
MimeObject* obj;
MimeContainer* cobj;
PRBool isMsgBody = PR_FALSE, isAlternativeOrRelated = PR_FALSE;
PR_ASSERT(context);
if (!context ||
!context->mime_data ||
!context->mime_data->last_parsed_object) {
return 0;
}
obj = mime_get_main_object(context->mime_data->last_parsed_object);
if (!mime_subclass_p(obj->clazz, (MimeObjectClass*) &mimeContainerClass))
return 0;
cobj = (MimeContainer*) obj;
isMsgBody = MimeObjectChildIsMessageBody(obj,
&isAlternativeOrRelated);
if (isAlternativeOrRelated)
return 0;
else if (isMsgBody)
return cobj->nchildren - 1;
else
return cobj->nchildren;
}
#endif
PRBool MimeObjectChildIsMessageBody(MimeObject *obj,
PRBool *isAlternativeOrRelated)
{
@ -1257,12 +1224,6 @@ PRBool MimeObjectChildIsMessageBody(MimeObject *obj,
return bRet;
}
#if 0
extern int MIME_HasAttachments(MWContext *context)
{
return (context->mime_data && context->mime_data->last_parsed_object->showAttachmentIcon);
}
#endif
//
// New Stream Converter Interface
//

Просмотреть файл

@ -26,7 +26,6 @@
* 04/20/2000 IBM Corp. OS/2 VisualAge build.
*/
#include "mimetext.h"
#include "libi18n.h"
#include "mimebuf.h"
#include "mimethtm.h"

Просмотреть файл