Bug 830112 - Remove prtypes.h from intl/ and some other cleanups. r=smontagu

This commit is contained in:
Masatoshi Kimura 2013-01-14 03:06:28 +09:00
parent d1870e8f24
commit 8395e84bbf
27 changed files with 17 additions and 218 deletions

View File

@ -9,7 +9,6 @@
#include "nsLWBrkCIID.h"
#include "nsJISx4501LineBreaker.h"
#include "nsSampleWordBreaker.h"
#include "nsLWBRKDll.h"
#include "nsSemanticUnitScanner.h"

View File

@ -1,15 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 nsCharDetDll_h__
#define nsCharDetDll_h__
#include "prtypes.h"
#include "nsIFactory.h"
#include "nsICharsetDetector.h"
#include "nsICharsetDetectionObserver.h"
#include "nsIStringCharsetDetector.h"
#endif /* nsCharDetDll_h__ */

View File

@ -9,7 +9,8 @@
#include "nsCOMPtr.h"
#include "nsISupports.h"
#include "nsICharsetDetector.h"
#include "nsCharDetDll.h"
#include "nsICharsetDetectionObserver.h"
#include "nsIStringCharsetDetector.h"
#include "nsCyrillicDetector.h"
//----------------------------------------------------------------------

View File

@ -5,8 +5,6 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "pratom.h"
#include "prtypes.h"
#include "nsISupports.h"
#include "nsILocale.h"
#include "nsLocale.h"

View File

@ -7,8 +7,6 @@
#include "nsJISx4501LineBreaker.h"
#include "pratom.h"
#include "nsLWBRKDll.h"
#include "jisx4501class.h"
#include "nsComplexBreaker.h"
#include "nsTArray.h"

View File

@ -1,11 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 nsLWBRKDll_h___
#define nsLWBRKDll_h___
#include "prtypes.h"
#endif /* nsLWBRKDll_h___ */

View File

@ -6,8 +6,6 @@
#include "nsSampleWordBreaker.h"
#include "pratom.h"
#include "nsLWBRKDll.h"
nsSampleWordBreaker::nsSampleWordBreaker()
{
}

View File

@ -40,7 +40,6 @@
// ucvlatin
#include "nsUCvLatinCID.h"
#include "nsUCvLatinDll.h"
#include "nsAsciiToUnicode.h"
#include "nsISO88592ToUnicode.h"
#include "nsISO88593ToUnicode.h"
@ -158,7 +157,6 @@
// ucvibm
#include "nsUCvIBMCID.h"
#include "nsUCvIBMDll.h"
#include "nsCP850ToUnicode.h"
#include "nsCP852ToUnicode.h"
#include "nsCP855ToUnicode.h"
@ -218,7 +216,6 @@
// ucvcn
#include "nsUCvCnCID.h"
#include "nsUCvCnDll.h"
#include "nsHZToUnicode.h"
#include "nsUnicodeToHZ.h"
#include "nsGBKToUnicode.h"

View File

@ -17,7 +17,6 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
nsGB2312ToUnicodeV2.cpp \
nsUnicodeToGB2312V2.cpp \
nsGBKToUnicode.cpp \
nsUnicodeToGBK.cpp \

View File

