Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg

This commit is contained in:
Ms2ger 2012-08-09 09:09:40 +02:00
parent b5e07ef2e5
commit 331accfcb4
107 changed files with 212 additions and 209 deletions

View File

@ -1043,7 +1043,7 @@ nsPrincipal::InitFromPersistent(const char* aPrefName,
const char* ordinalBegin = PL_strpbrk(aPrefName, "1234567890");
if (ordinalBegin) {
PRIntn n = atoi(ordinalBegin);
int n = atoi(ordinalBegin);
if (sCapabilitiesOrdinal <= n) {
sCapabilitiesOrdinal = n + 1;
}
@ -1122,7 +1122,7 @@ nsPrincipal::Read(nsIObjectInputStream* aStream)
const char* ordinalBegin = PL_strpbrk(mPrefName.get(), "1234567890");
if (ordinalBegin) {
PRIntn n = atoi(ordinalBegin);
int n = atoi(ordinalBegin);
if (sCapabilitiesOrdinal <= n) {
sCapabilitiesOrdinal = n + 1;
}

View File

@ -53,7 +53,7 @@ extern PRLogModuleInfo* gContentSinkLogModuleInfo;
#define SINK_TRACE_REFLOW 0x2
#define SINK_ALWAYS_REFLOW 0x4
#define SINK_LOG_TEST(_lm, _bit) (PRIntn((_lm)->level) & (_bit))
#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->level) & (_bit))
#define SINK_TRACE(_lm, _bit, _args) \
PR_BEGIN_MACRO \

View File

@ -54,7 +54,7 @@ nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
}
PRIntn
int
nsNodeInfoManager::NodeInfoInnerKeyCompare(const void *key1, const void *key2)
{
NS_ASSERTION(key1 && key2, "Null key passed to NodeInfoInnerKeyCompare!");
@ -183,8 +183,8 @@ nsNodeInfoManager::Init(nsIDocument *aDocument)
}
// static
PRIntn
nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex, void *arg)
int
nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, int hashIndex, void *arg)
{
static_cast<nsINodeInfo*>(he->value)->mDocument = nullptr;
return HT_ENUMERATE_NEXT;

View File

@ -116,9 +116,9 @@ protected:
void SetDocumentPrincipal(nsIPrincipal *aPrincipal);
private:
static PRIntn NodeInfoInnerKeyCompare(const void *key1, const void *key2);
static int NodeInfoInnerKeyCompare(const void *key1, const void *key2);
static PLHashNumber GetNodeInfoInnerHashValue(const void *key);
static PRIntn DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex,
static int DropNodeInfoDocument(PLHashEntry *he, int hashIndex,
void *arg);
PLHashTable *mNodeInfoHash;

View File

@ -156,7 +156,7 @@ void txDouble::toString(double aValue, nsAString& aDest)
const int buflen = 20;
char buf[buflen];
PRIntn intDigits, sign;
int intDigits, sign;
char* endp;
PR_dtoa(aValue, 0, 0, &intDigits, &sign, &endp, buf, buflen - 1);

View File

@ -572,7 +572,7 @@ txXPathNodeUtils::getBaseURI(const txXPathNode& aNode, nsAString& aURI)
}
/* static */
PRIntn
int
txXPathNodeUtils::comparePosition(const txXPathNode& aNode,
const txXPathNode& aOtherNode)
{

View File

@ -567,7 +567,7 @@ txNodeSet::findPosition(const txXPathNode& aNode, txXPathNode* aFirst,
// If we search 2 nodes or less there is no point in further divides
txXPathNode* pos = aFirst;
for (; pos < aLast; ++pos) {
PRIntn cmp = txXPathNodeUtils::comparePosition(aNode, *pos);
int cmp = txXPathNodeUtils::comparePosition(aNode, *pos);
if (cmp < 0) {
return pos;
}
@ -583,7 +583,7 @@ txNodeSet::findPosition(const txXPathNode& aNode, txXPathNode* aFirst,
// (cannot add two pointers)
txXPathNode* midpos = aFirst + (aLast - aFirst) / 2;
PRIntn cmp = txXPathNodeUtils::comparePosition(aNode, *midpos);
int cmp = txXPathNodeUtils::comparePosition(aNode, *midpos);
if (cmp == 0) {
aDupe = true;

View File

@ -94,8 +94,8 @@ public:
const txXPathNode& aBase, nsAString& aResult);
static void release(txXPathNode* aNode);
static void getBaseURI(const txXPathNode& aNode, nsAString& aURI);
static PRIntn comparePosition(const txXPathNode& aNode,
const txXPathNode& aOtherNode);
static int comparePosition(const txXPathNode& aNode,
const txXPathNode& aOtherNode);
static bool localNameEquals(const txXPathNode& aNode,
nsIAtom* aLocalName);
static bool isRoot(const txXPathNode& aNode);

View File

@ -277,7 +277,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
char* buf = new char[bufsize];
NS_ENSURE_TRUE(buf, NS_ERROR_OUT_OF_MEMORY);
PRIntn bufIntDigits, sign;
int bufIntDigits, sign;
char* endp;
PR_dtoa(value, 0, 0, &bufIntDigits, &sign, &endp, buf, bufsize-1);

View File

@ -205,7 +205,7 @@ Instantiation::Hash(const void* aKey)
}
PRIntn
int
Instantiation::Compare(const void* aLeft, const void* aRight)
{
const Instantiation* left = static_cast<const Instantiation*>(aLeft);

View File

@ -466,7 +466,7 @@ public:
return !Equals(aInstantiation); }
static PLHashNumber Hash(const void* aKey);
static PRIntn Compare(const void* aLeft, const void* aRight);
static int Compare(const void* aLeft, const void* aRight);
};

View File

@ -227,16 +227,16 @@ NS_GFX_(nscolor)
NS_ComposeColors(nscolor aBG, nscolor aFG)
{
// This function uses colors that are non premultiplied alpha.
PRIntn r, g, b, a;
int r, g, b, a;
PRIntn bgAlpha = NS_GET_A(aBG);
PRIntn fgAlpha = NS_GET_A(aFG);
int bgAlpha = NS_GET_A(aBG);
int fgAlpha = NS_GET_A(aFG);
// Compute the final alpha of the blended color
// a = fgAlpha + bgAlpha*(255 - fgAlpha)/255;
FAST_DIVIDE_BY_255(a, bgAlpha*(255-fgAlpha));
a = fgAlpha + a;
PRIntn blendAlpha;
int blendAlpha;
if (a == 0) {
// In this case the blended color is totally trasparent,
// we preserve the color information of the foreground color.

View File

@ -94,15 +94,15 @@ nsLocale::Hash_HashFunction(const void* key)
}
PRIntn
int
nsLocale::Hash_CompareNSString(const void* s1, const void* s2)
{
return !nsCRT::strcmp((const PRUnichar *) s1, (const PRUnichar *) s2);
}
PRIntn
nsLocale::Hash_EnumerateDelete(PLHashEntry *he, PRIntn hashIndex, void *arg)
int
nsLocale::Hash_EnumerateDelete(PLHashEntry *he, int hashIndex, void *arg)
{
// delete an entry
nsMemory::Free((PRUnichar *)he->key);

View File

@ -41,8 +41,8 @@ protected:
NS_IMETHOD AddCategory(const nsAString& category, const nsAString& value);
static PLHashNumber Hash_HashFunction(const void* key);
static PRIntn Hash_CompareNSString(const void* s1, const void* s2);
static PRIntn Hash_EnumerateDelete(PLHashEntry *he, PRIntn hashIndex, void *arg);
static int Hash_CompareNSString(const void* s1, const void* s2);
static int Hash_EnumerateDelete(PLHashEntry *he, int hashIndex, void *arg);
PLHashTable* fHashtable;
PRUint32 fCategoryCount;

View File

@ -385,7 +385,7 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
const nsRect& aDirtyRect,
const nsRect& aBorderArea,
nsStyleContext* aStyleContext,
PRIntn aSkipSides)
int aSkipSides)
{
SAMPLE_LABEL("nsCSSRendering", "PaintBorder");
nsStyleContext *styleIfVisited = aStyleContext->GetStyleIfVisited();
@ -428,7 +428,7 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
const nsRect& aBorderArea,
const nsStyleBorder& aStyleBorder,
nsStyleContext* aStyleContext,
PRIntn aSkipSides)
int aSkipSides)
{
nsMargin border;
nscoord twipsRadii[8];
@ -2527,8 +2527,8 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
state.mDestArea = nsRect(imageTopLeft + aBorderArea.TopLeft(), imageSize);
state.mFillArea = state.mDestArea;
PRIntn repeatX = aLayer.mRepeat.mXRepeat;
PRIntn repeatY = aLayer.mRepeat.mYRepeat;
int repeatX = aLayer.mRepeat.mXRepeat;
int repeatY = aLayer.mRepeat.mYRepeat;
if (repeatX == NS_STYLE_BG_REPEAT_REPEAT) {
state.mFillArea.x = bgClipRect.x;
state.mFillArea.width = bgClipRect.width;

View File

@ -173,7 +173,7 @@ struct nsCSSRendering {
const nsRect& aDirtyRect,
const nsRect& aBorderArea,
nsStyleContext* aStyleContext,
PRIntn aSkipSides = 0);
int aSkipSides = 0);
/**
* Like PaintBorder, but taking an nsStyleBorder argument instead of
@ -186,7 +186,7 @@ struct nsCSSRendering {
const nsRect& aBorderArea,
const nsStyleBorder& aBorderStyle,
nsStyleContext* aStyleContext,
PRIntn aSkipSides = 0);
int aSkipSides = 0);
/**

View File

@ -130,7 +130,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(PRInt32 aAppUnitsPerPixel,
gfxCornerSizes& aBorderRadii,
const nscolor* aBorderColors,
nsBorderColors* const* aCompositeColors,
PRIntn aSkipSides,
int aSkipSides,
nscolor aBackgroundColor)
: mContext(aDestContext),
mOuterRect(aOuterRect),
@ -523,7 +523,7 @@ nsCSSBorderRenderer::FillSolidBorder(const gfxRect& aOuterRect,
const gfxRect& aInnerRect,
const gfxCornerSizes& aBorderRadii,
const gfxFloat *aBorderSizes,
PRIntn aSides,
int aSides,
const gfxRGBA& aColor)
{
mContext->SetColor(aColor);
@ -683,7 +683,7 @@ ComputeCompositeColorForLine(PRUint32 aLineIndex,
}
void
nsCSSBorderRenderer::DrawBorderSidesCompositeColors(PRIntn aSides, const nsBorderColors *aCompositeColors)
nsCSSBorderRenderer::DrawBorderSidesCompositeColors(int aSides, const nsBorderColors *aCompositeColors)
{
gfxCornerSizes radii = mBorderRadii;
@ -731,7 +731,7 @@ nsCSSBorderRenderer::DrawBorderSidesCompositeColors(PRIntn aSides, const nsBorde
}
void
nsCSSBorderRenderer::DrawBorderSides(PRIntn aSides)
nsCSSBorderRenderer::DrawBorderSides(int aSides)
{
if (aSides == 0 || (aSides & ~SIDE_BITS_ALL) != 0) {
NS_WARNING("DrawBorderSides: invalid sides!");
@ -1543,7 +1543,7 @@ nsCSSBorderRenderer::DrawBorders()
return;
mInnerRect.Condition();
PRIntn dashedSides = 0;
int dashedSides = 0;
NS_FOR_CSS_SIDES(i) {
PRUint8 style = mBorderStyles[i];
@ -1596,8 +1596,8 @@ nsCSSBorderRenderer::DrawBorders()
if (IsZeroSize(mBorderCornerDimensions[corner]))
continue;
const PRIntn sides[2] = { corner, PREV_SIDE(corner) };
PRIntn sideBits = (1 << sides[0]) | (1 << sides[1]);
const int sides[2] = { corner, PREV_SIDE(corner) };
int sideBits = (1 << sides[0]) | (1 << sides[1]);
bool simpleCornerStyle = mCompositeColors[sides[0]] == NULL &&
mCompositeColors[sides[1]] == NULL &&
@ -1672,7 +1672,7 @@ nsCSSBorderRenderer::DrawBorders()
// We need to check for mNoBorderRadius, because when there is
// one, FillSolidBorder always draws the full rounded rectangle
// and expects there to be a clip in place.
PRIntn alreadyDrawnSides = 0;
int alreadyDrawnSides = 0;
if (mOneUnitBorder &&
mNoBorderRadius &&
(dashedSides & (SIDE_BIT_TOP | SIDE_BIT_LEFT)) == 0)

View File

@ -71,7 +71,7 @@ struct nsCSSBorderRenderer {
gfxCornerSizes& aBorderRadii,
const nscolor* aBorderColors,
nsBorderColors* const* aCompositeColors,
PRIntn aSkipSides,
int aSkipSides,
nscolor aBackgroundColor);
gfxCornerSizes mBorderCornerDimensions;
@ -98,7 +98,7 @@ struct nsCSSBorderRenderer {
PRInt32 mAUPP;
// misc -- which sides to skip, the background color
PRIntn mSkipSides;
int mSkipSides;
nscolor mBackgroundColor;
// calculated values
@ -151,7 +151,7 @@ struct nsCSSBorderRenderer {
const gfxRect& aInnerRect,
const gfxCornerSizes& aBorderRadii,
const gfxFloat *aBorderSizes,
PRIntn aSides,
int aSides,
const gfxRGBA& aColor);
//
@ -160,10 +160,10 @@ struct nsCSSBorderRenderer {
// draw the border for the given sides, using the style of the first side
// present in the bitmask
void DrawBorderSides (PRIntn aSides);
void DrawBorderSides (int aSides);
// function used by the above to handle -moz-border-colors
void DrawBorderSidesCompositeColors(PRIntn aSides, const nsBorderColors *compositeColors);
void DrawBorderSidesCompositeColors(int aSides, const nsBorderColors *compositeColors);
// draw the given dashed side
void DrawDashedSide (mozilla::css::Side aSide);

View File

@ -1845,7 +1845,7 @@ HashKey(void* key)
return NS_PTR_TO_INT32(key);
}
static PRIntn
static int
CompareKeys(void* key1, void* key2)
{
return key1 == key2;
@ -1978,8 +1978,8 @@ nsFrameManagerBase::UndisplayedMap::RemoveNodesFor(nsIContent* aParentContent)
}
}
static PRIntn
RemoveUndisplayedEntry(PLHashEntry* he, PRIntn i, void* arg)
static int
RemoveUndisplayedEntry(PLHashEntry* he, int i, void* arg)
{
UndisplayedNode* node = (UndisplayedNode*)(he->value);
delete node;

View File

@ -371,26 +371,26 @@ protected:
void DisplayTotals(PRUint32 aTotal, PRUint32 * aDupArray, char * aTitle);
void DisplayHTMLTotals(PRUint32 aTotal, PRUint32 * aDupArray, char * aTitle);
static PRIntn RemoveItems(PLHashEntry *he, PRIntn i, void *arg);
static PRIntn RemoveIndiItems(PLHashEntry *he, PRIntn i, void *arg);
static int RemoveItems(PLHashEntry *he, int i, void *arg);
static int RemoveIndiItems(PLHashEntry *he, int i, void *arg);
void CleanUp();
// stdout Output Methods
static PRIntn DoSingleTotal(PLHashEntry *he, PRIntn i, void *arg);
static PRIntn DoSingleIndi(PLHashEntry *he, PRIntn i, void *arg);
static int DoSingleTotal(PLHashEntry *he, int i, void *arg);
static int DoSingleIndi(PLHashEntry *he, int i, void *arg);
void DoGrandTotals();
void DoIndiTotalsTree();
// HTML Output Methods
static PRIntn DoSingleHTMLTotal(PLHashEntry *he, PRIntn i, void *arg);
static int DoSingleHTMLTotal(PLHashEntry *he, int i, void *arg);
void DoGrandHTMLTotals();
// Zero Out the Totals
static PRIntn DoClearTotals(PLHashEntry *he, PRIntn i, void *arg);
static int DoClearTotals(PLHashEntry *he, int i, void *arg);
// Displays the Diff Totals
static PRIntn DoDisplayDiffTotals(PLHashEntry *he, PRIntn i, void *arg);
static int DoDisplayDiffTotals(PLHashEntry *he, int i, void *arg);
PLHashTable * mCounts;
PLHashTable * mIndiFrameCounts;
@ -8598,7 +8598,7 @@ void ReflowCountMgr::PaintCount(const char* aName,
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::RemoveItems(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::RemoveItems(PLHashEntry *he, int i, void *arg)
{
char *str = (char *)he->key;
ReflowCounter * counter = (ReflowCounter *)he->value;
@ -8609,7 +8609,7 @@ PRIntn ReflowCountMgr::RemoveItems(PLHashEntry *he, PRIntn i, void *arg)
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::RemoveIndiItems(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::RemoveIndiItems(PLHashEntry *he, int i, void *arg)
{
char *str = (char *)he->key;
IndiReflowCounter * counter = (IndiReflowCounter *)he->value;
@ -8636,7 +8636,7 @@ void ReflowCountMgr::CleanUp()
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::DoSingleTotal(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::DoSingleTotal(PLHashEntry *he, int i, void *arg)
{
char *str = (char *)he->key;
ReflowCounter * counter = (ReflowCounter *)he->value;
@ -8698,7 +8698,7 @@ static void RecurseIndiTotals(nsPresContext* aPresContext,
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::DoSingleIndi(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::DoSingleIndi(PLHashEntry *he, int i, void *arg)
{
IndiReflowCounter * counter = (IndiReflowCounter *)he->value;
if (counter && !counter->mHasBeenOutput) {
@ -8731,7 +8731,7 @@ void ReflowCountMgr::DoIndiTotalsTree()
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::DoSingleHTMLTotal(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::DoSingleHTMLTotal(PLHashEntry *he, int i, void *arg)
{
char *str = (char *)he->key;
ReflowCounter * counter = (ReflowCounter *)he->value;
@ -8808,7 +8808,7 @@ void ReflowCountMgr::DisplayHTMLTotals(const char * aStr)
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::DoClearTotals(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::DoClearTotals(PLHashEntry *he, int i, void *arg)
{
ReflowCounter * counter = (ReflowCounter *)he->value;
counter->ClearTotals();
@ -8838,7 +8838,7 @@ void ReflowCountMgr::ClearGrandTotals()
}
//------------------------------------------------------------------
PRIntn ReflowCountMgr::DoDisplayDiffTotals(PLHashEntry *he, PRIntn i, void *arg)
int ReflowCountMgr::DoDisplayDiffTotals(PLHashEntry *he, int i, void *arg)
{
bool cycledOnce = (arg != 0);

View File

@ -91,7 +91,7 @@ public:
protected:
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
void ReparentFrameList(const nsFrameList& aFrameList);
// mLegendFrame is a nsLegendFrame or a nsHTMLScrollFrame with the
@ -245,7 +245,7 @@ void
nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext,
nsPoint aPt, const nsRect& aDirtyRect, PRUint32 aBGFlags)
{
PRIntn skipSides = GetSkipSides();
int skipSides = GetSkipSides();
const nsStyleBorder* borderStyle = GetStyleBorder();
nscoord topBorder = borderStyle->GetComputedBorderWidth(NS_SIDE_TOP);
@ -590,7 +590,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
return NS_OK;
}
PRIntn
int
nsFieldSetFrame::GetSkipSides() const
{
return 0;

View File

@ -477,7 +477,7 @@ nsFileControlFrame::GetTextControlFrame()
return static_cast<nsTextControlFrame*>(tc);
}
PRIntn
int
nsFileControlFrame::GetSkipSides() const
{
return 0;

View File

@ -143,7 +143,7 @@ protected:
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
}
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
/**
* The text box input.

View File

@ -328,7 +328,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
aDesiredSize.ascent += yoff;
}
PRIntn
int
nsHTMLButtonControlFrame::GetSkipSides() const
{
return 0;

View File

@ -108,7 +108,7 @@ protected:
nsMargin aFocusPadding,
nsReflowStatus& aStatus);
PRIntn GetSkipSides() const;
int GetSkipSides() const;
nsButtonFrameRenderer mRenderer;
};

View File

@ -1093,7 +1093,7 @@ nsListControlFrame::OnOptionSelected(PRInt32 aIndex, bool aSelected)
return NS_OK;
}
PRIntn
int
nsListControlFrame::GetSkipSides() const
{
// Don't skip any sides during border rendering

View File

@ -113,7 +113,7 @@ public:
#endif
// nsContainerFrame
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
// nsIListControlFrame
virtual void SetComboboxFrame(nsIFrame* aComboboxFrame);

View File

@ -207,7 +207,7 @@ RecordReflowStatus(bool aChildIsBlock, nsReflowStatus aFrameReflowStatus)
// 0: child-is-block
// 1: child-is-inline
PRIntn index = 0;
int index = 0;
if (!aChildIsBlock) index |= 1;
// Compute new status
@ -6098,13 +6098,13 @@ nsBlockFrame::RecoverFloatsFor(nsIFrame* aFrame,
//////////////////////////////////////////////////////////////////////
// Painting, event handling
PRIntn
int
nsBlockFrame::GetSkipSides() const
{
if (IS_TRUE_OVERFLOW_CONTAINER(this))
return (1 << NS_SIDE_TOP) | (1 << NS_SIDE_BOTTOM);
PRIntn skip = 0;
int skip = 0;
if (GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}

View File

@ -397,7 +397,7 @@ protected:
void SlideLine(nsBlockReflowState& aState,
nsLineBox* aLine, nscoord aDY);
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
virtual void ComputeFinalSize(const nsHTMLReflowState& aReflowState,
nsBlockReflowState& aState,

View File

@ -94,7 +94,7 @@ nsBlockReflowContext::ComputeCollapsedTopMargin(const nsHTMLReflowState& aRS,
// B->nextinflow, we'll traverse B->nextinflow twice. But this is
// OK because our traversal is idempotent.
for ( ;block; block = static_cast<nsBlockFrame*>(block->GetNextInFlow())) {
for (PRIntn overflowLines = false; overflowLines <= true; ++overflowLines) {
for (int overflowLines = false; overflowLines <= true; ++overflowLines) {
nsBlockFrame::line_iterator line;
nsBlockFrame::line_iterator line_end;
bool anyLines = true;

View File

@ -444,11 +444,11 @@ static bool RomanToText(PRInt32 ordinal, nsString& result, const char* achars, c
}
nsAutoString addOn, decStr;
decStr.AppendInt(ordinal, 10);
PRIntn len = decStr.Length();
int len = decStr.Length();
const PRUnichar* dp = decStr.get();
const PRUnichar* end = dp + len;
PRIntn romanPos = len;
PRIntn n;
int romanPos = len;
int n;
for (; dp < end; dp++) {
romanPos--;

View File

@ -571,7 +571,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
return NS_OK;
}
PRIntn
int
nsCanvasFrame::GetSkipSides() const
{
return 0;

View File

@ -108,7 +108,7 @@ public:
nsRect CanvasArea() const;
protected:
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
// Data members
bool mDoPaintFocus;

View File

@ -84,7 +84,7 @@ protected:
nscoord mLastBalanceHeight;
nsReflowStatus mLastFrameStatus;
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
/**
* These are the parameters that control the layout of columns.
@ -1124,7 +1124,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return NS_OK;
}
PRIntn
int
nsColumnSetFrame::GetSkipSides() const
{
return 0;

View File

@ -46,7 +46,7 @@ nsFirstLetterFrame::GetType() const
return nsGkAtoms::letterFrame;
}
PRIntn
int
nsFirstLetterFrame::GetSkipSides() const
{
return 0;

View File

@ -80,7 +80,7 @@ public:
protected:
nscoord mBaseline;
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
void DrainOverflowFrames(nsPresContext* aPresContext);
};

View File

@ -911,7 +911,7 @@ nsIFrame::GetUsedPadding() const
void
nsIFrame::ApplySkipSides(nsMargin& aMargin) const
{
PRIntn skipSides = GetSkipSides();
int skipSides = GetSkipSides();
if (skipSides & (1 << NS_SIDE_TOP))
aMargin.top = 0;
if (skipSides & (1 << NS_SIDE_RIGHT))
@ -1041,7 +1041,7 @@ bool
nsIFrame::ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
const nsSize& aFrameSize,
const nsSize& aBorderArea,
PRIntn aSkipSides,
int aSkipSides,
nscoord aRadii[8])
{
// Percentages are relative to whichever side they're on.
@ -8143,7 +8143,7 @@ nsFrame::GetBoxName(nsAutoString& aName)
#ifdef DEBUG
static void
GetTagName(nsFrame* aFrame, nsIContent* aContent, PRIntn aResultSize,
GetTagName(nsFrame* aFrame, nsIContent* aContent, int aResultSize,
char* aResult)
{
if (aContent) {

View File

@ -30,7 +30,7 @@
#define NS_FRAME_TRACE_CHILD_REFLOW 0x4
#define NS_FRAME_TRACE_NEW_FRAMES 0x8
#define NS_FRAME_LOG_TEST(_lm,_bit) (PRIntn((_lm)->level) & (_bit))
#define NS_FRAME_LOG_TEST(_lm,_bit) (int((_lm)->level) & (_bit))
#ifdef DEBUG
#define NS_FRAME_LOG(_bit,_args) \

View File

@ -662,7 +662,7 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsPresContext* aPresContext,
}
PRIntn
int
nsHTMLFramesetFrame::GetSkipSides() const
{
return 0;

View File

@ -179,7 +179,7 @@ protected:
bool GetNoResize(nsIFrame* aChildFrame);
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
void ReflowPlaceChild(nsIFrame* aChild,
nsPresContext* aPresContext,

View File

@ -147,7 +147,7 @@ nsHTMLScrollFrame::GetSplittableType() const
return NS_FRAME_NOT_SPLITTABLE;
}
PRIntn
int
nsHTMLScrollFrame::GetSkipSides() const
{
return 0;
@ -1087,7 +1087,7 @@ nsXULScrollFrame::GetPadding(nsMargin& aMargin)
return NS_OK;
}
PRIntn
int
nsXULScrollFrame::GetSkipSides() const
{
return 0;

View File

@ -541,7 +541,7 @@ public:
protected:
nsHTMLScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot);
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
void SetSuppressScrollbarUpdate(bool aSuppress) {
mInner.mSupppressScrollbarUpdate = aSuppress;
@ -788,7 +788,7 @@ public:
protected:
nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot);
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
void ClampAndSetBounds(nsBoxLayoutState& aState,
nsRect& aRect,

View File

@ -1001,7 +1001,7 @@ public:
static bool ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
const nsSize& aFrameSize,
const nsSize& aBorderArea,
PRIntn aSkipSides,
int aSkipSides,
nscoord aRadii[8]);
/*
@ -2357,7 +2357,7 @@ public:
* Determine whether borders should not be painted on certain sides of the
* frame.
*/
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
/**
* @returns true if this frame is selected.

View File

@ -1743,10 +1743,10 @@ nsImageFrame::List(FILE* out, PRInt32 aIndent) const
}
#endif
PRIntn
int
nsImageFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
if (nullptr != GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}

View File

@ -125,7 +125,7 @@ public:
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
#endif
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
nsresult GetIntrinsicImageSize(nsSize& aSize);

View File

@ -840,10 +840,10 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext,
//////////////////////////////////////////////////////////////////////
PRIntn
int
nsInlineFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
if (!IsLeftMost()) {
nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
if ((GetStateBits() & NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) ||
@ -878,8 +878,8 @@ nsInlineFrame::GetSkipSides() const
// the split we are involves getting our first continuation, which might be
// expensive. So don't bother if we already have the relevant bits set.
bool ltr = (NS_STYLE_DIRECTION_LTR == GetStyleVisibility()->mDirection);
PRIntn startBit = (1 << (ltr ? NS_SIDE_LEFT : NS_SIDE_RIGHT));
PRIntn endBit = (1 << (ltr ? NS_SIDE_RIGHT : NS_SIDE_LEFT));
int startBit = (1 << (ltr ? NS_SIDE_LEFT : NS_SIDE_RIGHT));
int endBit = (1 << (ltr ? NS_SIDE_RIGHT : NS_SIDE_LEFT));
if (((startBit | endBit) & skip) != (startBit | endBit)) {
// We're missing one of the skip bits, so check whether we need to set it.
// Only get the first continuation once, as an optimization.

View File

@ -135,7 +135,7 @@ protected:
nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
nsresult ReflowFrames(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,

View File

@ -203,7 +203,7 @@ nsSubDocumentFrame::ShowViewer()
}
}
PRIntn
int
nsSubDocumentFrame::GetSkipSides() const
{
return 0;

View File

@ -117,7 +117,7 @@ protected:
virtual nscoord GetIntrinsicWidth();
virtual nscoord GetIntrinsicHeight();
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
// Hide or show our document viewer
void HideViewer();

View File

@ -1931,7 +1931,7 @@ void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
{
// for visual debug
PRIntn skipSides = 0;
int skipSides = 0;
nsPresContext* presContext = mFrame->PresContext();
nsStyleContext* styleContext = mFrame->GetStyleContext();
nsRect rect = mRect + ToReferenceFrame();

View File

@ -80,7 +80,7 @@ public:
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
}
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
NS_IMETHOD
AppendFrames(ChildListID aListID,

View File

@ -72,7 +72,7 @@ protected:
nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLTokenFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
// hook to perform MathML-specific actions depending on the tag
virtual void ProcessTextData();

View File

@ -75,7 +75,7 @@ protected:
nsMathMLmactionFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmactionFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
private:
PRInt32 mActionType;

View File

@ -83,7 +83,7 @@ protected:
nsMathMLmfencedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmfencedFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
nsMathMLChar* mOpenChar;
nsMathMLChar* mCloseChar;

View File

@ -95,7 +95,7 @@ protected:
nsMathMLmfracFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmfracFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
nsresult PlaceInternal(nsRenderingContext& aRenderingContext,
bool aPlaceOrigin,

View File

@ -31,7 +31,7 @@ protected:
nsMathMLmmultiscriptsFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmmultiscriptsFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
private:
nscoord mSubScriptShift;

View File

@ -65,7 +65,7 @@ protected:
nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
virtual ~nsMathMLmoFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator.
nsOperatorFlags mFlags;

View File

@ -42,7 +42,7 @@ protected:
nsMathMLmpaddedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmpaddedFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
private:
nsCSSValue mWidth;

View File

@ -36,7 +36,7 @@ protected:
: nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmphantomFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};
#endif /* nsMathMLmphantomFrame_h___ */

View File

@ -50,7 +50,7 @@ protected:
nsMathMLmrootFrame(nsStyleContext* aContext);
virtual ~nsMathMLmrootFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
nsMathMLChar mSqrChar;
nsRect mBarRect;

View File

@ -36,7 +36,7 @@ protected:
nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmrowFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};
#endif /* nsMathMLmrowFrame_h___ */

View File

@ -39,7 +39,7 @@ protected:
nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmspaceFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
private:
nscoord mWidth;

View File

@ -44,7 +44,7 @@ protected:
nsMathMLmstyleFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmstyleFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};
#endif /* nsMathMLmstyleFrame_h___ */

