Bug 150073 - Remove nsCRT:: in nsCRT::strlen(const char *). r=dougt

This commit is contained in:
Shriram Kunchanapalli 2012-02-18 19:17:01 +05:30
Родитель 566a670f97
Коммит 86b1d55b6f
7 изменённых файлов: 12 добавлений и 27 удалений

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

@ -120,7 +120,7 @@ SVGTransformListParser::GetTransformToken(nsIAtom** aKeyAtom,
*delimiterStart = '\0';
PRUint32 len;
if ((len = nsCRT::strlen(mTokenPos)) > 0) {
if ((len = strlen(mTokenPos)) > 0) {
*aKeyAtom = NS_NewAtom(Substring(mTokenPos, mTokenPos + len));
if (aAdvancePos) {

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

@ -557,7 +557,7 @@ NS_IMETHODIMP mozHunspell::Suggest(const PRUnichar *aWord, PRUnichar ***aSuggest
PRUint32 index = 0;
for (index = 0; index < *aSuggestionCount && NS_SUCCEEDED(rv); ++index) {
// Convert the suggestion to utf16
PRInt32 inLength = nsCRT::strlen(wlst[index]);
PRInt32 inLength = strlen(wlst[index]);
PRInt32 outLength;
rv = mDecoder->GetMaxLength(wlst[index], inLength, &outLength);
if (NS_SUCCEEDED(rv))

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

@ -83,6 +83,6 @@ interface nsIAboutModule : nsISupports
#define NS_ABOUT_MODULE_CONTRACTID "@mozilla.org/network/protocol/about;1"
#define NS_ABOUT_MODULE_CONTRACTID_PREFIX NS_ABOUT_MODULE_CONTRACTID "?what="
#define NS_ABOUT_MODULE_CONTRACTID_LENGTH 49 // nsCRT::strlen(NS_ABOUT_MODULE_CONTRACTID_PREFIX)
#define NS_ABOUT_MODULE_CONTRACTID_LENGTH 49 // strlen(NS_ABOUT_MODULE_CONTRACTID_PREFIX)
%}

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

@ -355,7 +355,7 @@ nsHttpAuthEntry::AddPath(const char *aPath)
nsHttpAuthPath *tempPtr = mRoot;
while (tempPtr) {
const char *curpath = tempPtr->mPath;
if (strncmp(aPath, curpath, nsCRT::strlen(curpath)) == 0)
if (strncmp(aPath, curpath, strlen(curpath)) == 0)
return NS_OK; // subpath already exists in the list
tempPtr = tempPtr->mNext;
@ -364,7 +364,7 @@ nsHttpAuthEntry::AddPath(const char *aPath)
//Append the aPath
nsHttpAuthPath *newAuthPath;
int newpathLen = nsCRT::strlen(aPath);
int newpathLen = strlen(aPath);
newAuthPath = (nsHttpAuthPath *) malloc(sizeof(nsHttpAuthPath) + newpathLen);
if (!newAuthPath)
return NS_ERROR_OUT_OF_MEMORY;
@ -392,9 +392,9 @@ nsHttpAuthEntry::Set(const char *path,
{
char *newRealm, *newCreds, *newChall;
int realmLen = realm ? nsCRT::strlen(realm) : 0;
int credsLen = creds ? nsCRT::strlen(creds) : 0;
int challLen = chall ? nsCRT::strlen(chall) : 0;
int realmLen = realm ? strlen(realm) : 0;
int credsLen = creds ? strlen(creds) : 0;
int challLen = chall ? strlen(chall) : 0;
int len = realmLen + 1 + credsLen + 1 + challLen + 1;
newRealm = (char *) malloc(len);
@ -489,7 +489,7 @@ nsHttpAuthNode::LookupEntryByPath(const char *path)
if (path[0] == '\0')
return entry;
}
else if (strncmp(path, entryPath, nsCRT::strlen(entryPath)) == 0)
else if (strncmp(path, entryPath, strlen(entryPath)) == 0)
return entry;
authPath = authPath->mNext;

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

@ -743,7 +743,7 @@ mozTXTToHTMLConv::SmilyHit(const PRUnichar * aInString, PRInt32 aLength, bool co
if ( !aInString || !tagTXT || !imageName )
return false;
PRInt32 tagLen = nsCRT::strlen(tagTXT);
PRInt32 tagLen = strlen(tagTXT);
PRUint32 delim = (col0 ? 0 : 1) + tagLen;

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

@ -113,23 +113,8 @@ public:
*** nsCRT::memmove()
*** nsCRT::memset()
*** nsCRT::zero()
***
*** Additionally, the following char* string utilities
*** are no longer supported, please use the
*** corresponding lib C functions instead.
***
*** nsCRT::strlen()
***
***/
/** Compute the string length of s
@param s the string in question
@return the length of s
*/
static PRUint32 strlen(const char* s) {
return PRUint32(::strlen(s));
}
/// Compare s1 and s2.
static PRInt32 strcmp(const char* s1, const char* s2) {
return PRInt32(PL_strcmp(s1, s2));

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

@ -288,9 +288,9 @@ nsEscapeHTML(const char * string)
PRUnichar *
nsEscapeHTML2(const PRUnichar *aSourceBuffer, PRInt32 aSourceBufferLen)
{
// if the caller didn't calculate the length
// Calculate the length, if the caller didn't.
if (aSourceBufferLen < 0) {
aSourceBufferLen = nsCRT::strlen(aSourceBuffer); // ...then I will
aSourceBufferLen = nsCRT::strlen(aSourceBuffer);
}
/* XXX Hardcoded max entity len. */