@ -1,85 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
// =======================================================================
// Original Author: Yueheng Xu
// email: yueheng.xu@intel.com
// phone: (503)264-2248
// Intel Corporation, Oregon, USA
// Last Update: September 7, 1999
// Revision History:
// 09/07/1999 - initial version. Based on exisiting nsGB2312ToUnicode.cpp. Removed
// dependecy on those shift/map tables. Now we only depend on gbku.h.
// 09/28/1999 - changed to use the same table and code as GBKToUnicode converter
// ======================================================================================
#if 0
#include "nsGB2312ToUnicodeV2.h"
#include "nsUCvCnDll.h"
#include "gbku.h"
//----------------------------------------------------------------------
// Class nsGB2312ToUnicodeV2 [implementation]
//----------------------------------------------------------------------
// Subclassing of nsTablesDecoderSupport class [implementation]
NS_IMETHODIMP nsGB2312ToUnicodeV2::GetMaxLength(const char * aSrc,
int32_t aSrcLength,
int32_t * aDestLength)
{
*aDestLength = aSrcLength;
return NS_OK;
}
NS_IMETHODIMP nsGB2312ToUnicodeV2::ConvertNoBuff(const char* aSrc,
int32_t * aSrcLength,
PRUnichar *aDest,
int32_t * aDestLength)
{
int32_t i=0;
int32_t iSrcLength = (*aSrcLength);
int32_t iDestlen = 0;
nsresult rv = NS_OK;
for (i=0;i<iSrcLength;i++)
{
if ( iDestlen >= (*aDestLength) )
{
rv = NS_OK_UDEC_MOREOUTPUT;
break;
}
if(UINT8_IN_RANGE(0xa1, *aSrc, 0xfe))
{
if(i+1 >= iSrcLength)
{
rv = NS_OK_UDEC_MOREINPUT;
break;
}
// To make sure, the second byte has to be checked as well
// The valid 2nd byte range: [0xA1,0xFE]
if(UINT8_IN_RANGE(0xa1, aSrc[1], 0xfe))
{
// Valid GB 2312 code point
*aDest = mUtil.GBKCharToUnicode(aSrc[0], aSrc[1]);
aSrc += 2;
i++;
} else {
// Invalid GB 2312 code point
*aDest = UCS2_NO_MAPPING;
aSrc++;
}
} else {
if(IS_ASCII(*aSrc))
{
// The source is an ASCII
*aDest = CAST_CHAR_TO_UNICHAR(*aSrc);
} else {
*aDest = UCS2_NO_MAPPING;
}
aSrc++;
}
iDestlen++;
aDest++;
*aSrcLength = i+1;
}
*aDestLength = iDestlen;
return rv;
}
#endif

View File

@ -2,9 +2,8 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 nsGBKConvUtil_h__
#define nsGBKConvUtil_h__
#include "prtypes.h"
#ifndef nsGBKConvUtil_h_
#define nsGBKConvUtil_h_
#include "nscore.h"
class nsGBKConvUtil {
public:
@ -14,4 +13,4 @@ public:
bool UnicodeToGBKChar(PRUnichar aChar, bool aToGL,
char* aOutByte1, char* aOutByte2);
};
#endif /* nsGBKConvUtil_h__ */
#endif /* nsGBKConvUtil_h_ */

View File

@ -11,7 +11,6 @@
*/
#include "nsGBKToUnicode.h"
#include "nsUCvCnDll.h"
#include "gbku.h"

View File

@ -31,7 +31,6 @@
#include "nsUCvCnDll.h"
#include "nsHZToUnicode.h"
#include "gbku.h"

View File

@ -1,11 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 nsUCvCnDll_h___
#define nsUCvCnDll_h___
#include "prtypes.h"
#endif /* nsUCvCnDll_h___ */

View File

@ -4,7 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsUnicodeToGB2312V2.h"
#include "nsUCvCnDll.h"
#include "gbku.h"
//----------------------------------------------------------------------

View File

@ -14,7 +14,6 @@
*/
#include "nsUnicodeToGBK.h"
#include "nsUCvCnDll.h"
#include "gbku.h"
#include "uconvutil.h"
#include "nsUnicharUtils.h"

View File

@ -14,7 +14,6 @@
* Used table UnicodeToGBK[] to speed up the mapping.
*/
#include "nsUnicodeToHZ.h"
#include "nsUCvCnDll.h"
#include "gbku.h"
//----------------------------------------------------------------------
// Class nsUnicodeToGBK [implementation]

View File

@ -1,25 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/.
*
* This Original Code has been modified by IBM Corporation.
* Modifications made by IBM described herein are
* Copyright (c) International Business Machines
* Corporation, 1999
*
* Modifications to Mozilla code or documentation
* identified per MPL Section 3.3
*
* Date Modified by Description of modification
* 12/09/1999 IBM Corp. Support for IBM codepages - 850,852,855,857,862,864
*
*/
#ifndef nsUCvIBMDll_h___
#define nsUCvIBMDll_h___
#include "prtypes.h"
#endif /* nsUCvIBMDll_h___ */