View File

@ -40,7 +40,7 @@ public:
nsMathMLmsubFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmsubFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};
#endif /* nsMathMLmsubFrame_h___ */

View File

@ -41,7 +41,7 @@ protected:
nsMathMLmsubsupFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmsubsupFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};
#endif /* nsMathMLmsubsupFrame_h___ */

View File

@ -40,7 +40,7 @@ protected:
nsMathMLmsupFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmsupFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};
#endif /* nsMathMLmsupFrame_h___ */

View File

@ -256,7 +256,7 @@ protected:
nsMathMLmtdInnerFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
virtual ~nsMathMLmtdInnerFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
}; // class nsMathMLmtdInnerFrame
#endif /* nsMathMLmtableFrame_h___ */

View File

@ -49,7 +49,7 @@ protected:
nsMathMLmunderoverFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
virtual ~nsMathMLmunderoverFrame();
virtual PRIntn GetSkipSides() const { return 0; }
virtual int GetSkipSides() const { return 0; }
};

View File

@ -494,10 +494,10 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
}
PRIntn
int
nsTableCellFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
if (nullptr != GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}

View File

@ -212,7 +212,7 @@ public:
protected:
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
/**
* GetBorderOverflow says how far the cell's own borders extend

View File

@ -333,10 +333,10 @@ nsTableColGroupFrame::RemoveFrame(ChildListID aListID,
return NS_OK;
}
PRIntn
int
nsTableColGroupFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
if (nullptr != GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}

View File

@ -202,7 +202,7 @@ protected:
const nsFrameList::Slice& aCols);
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
// data members
PRInt32 mColCount;

View File

@ -1297,7 +1297,7 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext,
if (GetStyleVisibility()->IsVisible()) {
if (!IsBorderCollapse()) {
PRIntn skipSides = GetSkipSides();
int skipSides = GetSkipSides();
nsRect rect(aPt, mRect.Size());
nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
aDirtyRect, rect, mStyleContext, skipSides);
@ -1311,10 +1311,10 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext,
}
}
PRIntn
int
nsTableFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
// frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
// account for pagination
if (nullptr != GetPrevInFlow()) {

View File

@ -489,7 +489,7 @@ protected:
void InitChildReflowState(nsHTMLReflowState& aReflowState);
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
public:
bool IsRowInserted() const;

View File

@ -157,7 +157,7 @@ protected:
/** Always returns 0, since the outer table frame has no border of its own
* The inner table frame can answer this question in a meaningful way.
* @see nsContainerFrame::GetSkipSides */
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
PRUint8 GetCaptionSide(); // NS_STYLE_CAPTION_SIDE_* or NO_SIDE
@ -226,7 +226,7 @@ private:
nsFrameList mCaptionFrames;
};
inline PRIntn nsTableOuterFrame::GetSkipSides() const
inline int nsTableOuterFrame::GetSkipSides() const
{ return 0; }
#endif

