Fix compilation with GCC 2.95.
It astounds me how some of this lot compiled at all. svn path=/trunk/netsurf/; revision=7104
This commit is contained in:
parent
3a12ed0fac
commit
6a7b1a73a7
|
@ -2030,7 +2030,7 @@ bool box_create_frameset(struct content_html_frames *f, xmlNode *n,
|
|||
xmlFree(s);
|
||||
}
|
||||
frame->no_resize = xmlHasProp(c,
|
||||
(const xmlChar *) "noresize");
|
||||
(const xmlChar *) "noresize") != NULL;
|
||||
if ((s = (char *) xmlGetProp(c,
|
||||
(const xmlChar *) "frameborder"))) {
|
||||
i = atoi(s);
|
||||
|
@ -2448,25 +2448,25 @@ bool box_input_text(BOX_SPECIAL_PARAMS, bool password)
|
|||
xmlFree(s);
|
||||
if (box->gadget->value == NULL || box->gadget->initial_value == NULL) {
|
||||
box_free(box);
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
box->gadget->length = strlen(box->gadget->value);
|
||||
#endif
|
||||
|
||||
inline_container = box_create(0, 0, 0, 0, 0, content);
|
||||
if (!inline_container)
|
||||
return 0;
|
||||
return false;
|
||||
inline_container->type = BOX_INLINE_CONTAINER;
|
||||
inline_box = box_create(box->style, 0, 0, box->title, 0, content);
|
||||
if (!inline_box)
|
||||
return 0;
|
||||
return false;
|
||||
inline_box->type = BOX_TEXT;
|
||||
if (password) {
|
||||
inline_box->length = strlen(box->gadget->value);
|
||||
inline_box->text = talloc_array(content, char,
|
||||
inline_box->length + 1);
|
||||
if (!inline_box->text)
|
||||
return 0;
|
||||
return false;
|
||||
memset(inline_box->text, '*', inline_box->length);
|
||||
inline_box->text[inline_box->length] = '\0';
|
||||
} else {
|
||||
|
@ -2474,17 +2474,17 @@ bool box_input_text(BOX_SPECIAL_PARAMS, bool password)
|
|||
* wrapping */
|
||||
char *text = cnv_space2nbsp(box->gadget->value);
|
||||
if (!text)
|
||||
return 0;
|
||||
return false;
|
||||
inline_box->text = talloc_strdup(content, text);
|
||||
free(text);
|
||||
if (!inline_box->text)
|
||||
return 0;
|
||||
return false;
|
||||
inline_box->length = strlen(inline_box->text);
|
||||
}
|
||||
box_add_child(inline_container, inline_box);
|
||||
box_add_child(box, inline_container);
|
||||
|
||||
return box;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2693,7 +2693,7 @@ bool box_select_add_option(struct form_control *control, xmlNode *n)
|
|||
if (!value)
|
||||
goto no_memory;
|
||||
|
||||
selected = xmlHasProp(n, (const xmlChar *) "selected");
|
||||
selected = xmlHasProp(n, (const xmlChar *) "selected") != NULL;
|
||||
|
||||
/* replace spaces/TABs with hard spaces to prevent line wrapping */
|
||||
text_nowrap = cnv_space2nbsp(text);
|
||||
|
|
|
@ -864,7 +864,7 @@ struct form_control *parse_input_element(xmlNode *node)
|
|||
|
||||
if (control->type == GADGET_CHECKBOX || control->type == GADGET_RADIO) {
|
||||
control->selected =
|
||||
xmlHasProp(node, (const xmlChar *) "checked");
|
||||
xmlHasProp(node, (const xmlChar *) "checked") != NULL;
|
||||
}
|
||||
|
||||
if (control->type == GADGET_PASSWORD ||
|
||||
|
@ -983,7 +983,7 @@ struct form_control *parse_select_element(xmlNode *node)
|
|||
return NULL;
|
||||
|
||||
control->data.select.multiple =
|
||||
xmlHasProp(node, (const xmlChar *) "multiple");
|
||||
xmlHasProp(node, (const xmlChar *) "multiple") != NULL;
|
||||
|
||||
name = xmlGetProp(node, (const xmlChar *) "name");
|
||||
if (name != NULL) {
|
||||
|
|
|
@ -186,7 +186,7 @@ bool render_list_counter_increment(char *name, int value) {
|
|||
if (counter->state)
|
||||
counter->state->count += value;
|
||||
/* render_list_counter_output(name);
|
||||
*/ return (counter->state);
|
||||
*/ return counter->state != NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ void table_collapse_borders(struct box *table)
|
|||
assert(row_group->type == BOX_TABLE_ROW_GROUP);
|
||||
assert(row_group->style);
|
||||
table_collapse_borders_h(table, row_group, &first);
|
||||
first = (row_group->children);
|
||||
first = row_group->children != NULL;
|
||||
for (row = row_group->children; row; row = row->next) {
|
||||
assert(row->type == BOX_TABLE_ROW);
|
||||
assert(row->style);
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "utils/url.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#define FULL_WORD (unsigned int)4294967295
|
||||
#define FULL_WORD (unsigned int)4294967295U
|
||||
/* '0' + '0' * 10 */
|
||||
#define START_PREFIX 528
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include "replace.h"
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
#if !defined(__BEOS__) && !defined(__HAIKU__)
|
||||
#if !defined(__BEOS__) && !defined(__HAIKU__) && __GNUC__ > 2
|
||||
/* Assume we've got va_copy */
|
||||
#define HAVE_VA_COPY
|
||||
#include <string.h>
|
||||
|
|
Loading…
Reference in New Issue