[project @ 2004-06-12 20:08:47 by joty]

html_find_stylesheets() : returns void, not bool.

svn path=/import/netsurf/; revision=968
This commit is contained in:
John Tytgat 2004-06-12 20:08:47 +00:00
parent 0ebbc1330c
commit 3ccc79bc81
1 changed files with 19 additions and 19 deletions

View File

@ -39,7 +39,7 @@ static void html_find_stylesheets(struct content *c, xmlNode *head);
static void html_object_callback(content_msg msg, struct content *object, static void html_object_callback(content_msg msg, struct content *object,
void *p1, void *p2, union content_msg_data data); void *p1, void *p2, union content_msg_data data);
static void html_object_done(struct box *box, struct content *object, static void html_object_done(struct box *box, struct content *object,
bool background); bool background);
static bool html_object_type_permitted(const content_type type, static bool html_object_type_permitted(const content_type type,
const content_type *permitted_types); const content_type *permitted_types);
@ -414,12 +414,12 @@ void html_find_stylesheets(struct content *c, xmlNode *head)
content_create(c->data.html. content_create(c->data.html.
base_url); base_url);
if (!c->data.html.stylesheet_content[1]) if (!c->data.html.stylesheet_content[1])
return false; return;
if (!content_set_type(c->data.html. if (!content_set_type(c->data.html.
stylesheet_content[1], stylesheet_content[1],
CONTENT_CSS, "text/css", CONTENT_CSS, "text/css",
params)) params))
return false; return;
} }
/* can't just use xmlNodeGetContent(node), because that won't give /* can't just use xmlNodeGetContent(node), because that won't give
@ -430,7 +430,7 @@ void html_find_stylesheets(struct content *c, xmlNode *head)
stylesheet_content[1], stylesheet_content[1],
data, strlen(data))) { data, strlen(data))) {
xmlFree(data); xmlFree(data);
return false; return;
} }
xmlFree(data); xmlFree(data);
} }
@ -532,10 +532,10 @@ void html_convert_css_callback(content_msg msg, struct content *css,
#ifdef WITH_AUTH #ifdef WITH_AUTH
case CONTENT_MSG_AUTH: case CONTENT_MSG_AUTH:
c->data.html.stylesheet_content[i] = 0; c->data.html.stylesheet_content[i] = 0;
c->active--; c->active--;
content_add_error(c, "?", 0); content_add_error(c, "?", 0);
break; break;
#endif #endif
default: default:
@ -551,10 +551,10 @@ void html_convert_css_callback(content_msg msg, struct content *css,
* \param url URL of object to fetch (not copied, must be on heap) * \param url URL of object to fetch (not copied, must be on heap)
* \param box box that will contain the object * \param box box that will contain the object
* \param permitted_types array of types, terminated by CONTENT_UNKNOWN, * \param permitted_types array of types, terminated by CONTENT_UNKNOWN,
* or 0 if all types except OTHER and UNKNOWN acceptable * or 0 if all types except OTHER and UNKNOWN acceptable
* \param available_width estimate of width of object * \param available_width estimate of width of object
* \param available_height estimate of height of object * \param available_height estimate of height of object
* \param background this is a background image * \param background this is a background image
*/ */
void html_fetch_object(struct content *c, char *url, struct box *box, void html_fetch_object(struct content *c, char *url, struct box *box,
@ -689,10 +689,10 @@ void html_object_callback(content_msg msg, struct content *object,
#ifdef WITH_AUTH #ifdef WITH_AUTH
case CONTENT_MSG_AUTH: case CONTENT_MSG_AUTH:
c->data.html.object[i].content = 0; c->data.html.object[i].content = 0;
c->active--; c->active--;
content_add_error(c, "?", 0); content_add_error(c, "?", 0);
break; break;
#endif #endif
default: default:
@ -721,16 +721,16 @@ void html_object_callback(content_msg msg, struct content *object,
*/ */
void html_object_done(struct box *box, struct content *object, void html_object_done(struct box *box, struct content *object,
bool background) bool background)
{ {
struct box *b; struct box *b;
if (background) { if (background) {
box->background = object; box->background = object;
} }
else { else {
box->object = object; box->object = object;
} }
if (box->width != UNKNOWN_WIDTH && if (box->width != UNKNOWN_WIDTH &&
object->available_width != box->width) object->available_width != box->width)
@ -753,7 +753,7 @@ void html_object_done(struct box *box, struct content *object,
* *
* \param type the content_type to search for * \param type the content_type to search for
* \param permitted_types array of types, terminated by CONTENT_UNKNOWN, * \param permitted_types array of types, terminated by CONTENT_UNKNOWN,
* or 0 if all types except OTHER and UNKNOWN acceptable * or 0 if all types except OTHER and UNKNOWN acceptable
* \return the type is in the list or acceptable * \return the type is in the list or acceptable
*/ */
@ -795,7 +795,7 @@ void html_destroy(struct content *c)
free(c->title); free(c->title);
imagemap_destroy(c); imagemap_destroy(c);
if (c->data.html.parser) if (c->data.html.parser)
htmlFreeParserCtxt(c->data.html.parser); htmlFreeParserCtxt(c->data.html.parser);