View File

@ -578,10 +578,10 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
}
PRIntn
int
nsTableRowFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
if (nullptr != GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}

View File

@ -240,7 +240,7 @@ protected:
nsTableCellReflowState& aReflowState);
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
// row-specific methods

View File

@ -231,10 +231,10 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aLists, item, DisplayRows);
}
PRIntn
int
nsTableRowGroupFrame::GetSkipSides() const
{
PRIntn skip = 0;
int skip = 0;
if (nullptr != GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}

View File

@ -332,7 +332,7 @@ protected:
nsHTMLReflowState& aReflowState);
/** implement abstract method on nsContainerFrame */
virtual PRIntn GetSkipSides() const;
virtual int GetSkipSides() const;
void PlaceChild(nsPresContext* aPresContext,
nsRowGroupReflowState& aReflowState,

View File

@ -126,7 +126,7 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsGroupBoxFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext,
nsPoint aPt, const nsRect& aDirtyRect) {
PRIntn skipSides = 0;
int skipSides = 0;
const nsStyleBorder* borderStyleData = GetStyleBorder();
const nsMargin& border = borderStyleData->GetComputedBorder();
nscoord yoff = 0;

View File

@ -544,7 +544,7 @@ nsInputStreamWrapper::LazyInit()
CACHE_LOG_DEBUG(("nsInputStreamWrapper::LazyInit "
"[entry=%p, wrapper=%p, mInput=%p, rv=%d]",
mDescriptor, this, mInput.get(), PRIntn(rv)));
mDescriptor, this, mInput.get(), int(rv)));
if (NS_FAILED(rv)) return rv;

