Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756

This commit is contained in:
dougt%netscape.com 2002-05-15 18:55:21 +00:00
Родитель 32e3832782
Коммит e96df2ad1b
224 изменённых файлов: 542 добавлений и 2088 удалений

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

@ -52,6 +52,7 @@
#include "nsIJSContextStack.h"
#include "nsIObserver.h"
#include "pldhash.h"
#include "plstr.h"
class nsIDocShell;
class nsString;

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

@ -27,6 +27,7 @@
#include "nsReadableUtils.h"
#include "plstr.h"
#include "nsIPref.h"
#include "nsCRT.h"
//////////////////////////

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

@ -42,6 +42,7 @@
#include "prmem.h"
#include "nsCOMPtr.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
static NS_DEFINE_IID(kICertificatePrincipalIID, NS_ICERTIFICATEPRINCIPAL_IID);

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

@ -48,6 +48,7 @@
#include "nsIPref.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
NS_IMPL_QUERY_INTERFACE3_CI(nsCodebasePrincipal,
nsICodebasePrincipal,

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

@ -51,6 +51,7 @@
#include "nsCertificatePrincipal.h"
#include "nsAggregatePrincipal.h"
#include "nsXPIDLString.h"
#include "nsCRT.h"
#include "nsIJSContextStack.h"
#include "nsDOMError.h"
#include "nsDOMCID.h"

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

@ -46,6 +46,7 @@
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
NS_IMPL_QUERY_INTERFACE2_CI(nsSystemPrincipal, nsIPrincipal, nsISerializable)

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

@ -54,6 +54,7 @@
#include "nsNetUtil.h"
#include "nsEscape.h"
#include "nsITextToSubURI.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kParserServiceCID, NS_PARSERSERVICE_CID);

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

@ -44,6 +44,7 @@
#include "nsIAtom.h"
#include "nsINameSpaceManager.h"
#include "domstubs.h" // for SetDOMStringToNull();
#include "nsCRT.h"
nsNodeInfo::nsNodeInfo()

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

@ -40,6 +40,7 @@
#include "nsIParser.h" // for kQuote et. al.
#include "jsapi.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
PRBool
nsParserUtils::GetQuotedAttributeValue(const nsAString& aSource,

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

@ -65,6 +65,7 @@
#include "nsIScriptGlobalObject.h"
#include "nsIScriptContext.h"
#include "nsIHTMLDocument.h"
#include "nsCRT.h"
#include "nsIJSContextStack.h"
// XXX Temporary inclusion to deal with fragment parsing

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

@ -37,6 +37,7 @@
#include "nsNetUtil.h"
#include "nsUnicharUtils.h"
#include "nsVoidArray.h"
#include "nsCRT.h"
nsStyleLinkElement::nsStyleLinkElement() :
mDontLoadStyle(PR_FALSE),

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

@ -52,6 +52,7 @@
#include "nsString.h"
#include "prprf.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
typedef struct {
nsString mPrefix;

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

@ -56,6 +56,7 @@
#include "prprf.h"
#include "nsNetUtil.h"
#include "nsICSSLoader.h"
#include "nsCRT.h"
#include "nsRDFCID.h"
#include "nsIRDFResource.h"

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

@ -1,113 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Alec Flett <alecf@netscape.com>
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIServiceManager.h"
#include "nsICategoryManager.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsContentHTTPStartup.h"
#include "nsIHttpProtocolHandler.h"
#include "gbdate.h"
#define PRODUCT_NAME "Gecko"
NS_IMPL_ISUPPORTS1(nsContentHTTPStartup,nsIObserver)
nsresult
nsContentHTTPStartup::Observe( nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
{
if (nsCRT::strcmp(aTopic, NS_HTTP_STARTUP_TOPIC) != 0)
return NS_OK;
nsresult rv = nsnull;
nsCOMPtr<nsIHttpProtocolHandler> http(do_QueryInterface(aSubject));
if (NS_FAILED(rv)) return rv;
rv = http->SetProduct(NS_LITERAL_CSTRING(PRODUCT_NAME));
if (NS_FAILED(rv)) return rv;
rv = http->SetProductSub(NS_LITERAL_CSTRING(PRODUCT_VERSION));
if (NS_FAILED(rv)) return rv;
return NS_OK;
}
nsresult
nsContentHTTPStartup::RegisterHTTPStartup(nsIComponentManager* aCompMgr,
nsIFile* aPath,
const char* aRegistryLocation,
const char* aComponentType,
const nsModuleComponentInfo* aInfo)
{
nsresult rv;
nsCOMPtr<nsICategoryManager>
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
nsXPIDLCString previousEntry;
rv = catMan->AddCategoryEntry(NS_HTTP_STARTUP_CATEGORY,
"Content UserAgent Setter",
NS_CONTENTHTTPSTARTUP_CONTRACTID,
PR_TRUE, PR_TRUE,
getter_Copies(previousEntry));
return rv;
}
nsresult
nsContentHTTPStartup::UnregisterHTTPStartup(nsIComponentManager* aCompMgr,
nsIFile* aPath,
const char* aRegistryLocation,
const nsModuleComponentInfo* aInfo)
{
nsresult rv;
nsCOMPtr<nsICategoryManager>
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
return NS_OK;
}

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

@ -57,6 +57,7 @@
#include "nsIEventStateManager.h"
#include "nsIDOMEvent.h"
#include "nsNetUtil.h"
#include "nsCRT.h"
// For GetText().
#include "nsIContentIterator.h"

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

@ -40,6 +40,7 @@
#include "nsColor.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsCoord.h"
#include "nsCSSProps.h"
#include "nsUnitConversion.h"

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

@ -43,6 +43,7 @@
#include "prprf.h"
#include "nsContentUtils.h"
#include "nsXPIDLString.h"
#include "nsCRT.h"
nsROCSSPrimitiveValue::nsROCSSPrimitiveValue(nsISupports *aOwner, float aT2P)
: mType(CSS_PX), mOwner(aOwner), mT2P(aT2P)

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

@ -73,6 +73,7 @@
#include "nsIXPConnect.h"
#include "nsIScriptGlobalObjectOwner.h"
#include "nsIScriptContext.h"
#include "nsCRT.h"
// Event listeners
#include "nsIEventListenerManager.h"

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

@ -77,6 +77,7 @@
#include "nsXULAtoms.h"
#include "nsXBLAtoms.h"
#include "nsXBLProtoImpl.h"
#include "nsCRT.h"
#include "nsIScriptContext.h"

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

@ -78,6 +78,7 @@
#include "nsDOMCID.h"
#include "nsUnicharUtils.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID);

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

@ -76,6 +76,7 @@
#include "nsIXBLDocumentInfo.h"
#include "nsXBLAtoms.h"
#include "nsXULAtoms.h"
#include "nsCRT.h"
#include "nsIXBLPrototypeHandler.h"

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

@ -53,6 +53,7 @@
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsFIXptr.h"
#include "nsCRT.h"
#include "nsContentCID.h"
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);

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

@ -99,6 +99,7 @@
#include "nsIEventListenerManager.h"
#include "nsContentUtils.h"
#include "nsIElementFactory.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kHTMLStyleSheetCID,NS_HTMLSTYLESHEET_CID);

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

@ -69,6 +69,7 @@
#include "nsReadableUtils.h"
#include "nsContentUtils.h"
#include "nsXULAtoms.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kCSSParserCID, NS_CSSPARSER_CID);

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

@ -67,6 +67,7 @@
#include "nsGUIEvent.h"
#include "nsContentUtils.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
#ifdef PR_LOGGING
static PRLogModuleInfo* gLog;

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

@ -95,6 +95,7 @@
#include "prlog.h"
#include "prmem.h"
#include "jsapi.h" // for JSVERSION_*, JS_VersionToString, etc.
#include "nsCRT.h"
#include "nsIFastLoadService.h" // XXXbe temporary
#include "nsIObjectInputStream.h" // XXXbe temporary

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

@ -36,6 +36,7 @@
#include "nsLDAPURL.h"
#include "nsReadableUtils.h"
#include "netCore.h"
#include "plstr.h"
// The two schemes we support, LDAP and LDAPS
//

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

@ -29,6 +29,7 @@
#include "nsIClipboardCommands.h"
#include "nsDocShell.h"
#include "nsICommandManager.h"
#include "nsCRT.h"
class nsIEventQueue;
class nsIController;

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

@ -64,6 +64,7 @@
#include "nsDOMClassInfo.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#include "nsCRT.h"
static nsresult EscapeNonAsciiInURI(const nsAString& aHref, nsACString& aEscapedHref)

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

@ -51,6 +51,7 @@
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsDOMClassInfo.h"
#include "nsCRT.h"
#define NS_INTERFACE_PREFIX "nsI"
#define NS_DOM_INTERFACE_PREFIX "nsIDOM"

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

@ -47,6 +47,8 @@
#include "nsIObserverService.h"
#include "nsIJSContextStack.h"
#include "nsIExceptionService.h"
#include "nsCRT.h"
#include "nsScriptNameSpaceManager.h"
#include "nsDOMException.h"

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

@ -51,6 +51,7 @@
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsDOMClassInfo.h"
#include "nsCRT.h"
#define NS_INTERFACE_PREFIX "nsI"
#define NS_DOM_INTERFACE_PREFIX "nsIDOM"

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

@ -57,6 +57,7 @@
#include "nsReadableUtils.h"
#include "nsICommandParams.h"
#include "nsComponentManagerUtils.h"
#include "nsCRT.h"
//prototype
nsresult GetListState(nsIEditor *aEditor, PRBool *aMixed, PRUnichar **tagStr);
nsresult PasteAsQuotation(nsIEditor *aEditor, PRInt32 aSelectionType);

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

@ -67,6 +67,7 @@
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
#include "nsIDocumentViewer.h"
#include "nsIPresShell.h"

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

@ -47,6 +47,7 @@
#include "nsIParser.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
void
ChangeCSSInlineStyleTxn::AppendDeclaration(nsAString & aOutputString,

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

@ -37,6 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsReadableUtils.h"
#include "nsCRT.h"
#include "DeleteElementTxn.h"
#ifdef NS_DEBUG

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

@ -48,6 +48,7 @@
#include "nsIDOMRange.h"
#include "nsHTMLEditorLog.h"
#include "nsCOMPtr.h"
#include "nsCRT.h"
#include "nsEditorTxnLog.h"

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

@ -55,6 +55,7 @@
#include "nsLayoutCID.h"
#include "nsIDOMCharacterData.h"
#include "nsEditorUtils.h"
#include "nsCRT.h"
const PRUnichar nbsp = 160;

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

@ -41,6 +41,7 @@
#include "nsWrapUtils.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
/** Mail citations using the AOL style >> This is a citation <<
*/

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

@ -41,6 +41,7 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsInternetCiter.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"

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

@ -40,6 +40,7 @@
#include "nsEditor.h"
#include "nsTextEditUtils.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"

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

@ -1,806 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsFindAndReplace.h"
#include "nsString.h"
#include "nsUnicharUtils.h"
NS_IMPL_ISUPPORTS1(nsFindAndReplace, nsIFindAndReplace)
nsFindAndReplace::nsFindAndReplace()
: mFindBackwards(PR_FALSE)
, mCaseSensitive(PR_FALSE)
, mWrapFind(PR_FALSE)
, mEntireWord(PR_FALSE)
, mStartBlockIndex(0)
, mStartSelOffset(0)
, mCurrentBlockIndex(0)
, mCurrentSelOffset(0)
, mWrappedOnce(PR_FALSE)
{
NS_INIT_ISUPPORTS();
}
nsFindAndReplace::~nsFindAndReplace()
{
/* destructor code */
}
/* [noscript] attribute nsITextServicesDocument tsDoc; */
NS_IMETHODIMP
nsFindAndReplace::GetTsDoc(nsITextServicesDocument * *aTsDoc)
{
if (!aTsDoc)
return NS_ERROR_NULL_POINTER;
*aTsDoc = mTsDoc;
NS_IF_ADDREF((*aTsDoc));
return NS_OK;
}
NS_IMETHODIMP
nsFindAndReplace::SetTsDoc(nsITextServicesDocument * aTsDoc)
{
mTsDoc = aTsDoc;
return NS_OK;
}
/* attribute boolean findBackwards; */
NS_IMETHODIMP
nsFindAndReplace::GetFindBackwards(PRBool *aFindBackwards)
{
if (!aFindBackwards)
return NS_ERROR_NULL_POINTER;
*aFindBackwards = mFindBackwards;
return NS_OK;
}
NS_IMETHODIMP
nsFindAndReplace::SetFindBackwards(PRBool aFindBackwards)
{
mFindBackwards = aFindBackwards;
return NS_OK;
}
/* attribute boolean caseSensitive; */
NS_IMETHODIMP
nsFindAndReplace::GetCaseSensitive(PRBool *aCaseSensitive)
{
if (!aCaseSensitive)
return NS_ERROR_NULL_POINTER;
*aCaseSensitive = mCaseSensitive;
return NS_OK;
}
NS_IMETHODIMP
nsFindAndReplace::SetCaseSensitive(PRBool aCaseSensitive)
{
mCaseSensitive = aCaseSensitive;
return NS_OK;
}
/* attribute boolean wrapFind; */
NS_IMETHODIMP
nsFindAndReplace::GetWrapFind(PRBool *aWrapFind)
{
if (!aWrapFind)
return NS_ERROR_NULL_POINTER;
*aWrapFind = mWrapFind;
return NS_OK;
}
NS_IMETHODIMP
nsFindAndReplace::SetWrapFind(PRBool aWrapFind)
{
mWrapFind = aWrapFind;
return NS_OK;
}
/* attribute boolean entireWord; */
NS_IMETHODIMP
nsFindAndReplace::GetEntireWord(PRBool *aEntireWord)
{
if (!aEntireWord)
return NS_ERROR_NULL_POINTER;
*aEntireWord = mEntireWord;
return NS_OK;
}
NS_IMETHODIMP
nsFindAndReplace::SetEntireWord(PRBool aEntireWord)
{
mEntireWord = aEntireWord;
return NS_OK;
}
/* readonly attribute boolean replaceEnabled; */
NS_IMETHODIMP
nsFindAndReplace::GetReplaceEnabled(PRBool *aReplaceEnabled)
{
if (!aReplaceEnabled)
return NS_ERROR_NULL_POINTER;
*aReplaceEnabled = PR_FALSE;
nsresult result = NS_OK;
if (mTsDoc)
result = mTsDoc->CanEdit(aReplaceEnabled);
return result;
}
/* boolean Find (in wstring aFindText); */
NS_IMETHODIMP nsFindAndReplace::Find(const PRUnichar *aFindText, PRBool *aDidFind)
{
if (!aFindText || !aDidFind)
return NS_ERROR_NULL_POINTER;
if (!mTsDoc)
return NS_ERROR_NOT_INITIALIZED;
nsAutoString findStr(aFindText);
if (!mCaseSensitive)
ToLowerCase(findStr);
nsresult result = SetupDocForFind(mTsDoc, &mStartSelOffset);
if (NS_FAILED(result))
return result;
// find out where we started
if (mWrapFind)
{
result = GetCurrentBlockIndex(mTsDoc, &mStartBlockIndex);
if (NS_FAILED(result))
return result;
// and set the starting position again (hopefully, in future we won't have to do this)
result = SetupDocForFind(mTsDoc, &mStartSelOffset);
if (NS_FAILED(result))
return result;
}
mCurrentBlockIndex = mStartBlockIndex;
mCurrentSelOffset = mStartSelOffset;
mWrappedOnce = PR_FALSE;
return DoFind(mTsDoc, findStr, aDidFind);
}
/* boolean Replace (in wstring aFindText, in wstring aReplaceText, in boolean aAllOccurrences); */
NS_IMETHODIMP
nsFindAndReplace::Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceText, PRBool aAllOccurrences, PRBool *aDidFind)
{
if (!aFindText || !aReplaceText || !aDidFind)
return NS_ERROR_NULL_POINTER;
*aDidFind = PR_FALSE;
if (!mTsDoc)
return NS_ERROR_NOT_INITIALIZED;
PRBool enabled;
GetReplaceEnabled(&enabled);
if (!enabled)
return NS_OK;
nsAutoString findStr(aFindText);
PRUint32 findStrLength = findStr.Length();
if (!mCaseSensitive)
ToLowerCase(findStr);
nsresult result = SetupDocForReplace(mTsDoc, findStr, &mStartSelOffset);
if (NS_FAILED(result))
return result;
// find out where we started
if (mWrapFind)
{
result = GetCurrentBlockIndex(mTsDoc, &mStartBlockIndex);
if (NS_FAILED(result))
return result;
// and set the starting position again (hopefully, in future we won't have to do this)
result = SetupDocForReplace(mTsDoc, findStr, &mStartSelOffset);
if (NS_FAILED(result))
return result;
}
mCurrentBlockIndex = mStartBlockIndex;
mCurrentSelOffset = mStartSelOffset;
mWrappedOnce = PR_FALSE;
nsAutoString replaceStr(aReplaceText);
PRUint32 replaceStrLength = replaceStr.Length();
PRBool didReplace = PR_FALSE;
// Keep looping until DoFind() fails to find another instance
// of the find string or has looped through the entire document.
do
{
result = DoFind(mTsDoc, findStr, aDidFind);
if (NS_FAILED(result))
break;
if (!*aDidFind || (didReplace && !aAllOccurrences))
break;
if (mWrapFind)
{
// If we are wrapping, and we replace any part of
// the starting block before mStartSelOffset, we
// need to make sure that we adjust mStartSelOffset
// so that after we've wrapped and get to the starting
// block again, we know where to stop.
if (mCurrentBlockIndex == mStartBlockIndex &&
mCurrentSelOffset < mStartSelOffset)
{
mStartSelOffset += replaceStrLength - findStrLength;
if (mStartSelOffset < 0)
mStartSelOffset = 0;
}
}
if (replaceStrLength == 0)
result = mTsDoc->DeleteSelection();
else
{
result = mTsDoc->InsertText(&replaceStr);
// DoFind() sets mCurrentSelOffset to the beginning
// of the selection. If we are searching in the forward
// direction, set the offset after the string we just
// inserted so that we don't search through it when we
// call DoFind() again.
if (!mFindBackwards)
mCurrentSelOffset += replaceStrLength;
}
if (NS_FAILED(result))
break;
didReplace = PR_TRUE;
}
while (*aDidFind);
return result;
}
// ----------------------------------------------------------------
// CharsMatch
//
// Compare chars. Match if both are whitespace, or both are
// non whitespace and same char.
// ----------------------------------------------------------------
#define NBSP_CHARCODE ((PRUnichar)160)
#define IS_SPACE_CHAR(c) (nsCRT::IsAsciiSpace(c) || (c) == NBSP_CHARCODE)
inline static PRBool
CharsMatch(PRUnichar c1, PRUnichar c2)
{
return (c1 == c2) || (IS_SPACE_CHAR(c1) && IS_SPACE_CHAR(c2));
}
// ----------------------------------------------------------------
// FindInString
//
// Routine to search in an nsString which is smart about extra
// whitespace, can search backwards, and do case insensitive search.
//
// This uses a brute-force algorithm, which should be sufficient
// for our purposes (text searching)
//
// aSearchStr contains the text from a content node, which can contain
// extra white space between words, which we have to deal with.
// The offsets passed in and back are offsets into aSearchStr,
// and thus include extra white space.
//
// If we are ignoring case, the strings have already been lowercased
// at this point.
//
// aStartOffset is the offset in the search string to start searching
// at. If -1, it means search from the start (forwards) or end (backwards).
//
// aSkipTrailingSpaces adjusts the matching algorithm when dealing with
// adjacent white space. If true the algorithm matches the exact number
// of spaces in each consecutive run of spaces in the aPatternStr, and if
// the number of consecutive spaces for a given run in aSearchStr is longer,
// the trailing extra spaces are ignored/skipped, but included in the length
// of the string matched. If false, the matching algorithm will only match
// the number of spaces in each run contained in aPatternStr.
//
// aFoundStrLen will contain the length of the string matching aPatternStr.
// It should be noted that aFoundStrLen can be greater than the length of
// aPatternStr since the matched string could contain extra whitespace.
//
// Returns -1 if the string is not found, or if the pattern is an
// empty string, or if aStartOffset is off the end of the string.
// ----------------------------------------------------------------
static PRInt32 FindInString(const nsString &aSearchStr, const nsString &aPatternStr,
PRInt32 aStartOffset, PRBool aSearchBackwards,
PRBool aSkipTrailingSpaces, PRInt32 *aFoundStrLen)
{
PRInt32 patternLen = aPatternStr.Length();
PRInt32 searchStrLen = aSearchStr.Length();
if (aFoundStrLen)
*aFoundStrLen = 0;
if (patternLen == 0) // pattern is empty
return -1;
if (aStartOffset < 0)
aStartOffset = (aSearchBackwards) ? searchStrLen : 0;
if (aStartOffset > searchStrLen) // bad start offset
return -1;
if (patternLen > searchStrLen) // pattern is longer than string to search
return -1;
const PRUnichar *searchBuf = aSearchStr.get();
const PRUnichar *patternBuf = aPatternStr.get();
const PRUnichar *searchEnd = searchBuf + searchStrLen;
const PRUnichar *patEnd = patternBuf + patternLen;
const PRUnichar *s = searchBuf + aStartOffset;
if (aSearchBackwards)
s -= patternLen;
while ((!aSearchBackwards && s < searchEnd) ||
( aSearchBackwards && s >= searchBuf))
{
if (CharsMatch(*patternBuf, *s)) // start potential match
{
const PRUnichar *t = s;
const PRUnichar *p = patternBuf;
PRInt32 curMatchOffset = t - searchBuf;
PRInt32 curMatchLen = 0;
while (p < patEnd && t < searchEnd && CharsMatch(*p, *t))
{
PRBool didProcessWhitespace = PR_FALSE;
while (t != searchEnd && p != patEnd && IS_SPACE_CHAR(*p))
{
didProcessWhitespace = PR_TRUE;
if (!IS_SPACE_CHAR(*t))
break;
p++;
t++;
curMatchLen++;
if (aSkipTrailingSpaces && (p == patEnd || !IS_SPACE_CHAR(*p)))
{
// leaving p whitespace. Eat up additional whitespace in t
while (t < searchEnd && IS_SPACE_CHAR(*t))
{
t++;
curMatchLen++;
}
}
}
if (!didProcessWhitespace)
{
t++;
p++;
curMatchLen++;
}
}
if (p == patEnd)
{
if (aFoundStrLen)
*aFoundStrLen = curMatchLen;
return curMatchOffset;
}
}
if (aSearchBackwards)
s--;
else // searching forwards
s++;
}
return -1;
}
// utility method to discover which block we're in. The TSDoc interface doesn't give
// us this, because it can't assume a read-only document.
nsresult
nsFindAndReplace::GetCurrentBlockIndex(nsITextServicesDocument *aDoc, PRInt32 *outBlockIndex)
{
PRInt32 blockIndex = 0;
PRBool isDone = PR_FALSE;
nsresult result = NS_OK;
do
{
aDoc->PrevBlock();
result = aDoc->IsDone(&isDone);
if (!isDone)
blockIndex ++;
} while (NS_SUCCEEDED(result) && !isDone);
*outBlockIndex = blockIndex;
return result;
}
nsresult
nsFindAndReplace::SetupDocForFind(nsITextServicesDocument *aDoc, PRInt32 *outBlockOffset)
{
nsresult rv;
nsITextServicesDocument::TSDBlockSelectionStatus blockStatus;
PRInt32 selOffset;
PRInt32 selLength;
// Set up the TSDoc. We are going to start searching thus:
//
// Searching forwards:
// Look forward from the end of the selection
// Searching backwards:
// Look backwards from the start of the selection
//
if (!mFindBackwards) // searching forwards
{
rv = aDoc->LastSelectedBlock(&blockStatus, &selOffset, &selLength);
if (NS_SUCCEEDED(rv) && (blockStatus != nsITextServicesDocument::eBlockNotFound))
{
switch (blockStatus)
{
case nsITextServicesDocument::eBlockOutside: // No TB in S, but found one before/after S.
case nsITextServicesDocument::eBlockPartial: // S begins or ends in TB but extends outside of TB.
// the TS doc points to the block we want.
*outBlockOffset = selOffset + selLength;
break;
case nsITextServicesDocument::eBlockInside: // S extends beyond the start and end of TB.
// we want the block after this one.
rv = aDoc->NextBlock();
*outBlockOffset = 0;
break;
case nsITextServicesDocument::eBlockContains: // TB contains entire S.
*outBlockOffset = selOffset + selLength;
break;
case nsITextServicesDocument::eBlockNotFound: // There is no text block (TB) in or before the selection (S).
default:
NS_NOTREACHED("Shouldn't ever get this status");
}
}
else //failed to get last sel block. Just start at beginning
{
rv = aDoc->FirstBlock();
}
}
else // searching backwards
{
rv = aDoc->FirstSelectedBlock(&blockStatus, &selOffset, &selLength);
if (NS_SUCCEEDED(rv) && (blockStatus != nsITextServicesDocument::eBlockNotFound))
{
switch (blockStatus)
{
case nsITextServicesDocument::eBlockOutside: // No TB in S, but found one before/after S.
// must be a text block before the selection, so
// offset should be at end of block.
*outBlockOffset = -1;
break;
case nsITextServicesDocument::eBlockPartial: // S begins or ends in TB but extends outside of TB.
case nsITextServicesDocument::eBlockContains: // TB contains entire S.
// the TS doc points to the block we want.
*outBlockOffset = selOffset;
// if (selOffset > 0 && selLength > 0)
// *outBlockOffset -= 1;
break;
case nsITextServicesDocument::eBlockInside: // S extends beyond the start and end of TB.
// we want the block before this one.
rv = aDoc->PrevBlock();
*outBlockOffset = -1;
break;
case nsITextServicesDocument::eBlockNotFound: // There is no text block (TB) in or before the selection (S).
default:
NS_NOTREACHED("Shouldn't ever get this status");
}
}
else
{
rv = aDoc->LastBlock();
}
}
return rv;
}
nsresult
nsFindAndReplace::SetupDocForReplace(nsITextServicesDocument *aDoc, const nsString &aFindStr, PRInt32 *outBlockOffset)
{
nsresult rv;
nsITextServicesDocument::TSDBlockSelectionStatus blockStatus;
PRInt32 selOffset;
PRInt32 selLength;
// Set up the TSDoc. We are going to start replacing thus:
//
// Searching forwards:
// Look forward from the end of the selection
// Searching backwards:
// Look backwards from the start of the selection
//
if (!mFindBackwards) // searching forwards
{
rv = aDoc->LastSelectedBlock(&blockStatus, &selOffset, &selLength);
if (NS_SUCCEEDED(rv) && (blockStatus != nsITextServicesDocument::eBlockNotFound))
{
switch (blockStatus)
{
case nsITextServicesDocument::eBlockOutside: // No TB in S, but found one before/after S.
case nsITextServicesDocument::eBlockPartial: // S begins or ends in TB but extends outside of TB.
// the TS doc points to the block we want.
*outBlockOffset = selOffset + selLength;
break;
case nsITextServicesDocument::eBlockInside: // S extends beyond the start and end of TB.
// we want the block after this one.
rv = aDoc->NextBlock();
*outBlockOffset = 0;
break;
case nsITextServicesDocument::eBlockContains: // TB contains entire S.
*outBlockOffset = selOffset;
if (selLength != (PRInt32)aFindStr.Length())
*outBlockOffset += selLength;
break;
case nsITextServicesDocument::eBlockNotFound: // There is no text block (TB) in or before the selection (S).
default:
NS_NOTREACHED("Shouldn't ever get this status");
}
}
else //failed to get last sel block. Just start at beginning
{
rv = aDoc->FirstBlock();
}
}
else // searching backwards
{
rv = aDoc->FirstSelectedBlock(&blockStatus, &selOffset, &selLength);
if (NS_SUCCEEDED(rv) && (blockStatus != nsITextServicesDocument::eBlockNotFound))
{
switch (blockStatus)
{
case nsITextServicesDocument::eBlockOutside: // No TB in S, but found one before/after S.
case nsITextServicesDocument::eBlockPartial: // S begins or ends in TB but extends outside of TB.
// the TS doc points to the block we want.
*outBlockOffset = selOffset;
break;
case nsITextServicesDocument::eBlockInside: // S extends beyond the start and end of TB.
// we want the block before this one.
rv = aDoc->PrevBlock();
*outBlockOffset = -1;
break;
case nsITextServicesDocument::eBlockContains: // TB contains entire S.
*outBlockOffset = selOffset;
if (selLength == (PRInt32)aFindStr.Length())
*outBlockOffset += selLength;
break;
case nsITextServicesDocument::eBlockNotFound: // There is no text block (TB) in or before the selection (S).
default:
NS_NOTREACHED("Shouldn't ever get this status");
}
}
else
{
rv = aDoc->LastBlock();
}
}
return rv;
}
nsresult
nsFindAndReplace::DoFind(nsITextServicesDocument *aTxtDoc, const nsString &aFindString, PRBool *aDidFind)
{
if (!aTxtDoc || !aDidFind)
return NS_ERROR_NULL_POINTER;
*aDidFind = PR_FALSE;
nsresult rv = NS_OK;
// Set up the TSDoc. We are going to start searching thus:
//
// Searching forwards:
// Look forward from the end of the selection
// Searching backwards:
// Look backwards from the start of the selection
//
PRBool done = PR_FALSE;
// Loop till we find a match or fail.
while ( !done )
{
PRBool atExtremum = PR_FALSE; // are we at the end (or start)
while ( NS_SUCCEEDED(aTxtDoc->IsDone(&atExtremum)) && !atExtremum )
{
nsString str;
rv = aTxtDoc->GetCurrentTextBlock(&str);
if (NS_FAILED(rv))
return rv;
if (!mCaseSensitive)
ToLowerCase(str);
if (mWrapFind && mWrappedOnce &&
mCurrentBlockIndex == mStartBlockIndex && mCurrentSelOffset != -1)
{
if (( mFindBackwards && (mCurrentSelOffset <= mStartSelOffset)) ||
(!mFindBackwards && (mCurrentSelOffset >= mStartSelOffset)))
{
done = PR_TRUE;
break;
}
}
PRInt32 foundLength = 0;
PRInt32 foundOffset = FindInString(str, aFindString, mCurrentSelOffset, mFindBackwards, PR_TRUE, &foundLength);
if (mWrapFind && mWrappedOnce && (mCurrentBlockIndex == mStartBlockIndex))
{
if ((mFindBackwards && ((foundOffset + (PRInt32)aFindString.Length()) <= mStartSelOffset)) ||
(!mFindBackwards && (foundOffset >= mStartSelOffset)))
{
done = PR_TRUE;
break;
}
}
if (foundOffset != -1)
{
mCurrentSelOffset = foundOffset; // reset for next call to DoFind().
// Match found. Select it, remember where it was, and quit.
aTxtDoc->SetSelection(foundOffset, foundLength);
aTxtDoc->ScrollSelectionIntoView();
done = PR_TRUE;
*aDidFind = PR_TRUE;
break;
}
else
{
mCurrentSelOffset = -1; // reset for next block
// have we already been around once?
if (mWrappedOnce && (mCurrentBlockIndex == mStartBlockIndex))
{
done = PR_TRUE;
break;
}
// No match found in this block, try the next (or previous) one.
if (mFindBackwards) {
aTxtDoc->PrevBlock();
mCurrentBlockIndex--;
} else {
aTxtDoc->NextBlock();
mCurrentBlockIndex++;
}
}
} // while !atExtremum
// At end (or matched). Decide which it was...
if (!done)
{
// Hit end without a match. If we haven't passed this way already,
// then reset to the first/last block (depending on search direction).
if (!mWrappedOnce)
{
// Reset now.
mWrappedOnce = PR_TRUE;
// If not wrapping, give up.
if ( !mWrapFind ) {
done = PR_TRUE;
}
else
{
if ( mFindBackwards ) {
// Reset to last block.
rv = aTxtDoc->LastBlock();
// ugh
rv = GetCurrentBlockIndex(aTxtDoc, &mCurrentBlockIndex);
rv = aTxtDoc->LastBlock();
} else {
// Reset to first block.
rv = aTxtDoc->FirstBlock();
mCurrentBlockIndex = 0;
}
}
}
else
{
// already wrapped. This means no matches were found.
done = PR_TRUE;
}
}
}
return NS_OK;
}

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

@ -22,6 +22,7 @@
#include <nsIDocShell.h>
#include <nsIWebProgress.h>
#include "nsIWidget.h"
#include "nsCRT.h"
// for NS_APPSHELL_CID
#include <nsWidgetsCID.h>

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

@ -25,6 +25,7 @@
#include <nsIChannel.h>
#include "nsIURI.h"
#include "nsCRT.h"
EmbedProgress::EmbedProgress(void)
{

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

@ -29,6 +29,7 @@
#include "nsILocalFile.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsCRT.h"
#include <Folders.h>
#include <Script.h>

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

@ -77,6 +77,7 @@
#include "nsIWindowWatcher.h"
#include "nsIDOMWindow.h"
#include "nsIDownload.h"
#include "nsCRT.h"
#include <TextServices.h>

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

@ -61,6 +61,7 @@
#include "nsIWidget.h"
#include "nsIWebBrowserPrint.h"
#include "nsIMacTextInputEventSink.h"
#include "nsCRT.h"
// Local
#include "ApplIDs.h"

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

@ -43,6 +43,7 @@
#include "nsIObserverService.h"
#include "nsXPIDLString.h"
#include "nsIRegistry.h"
#include "nsCRT.h"
// ANSI
#include <climits>

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

@ -28,6 +28,7 @@
*/
#include "CTextInputEventHandler.h"
#include "nsCRT.h"
#pragma mark -

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

@ -56,6 +56,7 @@
#include "nsIServiceManagerUtils.h"
#include "nsUnicharUtils.h"
#include "nsIDOMElement.h"
#include "nsCRT.h"
// Yikes! Casting a char to unichar can fill with ones!
#define CHAR_TO_UNICHAR(c) ((PRUnichar)(const unsigned char)c)

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

@ -41,6 +41,7 @@
#include "nsIUploadChannel.h"
#include "nsEscape.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
#include "nsCExternalHandlerService.h"

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

@ -63,6 +63,7 @@
#include "nsIWindowWatcher.h"
#include "plstr.h"
#include "Preferences.h"
#include "nsCRT.h"
#include <io.h>
#include <fcntl.h>

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

@ -9,6 +9,7 @@
// Mozilla
#include "nsIProfile.h"
#include "nsIServiceManager.h"
#include "nsCRT.h"
#ifdef _DEBUG
#define new DEBUG_NEW

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

@ -28,6 +28,7 @@
#include "nsILocalFile.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsCRT.h"
#include <windows.h>

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

@ -36,6 +36,7 @@
#include "nsCWebBrowser.h"
#include "nsWidgetsCID.h"
#include "nsIProfileChangeStatus.h"
#include "nsCRT.h"
// Local includes
#include "resource.h"

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

@ -62,6 +62,7 @@
#include "nsIURI.h"
#include "plstr.h"
#include "nsIInterfaceRequestor.h"
#include "nsCRT.h"
// Local header files
#include "winEmbed.h"

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

@ -38,6 +38,7 @@
#include "nsCookie.h"
#include "nsString.h"
#include "nsCRT.h"
#include "prmem.h"
// nsCookie Implementation

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

@ -38,6 +38,7 @@
#include "nsPermissions.h"
#include "nsUtils.h"
#include "plstr.h"
#include "nsVoidArray.h"
#include "prmem.h"

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

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsPermission.h"
#include "nsString.h"
#include "nsCRT.h"
#include "prmem.h"
// nsPermission Implementation

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

@ -43,6 +43,7 @@
#include "nsXPIDLString.h"
#include "nsIEventQueueService.h"
#include "nsIStringBundle.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);

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

@ -35,6 +35,7 @@
#include "nsITXTToHTMLConv.h"
#include "nsIProgressEventSink.h"
#include "nsNetUtil.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);

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

@ -46,6 +46,7 @@
#include "nsVoidArray.h"
#include "nsSupportsArray.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "nsWeakReference.h"
#include "nsIGenericFactory.h"

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

@ -42,6 +42,7 @@
#include "nsIServiceManager.h"
#include "nsIURI.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsIPrefService.h"
#include "nsIPrefBranchInternal.h"

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

@ -46,6 +46,7 @@
#include "nsIObserverService.h"
#include "nsIEventQueueService.h"
#include "nsLiteralString.h"
#include "nsCRT.h"
extern nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length,
const char *filename,

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

@ -51,6 +51,7 @@
#include "nsXPIDLString.h"
#include "prmem.h"
#include "nsString.h"
#include "nsCRT.h"

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

@ -39,6 +39,7 @@
#include "txAtoms.h"
#include "XSLTProcessor.h"
#include "TxLog.h"
#include "nsCRT.h"
/* 1c1a3c01-14f6-11d6-a7f2-ea502af815dc */
#define TRANSFORMIIX_DOMCI_EXTENSION_CID \

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

@ -35,7 +35,8 @@
*/
#include "primitives.h"
#include <math.h>
#include <math.h>
#include <stdlib.h>
#ifdef WIN32
#include <float.h>
#endif
@ -46,7 +47,6 @@
#ifndef TX_EXE
#include "prdtoa.h"
#else
#include <stdlib.h>
#include <stdio.h>
#endif

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

@ -37,6 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsBasicStreamGenerator.h"
#include "nsCRT.h"
const char * nsBasicStreamGenerator::mSignature = "Basic Keyed Stream Generator";

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

@ -38,6 +38,7 @@
#include "nsPassword.h"
#include "nsString.h"
#include "nsCRT.h"
#include "prmem.h"
// nsPassword Implementation

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

@ -46,6 +46,7 @@
#include "nsVoidArray.h"
#include "nsSupportsArray.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "nsWeakReference.h"
#include "nsIGenericFactory.h"

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

@ -57,6 +57,7 @@
#include "nsICodebasePrincipal.h"
#include "nsIDOMClassInfo.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
#ifdef IMPLEMENT_SYNC_LOAD
#include "nsIScriptContext.h"

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

@ -49,6 +49,7 @@
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsPrintfCString.h"
#include "nsCRT.h"
#include "nsIURI.h"
#include "nsILoadGroup.h"
#include "nsNetUtil.h"

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

@ -50,6 +50,7 @@
#include "nsDOMCID.h"
#include "prprf.h"
#include "nsIDOMClassInfo.h"
#include "nsCRT.h"
#include "nsSOAPHeaderBlock.h"
#include "nsSOAPParameter.h"

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

@ -46,6 +46,7 @@
#include "nsVoidArray.h"
#include "nsSupportsArray.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "nsWeakReference.h"
#include "nsIGenericFactory.h"

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

@ -53,6 +53,7 @@
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsFIXptr.h"
#include "nsCRT.h"
#include "nsContentCID.h"
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);

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

@ -24,6 +24,7 @@
#include <nsCOMPtr.h>
#include <nsString.h>
#include <nsCRT.h>
#include <nsIURI.h>
#include <nsIChannel.h>
#include <nsIInputStream.h>

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

@ -45,6 +45,7 @@
#define FORCE_PR_LOG /* Allow logging in the release build */
#define PR_LOGGING 1
#include "prlog.h"
#include "plstr.h"
#include "nsDeviceContextSpecG.h"

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

@ -50,6 +50,7 @@
#ifdef USE_XPRINT
#include "nsIDeviceContextSpecXPrint.h"
#endif /* USE_XPRINT */
#include "nsCRT.h" /* should be <limits.h>? */
#define NS_PORTRAIT 0
#define NS_LANDSCAPE 1

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

@ -47,6 +47,7 @@
#include "nsIPref.h"
#include "nsGfxUtils.h"
#include "nsCRT.h"
#include "plbase64.h"
#include "prmem.h"

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

@ -42,6 +42,7 @@
#include "nsUnicodeMappingUtil.h"
#include "nsDeviceContextMac.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
#define BAD_FONT_NUM -1

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

@ -32,6 +32,7 @@
#include "nsILanguageAtomService.h"
#include "nsIServiceManager.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
NS_IMPL_ISUPPORTS3(DeviceContextImpl, nsIDeviceContext, nsIObserver, nsISupportsWeakReference)

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

@ -39,6 +39,7 @@
#include "nsFont.h"
#include "nsString.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
nsFont::nsFont(const char* aName, PRUint8 aStyle, PRUint8 aVariant,
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,

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

@ -57,6 +57,7 @@
#include "nsIPrintSettingsWin.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsIServiceManager.h"
#include "nsReadableUtils.h"
#include "nsGfxCIID.h"

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

@ -41,6 +41,7 @@
#include "nsString.h"
#include "nsCRT.h"
#include "nsAVLTree.h"
MOZ_DECL_CTOR_COUNTER(EntityNode)

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

@ -33,6 +33,7 @@
#include "nsIServiceManager.h"
#include "nsIComponentRegistrar.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);

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

@ -41,6 +41,7 @@
#include "nsILanguageAtomService.h"
#include "nsIPersistentProperties2.h"
#include "nsISupportsArray.h"
#include "nsCRT.h"
class nsLanguageAtomService : public nsILanguageAtomService
{

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

@ -43,6 +43,7 @@
#include "nsLocaleCID.h"
#include "nsIComponentManager.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
#include <ctype.h>

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

@ -49,6 +49,7 @@
#include "nsCOMPtr.h"
#include "nsIPref.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"
//#define DEBUG_UNIX_COLLATION
inline void nsCollationUnix::DoSetLocale()

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

@ -45,6 +45,7 @@
#include "nsLocaleCID.h"
#include "prprf.h"
#include <Windows.h>
#include "nsCRT.h"
NS_DEFINE_IID(kIWin32LocaleImplCID, NS_WIN32LOCALE_CID);

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

@ -50,6 +50,7 @@
#include "nsILocaleService.h"
#include "nsUConvDll.h"
#include "prmem.h"
#include "nsCRT.h"
// just for CIDs
#include "nsIUnicodeDecodeHelper.h"

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

@ -46,6 +46,7 @@
#include "nsICharsetConverterManager2.h"
#include "nsIScriptableUConv.h"
#include "nsScriptableUConv.h"
#include "nsCRT.h"
#include "nsIPlatformCharset.h"

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

@ -45,6 +45,7 @@
#include "nsEscape.h"
#include "prmem.h"
#include "nsTextToSubURI.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kITextToSubURIIID, NS_ITEXTTOSUBURI_IID);
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);

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

@ -49,6 +49,7 @@
#include "nsIModule.h"
#include "nsUCvCnCID.h"
#include "nsUCvCnDll.h"
#include "nsCRT.h"
#include "nsHZToUnicode.h"
#include "nsUnicodeToHZ.h"

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

@ -46,6 +46,7 @@
#include "nsIModule.h"
#include "nsUCvIBMCID.h"
#include "nsUCvIBMDll.h"
#include "nsCRT.h"
#include "nsCP850ToUnicode.h"
#include "nsCP852ToUnicode.h"

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

@ -49,6 +49,7 @@
#include "nsUCVJACID.h"
#include "nsUCVJA2CID.h"
#include "nsUCVJADll.h"
#include "nsCRT.h"
#include "nsJapaneseToUnicode.h"
#include "nsUnicodeToSJIS.h"

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

@ -50,6 +50,7 @@
#include "nsIModule.h"
#include "nsUCvKOCID.h"
#include "nsUCvKODll.h"
#include "nsCRT.h"
#include "nsEUCKRToUnicode.h"
#include "nsUnicodeToEUCKR.h"

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

@ -49,6 +49,7 @@
#include "nsIModule.h"
#include "nsUCvLatinCID.h"
#include "nsUCvLatinDll.h"
#include "nsCRT.h"
#include "nsUEscapeToUnicode.h"
#include "nsUnicodeToUEscape.h"

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

@ -49,6 +49,7 @@
#include "nsIModule.h"
#include "nsUCvMathCID.h"
#include "nsUCvMathDll.h"
#include "nsCRT.h"
#include "nsUnicodeToTeXCMRttf.h"
#include "nsUnicodeToTeXCMMIttf.h"

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

@ -48,6 +48,7 @@
#include "nsIModule.h"
#include "nsUCvTWCID.h"
#include "nsUCvTWDll.h"
#include "nsCRT.h"
#include "nsBIG5ToUnicode.h"
#include "nsUnicodeToBIG5.h"

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

@ -40,6 +40,7 @@
#include "nspr.h"
#include "nsString.h"
#include "nsCRT.h"
#include "pratom.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше