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

@@ -97,7 +97,7 @@ class nsCaret : public nsISelectionListener
*
* Note: This call breaks the caret's ability to blink at all.
**/
nsresult DrawAtPosition(nsIDOMNode* aNode, PRInt32 aOffset);
nsresult DrawAtPosition(nsIDOMNode* aNode, int32_t aOffset);
/** GetCaretFrame
* Get the current frame that the caret should be drawn in. If the caret is
@@ -106,7 +106,7 @@ class nsCaret : public nsISelectionListener
*
* @param aOffset is result of the caret offset in the content.
*/
nsIFrame* GetCaretFrame(PRInt32 *aOffset = nullptr);
nsIFrame* GetCaretFrame(int32_t *aOffset = nullptr);
/** GetCaretRect
* Get the current caret rect. Only call this when GetCaretFrame returns
@@ -157,11 +157,11 @@ class nsCaret : public nsISelectionListener
static void CaretBlinkCallback(nsITimer *aTimer, void *aClosure);
nsresult GetCaretFrameForNodeOffset(nsIContent* aContentNode,
PRInt32 aOffset,
int32_t aOffset,
nsFrameSelection::HINT aFrameHint,
PRUint8 aBidiLevel,
uint8_t aBidiLevel,
nsIFrame** aReturnFrame,
PRInt32* aReturnOffset);
int32_t* aReturnOffset);
NS_IMETHOD CheckCaretDrawingState();
@@ -178,18 +178,18 @@ protected:
void InvalidateTextOverflowBlock();
bool DrawAtPositionWithHint(nsIDOMNode* aNode,
PRInt32 aOffset,
int32_t aOffset,
nsFrameSelection::HINT aFrameHint,
PRUint8 aBidiLevel,
uint8_t aBidiLevel,
bool aInvalidate);
struct Metrics {
nscoord mBidiIndicatorSize; // width and height of bidi indicator
nscoord mCaretWidth; // full caret width including bidi indicator
};
Metrics ComputeMetrics(nsIFrame* aFrame, PRInt32 aOffset, nscoord aCaretHeight);
Metrics ComputeMetrics(nsIFrame* aFrame, int32_t aOffset, nscoord aCaretHeight);
nsresult GetGeometryForFrame(nsIFrame* aFrame,
PRInt32 aFrameOffset,
int32_t aFrameOffset,
nsRect* aRect,
nscoord* aBidiIndicatorSize);
@@ -202,7 +202,7 @@ protected:
void DrawCaret(bool aInvalidate);
void DrawCaretAfterBriefDelay();
bool UpdateCaretRects(nsIFrame* aFrame, PRInt32 aFrameOffset);
bool UpdateCaretRects(nsIFrame* aFrame, int32_t aFrameOffset);
static void InvalidateRects(const nsRect &aRect, const nsRect &aHook,
nsIFrame *aFrame);
nsRect GetHookRect()
@@ -236,7 +236,7 @@ protected:
// XXX these fields should go away and the values be acquired as needed,
// probably by ComputeMetrics.
PRUint32 mBlinkRate; // time for one cyle (on then off), in milliseconds
uint32_t mBlinkRate; // time for one cyle (on then off), in milliseconds
nscoord mCaretWidthCSSPx; // caret width in CSS pixels
float mCaretAspectRatio; // caret width/height aspect ratio
@@ -254,7 +254,7 @@ protected:
bool mKeyboardRTL; // is the keyboard language right-to-left
bool mBidiUI; // is bidi UI turned on
nsRect mHookRect; // directional hook on the caret
PRUint8 mLastBidiLevel; // saved bidi level of the last draw request, to use when we erase
uint8_t mLastBidiLevel; // saved bidi level of the last draw request, to use when we erase
#endif
nsRect mCaretRect; // the last caret rect, in the coodinates of the last frame.
@@ -262,7 +262,7 @@ protected:
// in (by DrawAtPosition()/DrawCaret()),
// note that this can be different than where it was
// actually drawn (anon <BR> in text control)
PRInt32 mLastContentOffset; // the offset for the last request
int32_t mLastContentOffset; // the offset for the last request
nsFrameSelection::HINT mLastHint; // the hint associated with the last request, see also
// mLastBidiLevel below