View File

@ -139,7 +139,7 @@ nsDiskCacheInputStream::Read(char * buffer, PRUint32 count, PRUint32 * bytesRead
nsresult rv = NS_ErrorAccordingToNSPR();
CACHE_LOG_DEBUG(("CACHE: nsDiskCacheInputStream::Read PR_Read failed"
"[stream=%p, rv=%d, NSPR error %s",
this, PRIntn(rv), PR_ErrorToName(error)));
this, int(rv), PR_ErrorToName(error)));
return rv;
}
@ -699,7 +699,7 @@ nsDiskCacheStreamIO::UpdateFileSize()
nsresult
nsDiskCacheStreamIO::OpenCacheFile(PRIntn flags, PRFileDesc ** fd)
nsDiskCacheStreamIO::OpenCacheFile(int flags, PRFileDesc ** fd)
{
NS_ENSURE_ARG_POINTER(fd);

View File

@ -58,7 +58,7 @@ private:
void Close();
nsresult OpenCacheFile(PRIntn flags, PRFileDesc ** fd);
nsresult OpenCacheFile(int flags, PRFileDesc ** fd);
nsresult ReadCacheBlocks();
nsresult FlushBufferToFile();
void UpdateFileSize();

View File

@ -965,7 +965,7 @@ nsHostResolver::ThreadFunc(void *arg)
while (resolver->GetHostToLookup(&rec)) {
LOG(("Calling getaddrinfo for host [%s].\n", rec->host));
PRIntn flags = PR_AI_ADDRCONFIG;
int flags = PR_AI_ADDRCONFIG;
if (!(rec->flags & RES_CANON_NAME))
flags |= PR_AI_NOCANONNAME;

View File

@ -145,11 +145,11 @@ MaybeMarkCacheEntryValid(const void * channel,
nsresult rv = cacheEntry->MarkValid();
LOG(("Marking cache entry valid "
"[channel=%p, entry=%p, access=%d, result=%d]",
channel, cacheEntry, PRIntn(cacheAccess), PRIntn(rv)));
channel, cacheEntry, int(cacheAccess), int(rv)));
} else {
LOG(("Not marking read-only cache entry valid "
"[channel=%p, entry=%p, access=%d]",
channel, cacheEntry, PRIntn(cacheAccess)));
channel, cacheEntry, int(cacheAccess)));
}
}
@ -2891,7 +2891,7 @@ HttpCacheQuery::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry,
{
LOG(("HttpCacheQuery::OnCacheEntryAvailable [channel=%p entry=%p "
"access=%x status=%x, mRunConut=%d]\n", mChannel.get(), entry, access,
status, PRIntn(mRunCount)));
status, int(mRunCount)));
// XXX Bug 759805: Sometimes we will call this method directly from
// HttpCacheQuery::Run when AsyncOpenCacheEntry fails, but
@ -5862,7 +5862,7 @@ nsHttpChannel::DoInvalidateCacheEntry(const nsCString &key)
GetCacheSessionNameForStoragePolicy(storagePolicy, mPrivateBrowsing);
LOG(("DoInvalidateCacheEntry [channel=%p session=%s policy=%d key=%s]",
this, clientID, PRIntn(storagePolicy), key.get()));
this, clientID, int(storagePolicy), key.get()));
nsresult rv;
nsCOMPtr<nsICacheService> serv =
@ -5881,7 +5881,7 @@ nsHttpChannel::DoInvalidateCacheEntry(const nsCString &key)
}
LOG(("DoInvalidateCacheEntry [channel=%p session=%s policy=%d key=%s rv=%d]",
this, clientID, PRIntn(storagePolicy), key.get(), PRIntn(rv)));
this, clientID, int(storagePolicy), key.get(), int(rv)));
}
nsCacheStoragePolicy

