From 4983a663a5182c084b2b15e7f08928c346181b64 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 15 Mar 2012 11:55:01 +0100 Subject: [PATCH] mshtml: Get rid of remaining PRBool usages. --- dlls/mshtml/binding.h | 2 +- dlls/mshtml/editor.c | 14 +++++++------- dlls/mshtml/htmlevent.c | 6 +++--- dlls/mshtml/htmlinput.c | 6 +++--- dlls/mshtml/htmlnode.c | 2 +- dlls/mshtml/htmloption.c | 2 +- dlls/mshtml/htmlscript.c | 2 +- dlls/mshtml/htmlselect.c | 2 +- dlls/mshtml/htmltextarea.c | 2 +- dlls/mshtml/mutation.c | 8 ++++---- dlls/mshtml/navigate.c | 2 +- dlls/mshtml/nsiface.idl | 1 - dlls/mshtml/selection.c | 2 +- dlls/mshtml/txtrange.c | 10 +++++----- 14 files changed, 30 insertions(+), 31 deletions(-) diff --git a/dlls/mshtml/binding.h b/dlls/mshtml/binding.h index 697370af2e1..82cafdd9625 100644 --- a/dlls/mshtml/binding.h +++ b/dlls/mshtml/binding.h @@ -101,7 +101,7 @@ typedef struct { HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int) DECLSPEC_HIDDEN; HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_HIDDEN; -nsresult on_start_uri_open(NSContainer*,nsIURI*,PRBool*) DECLSPEC_HIDDEN; +nsresult on_start_uri_open(NSContainer*,nsIURI*,cpp_bool*) DECLSPEC_HIDDEN; HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLSPEC_HIDDEN; HRESULT create_doc_uri(HTMLWindow*,WCHAR*,nsWineURI**) DECLSPEC_HIDDEN; HRESULT load_nsuri(HTMLWindow*,nsWineURI*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index ae5954a8c9d..129040a6d1c 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -147,7 +147,7 @@ static nsresult get_ns_command_state(NSContainer *This, const char *cmd, nsIComm static DWORD query_ns_edit_status(HTMLDocument *This, const char *nscmd) { nsICommandParams *nsparam; - PRBool b = FALSE; + cpp_bool b = FALSE; if(This->doc_obj->usermode != EDITMODE || This->window->readystate < READYSTATE_INTERACTIVE) return OLECMDF_SUPPORTED; @@ -183,7 +183,7 @@ static DWORD query_align_status(HTMLDocument *This, const WCHAR *align) { DWORD ret = OLECMDF_SUPPORTED | OLECMDF_ENABLED; nsAString justify_str; - PRBool b; + cpp_bool b; nsresult nsres; if(This->doc_obj->usermode != EDITMODE || This->window->readystate < READYSTATE_INTERACTIVE) @@ -214,7 +214,7 @@ static nsISelection *get_ns_selection(HTMLDocument *This) static void remove_child_attr(nsIDOMElement *elem, LPCWSTR tag, nsAString *attr_str) { - PRBool has_children; + cpp_bool has_children; PRUint32 child_cnt, i; nsIDOMNode *child_node; nsIDOMNodeList *node_list; @@ -330,7 +330,7 @@ static void get_font_size(HTMLDocument *This, WCHAR *ret) static void set_font_size(HTMLDocument *This, LPCWSTR size) { nsISelection *nsselection; - PRBool collapsed; + cpp_bool collapsed; nsIDOMHTMLElement *elem; nsIDOMRange *range; PRInt32 range_cnt = 0; @@ -389,7 +389,7 @@ static void set_font_size(HTMLDocument *This, LPCWSTR size) static void handle_arrow_key(HTMLDocument *This, nsIDOMKeyEvent *event, const char * const cmds[4]) { int i=0; - PRBool b; + cpp_bool b; nsIDOMKeyEvent_GetCtrlKey(event, &b); if(b) @@ -1127,7 +1127,7 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, nsAString href_str, ns_url; nsIHTMLEditor *html_editor; nsIDOMHTMLElement *anchor_elem; - PRBool insert_link_at_caret; + cpp_bool insert_link_at_caret; nsISelection *nsselection; BSTR url = NULL; INT ret; @@ -1253,7 +1253,7 @@ void init_editor(HTMLDocument *This) HRESULT editor_is_dirty(HTMLDocument *This) { - PRBool modified; + cpp_bool modified; if(!This->doc_obj->nscontainer || !This->doc_obj->nscontainer->editor) return S_FALSE; diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index b2efeedbf84..290ca715572 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -345,7 +345,7 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle static HRESULT WINAPI HTMLEventObj_get_altKey(IHTMLEventObj *iface, VARIANT_BOOL *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - PRBool ret = FALSE; + cpp_bool ret = FALSE; TRACE("(%p)->(%p)\n", This, p); @@ -375,7 +375,7 @@ static HRESULT WINAPI HTMLEventObj_get_altKey(IHTMLEventObj *iface, VARIANT_BOOL static HRESULT WINAPI HTMLEventObj_get_ctrlKey(IHTMLEventObj *iface, VARIANT_BOOL *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - PRBool ret = FALSE; + cpp_bool ret = FALSE; TRACE("(%p)->(%p)\n", This, p); @@ -405,7 +405,7 @@ static HRESULT WINAPI HTMLEventObj_get_ctrlKey(IHTMLEventObj *iface, VARIANT_BOO static HRESULT WINAPI HTMLEventObj_get_shiftKey(IHTMLEventObj *iface, VARIANT_BOOL *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - PRBool ret = FALSE; + cpp_bool ret = FALSE; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 65cbeab8803..41fefb3cbbb 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -262,7 +262,7 @@ static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VA static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p) { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - PRBool disabled = FALSE; + cpp_bool disabled = FALSE; TRACE("(%p)->(%p)\n", This, p); @@ -419,7 +419,7 @@ static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *ifa static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p) { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - PRBool default_checked = FALSE; + cpp_bool default_checked = FALSE; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); @@ -453,7 +453,7 @@ static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VAR static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p) { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - PRBool checked; + cpp_bool checked; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 8962acfb56a..a2786e65fba 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -436,7 +436,7 @@ static HRESULT WINAPI HTMLDOMNode_get_parentNode(IHTMLDOMNode *iface, IHTMLDOMNo static HRESULT WINAPI HTMLDOMNode_hasChildNodes(IHTMLDOMNode *iface, VARIANT_BOOL *fChildren) { HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface); - PRBool has_child = FALSE; + cpp_bool has_child = FALSE; nsresult nsres; TRACE("(%p)->(%p)\n", This, fChildren); diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 533a914901f..0fb685bf541 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -117,7 +117,7 @@ static HRESULT WINAPI HTMLOptionElement_put_selected(IHTMLOptionElement *iface, static HRESULT WINAPI HTMLOptionElement_get_selected(IHTMLOptionElement *iface, VARIANT_BOOL *p) { HTMLOptionElement *This = impl_from_IHTMLOptionElement(iface); - PRBool selected; + cpp_bool selected; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 3418fcc379c..e98cbb0187a 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -180,7 +180,7 @@ static HRESULT WINAPI HTMLScriptElement_put_defer(IHTMLScriptElement *iface, VAR static HRESULT WINAPI HTMLScriptElement_get_defer(IHTMLScriptElement *iface, VARIANT_BOOL *p) { HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface); - PRBool defer = FALSE; + cpp_bool defer = FALSE; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index fc91c2d1f1d..b2cbea7e7d9 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -349,7 +349,7 @@ static HRESULT WINAPI HTMLSelectElement_put_disabled(IHTMLSelectElement *iface, static HRESULT WINAPI HTMLSelectElement_get_disabled(IHTMLSelectElement *iface, VARIANT_BOOL *p) { HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface); - PRBool disabled = FALSE; + cpp_bool disabled = FALSE; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index fc833e35229..f16207ccc4b 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -291,7 +291,7 @@ static HRESULT WINAPI HTMLTextAreaElement_put_readOnly(IHTMLTextAreaElement *ifa static HRESULT WINAPI HTMLTextAreaElement_get_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL *p) { HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface); - PRBool b; + cpp_bool b; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 0cd58f7b1ce..c32fd4154c1 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -562,17 +562,17 @@ static void NSAPI nsDocumentObserver_DocumentStatesChanged(nsIDocumentObserver * } static void NSAPI nsDocumentObserver_StyleSheetAdded(nsIDocumentObserver *iface, nsIDocument *aDocument, - nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet) + nsIStyleSheet *aStyleSheet, cpp_bool aDocumentSheet) { } static void NSAPI nsDocumentObserver_StyleSheetRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, - nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet) + nsIStyleSheet *aStyleSheet, cpp_bool aDocumentSheet) { } static void NSAPI nsDocumentObserver_StyleSheetApplicableStateChanged(nsIDocumentObserver *iface, - nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aApplicable) + nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, cpp_bool aApplicable) { } @@ -635,7 +635,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, } static void NSAPI nsDocumentObserver_AttemptToExecuteScript(nsIDocumentObserver *iface, nsIContent *aContent, - nsIParser *aParser, PRBool *aBlock) + nsIParser *aParser, cpp_bool *aBlock) { HTMLDocumentNode *This = impl_from_nsIDocumentObserver(iface); nsIDOMHTMLScriptElement *nsscript; diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index d3070b01d9f..12551213a6c 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -186,7 +186,7 @@ static nsresult NSAPI nsInputStream_ReadSegments(nsIInputStream *iface, return nsres; } -static nsresult NSAPI nsInputStream_IsNonBlocking(nsIInputStream *iface, PRBool *_retval) +static nsresult NSAPI nsInputStream_IsNonBlocking(nsIInputStream *iface, cpp_bool *_retval) { nsProtocolStream *This = impl_from_nsIInputStream(iface); FIXME("(%p)->(%p)\n", This, _retval); diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 8d52ead6652..2327f4a5309 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -55,7 +55,6 @@ typedef PRUint32 nsLoadFlags; typedef unsigned char cpp_bool; #define bool cpp_bool -cpp_quote("#define PRBool cpp_bool") /* FIXME */ typedef struct { void *v; diff --git a/dlls/mshtml/selection.c b/dlls/mshtml/selection.c index 34e3259ff1c..9add1e67437 100644 --- a/dlls/mshtml/selection.c +++ b/dlls/mshtml/selection.c @@ -204,7 +204,7 @@ static HRESULT WINAPI HTMLSelectionObject_clear(IHTMLSelectionObject *iface) static HRESULT WINAPI HTMLSelectionObject_get_type(IHTMLSelectionObject *iface, BSTR *p) { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface); - PRBool collapsed = TRUE; + cpp_bool collapsed = TRUE; static const WCHAR wszNone[] = {'N','o','n','e',0}; static const WCHAR wszText[] = {'T','e','x','t',0}; diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index f70e2425ca1..93cd708feb9 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -397,7 +397,7 @@ static void get_cur_pos(HTMLTxtRange *This, BOOL start, dompos_t *pos) pos->p = NULL; if(!start) { - PRBool collapsed; + cpp_bool collapsed; nsIDOMRange_GetCollapsed(This->nsrange, &collapsed); start = collapsed; } @@ -485,7 +485,7 @@ static void range_to_string(HTMLTxtRange *This, wstrbuf_t *buf) { nsIDOMNode *iter, *tmp; dompos_t start_pos, end_pos; - PRBool collapsed; + cpp_bool collapsed; nsIDOMRange_GetCollapsed(This->nsrange, &collapsed); if(collapsed) { @@ -1324,7 +1324,7 @@ static HRESULT WINAPI HTMLTxtRange_expand(IHTMLTxtRange *iface, BSTR Unit, VARIA switch(unit) { case RU_WORD: { dompos_t end_pos, start_pos, new_start_pos, new_end_pos; - PRBool collapsed; + cpp_bool collapsed; nsIDOMRange_GetCollapsed(This->nsrange, &collapsed); @@ -1468,7 +1468,7 @@ static HRESULT WINAPI HTMLTxtRange_moveStart(IHTMLTxtRange *iface, BSTR Unit, switch(unit) { case RU_CHAR: { dompos_t start_pos, end_pos, new_pos; - PRBool collapsed; + cpp_bool collapsed; get_cur_pos(This, TRUE, &start_pos); get_cur_pos(This, FALSE, &end_pos); @@ -1519,7 +1519,7 @@ static HRESULT WINAPI HTMLTxtRange_moveEnd(IHTMLTxtRange *iface, BSTR Unit, switch(unit) { case RU_CHAR: { dompos_t start_pos, end_pos, new_pos; - PRBool collapsed; + cpp_bool collapsed; get_cur_pos(This, TRUE, &start_pos); get_cur_pos(This, FALSE, &end_pos); -- 2.11.4.GIT