Code hygiene: don't use PR_TRUE and PR_FALSE, and use stdint types instead of PRInt types (no bug really, but you could say bug 579517)

This commit is contained in:
Ehsan Akhgari 2012-10-25 11:48:19 -04:00
Родитель 2fa08081b0
Коммит f3c0ac7a23
62 изменённых файлов: 175 добавлений и 175 удалений

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

@ -23,7 +23,7 @@ interface nsIDOMNode;
* nsCOMPtr<nsIObserverService> observerService =
* do_GetService("@mozilla.org/observer-service;1", &rv);
* if (NS_SUCCEEDED(rv))
* rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
* rv = observerService->AddObserver(this, "accessible-event", true);
*/
[scriptable, uuid(7f66a33a-9ed7-4fd4-87a8-e431b0f43368)]
interface nsIAccessibleEvent : nsISupports

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

@ -151,9 +151,9 @@ interface nsIImageLoadingContent : imgINotificationObserver
void forceReload();
/**
* Enables/disables image state forcing. When |aForce| is PR_TRUE, we force
* Enables/disables image state forcing. When |aForce| is true, we force
* nsImageLoadingContent::ImageState() to return |aState|. Call again with |aForce|
* as PR_FALSE to revert ImageState() to its original behaviour.
* as false to revert ImageState() to its original behaviour.
*/
void forceImageState(in boolean aForce, in unsigned long long aState);
};

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

@ -93,8 +93,8 @@ interface nsISelection : nsISupports
/**
* Indicates whether the node is part of the selection. If partlyContained
* is set to PR_TRUE, the function returns true when some part of the node
* is part of the selection. If partlyContained is set to PR_FALSE, the
* is set to true, the function returns true when some part of the node
* is part of the selection. If partlyContained is set to false, the
* function only returns true when the entire node is part of the selection.
*/
boolean containsNode(in nsIDOMNode node, in boolean partlyContained);
@ -127,8 +127,8 @@ interface nsISelection : nsISupports
/**
* Modifies the cursor Bidi level after a change in keyboard direction
* @param langRTL is PR_TRUE if the new language is right-to-left or
* PR_FALSE if the new language is left-to-right.
* @param langRTL is true if the new language is right-to-left or
* false if the new language is left-to-right.
*/
void selectionLanguageChange(in boolean langRTL);

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

@ -99,7 +99,7 @@ interface nsISelectionController : nsISelectionDisplay
* Set the caret as enabled or disabled. An enabled caret will
* draw or blink when made visible. A disabled caret will never show up.
* Can be called any time.
* @param aEnable PR_TRUE to enable caret. PR_FALSE to disable.
* @param aEnable true to enable caret. false to disable.
* @return always NS_OK
*/
@ -108,7 +108,7 @@ interface nsISelectionController : nsISelectionDisplay
/**
* Set the caret readonly or not. An readonly caret will
* draw but not blink when made visible.
* @param aReadOnly PR_TRUE to enable caret. PR_FALSE to disable.
* @param aReadOnly true to enable caret. false to disable.
* @return always NS_OK
*/
void setCaretReadOnly(in boolean readOnly);
@ -131,16 +131,16 @@ interface nsISelectionController : nsISelectionDisplay
/**
* Show the caret even in selections. By default the caret is hidden unless the
* selection is collapsed. Use this function to show the caret even in selections.
* @param aVisibility PR_TRUE to show the caret in selections. PR_FALSE to hide.
* @param aVisibility true to show the caret in selections. false to hide.
* @return always NS_OK
*/
void setCaretVisibilityDuringSelection(in boolean visibility);
/** CharacterMove will move the selection one character forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void characterMove(in boolean forward, in boolean extend);
@ -161,10 +161,10 @@ interface nsISelectionController : nsISelectionDisplay
[noscript] void characterExtendForBackspace();
/** WordMove will move the selection one word forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
@ -172,48 +172,48 @@ interface nsISelectionController : nsISelectionDisplay
/** wordExtendForDelete will extend the selection one word forward/backward in the document.
* this method is used internally for handling ctrl[option]-backspace and ctrl[option]-del.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
*/
[noscript] void wordExtendForDelete(in boolean forward);
/** LineMove will move the selection one line forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void lineMove(in boolean forward, in boolean extend);
/** IntraLineMove will move the selection to the front of the line or end of the line
* in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void intraLineMove(in boolean forward, in boolean extend);
/** PageMove will move the selection one page forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void pageMove(in boolean forward, in boolean extend);
/** CompleteScroll will move page view to the top or bottom of the document
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
*/
void completeScroll(in boolean forward);
/** CompleteMove will move page view to the top or bottom of the document
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void completeMove(in boolean forward, in boolean extend);

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

@ -87,7 +87,7 @@ interface nsIXMLHttpRequestUpload : nsIXMLHttpRequestEventTarget {
* nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(myxmlhttpreq));
*
* target->AddEventListener(NS_LITERAL_STRING("load"), mylistener,
* PR_FALSE)
* false)
*
* where mylistener is your event listener object that implements the
* interface nsIDOMEventListener.

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

@ -31,9 +31,9 @@ class nsDOMMutationRecord : public nsIDOMMutationRecord
public:
nsDOMMutationRecord(const nsAString& aType) : mType(aType)
{
mAttrName.SetIsVoid(PR_TRUE);
mAttrNamespace.SetIsVoid(PR_TRUE);
mPrevValue.SetIsVoid(PR_TRUE);
mAttrName.SetIsVoid(true);
mAttrNamespace.SetIsVoid(true);
mPrevValue.SetIsVoid(true);
}
virtual ~nsDOMMutationRecord() {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS

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

@ -21,7 +21,7 @@ interface nsIXTFAttributeHandler : nsISupports
// If the attribute 'name' is unknown the implementation should mark
// the returned string as being 'null' (i.e. return 'null' in JS;
// call SetIsVoid(PR_TRUE) in C++) rather than throw an exception.
// call SetIsVoid(true) in C++) rather than throw an exception.
// A 'void' result will be translated into the attribute missing
// by the wrapper. An empty result will be translated into
// the attribute having no value.

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

@ -27,8 +27,8 @@ interface nsIDocShellTreeItem : nsIDocShellTreeNode
* Compares the provided name against the item's name and
* returns the appropriate result.
*
* @return <CODE>PR_TRUE</CODE> if names match;
* <CODE>PR_FALSE</CODE> otherwise.
* @return <CODE>true</CODE> if names match;
* <CODE>false</CODE> otherwise.
*/
boolean nameEquals(in wstring name);

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

@ -206,7 +206,7 @@ interface nsIDOMEventTarget : nsISupports
* This is used to create the event target chain and implementations
* should set the necessary members of nsEventChainPreVisitor.
* At least aVisitor.mCanHandle must be set,
* usually also aVisitor.mParentTarget if mCanHandle is PR_TRUE.
* usually also aVisitor.mParentTarget if mCanHandle is true.
* First one tells that this object can handle the aVisitor.mEvent event and
* the latter one is the possible parent object for the event target chain.
* @see nsEventDispatcher.h for more documentation about aVisitor.
@ -220,7 +220,7 @@ interface nsIDOMEventTarget : nsISupports
void PreHandleEvent(in nsEventChainPreVisitorRef aVisitor);
/**
* If nsEventChainPreVisitor.mWantsWillHandleEvent is set PR_TRUE,
* If nsEventChainPreVisitor.mWantsWillHandleEvent is set true,
* called just before possible event handlers on this object will be called.
*/
[noscript, nostdcall]
@ -263,7 +263,7 @@ interface nsIDOMEventTarget : nsISupports
/**
* Get the event listener manager, the guy you talk to to register for events
* on this node.
* @param aMayCreate If PR_FALSE, returns a listener manager only if
* @param aMayCreate If false, returns a listener manager only if
* one already exists.
*/
[notxpcom, nostdcall]

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

@ -103,8 +103,8 @@ parent:
* Notifies chrome that there is a focus change involving an editable
* object (input, textarea, document, contentEditable. etc.)
*
* focus PR_TRUE if editable object is receiving focus
* PR_FALSE if losing focus
* focus true if editable object is receiving focus
* false if losing focus
* preference Native widget preference for IME updates
* seqno Current seqno value on the chrome side
*/
@ -114,7 +114,7 @@ parent:
/**
* Notifies chrome that there has been a change in text content
* One call can encompass both a delete and an insert operation
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
* Only called when NotifyIMEFocus returns true for mWantUpdates
*
* offset Starting offset of the change
* end Ending offset of the range deleted
@ -127,7 +127,7 @@ parent:
/**
* Notifies chrome that there has been a change in selection
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
* Only called when NotifyIMEFocus returns true for mWantUpdates
*
* seqno Current seqno value on the content side
* anchor Offset where the selection started
@ -137,7 +137,7 @@ parent:
/**
* Notifies chrome to refresh its text cache
* Only called when NotifyIMEFocus returns PR_TRUE for mWantHints
* Only called when NotifyIMEFocus returns true for mWantHints
*
* text The entire content of the text field
*/
@ -146,12 +146,12 @@ parent:
/**
* Instructs chrome to end any pending composition
*
* cancel PR_TRUE if composition should be cancelled
* cancel true if composition should be cancelled
* composition Text to commit before ending the composition
*
* if cancel is PR_TRUE,
* if cancel is true,
* widget should return empty string for composition
* if cancel is PR_FALSE,
* if cancel is false,
* widget should return the current composition text
*/
sync EndIMEComposition(bool cancel) returns (nsString composition);

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

