Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc

This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
This commit is contained in:
Ehsan Akhgari
2014-01-04 10:02:17 -05:00
parent ae471708c0
commit 68bfe70f09
1063 changed files with 5572 additions and 5572 deletions

View File

@@ -117,7 +117,7 @@ nsHtml5TreeOperation::~nsHtml5TreeOperation()
}
nsresult
nsHtml5TreeOperation::AppendTextToTextNode(const PRUnichar* aBuffer,
nsHtml5TreeOperation::AppendTextToTextNode(const char16_t* aBuffer,
uint32_t aLength,
nsIContent* aTextNode,
nsHtml5TreeOpExecutor* aBuilder)
@@ -149,7 +149,7 @@ nsHtml5TreeOperation::AppendTextToTextNode(const PRUnichar* aBuffer,
nsresult
nsHtml5TreeOperation::AppendText(const PRUnichar* aBuffer,
nsHtml5TreeOperation::AppendText(const char16_t* aBuffer,
uint32_t aLength,
nsIContent* aParent,
nsHtml5TreeOpExecutor* aBuilder)
@@ -482,7 +482,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
}
case eTreeOpAppendText: {
nsIContent* parent = *mOne.node;
PRUnichar* buffer = mTwo.unicharPtr;
char16_t* buffer = mTwo.unicharPtr;
uint32_t length = mFour.integer;
return AppendText(buffer, length, parent, aBuilder);
}
@@ -504,7 +504,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
}
case eTreeOpFosterParentText: {
nsIContent* stackParent = *mOne.node;
PRUnichar* buffer = mTwo.unicharPtr;
char16_t* buffer = mTwo.unicharPtr;
uint32_t length = mFour.integer;
nsIContent* table = *mThree.node;
nsIContent* foster = table->GetParent();
@@ -541,7 +541,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
}
case eTreeOpAppendComment: {
nsIContent* parent = *mOne.node;
PRUnichar* buffer = mTwo.unicharPtr;
char16_t* buffer = mTwo.unicharPtr;
int32_t length = mFour.integer;
nsRefPtr<dom::Comment> comment =
@@ -553,7 +553,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
return Append(comment, parent, aBuilder);
}
case eTreeOpAppendCommentToDocument: {
PRUnichar* buffer = mTwo.unicharPtr;
char16_t* buffer = mTwo.unicharPtr;
int32_t length = mFour.integer;
nsRefPtr<dom::Comment> comment =
@@ -658,7 +658,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
return rv;
}
case eTreeOpProcessOfflineManifest: {
PRUnichar* str = mOne.unicharPtr;
char16_t* str = mOne.unicharPtr;
nsDependentString dependentString(str);
aBuilder->ProcessOfflineManifest(dependentString);
return rv;
@@ -716,7 +716,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
}
case eTreeOpAddClass: {
nsIContent* node = *(mOne.node);
PRUnichar* str = mTwo.unicharPtr;
char16_t* str = mTwo.unicharPtr;
nsDependentString depStr(str);
// See viewsource.css for the possible classes
nsAutoString klass;
@@ -740,7 +740,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
}
case eTreeOpAddViewSourceHref: {
nsIContent* node = *mOne.node;
PRUnichar* buffer = mTwo.unicharPtr;
char16_t* buffer = mTwo.unicharPtr;
int32_t length = mFour.integer;
nsDependentString relative(buffer, length);
@@ -813,13 +813,13 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
nsXPIDLString message;
if (otherAtom) {
const PRUnichar* params[] = { atom->GetUTF16String(),
const char16_t* params[] = { atom->GetUTF16String(),
otherAtom->GetUTF16String() };
rv = nsContentUtils::FormatLocalizedString(
nsContentUtils::eHTMLPARSER_PROPERTIES, msgId, params, message);
NS_ENSURE_SUCCESS(rv, rv);
} else if (atom) {
const PRUnichar* params[] = { atom->GetUTF16String() };
const char16_t* params[] = { atom->GetUTF16String() };
rv = nsContentUtils::FormatLocalizedString(
nsContentUtils::eHTMLPARSER_PROPERTIES, msgId, params, message);
NS_ENSURE_SUCCESS(rv, rv);