Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg

This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
This commit is contained in:
Ehsan Akhgari
2012-08-22 11:56:38 -04:00
parent 267ef7575d
commit 243c878d26
4098 changed files with 54923 additions and 54923 deletions

View File

@@ -274,7 +274,7 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsRenderingContext* aRend
// Loop over the columns to consider the columns and cells *without*
// a colspan.
PRInt32 col, col_end;
int32_t col, col_end;
for (col = 0, col_end = cellMap->GetColCount(); col < col_end; ++col) {
nsTableColFrame *colFrame = tableFrame->GetColFrame(col);
if (!colFrame) {
@@ -309,7 +309,7 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsRenderingContext* aRend
// Consider the contents of and the widths on the cells without
// colspans.
nsCellMapColumnIterator columnIter(cellMap, col);
PRInt32 row, colSpan;
int32_t row, colSpan;
nsTableCellFrame* cellFrame;
while ((cellFrame = columnIter.GetNextFrame(&row, &colSpan))) {
if (colSpan > 1) {
@@ -354,12 +354,12 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsRenderingContext* aRend
// satisfy all the constraints given and don't distribute space to
// columns where we don't need it.
SpanningCellSorter::Item *item;
PRInt32 colSpan;
int32_t colSpan;
while ((item = spanningCells.GetNext(&colSpan))) {
NS_ASSERTION(colSpan > 1,
"cell should not have been put in spanning cell sorter");
do {
PRInt32 row = item->row;
int32_t row = item->row;
col = item->col;
CellData *cellData = cellMap->GetDataAt(row, col);
NS_ASSERTION(cellData && cellData->IsOrig(),
@@ -432,12 +432,12 @@ BasicTableLayoutStrategy::ComputeIntrinsicWidths(nsRenderingContext* aRenderingC
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
nscoord min = 0, pref = 0, max_small_pct_pref = 0, nonpct_pref_total = 0;
float pct_total = 0.0f; // always from 0.0f - 1.0f
PRInt32 colCount = cellMap->GetColCount();
int32_t colCount = cellMap->GetColCount();
nscoord spacing = mTableFrame->GetCellSpacingX();
nscoord add = spacing; // add (colcount + 1) * spacing for columns
// where a cell originates
for (PRInt32 col = 0; col < colCount; ++col) {
for (int32_t col = 0; col < colCount; ++col) {
nsTableColFrame *colFrame = mTableFrame->GetColFrame(col);
if (!colFrame) {
NS_ERROR("column frames out of sync with cell map");
@@ -537,7 +537,7 @@ BasicTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
ComputeIntrinsicWidths(aReflowState.rendContext);
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
PRInt32 colCount = cellMap->GetColCount();
int32_t colCount = cellMap->GetColCount();
if (colCount <= 0)
return; // nothing to do
@@ -551,15 +551,15 @@ BasicTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
void
BasicTableLayoutStrategy::DistributePctWidthToColumns(float aSpanPrefPct,
PRInt32 aFirstCol,
PRInt32 aColCount)
int32_t aFirstCol,
int32_t aColCount)
{
// First loop to determine:
PRInt32 nonPctColCount = 0; // number of spanned columns without % width
int32_t nonPctColCount = 0; // number of spanned columns without % width
nscoord nonPctTotalPrefWidth = 0; // total pref width of those columns
// and to reduce aSpanPrefPct by columns that already have % width
PRInt32 scol, scol_end;
int32_t scol, scol_end;
for (scol = aFirstCol, scol_end = aFirstCol + aColCount;
scol < scol_end; ++scol) {
nsTableColFrame *scolFrame = mTableFrame->GetColFrame(scol);
@@ -635,8 +635,8 @@ BasicTableLayoutStrategy::DistributePctWidthToColumns(float aSpanPrefPct,
void
BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
PRInt32 aFirstCol,
PRInt32 aColCount,
int32_t aFirstCol,
int32_t aColCount,
BtlsWidthType aWidthType,
bool aSpanHasSpecifiedWidth)
{
@@ -651,7 +651,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
// aWidth initially includes border-spacing for the boundaries in between
// each of the columns. We start at aFirstCol + 1 because the first
// in-between boundary would be at the left edge of column aFirstCol + 1
for (PRInt32 col = aFirstCol + 1; col < aFirstCol + aColCount; ++col) {
for (int32_t col = aFirstCol + 1; col < aFirstCol + aColCount; ++col) {
if (mTableFrame->ColumnHasCellSpacingBefore(col)) {
subtract += spacing;
}
@@ -724,10 +724,10 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
total_flex_pref = 0,
total_fixed_pref = 0;
float total_pct = 0.0f; // 0.0f to 1.0f
PRInt32 numInfiniteWidthCols = 0;
PRInt32 numNonSpecZeroWidthCols = 0;
int32_t numInfiniteWidthCols = 0;
int32_t numNonSpecZeroWidthCols = 0;
PRInt32 col;
int32_t col;
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
for (col = aFirstCol; col < aFirstCol + aColCount; ++col) {
nsTableColFrame *colFrame = mTableFrame->GetColFrame(col);