@ -33,11 +33,11 @@ interface nsIEditingSession : nsISupports
* Make this window editable
* @param aWindow nsIDOMWindow, the window the embedder needs to make editable
* @param aEditorType string, "html" "htmlsimple" "text" "textsimple"
* @param aMakeWholeDocumentEditable if PR_TRUE make the whole document in
* @param aMakeWholeDocumentEditable if true make the whole document in
* aWindow editable, otherwise it's the
* embedder who should make the document
* (or part of it) editable.
* @param aInteractive if PR_FALSE turn off scripting and plugins
* @param aInteractive if false turn off scripting and plugins
*/
void makeWindowEditable(in nsIDOMWindow window, in string aEditorType,
in boolean doAfterUriLoad,

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

@ -27,12 +27,12 @@ interface nsIContentFilter : nsISupports
* The flag is true when the editor intends to delete the selection.
*
* Callers who want to cancel all insertion can simply set
* continueWithInsertion to PR_FALSE and return.
* continueWithInsertion to false and return.
* Note: If cancellation occurs during the "open" event, the editor will
* still be available but will be empty.
*
* Callers who want to allow insertion of the data with no changes
* can simply set continueWithInsertion to PR_TRUE and return.
* can simply set continueWithInsertion to true and return.
*
* Callers who want to modify the content (docFragment) being inserted are
* responsible for updating contentStartNode, contentStartOffset,

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

@ -176,12 +176,12 @@ interface nsIEditor : nsISupports
/** turn the undo system on or off
* @param aEnable if PR_TRUE, the undo system is turned on if available
* if PR_FALSE the undo system is turned off if it
* @param aEnable if true, the undo system is turned on if available
* if false the undo system is turned off if it
* was previously on
* @return if aEnable is PR_TRUE, returns NS_OK if
* @return if aEnable is true, returns NS_OK if
* the undo system could be initialized properly
* if aEnable is PR_FALSE, returns NS_OK.
* if aEnable is false, returns NS_OK.
*/
void enableUndo(in boolean enable);
@ -208,8 +208,8 @@ interface nsIEditor : nsISupports
void undo(in unsigned long count);
/** returns state information about the undo system.
* @param aIsEnabled [OUT] PR_TRUE if undo is enabled
* @param aCanUndo [OUT] PR_TRUE if at least one transaction is
* @param aIsEnabled [OUT] true if undo is enabled
* @param aCanUndo [OUT] true if at least one transaction is
* currently ready to be undone.
*/
void canUndo(out boolean isEnabled, out boolean canUndo);
@ -227,8 +227,8 @@ interface nsIEditor : nsISupports
void redo(in unsigned long count);
/** returns state information about the redo system.
* @param aIsEnabled [OUT] PR_TRUE if redo is enabled
* @param aCanRedo [OUT] PR_TRUE if at least one transaction is
* @param aIsEnabled [OUT] true if redo is enabled
* @param aCanRedo [OUT] true if at least one transaction is
currently ready to be redone.
*/
void canRedo(out boolean isEnabled, out boolean canRedo);
@ -261,8 +261,8 @@ interface nsIEditor : nsISupports
* @param should Set false to suppress changing the selection;
* i.e., before using InsertElement() to insert
* under <head> element
* WARNING: You must be very careful to reset back to PR_TRUE after
* setting PR_FALSE, else selection/caret is trashed
* WARNING: You must be very careful to reset back to true after
* setting false, else selection/caret is trashed
* for further editing.
*/
void setShouldTxnSetSelection(in boolean should);
@ -370,9 +370,9 @@ interface nsIEditor : nsISupports
* @param aElement the content element to operate on
* @param aAttribute the string representation of the attribute to get
* @param aResultValue [OUT] the value of aAttribute.
* Only valid if aResultIsSet is PR_TRUE
* @return PR_TRUE if aAttribute is set on the current node,
* PR_FALSE if it is not.
* Only valid if aResultIsSet is true
* @return true if aAttribute is set on the current node,
* false if it is not.
*/
boolean getAttributeValue(in nsIDOMElement aElement,
in AString attributestr,

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

@ -105,11 +105,11 @@ interface nsIHTMLEditor : nsISupports
* May be null.
* Example: aProperty="font", aAttribute="color",
* aValue="0x00FFFF"
* @param aFirst [OUT] PR_TRUE if the first text node in the
* @param aFirst [OUT] true if the first text node in the
* selection has the property
* @param aAny [OUT] PR_TRUE if any of the text nodes in the
* @param aAny [OUT] true if any of the text nodes in the
* selection have the property
* @param aAll [OUT] PR_TRUE if all of the text nodes in the
* @param aAll [OUT] true if all of the text nodes in the
* selection have the property
*/
void getInlineProperty(in nsIAtom aProperty,
@ -230,7 +230,7 @@ interface nsIHTMLEditor : nsISupports
*
* @param aElement The element to insert
* @param aDeleteSelection Delete the selection before inserting
* If aDeleteSelection is PR_FALSE, then the element is inserted
* If aDeleteSelection is false, then the element is inserted
* after the end of the selection for all element except
* Named Anchors, which insert before the selection
*/

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

@ -155,7 +155,7 @@ interface nsITransactionListener : nsISupports
* @param aTransactionToMerge the transaction to merge.
* @param aDidMerge true if transaction was merged, else false.
* @param aMergeResult the nsresult returned after the merge attempt.
* @param aInterrupt listeners should set this to PR_TRUE if they
* @param aInterrupt listeners should set this to true if they
* want to interrupt normal control flow, without throwing an error.
*/
void didMerge(in nsITransactionManager aManager,

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

@ -20,14 +20,14 @@ interface nsIPrintPreviewNavigation : nsISupports
/**
* Preview the next Page
*
* Return - PR_TRUE if success
* Return - true if success
*/
boolean nextPage();
/**
* Preview the previous Page
*
* Return - PR_TRUE if success
* Return - true if success
*/
boolean previousPage();
@ -35,7 +35,7 @@ interface nsIPrintPreviewNavigation : nsISupports
* Go to a page to preview
*
* aPageNumber - Page to go preview
* Return - PR_TRUE if success
* Return - true if success
*/
boolean goToPage(unsigned long aPageNumber);

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

@ -35,9 +35,9 @@ interface nsITooltipTextProvider : nsISupports
* @arg aNode The node to obtain the text from.
* @arg aText The tooltip text.
*
* @return <CODE>PR_TRUE</CODE> if tooltip text is associated
* @return <CODE>true</CODE> if tooltip text is associated
* with the node and was returned in the aText argument;
* <CODE>PR_FALSE</CODE> otherwise.
* <CODE>false</CODE> otherwise.
*/
boolean getNodeText(in nsIDOMNode aNode, out wstring aText);
};

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

@ -77,8 +77,8 @@ interface nsIWebBrowserSetup : nsISupports
const unsigned long SETUP_USE_GLOBAL_HISTORY = 256;
/**
* Boolean. A value of PR_TRUE makes the browser a chrome wrapper.
* Default is PR_FALSE.
* Boolean. A value of true makes the browser a chrome wrapper.
* Default is false.
*
* @since mozilla1.0
*
@ -99,7 +99,7 @@ interface nsIWebBrowserSetup : nsISupports
/**
* Sets an integer or boolean property on the new web browser object.
* Only PR_TRUE and PR_FALSE are legal boolean values.
* Only true and false are legal boolean values.
*
* @param aId The identifier of the property to be set.
* @param aValue The value of the property.

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

@ -18,7 +18,7 @@ interface nsIUTF8ConverterService : nsISupports
* @param aString a string to ensure its UTF8ness
* @param aCharset the charset to convert from if |aString| is not in UTF-8
* @param aSkipCheck determines whether or not to skip 'ASCIIness' and
* 'UTF8ness' check. Set this to PR_TRUE only if you suspect that
* 'UTF8ness' check. Set this to true only if you suspect that
* aString can be mistaken for ASCII / UTF-8 but is actually NOT
* in ASCII / UTF-8 so that aString has to go through the conversion.
* skipping ASCIIness/UTF8ness check.

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

@ -58,7 +58,7 @@ bool SignatureVerifier::VerifyInit(const uint8_t* signature_algorithm,
&sig_alg_der);
if (rv != SECSuccess) {
SECKEY_DestroyPublicKey(public_key);
PORT_FreeArena(arena, PR_TRUE);
PORT_FreeArena(arena, true);
return false;
}
@ -71,7 +71,7 @@ bool SignatureVerifier::VerifyInit(const uint8_t* signature_algorithm,
&sig_alg_id, &hash_alg_tag,
NULL);
SECKEY_DestroyPublicKey(public_key); // Done with public_key.
PORT_FreeArena(arena, PR_TRUE); // Done with sig_alg_id.
PORT_FreeArena(arena, true); // Done with sig_alg_id.
if (!vfy_context_) {
// A corrupted RSA signature could be detected without the data, so
// VFY_CreateContextWithAlgorithmID may fail with SEC_ERROR_BAD_SIGNATURE
@ -104,7 +104,7 @@ bool SignatureVerifier::VerifyFinal() {
void SignatureVerifier::Reset() {
if (vfy_context_) {
VFY_DestroyContext(vfy_context_, PR_TRUE);
VFY_DestroyContext(vfy_context_, true);
vfy_context_ = NULL;
}
signature_.clear();

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

@ -22,7 +22,7 @@ struct NSSDestroyer {
};
void DestroyContext(PK11Context* context) {
PK11_DestroyContext(context, PR_TRUE);
PK11_DestroyContext(context, true);
}
// Define some convenient scopers around NSS pointers.

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

@ -28,7 +28,7 @@ SECMODModule *InitDefaultRootCerts() {
char modparams[1024];
snprintf(modparams, sizeof(modparams),
"name=\"Root Certs\" library=\"%s\"", kModulePath);
SECMODModule *root = SECMOD_LoadUserModule(modparams, NULL, PR_FALSE);
SECMODModule *root = SECMOD_LoadUserModule(modparams, NULL, false);
if (root)
return root;
@ -67,7 +67,7 @@ class NSSInitSingleton {
}
// Enable SSL
SSL_OptionSetDefault(SSL_SECURITY, PR_TRUE);
SSL_OptionSetDefault(SSL_SECURITY, true);
// All other SSL options are set per-session by SSLClientSocket.
}

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

@ -64,7 +64,7 @@ TEST_F(PRTimeTest, ParseTimeTest1) {
PRTime current_time64 = static_cast<PRTime>(current_time) * PR_USEC_PER_SEC;
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString(time_buf, PR_FALSE, &parsed_time);
PRStatus result = PR_ParseTimeString(time_buf, false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(current_time64, parsed_time);
}
@ -72,14 +72,14 @@ TEST_F(PRTimeTest, ParseTimeTest1) {
TEST_F(PRTimeTest, ParseTimeTest2) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("Mon, 15 Oct 2007 19:45:00 GMT",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_pdt);
}
TEST_F(PRTimeTest, ParseTimeTest3) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("15 Oct 07 12:45:00", PR_FALSE,
PRStatus result = PR_ParseTimeString("15 Oct 07 12:45:00", false,
&parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_local_);
@ -87,7 +87,7 @@ TEST_F(PRTimeTest, ParseTimeTest3) {
TEST_F(PRTimeTest, ParseTimeTest4) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("15 Oct 07 19:45 GMT", PR_FALSE,
PRStatus result = PR_ParseTimeString("15 Oct 07 19:45 GMT", false,
&parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_pdt);
@ -96,7 +96,7 @@ TEST_F(PRTimeTest, ParseTimeTest4) {
TEST_F(PRTimeTest, ParseTimeTest5) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("Mon Oct 15 12:45 PDT 2007",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_pdt);
}
@ -104,14 +104,14 @@ TEST_F(PRTimeTest, ParseTimeTest5) {
TEST_F(PRTimeTest, ParseTimeTest6) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("Monday, Oct 15, 2007 12:45 PM",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_local_);
}
TEST_F(PRTimeTest, ParseTimeTest7) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("10/15/07 12:45:00 PM", PR_FALSE,
PRStatus result = PR_ParseTimeString("10/15/07 12:45:00 PM", false,
&parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_local_);
@ -119,7 +119,7 @@ TEST_F(PRTimeTest, ParseTimeTest7) {
TEST_F(PRTimeTest, ParseTimeTest8) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("15-OCT-2007 12:45pm", PR_FALSE,
PRStatus result = PR_ParseTimeString("15-OCT-2007 12:45pm", false,
&parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_local_);
@ -128,7 +128,7 @@ TEST_F(PRTimeTest, ParseTimeTest8) {
TEST_F(PRTimeTest, ParseTimeTest9) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("16 Oct 2007 4:45-JST (Tuesday)",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(parsed_time, comparison_time_pdt);
}
@ -247,14 +247,14 @@ TEST_F(PRTimeTest, ParseTimeTestOutOfRange) {
// we use January 2, 3001 to make sure it's after the magic maximum in any
// timezone.
PRStatus result = PR_ParseTimeString("Sun Jan 2 00:00:00 3001",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
}
TEST_F(PRTimeTest, ParseTimeTestNotNormalized1) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("Mon Oct 15 12:44:60 PDT 2007",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(comparison_time_pdt, parsed_time);
}
@ -262,7 +262,7 @@ TEST_F(PRTimeTest, ParseTimeTestNotNormalized1) {
TEST_F(PRTimeTest, ParseTimeTestNotNormalized2) {
PRTime parsed_time = 0;
PRStatus result = PR_ParseTimeString("Sun Oct 14 36:45 PDT 2007",
PR_FALSE, &parsed_time);
false, &parsed_time);
EXPECT_EQ(PR_SUCCESS, result);
EXPECT_EQ(comparison_time_pdt, parsed_time);
}

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

@ -90,7 +90,7 @@ bool Time::FromString(const wchar_t* time_string, Time* parsed_time) {
if (ascii_time_string.length() == 0)
return false;
PRTime result_time = 0;
PRStatus result = PR_ParseTimeString(ascii_time_string.c_str(), PR_FALSE,
PRStatus result = PR_ParseTimeString(ascii_time_string.c_str(), false,
&result_time);
if (PR_SUCCESS != result)
return false;

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

@ -10,8 +10,8 @@
/**
* Note: This is not really an XPCOM interface. For example, callers must
* guarantee that they set the *_retval of the various methods that return a
* boolean to PR_TRUE before making the call. Implementations may skip writing
* to *_retval unless they want to return PR_FALSE.
* boolean to true before making the call. Implementations may skip writing
* to *_retval unless they want to return false.
*/
[uuid(c4788e02-3239-490a-8aeb-60fad08303fd)]

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

@ -37,8 +37,8 @@ protected:
nsIFrame *getStart(){return mStart;}
nsIFrame *getLast(){return mLast;}
void setLast(nsIFrame *aFrame){mLast = aFrame;}
PRInt8 getOffEdge(){return mOffEdge;}
void setOffEdge(PRInt8 aOffEdge){mOffEdge = aOffEdge;}
int8_t getOffEdge(){return mOffEdge;}
void setOffEdge(int8_t aOffEdge){mOffEdge = aOffEdge;}
void SetLockInScrollView(bool aLockScroll){mLockScroll = aLockScroll;}
/*
@ -94,7 +94,7 @@ private:
nsIFrame *mStart;
nsIFrame *mCurrent;
nsIFrame *mLast; //the last one that was in current;
PRInt8 mOffEdge; //0= no -1 to far prev, 1 to far next;
int8_t mOffEdge; //0= no -1 to far prev, 1 to far next;
};
@ -168,7 +168,7 @@ NS_IMETHODIMP
nsFrameTraversal::NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
PRInt32 aType,
int32_t aType,
bool aVisual,
bool aLockInScrollView,
bool aFollowOOFs)

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

@ -29,7 +29,7 @@ public:
NS_IMETHOD NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
PRInt32 aType,
int32_t aType,
bool aVisual,
bool aLockInScrollView,
bool aFollowOOFs);

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

@ -61,7 +61,7 @@ public:
NS_IMETHOD NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
PRInt32 aType,
int32_t aType,
bool aVisual,
bool aLockInScrollView,
bool aFollowOOFs) = 0;

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

@ -64,7 +64,7 @@ TemporaryRef<DtlsIdentity> DtlsIdentity::Generate() {
private_key =
PK11_GenerateKeyPair(slot,
CKM_RSA_PKCS_KEY_PAIR_GEN, &rsaparams, &pubkey,
PR_FALSE, PR_TRUE, nullptr);
false, true, nullptr);
if (private_key == nullptr)
return nullptr;
public_key = pubkey;

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

@ -324,7 +324,7 @@ int NrSocket::create(nr_transport_addr *addr) {
// Set nonblocking
PRSocketOptionData option;
option.option = PR_SockOpt_Nonblocking;
option.value.non_blocking = PR_TRUE;
option.value.non_blocking = true;
status = PR_SetSocketOption(fd_, &option);
if (status != PR_SUCCESS) {
r_log(LOG_GENERIC, LOG_CRIT, "Couldn't make socket nonblocking");

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

@ -144,7 +144,7 @@ static int nr_crypto_nss_hmac(UCHAR *key, int keyl, UCHAR *buf, int bufl,
err = 0;
abort:
if(hmac_ctx) PK11_DestroyContext(hmac_ctx, PR_TRUE);
if(hmac_ctx) PK11_DestroyContext(hmac_ctx, true);
if (skey) PK11_FreeSymKey(skey);
if (slot) PK11_FreeSlot(slot);

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

@ -268,7 +268,7 @@ static PRStatus TransportLayerGetsockname(PRFileDesc *f, PRNetAddr *addr) {
static PRStatus TransportLayerGetsockoption(PRFileDesc *f, PRSocketOptionData *opt) {
switch (opt->option) {
case PR_SockOpt_Nonblocking:
opt->value.non_blocking = PR_TRUE;
opt->value.non_blocking = true;
return PR_SUCCESS;
default:
UNIMPLEMENTED;
@ -481,13 +481,13 @@ bool TransportLayerDtls::Setup() {
}
// Insist on a certificate from the client
rv = SSL_OptionSet(ssl_fd, SSL_REQUEST_CERTIFICATE, PR_TRUE);
rv = SSL_OptionSet(ssl_fd, SSL_REQUEST_CERTIFICATE, true);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't request certificate");
return false;
}
rv = SSL_OptionSet(ssl_fd, SSL_REQUIRE_CERTIFICATE, PR_TRUE);
rv = SSL_OptionSet(ssl_fd, SSL_REQUIRE_CERTIFICATE, true);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't require certificate");
return false;
@ -507,19 +507,19 @@ bool TransportLayerDtls::Setup() {
return false;
}
rv = SSL_OptionSet(ssl_fd, SSL_ENABLE_SESSION_TICKETS, PR_FALSE);
rv = SSL_OptionSet(ssl_fd, SSL_ENABLE_SESSION_TICKETS, false);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't disable session tickets");
return false;
}
rv = SSL_OptionSet(ssl_fd, SSL_NO_CACHE, PR_TRUE);
rv = SSL_OptionSet(ssl_fd, SSL_NO_CACHE, true);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't disable session caching");
return false;
}
rv = SSL_OptionSet(ssl_fd, SSL_ENABLE_DEFLATE, PR_FALSE);
rv = SSL_OptionSet(ssl_fd, SSL_ENABLE_DEFLATE, false);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't disable deflate");
return false;
@ -531,13 +531,13 @@ bool TransportLayerDtls::Setup() {
return false;
}
rv = SSL_OptionSet(ssl_fd, SSL_ENABLE_FALSE_START, PR_FALSE);
rv = SSL_OptionSet(ssl_fd, SSL_ENABLE_FALSE_START, false);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't disable false start");
return false;
}
rv = SSL_OptionSet(ssl_fd, SSL_NO_LOCKS, PR_TRUE);
rv = SSL_OptionSet(ssl_fd, SSL_NO_LOCKS, true);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't disable locks");
return false;
@ -564,7 +564,7 @@ bool TransportLayerDtls::Setup() {
}
// Now start the handshake
rv = SSL_ResetHandshake(ssl_fd, role_ == SERVER ? PR_TRUE : PR_FALSE);
rv = SSL_ResetHandshake(ssl_fd, role_ == SERVER ? true : false);
if (rv != SECSuccess) {
MOZ_MTLOG(PR_LOG_ERROR, "Couldn't reset handshake");
return false;

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

@ -370,7 +370,7 @@ WebrtcAudioConduit::SendAudioFrame(const int16_t audio_data[],
((lengthSamples % (samplingFreqHz / 100) != 0)) )
{
CSFLogError(logTag, "%s Invalid Params ", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}
@ -378,7 +378,7 @@ WebrtcAudioConduit::SendAudioFrame(const int16_t audio_data[],
if(capture_delay < 0 )
{
CSFLogError(logTag,"%s Invalid Capture Delay ", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}
@ -422,7 +422,7 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
if(!speechData )
{
CSFLogError(logTag,"%s Null Audio Buffer Pointer", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}
@ -430,7 +430,7 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
if((numSamples = GetNum10msSamplesForFrequency(samplingFreqHz)) == 0 )
{
CSFLogError(logTag,"%s Invalid Sampling Frequency ", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}
@ -438,7 +438,7 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
if(capture_delay < 0 )
{
CSFLogError(logTag,"%s Invalid Capture Delay ", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}

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

@ -198,7 +198,7 @@ WebrtcVideoConduit::AttachRenderer(mozilla::RefPtr<VideoRenderer> aVideoRenderer
if(!aVideoRenderer)
{
CSFLogError(logTag, "%s NULL Renderer", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitInvalidRenderer;
}
//Assign the new renderer - overwrites if there is already one
@ -227,7 +227,7 @@ WebrtcVideoConduit::AttachTransport(mozilla::RefPtr<TransportInterface> aTranspo
if(!aTransport)
{
CSFLogError(logTag, "%s NULL Transport ", __FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitInvalidTransport;
}
//Assign the transport
@ -448,14 +448,14 @@ WebrtcVideoConduit::SendVideoFrame(unsigned char* video_frame,
width == 0 || height == 0)
{
CSFLogError(logTag, "%s Invalid Parameters ",__FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}
if(video_type != kVideoI420)
{
CSFLogError(logTag, "%s VideoType Invalid. Only 1420 Supported",__FUNCTION__);
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return kMediaConduitMalformedArgument;
}
//Transmission should be enabled before we insert any frames.

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

@ -648,7 +648,7 @@ void vcmGetIceParams(const char *peerconnection, char **ufragp, char **pwdp)
}
if (!ufrag || !pwd) {
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
cpr_free(ufrag);
cpr_free(pwd);
CSFLogDebug( logTag, "%s: no ufrag or password", __FUNCTION__);
@ -1185,7 +1185,7 @@ int vcmRxStartICE(cc_mcapid_t mcap_id,
pc->impl()->GetRemoteStream(pc_stream_id);
if (!stream) {
// This should never happen
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
return VCM_ERROR;
}
// Create the transport flows
@ -1218,7 +1218,7 @@ int vcmRxStartICE(cc_mcapid_t mcap_id,
{
int ret = vcmPayloadType2AudioCodec(payloads[i], &config_raw);
if (ret) {
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
return VCM_ERROR;
}
configs.push_back(config_raw);
@ -1250,7 +1250,7 @@ int vcmRxStartICE(cc_mcapid_t mcap_id,
{
int ret = vcmPayloadType2VideoCodec(payloads[i], &config_raw);
if (ret) {
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
return VCM_ERROR;
}
configs.push_back(config_raw);
@ -2364,11 +2364,11 @@ static int vcmPayloadType2AudioCodec(vcm_media_payload_type_t payload_in,
//TODO: Check with Ekr, Derf if 64k and 56K are valid frequency rates for G722.1
// or G722.2
CSFLogError(logTag, "vcmPayloadType2AudioCodec Codec Not Implemented !");
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
return VCM_ERROR;
default:
CSFLogError(logTag, "vcmPayloadType2AudioCodec unknown codec. Apparent internal error");
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
return VCM_ERROR;
}
@ -2401,7 +2401,7 @@ static int vcmPayloadType2VideoCodec(vcm_media_payload_type_t payload_in,
break;
default:
CSFLogError(logTag, "vcmPayloadType2VideoCodec unknown codec. Apparent internal error");
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
return VCM_ERROR;
}
return 0;

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

@ -555,7 +555,7 @@ void MediaPipelineTransmit::ProcessAudioChunk(AudioSessionConduit *conduit,
case nsAudioStream::FORMAT_U8:
case nsAudioStream::FORMAT_FLOAT32:
MOZ_MTLOG(PR_LOG_ERROR, "Can't process audio except in 16-bit PCM yet");
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return;
break;
case nsAudioStream::FORMAT_S16:
@ -574,7 +574,7 @@ void MediaPipelineTransmit::ProcessAudioChunk(AudioSessionConduit *conduit,
}
break;
default:
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return;
break;
}
@ -604,7 +604,7 @@ void MediaPipelineTransmit::ProcessVideoChunk(VideoSessionConduit *conduit,
if (format != PLANAR_YCBCR) {
MOZ_MTLOG(PR_LOG_ERROR, "Can't process non-YCBCR video");
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return;
}

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

@ -225,14 +225,14 @@ nsresult SrtpFlow::Init() {
err_status_t r = srtp_init();
if (r != err_status_ok) {
MOZ_MTLOG(PR_LOG_ERROR, "Could not initialize SRTP");
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return NS_ERROR_FAILURE;
}
r = srtp_install_event_handler(&SrtpFlow::srtp_event_handler);
if (r != err_status_ok) {
MOZ_MTLOG(PR_LOG_ERROR, "Could not install SRTP event handler");
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
return NS_ERROR_FAILURE;
}

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

@ -211,7 +211,7 @@ public:
mObserver->OnAddStream(stream, "video");
} else {
CSFLogErrorS(logTag, __FUNCTION__ << "Audio & Video not supported");
MOZ_ASSERT(PR_FALSE);
MOZ_ASSERT(false);
}
}
break;

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

@ -16,7 +16,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(Fake_nsDOMMediaStream, nsIDOMMediaStream)
NS_IMETHODIMP
Fake_nsDOMMediaStream::GetCurrentTime(double *aCurrentTime)
{
PR_ASSERT(PR_FALSE);
PR_ASSERT(false);
*aCurrentTime = 0;
return NS_OK;

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

@ -36,7 +36,7 @@ CryptoX_Result NSS_VerifySignature(VFYContext * const *ctx ,
#define CryptoX_VerifyBegin(CryptoHandle, SignatureHandle, PublicKey) \
NSS_VerifyBegin(SignatureHandle, PublicKey)
#define CryptoX_FreeSignatureHandle(SignatureHandle) \
VFY_DestroyContext(SignatureHandle, PR_TRUE)
VFY_DestroyContext(SignatureHandle, true)
#define CryptoX_VerifyUpdate(SignatureHandle, buf, len) \
VFY_Update(*SignatureHandle, (const unsigned char*)(buf), len)
#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, \

2
netwerk/cache/nsDiskCacheStreams.cpp поставляемый
Просмотреть файл

@ -392,7 +392,7 @@ nsDiskCacheStreamIO::CloseInternal()
nsresult rv = Flush();
NS_ENSURE_SUCCESS(rv, rv);
}
mOutputStreamIsOpen = PR_FALSE;
mOutputStreamIsOpen = false;
}
// Make sure to always close the FileDescriptor

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

@ -172,7 +172,7 @@ interface nsIMIMEInfo : nsIHandlerInfo {
* Returns whether or not these two nsIMIMEInfos are logically
* equivalent.
*
* @returns PR_TRUE if the two are considered equal
* @returns true if the two are considered equal
*/
boolean equals(in nsIMIMEInfo aMIMEInfo);

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

@ -256,7 +256,7 @@ nsFileChannel::nsFileChannel(nsIURI *uri)
NS_SUCCEEDED(file->IsSymlink(&symLink)) &&
symLink &&
NS_SUCCEEDED(file->GetNativeTarget(fileTarget)) &&
NS_SUCCEEDED(NS_NewNativeLocalFile(fileTarget, PR_TRUE,
NS_SUCCEEDED(NS_NewNativeLocalFile(fileTarget, true,
getter_AddRefs(resolvedFile))) &&
NS_SUCCEEDED(NS_NewFileURI(getter_AddRefs(targetURI),
resolvedFile, nullptr))) {

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

@ -20,7 +20,7 @@ interface nsIHttpAuthenticableChannel : nsIProxiedChannel
/**
* Returns if the proxy HTTP method used is CONNECT. If no proxy is being
* used it must return PR_FALSE.
* used it must return false.
*/
readonly attribute boolean proxyMethodIsConnect;

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

@ -1102,11 +1102,11 @@ AuthCertificateHook(void *arg, PRFileDesc *fd, PRBool checkSig, PRBool isServer)
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG,
("[%p] starting AuthCertificateHook\n", fd));
// Modern libssl always passes PR_TRUE for checkSig, and we have no means of
// Modern libssl always passes true for checkSig, and we have no means of
// doing verification without checking signatures.
NS_ASSERTION(checkSig, "AuthCertificateHook: checkSig unexpectedly false");
// PSM never causes libssl to call this function with PR_TRUE for isServer,
// PSM never causes libssl to call this function with true for isServer,
// and many things in PSM assume that we are a client.
NS_ASSERTION(!isServer, "AuthCertificateHook: isServer unexpectedly true");

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

@ -57,7 +57,7 @@ struct IconData
, fetchMode(FETCH_NEVER)
, status(ICON_STATUS_UNKNOWN)
{
guid.SetIsVoid(PR_TRUE);
guid.SetIsVoid(true);
}
int64_t id;

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

@ -372,8 +372,8 @@ GenerateKeyPair(PK11SlotInfo * slot,
{
*publicKey = NULL;
*privateKey = PK11_GenerateKeyPair(slot, mechanism, params, publicKey,
PR_FALSE /*isPerm*/,
PR_TRUE /*isSensitive*/,
false /*isPerm*/,
true /*isSensitive*/,
NULL /*&pwdata*/);
if (!*privateKey) {
MOZ_ASSERT(!*publicKey);

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

@ -2669,7 +2669,7 @@ static void MOZ_gdk_display_close(GdkDisplay *display)
* By defining the symbol here, we can avoid the wasted lookup and hopefully
* improve startup performance.
*/
NS_VISIBILITY_DEFAULT PRBool nspr_use_zone_allocator = PR_FALSE;
NS_VISIBILITY_DEFAULT PRBool nspr_use_zone_allocator = false;
#ifdef CAIRO_HAS_DWRITE_FONT

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

@ -29,28 +29,28 @@
* query as to whether the application should continue to
* run.
*
* If the returned boolean result is PR_FALSE, then the
* If the returned boolean result is false, then the
* application should exit without further processing. In
* such cases, the returned nsresult indicates whether the
* reason to exit is due to an error or not.
*
* Win32 Note: In the case of starting a second instance
* of this executable, this function will return
* PR_FALSE and nsresult==NS_OK. This means that
* false and nsresult==NS_OK. This means that
* the command line arguments have been
* successfully passed to the instance of the
* application acting as a DDE server.
*
* stop - You call this to inform the native app support that the
* application *wishes* to terminate. If the returned boolean
* value is PR_FALSE, then the application should continue
* value is false, then the application should continue
* (as if there were still additional top-level windows open).
*
* Win32 Note: If this is the instance of the application
* acting as the DDE server, and there are current
* DDE conversations active with other instances
* acting as DDE clients, then this function will
* return PR_FALSE.
* return false.
*
* quit - Like Stop, but this method *forces* termination (or more
* precisely, indicates that the application is about to be

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

@ -135,7 +135,7 @@ PR_EXTERN(void) NS_TraceMallocStartup(int logfd);
PR_EXTERN(int) NS_TraceMallocStartupArgs(int argc, char* argv[]);
/**
* Return PR_TRUE iff |NS_TraceMallocStartup[Args]| has been successfully called.
* Return true iff |NS_TraceMallocStartup[Args]| has been successfully called.
*/
PR_EXTERN(PRBool) NS_TraceMallocHasStarted(void);

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

@ -508,7 +508,7 @@ typedef struct __struct_STContextCacheItem
** Ignore this unless the reference count is 0,
** This is used to evict the oldest unused item from
** the context cache.
** mInUse Mainly PR_FALSE only at the beginning of the process,
** mInUse Mainly false only at the beginning of the process,
** but this indicates that the item has not yet been
** used at all, and thus shouldn't be evaluated for
** a cache hit.

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

@ -815,7 +815,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
if (!aKeyEvent.IsMeta() && !aKeyEvent.IsControl() && IsOpenedIMEMode()) {
UInt32 state =
nsCocoaUtils::ConvertToCarbonModifier([aNativeKeyEvent modifierFlags]);
PRUint32 ch = TranslateToChar(nativeKeyCode, state, kbType);
uint32_t ch = TranslateToChar(nativeKeyCode, state, kbType);
if (ch) {
insertString = ch;
}

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

@ -32,13 +32,13 @@ interface nsIAppShell : nsISupports
* prevent native event starvation.
*
* Calls to this function may be nested. When the number of calls that pass
* PR_TRUE is subtracted from the number of calls that pass PR_FALSE is
* true is subtracted from the number of calls that pass false is
* greater than 0, performance is given precedence over preventing event
* starvation.
*
* The starvationDelay arg is only used when favorPerfOverStarvation is
* PR_FALSE. It is the amount of time in milliseconds to wait before the
* PR_FALSE actually takes effect.
* false. It is the amount of time in milliseconds to wait before the
* false actually takes effect.
*/
void favorPerformanceHint(in boolean favorPerfOverStarvation,
in unsigned long starvationDelay);

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

@ -34,10 +34,10 @@ interface nsIFactory : nsISupports {
/**
* LockFactory provides the client a way to keep the component
* in memory until it is finished with it. The client can call
* LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE)
* LockFactory(true) to lock the factory and LockFactory(false)
* to release the factory.
*
* @param lock - Must be PR_TRUE or PR_FALSE
* @param lock - Must be true or false
* @return NS_OK - If the lock operation was successful.
* NS_ERROR* - Method failure.
*/

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

@ -69,12 +69,12 @@ interface nsIModule : nsISupports
* @param aCompMgr : The global component manager
*
* @return indicates to the caller if the module can be unloaded.
* Returning PR_TRUE isn't a guarantee that the module will be
* Returning true isn't a guarantee that the module will be
* unloaded. It constitues only willingness of the module to be
* unloaded. It is very important to ensure that no outstanding
* references to the module's code/data exist before returning
* PR_TRUE.
* Returning PR_FALSE guaratees that the module won't be unloaded.
* true.
* Returning false guaratees that the module won't be unloaded.
*/
boolean canUnload(in nsIComponentManager aCompMgr);
};

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

@ -25,15 +25,15 @@ interface nsISimpleEnumerator : nsISupports {
* internal state of enumerator.
*
* @see getNext()
* @return PR_TRUE if there are remaining elements in the enumerator.
* PR_FALSE if there are no more elements in the enumerator.
* @return true if there are remaining elements in the enumerator.
* false if there are no more elements in the enumerator.
*/
boolean hasMoreElements();
/**
* Called to retrieve the next element in the enumerator. The "next"
* element is the first element upon the first call. Must be
* pre-ceeded by a call to hasMoreElements() which returns PR_TRUE.
* pre-ceeded by a call to hasMoreElements() which returns true.
* This method is generally called within a loop to iterate over
* the elements in the enumerator.
*

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

@ -32,7 +32,7 @@ class nsISupportsArray;
#define NS_SUPPORTSARRAY_CONTRACTID "@mozilla.org/supports-array;1"
#define NS_SUPPORTSARRAY_CLASSNAME "Supports Array"
// Enumerator callback function. Return PR_FALSE to stop
// Enumerator callback function. Return false to stop
typedef bool (*nsISupportsArrayEnumFunc)(nsISupports* aElement, void *aData);
nsresult

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

@ -170,7 +170,7 @@ interface nsIFile : nsISupports
/**
* This will try to delete this file. The 'recursive' flag
* must be PR_TRUE to delete directories which are not empty.
* must be true to delete directories which are not empty.
*
* This will not resolve any symlinks.
*/

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

@ -47,8 +47,8 @@ interface nsIEnvironment : nsISupports
*
* @param aName the variable name to probe.
* @return if the variable has been set, the value returned is
* PR_TRUE. If the variable was not defined in the
* environment PR_FALSE will be returned.
* true. If the variable was not defined in the
* environment false will be returned.
*/
boolean exists(in AString aName);
};

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

@ -160,9 +160,9 @@ XPT_GetAddrForOffset(XPTCursor *cursor, uint32_t offset);
mode == XPT_ENCODE ? size : 0u, &new_curs, \
&already) || \
!(mode == XPT_DECODE || XPT_Do32(cursor, &new_curs.offset))) \
return PR_FALSE; \
return false; \
if (already) \
return PR_TRUE; \
return true; \
#define XPT_PREAMBLE_NO_ALLOC(cursor, addrp, pool, size, new_curs, already) \
{ \
@ -173,7 +173,7 @@ XPT_GetAddrForOffset(XPTCursor *cursor, uint32_t offset);
error: \
if (cursor->state->mode == XPT_DECODE) \
XPT_FREEIF(arena, free_it); \
return PR_FALSE;
return false;
#ifdef __cplusplus

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

@ -128,7 +128,7 @@ interface nsIWindowMediator: nsISupports
* @param outBelow if outPosition==zLevelBelow, the window
* below which inWindow should be placed. Otherwise this
* this value will be null.
* @return PR_TRUE if the position returned is different from
* @return true if the position returned is different from
* the position given.
*/

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

@ -66,14 +66,14 @@ interface nsIXULWindow : nsISupports
* Move the window to a centered position.
* @param aRelative If not null, the window relative to which the window is
* moved. See aScreen parameter for details.
* @param aScreen PR_TRUE to center the window relative to the screen
* @param aScreen true to center the window relative to the screen
* containing aRelative if aRelative is not null. If
* aRelative is null then relative to the screen of the
* opener window if it was initialized by passing it to
* nsWebShellWindow::Initialize. Failing that relative to
* the main screen.
* PR_FALSE to center it relative to aRelative itself.
* @param aAlert PR_TRUE to move the window to an alert position,
* false to center it relative to aRelative itself.
* @param aAlert true to move the window to an alert position,
* generally centered horizontally and 1/3 down from the top.
*/
void center(in nsIXULWindow aRelative, in boolean aScreen, in boolean aAlert);