Rename nsurl_enquire to nsurl_has_component.

svn path=/trunk/netsurf/; revision=13183
This commit is contained in:
Michael Drake 2011-11-27 18:32:06 +00:00
parent 07309888d6
commit 714f07c48b
5 changed files with 8 additions and 7 deletions

View File

@ -322,7 +322,7 @@ void fetch_curl_finalise(lwc_string *scheme)
bool fetch_curl_can_fetch(const nsurl *url)
{
return nsurl_enquire(url, NSURL_HOST);
return nsurl_has_component(url, NSURL_HOST);
}
/**

View File

@ -724,10 +724,10 @@ nserror llcache_object_retrieve(nsurl *url, uint32_t flags,
*/
/* Look for a query segment */
has_query = nsurl_enquire(url, NSURL_QUERY);
has_query = nsurl_has_component(url, NSURL_QUERY);
/* Get rid of any url fragment */
if (nsurl_enquire(url, NSURL_FRAGMENT)) {
if (nsurl_has_component(url, NSURL_FRAGMENT)) {
error = nsurl_defragment(url, &defragmented_url);
if (error != NSERROR_OK)
return error;

View File

@ -794,7 +794,7 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
lwc_string_unref(bw->frag_id);
bw->frag_id = NULL;
if (nsurl_enquire(nsurl, NSURL_FRAGMENT)) {
if (nsurl_has_component(nsurl, NSURL_FRAGMENT)) {
bool same_url = false;
bw->frag_id = nsurl_get_component(nsurl, NSURL_FRAGMENT);
@ -811,7 +811,8 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
* don't bother to fetch, just update the window.
*/
if (same_url && fetch_is_post == false &&
nsurl_enquire(nsurl, NSURL_QUERY) == false) {
nsurl_has_component(nsurl, NSURL_QUERY) ==
false) {
nsurl_unref(nsurl);
if (nsref != NULL)
nsurl_unref(nsref);

View File

@ -1482,7 +1482,7 @@ lwc_string *nsurl_get_component(const nsurl *url, nsurl_component part)
/* exported interface, documented in nsurl.h */
bool nsurl_enquire(const nsurl *url, nsurl_component part)
bool nsurl_has_component(const nsurl *url, nsurl_component part)
{
assert(url != NULL);

View File

@ -165,7 +165,7 @@ lwc_string *nsurl_get_component(const nsurl *url, nsurl_component part);
* NSURL_QUERY
* NSURL_FRAGMENT
*/
bool nsurl_enquire(const nsurl *url, nsurl_component part);
bool nsurl_has_component(const nsurl *url, nsurl_component part);
/**