View File

@ -1180,7 +1180,7 @@ nsSOCKSIOLayerGetPeerName(PRFileDesc *fd, PRNetAddr *addr)
}
static PRStatus
nsSOCKSIOLayerListen(PRFileDesc *fd, PRIntn backlog)
nsSOCKSIOLayerListen(PRFileDesc *fd, int backlog)
{
// TODO: implement SOCKS support for listen
return fd->lower->methods->listen(fd->lower, backlog);

View File

@ -237,7 +237,7 @@ main(int argc, char* argv[])
if (argc < 3)
usage(argv);
PRIntn i=0;
int i=0;
bool sync = false;
if (nsCRT::strcasecmp(argv[1], "-sync") == 0) {
if (argc < 4)

View File

@ -299,7 +299,7 @@ HTMLTagsHashCodeUCPtr(const void *key)
return HashString(static_cast<const PRUnichar*>(key));
}
static PRIntn
static int
HTMLTagsKeyCompareUCPtr(const void *key1, const void *key2)
{
const PRUnichar *str1 = (const PRUnichar *)key1;

View File

@ -901,7 +901,7 @@ ProcessRDN(CERTRDN* rdn, nsAString &finalString, nsINSSComponent *nssComponent)
// We know we can fit buffer of this length. CERT_RFC1485_EscapeAndQuote
// will fail if we provide smaller buffer then the result can fit to.
PRIntn escapedValueCapacity = decodeItem->len * 3 + 3;
int escapedValueCapacity = decodeItem->len * 3 + 3;
nsAutoArrayPtr<char> escapedValue;
escapedValue = new char[escapedValueCapacity];
if (!escapedValue) {

View File

@ -123,7 +123,7 @@ static PLHashNumber PR_CALLBACK certHashtable_keyHash(const void *key)
return hash;
}
static PRIntn PR_CALLBACK certHashtable_keyCompare(const void *k1, const void *k2)
static int PR_CALLBACK certHashtable_keyCompare(const void *k1, const void *k2)
{
// return type is a bool, answering the question "are the keys equal?"
@ -150,7 +150,7 @@ static PRIntn PR_CALLBACK certHashtable_keyCompare(const void *k1, const void *k
return true;
}
static PRIntn PR_CALLBACK certHashtable_valueCompare(const void *v1, const void *v2)
static int PR_CALLBACK certHashtable_valueCompare(const void *v1, const void *v2)
{
// two values are identical if their keys are identical
@ -163,7 +163,7 @@ static PRIntn PR_CALLBACK certHashtable_valueCompare(const void *v1, const void
return certHashtable_keyCompare(&cert1->certKey, &cert2->certKey);
}
static PRIntn PR_CALLBACK certHashtable_clearEntry(PLHashEntry *he, PRIntn /*index*/, void * /*userdata*/)
static int PR_CALLBACK certHashtable_clearEntry(PLHashEntry *he, int /*index*/, void * /*userdata*/)
{
if (he && he->value) {
CERT_DestroyCertificate((CERTCertificate*)he->value);

View File

@ -698,12 +698,12 @@ PRStatus nsNSSSocketInfo::CloseSocketAndDestroy(
specifically tailored to SSLTRACE. Sigh. */
#define DUMPBUF_LINESIZE 24
static void
nsDumpBuffer(unsigned char *buf, PRIntn len)
nsDumpBuffer(unsigned char *buf, int len)
{
char hexbuf[DUMPBUF_LINESIZE*3+1];
char chrbuf[DUMPBUF_LINESIZE+1];
static const char *hex = "0123456789abcdef";
PRIntn i = 0, l = 0;
int i = 0, l = 0;
char ch, *c, *h;
if (len == 0)
return;
@ -997,7 +997,7 @@ nsTHashtable<nsCStringHashKey> *nsSSLIOLayerHelpers::mRenegoUnrestrictedSites =
bool nsSSLIOLayerHelpers::mTreatUnsafeNegotiationAsBroken = false;
PRInt32 nsSSLIOLayerHelpers::mWarnLevelMissingRFC5746 = 1;
static PRIntn _PSM_InvalidInt(void)
static int _PSM_InvalidInt(void)
{
PR_ASSERT(!"I/O method is invalid");
PR_SetError(PR_INVALID_METHOD_ERROR, 0);
@ -1064,7 +1064,7 @@ static PRStatus PR_CALLBACK PSMSetsocketoption(PRFileDesc *fd,
}
static PRInt32 PR_CALLBACK PSMRecv(PRFileDesc *fd, void *buf, PRInt32 amount,
PRIntn flags, PRIntervalTime timeout)
int flags, PRIntervalTime timeout)
{
nsNSSShutDownPreventionLock locker;
nsNSSSocketInfo *socketInfo = getSocketInfoIfRunning(fd, reading, locker);
@ -1089,7 +1089,7 @@ static PRInt32 PR_CALLBACK PSMRecv(PRFileDesc *fd, void *buf, PRInt32 amount,
}
static PRInt32 PR_CALLBACK PSMSend(PRFileDesc *fd, const void *buf, PRInt32 amount,
PRIntn flags, PRIntervalTime timeout)
int flags, PRIntervalTime timeout)
{
nsNSSShutDownPreventionLock locker;
nsNSSSocketInfo *socketInfo = getSocketInfoIfRunning(fd, writing, locker);
@ -1136,7 +1136,7 @@ static PRStatus PR_CALLBACK PSMConnectcontinue(PRFileDesc *fd, PRInt16 out_flags
return fd->lower->methods->connectcontinue(fd, out_flags);
}
static PRIntn PSMAvailable(void)
static int PSMAvailable(void)
{
// This is called through PR_Available(), but is not implemented in PSM
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
@ -1436,7 +1436,7 @@ typedef struct {
SECItem derConstraint;
SECItem derPort;
CERTGeneralName* constraint; /* decoded constraint */
PRIntn port; /* decoded port number */
int port; /* decoded port number */
} CERTCertificateScopeEntry;
typedef struct {
@ -1562,7 +1562,7 @@ static char* _str_to_lower(char* string)
* the port) does not satisfy the restriction
*/
static bool CERT_MatchesScopeOfUse(CERTCertificate* cert, char* hostname,
char* hostIP, PRIntn port)
char* hostIP, int port)
{
bool rv = true; /* whether the cert can be presented */
SECStatus srv;
@ -1888,7 +1888,7 @@ void ClientAuthDataRunnable::RunOnTargetThread()
CERTCertListNode* node;
CERTCertNicknames* nicknames = NULL;
char* extracted = NULL;
PRIntn keyError = 0; /* used for private key retrieval error */
int keyError = 0; /* used for private key retrieval error */
SSM_UserCertChoice certChoice;
PRInt32 NumberOfCerts = 0;
void * wincx = mSocketInfo;

View File

@ -585,7 +585,7 @@ nsPKCS12Blob::inputToDecoder(SEC_PKCS12DecoderContext *dcx, nsIFile *file)
OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath)
{
PRIntn len;
int len;
char *cursor;
len = PL_strlen(macPath);

View File

@ -265,7 +265,7 @@ bool shutdown_server = false;
bool do_http_proxy = false;
bool any_host_spec_config = false;
PR_CALLBACK PRIntn ClientAuthValueComparator(const void *v1, const void *v2)
PR_CALLBACK int ClientAuthValueComparator(const void *v1, const void *v2)
{
int a = *static_cast<const client_auth_option*>(v1) -
*static_cast<const client_auth_option*>(v2);
@ -277,7 +277,7 @@ PR_CALLBACK PRIntn ClientAuthValueComparator(const void *v1, const void *v2)
return -1;
}
static PRIntn match_hostname(PLHashEntry *he, PRIntn index, void* arg)
static int match_hostname(PLHashEntry *he, int index, void* arg)
{
server_match_t *match = (server_match_t*)arg;
if (match->fullHost.find((char*)he->key) != string::npos)
@ -1268,21 +1268,21 @@ int parseConfigFile(const char* filePath)
return 0;
}
PRIntn freeHostCertHashItems(PLHashEntry *he, PRIntn i, void *arg)
int freeHostCertHashItems(PLHashEntry *he, int i, void *arg)
{
delete [] (char*)he->key;
delete [] (char*)he->value;
return HT_ENUMERATE_REMOVE;
}
PRIntn freeHostRedirHashItems(PLHashEntry *he, PRIntn i, void *arg)
int freeHostRedirHashItems(PLHashEntry *he, int i, void *arg)
{
delete [] (char*)he->key;
delete [] (char*)he->value;
return HT_ENUMERATE_REMOVE;
}
PRIntn freeClientAuthHashItems(PLHashEntry *he, PRIntn i, void *arg)
int freeClientAuthHashItems(PLHashEntry *he, int i, void *arg)
{
delete [] (char*)he->key;
delete (client_auth_option*)he->value;

View File

@ -1959,7 +1959,7 @@ WriteExtraData(nsIFile* extraFile,
bool truncate=false)
{
PRFileDesc* fd;
PRIntn truncOrAppend = truncate ? PR_TRUNCATE : PR_APPEND;
int truncOrAppend = truncate ? PR_TRUNCATE : PR_APPEND;
nsresult rv =
extraFile->OpenNSPRFileDesc(PR_WRONLY | PR_CREATE_FILE | truncOrAppend,
0600, &fd);

View File

@ -190,7 +190,7 @@ bad:
} \
PR_END_MACRO
static PRIntn tabulate_node(PLHashEntry *he, PRIntn i, void *arg)
static int tabulate_node(PLHashEntry *he, int i, void *arg)
{
tmgraphnode *node = (tmgraphnode*) he;
tmgraphnode **table = (tmgraphnode**) arg;

View File

@ -165,7 +165,7 @@ EventFilter::Build(const char * filterVar)
// Copied from nspr logging code (read of NSPR_LOG_MODULES)
char eventName[64];
PRIntn evlen = strlen(filterVar), pos = 0, count, delta = 0;
int evlen = strlen(filterVar), pos = 0, count, delta = 0;
// Read up to a comma or EOF -> get name of an event first in the list
count = sscanf(filterVar, "%63[^,]%n", eventName, &delta);
@ -257,7 +257,7 @@ void FlushingThread(void * aArg)
}
firstBatch = false;
static const PRIntn kBufferSize = 2048;
static const int kBufferSize = 2048;
char buf[kBufferSize];
PR_snprintf(buf, kBufferSize, "{\"thread\":\"%s\",\"log\":[\n",

View File

@ -255,7 +255,7 @@ struct FixedBuffer
PRUint32 curlen;
};
static PRIntn
static int
StuffFixedBuffer(void *closure, const char *buf, PRUint32 len)
{
if (!len)

View File

@ -281,7 +281,7 @@ public:
mNewStats.mObjsOutstandingSquared += cnt * cnt;
}
static PRIntn DumpEntry(PLHashEntry *he, PRIntn i, void *arg) {
static int DumpEntry(PLHashEntry *he, int i, void *arg) {
BloatEntry* entry = (BloatEntry*)he->value;
if (entry) {
entry->Accumulate();
@ -290,7 +290,7 @@ public:
return HT_ENUMERATE_NEXT;
}
static PRIntn TotalEntries(PLHashEntry *he, PRIntn i, void *arg) {
static int TotalEntries(PLHashEntry *he, int i, void *arg) {
BloatEntry* entry = (BloatEntry*)he->value;
if (entry && nsCRT::strcmp(entry->mClassName, "TOTAL") != 0) {
entry->Total((BloatEntry*)arg);
@ -342,7 +342,7 @@ public:
return true;
}
void Dump(PRIntn i, FILE* out, nsTraceRefcntImpl::StatisticsType type) {
void Dump(int i, FILE* out, nsTraceRefcntImpl::StatisticsType type) {
nsTraceRefcntStats* stats = (type == nsTraceRefcntImpl::NEW_STATS) ? &mNewStats : &mAllStats;
if (gLogLeaksOnly && !HaveLeaks(stats)) {
return;
@ -444,7 +444,7 @@ GetBloatEntry(const char* aTypeName, PRUint32 aInstanceSize)
return entry;
}
static PRIntn DumpSerialNumbers(PLHashEntry* aHashEntry, PRIntn aIndex, void* aClosure)
static int DumpSerialNumbers(PLHashEntry* aHashEntry, int aIndex, void* aClosure)
{
serialNumberRecord* record = reinterpret_cast<serialNumberRecord *>(aHashEntry->value);
#ifdef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR

View File

@ -180,8 +180,11 @@ public:
};
#define NS_IS_SPACE(VAL) \
(((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
inline bool
NS_IS_SPACE(PRUnichar c)
{
return ((int(c) & 0x7f) == int(c)) && isspace(int(c));
}
#define NS_IS_CNTRL(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : iscntrl(i))
#define NS_IS_DIGIT(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))

View File

@ -708,7 +708,7 @@ static struct NumArgState* BuildArgArray(const PRUnichar *fmt,
nas[cn].type = TYPE_UINT32;
} else if (sizeof(void *) == sizeof(PRInt64)) {
nas[cn].type = TYPE_UINT64;
} else if (sizeof(void *) == sizeof(PRIntn)) {
} else if (sizeof(void *) == sizeof(int)) {
nas[cn].type = TYPE_UINTN;
} else {
nas[cn].type = TYPE_UNKNOWN;
@ -771,7 +771,7 @@ static struct NumArgState* BuildArgArray(const PRUnichar *fmt,
case TYPE_INT16:
case TYPE_UINT16:
case TYPE_INTN:
case TYPE_UINTN: (void)va_arg(ap, PRIntn); break;
case TYPE_UINTN: (void)va_arg(ap, int); break;
case TYPE_INT32: (void)va_arg(ap, PRInt32); break;
@ -783,7 +783,7 @@ static struct NumArgState* BuildArgArray(const PRUnichar *fmt,
case TYPE_STRING: (void)va_arg(ap, char*); break;
case TYPE_INTSTR: (void)va_arg(ap, PRIntn*); break;
case TYPE_INTSTR: (void)va_arg(ap, int*); break;
case TYPE_DOUBLE: (void)va_arg(ap, double); break;

Some files were not shown because too many files have changed in this diff Show More