View File

@ -3,10 +3,8 @@
* 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 nsUCVJADll_h___
#define nsUCVJADll_h___
#include "prtypes.h"
#ifndef nsUCVJADll_h_
#define nsUCVJADll_h_
extern const uint16_t g_ut0201Mapping[];
extern const uint16_t g_ut0208Mapping[];
@ -17,4 +15,4 @@ extern const uint16_t g_uf0201GLMapping[];
extern const uint16_t g_uf0208Mapping[];
extern const uint16_t g_uf0208extMapping[];
#endif /* nsUCVJADll_h___ */
#endif /* nsUCVJADll_h_ */

View File

@ -3,10 +3,8 @@
* 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 nsUCvKODll_h___
#define nsUCvKODll_h___
#include "prtypes.h"
#ifndef nsUCvKODll_h_
#define nsUCvKODll_h_
extern const uint16_t g_utKSC5601Mapping[];
extern const uint16_t g_ufKSC5601Mapping[];
@ -14,4 +12,4 @@ extern const uint16_t g_ASCIIMappingTable[];
extern const uint16_t g_HangulNullMapping[];
extern const uint16_t g_ufJohabJamoMapping[];
#endif /* nsUCvKODll_h___ */
#endif /* nsUCvKODll_h_ */

View File

@ -1,14 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 nsUCvLatinDll_h___
#define nsUCvLatinDll_h___
#include "prtypes.h"
#define g_InstanceCount ucvlatin_g_InstanceCount
#define g_LockCount ucvlatin_g_LockCount
#endif /* nsUCvLatinDll_h___ */

View File

@ -5,10 +5,8 @@
#include "nsUCConstructors.h"
#include "nsUTF16ToUnicode.h"
#include "nsUCvLatinDll.h"
#include "nsCharTraits.h"
#include <string.h>
#include "prtypes.h"
enum {
STATE_NORMAL = 0,

View File

@ -3,10 +3,8 @@
* 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 nsUCvTWDll_h___
#define nsUCvTWDll_h___
#include "prtypes.h"
#ifndef nsUCvTWDll_h_
#define nsUCvTWDll_h_
extern const uint16_t g_ufBig5Mapping[];
extern const uint16_t g_utBIG5Mapping[];
@ -14,4 +12,4 @@ extern const uint16_t g_ASCIIMappingTable[];
extern const uint16_t g_ufBig5HKSCSMapping[];
extern const uint16_t g_utBig5HKSCSMapping[];
#endif /* nsUCvTWDll_h___ */
#endif /* nsUCvTWDll_h_ */

View File

@ -3,10 +3,8 @@
* 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 nsUCvTW2Dll_h___
#define nsUCvTW2Dll_h___
#include "prtypes.h"
#ifndef nsUCvTW2Dll_h_
#define nsUCvTW2Dll_h_
extern const uint16_t g_ASCIIMappingTable[] ;
extern const uint16_t g_ufCNS1MappingTable[];
@ -24,4 +22,4 @@ extern const uint16_t g_utCNS5MappingTable[];
extern const uint16_t g_utCNS6MappingTable[];
extern const uint16_t g_utCNS7MappingTable[];
#endif /* nsUCvTW2Dll_h___ */
#endif /* nsUCvTW2Dll_h_ */

View File

@ -4,8 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nscore.h"
#include "pratom.h"
#include "nsUUDll.h"
#include "nsISupports.h"
#include "nsCategoryImp.h"
#include "nsUnicodeProperties.h"

View File

@ -1,11 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 nsUUDll_h__
#define nsUUDll_h__
#include "prtypes.h"
#endif /* nsUUDll_h__ */

View File

@ -6,7 +6,6 @@
#ifndef NS_UNICODEPROPERTIES_H
#define NS_UNICODEPROPERTIES_H
#include "prtypes.h"
#include "nsBidiUtils.h"
#include "nsIUGenCategory.h"
#include "nsUnicodeScriptCodes.h"