aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-06-19 16:13:57 +0200
committerjcid <devnull@localhost>2008-06-19 16:13:57 +0200
commit4fe7cf08fa4ab9e48f037ea99fe86bd4b69d36ee (patch)
tree86d040483020e9bcc36b13a32d59b6f27ff0edd4 /src
parentbf81ea10a2b7c648a5db06517f569d92645e830a (diff)
- minor cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/form.cc2
-rw-r--r--src/html.cc40
-rw-r--r--src/html_common.hh4
3 files changed, 23 insertions, 23 deletions
diff --git a/src/form.cc b/src/form.cc
index 5c548c3b..b047dc46 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -1881,7 +1881,7 @@ static dw::core::ui::Embed *Html_input_image(DilloHtml *html,
/* create new image and add it to the button */
if ((Image = a_Html_add_new_image(html, tag, tagsize, url, &style_attrs,
- FALSE))) {
+ false))) {
Style *style = Style::create (HT2LT(html), &style_attrs);
IM2DW(Image)->setStyle (style);
dw::core::ui::ComplexButtonResource *complex_b_r =
diff --git a/src/html.cc b/src/html.cc
index b6c8b1ea..ce8a6769 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -330,9 +330,9 @@ static void Html_tag_set_align_attr(DilloHtml *html, const char *tag,
/*
* Evaluates the VALIGN attribute (top|bottom|middle|baseline) and
- * sets the style in style_attrs. Returns TRUE when set.
+ * sets the style in style_attrs. Returns true when set.
*/
-static bool_t Html_tag_set_valign_attr(DilloHtml *html, const char *tag,
+static bool Html_tag_set_valign_attr(DilloHtml *html, const char *tag,
int tagsize, StyleAttrs *style_attrs)
{
const char *attr;
@@ -346,9 +346,9 @@ static bool_t Html_tag_set_valign_attr(DilloHtml *html, const char *tag,
style_attrs->valign = VALIGN_BASELINE;
else
style_attrs->valign = VALIGN_MIDDLE;
- return TRUE;
+ return true;
} else
- return FALSE;
+ return false;
}
@@ -385,7 +385,7 @@ static void Html_add_indented_widget(DilloHtml *html, Widget *textblock,
DW2TB(html->dw)->addWidget (textblock, style);
DW2TB(html->dw)->addParbreak (space, style);
S_TOP(html)->textblock = html->dw = textblock;
- S_TOP(html)->hand_over_break = TRUE;
+ S_TOP(html)->hand_over_break = true;
style->unref ();
/* Handle it when the user clicks on a link */
@@ -483,7 +483,7 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
stack->getRef(0)->textblock = NULL;
stack->getRef(0)->table = NULL;
stack->getRef(0)->ref_list_item = NULL;
- stack->getRef(0)->hand_over_break = FALSE;
+ stack->getRef(0)->hand_over_break = false;
InFlags = IN_NONE;
@@ -1216,27 +1216,27 @@ static void Html_process_word(DilloHtml *html, const char *word, int size)
/*
* Does the tag in tagstr (e.g. "p") match the tag in the tag, tagsize
- * structure, with the initial < skipped over (e.g. "P align=center>")
+ * structure, with the initial < skipped over (e.g. "P align=center>")?
*/
-static bool_t Html_match_tag(const char *tagstr, char *tag, int tagsize)
+static bool Html_match_tag(const char *tagstr, char *tag, int tagsize)
{
int i;
for (i = 0; i < tagsize && tagstr[i] != '\0'; i++) {
if (tolower(tagstr[i]) != tolower(tag[i]))
- return FALSE;
+ return false;
}
/* The test for '/' is for xml compatibility: "empty/>" will be matched. */
if (i < tagsize && (isspace(tag[i]) || tag[i] == '>' || tag[i] == '/'))
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
/*
* This function is called after popping the stack, to
* handle nested DwPage widgets.
*/
-static void Html_eventually_pop_dw(DilloHtml *html, bool_t hand_over_break)
+static void Html_eventually_pop_dw(DilloHtml *html, bool hand_over_break)
{
if (html->dw != S_TOP(html)->textblock) {
if (hand_over_break)
@@ -1280,7 +1280,7 @@ static void Html_force_push_tag(DilloHtml *html, int tag_idx)
*/
static void Html_real_pop_tag(DilloHtml *html)
{
- bool_t hand_over_break;
+ bool hand_over_break;
(S_TOP(html)->style)->unref ();
if (S_TOP(html)->table_cell_style)
@@ -1887,7 +1887,7 @@ static void Html_tag_open_table_cell(DilloHtml *html,
StyleAttrs style_attrs;
Style *style, *old_style;
int32_t bgcolor;
- bool_t new_style;
+ bool new_style;
switch (S_TOP(html)->table_mode) {
case DILLO_HTML_TABLE_MODE_NONE:
@@ -1927,15 +1927,15 @@ static void Html_tag_open_table_cell(DilloHtml *html,
/* cell style */
style_attrs = *S_TOP(html)->table_cell_style;
- new_style = FALSE;
+ new_style = false;
if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "width"))) {
style_attrs.width = Html_parse_length (html, attrbuf);
- new_style = TRUE;
+ new_style = true;
}
if (Html_tag_set_valign_attr (html, tag, tagsize, &style_attrs))
- new_style = TRUE;
+ new_style = true;
if (!prefs.force_my_colors &&
(attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
@@ -1944,7 +1944,7 @@ static void Html_tag_open_table_cell(DilloHtml *html,
if (bgcolor == 0xffffff && !prefs.allow_white_bg)
bgcolor = prefs.bg_color;
- new_style = TRUE;
+ new_style = true;
style_attrs.backgroundColor =
Color::createShaded (HT2LT(html), bgcolor);
HTML_SET_TOP_ATTR (html, backgroundColor,
@@ -2333,7 +2333,7 @@ static void Html_tag_open_tt(DilloHtml *html, const char *tag, int tagsize)
DilloImage *a_Html_add_new_image(DilloHtml *html, const char *tag,
int tagsize, DilloUrl *url,
dw::core::style::StyleAttrs *style_attrs,
- bool_t add)
+ bool add)
{
const int MAX_W = 6000, MAX_H = 6000;
@@ -2485,7 +2485,7 @@ static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize)
style_attrs.borderWidth.setVal (border);
}
- Image = a_Html_add_new_image(html, tag, tagsize, url, &style_attrs, TRUE);
+ Image = a_Html_add_new_image(html, tag, tagsize, url, &style_attrs, true);
/* Image maps */
if (a_Html_get_attr(html, tag, tagsize, "ismap")) {
diff --git a/src/html_common.hh b/src/html_common.hh
index 0587a54e..1c48bd4f 100644
--- a/src/html_common.hh
+++ b/src/html_common.hh
@@ -127,7 +127,7 @@ struct _DilloHtmlState {
/* This is used for list items etc; if it is set to TRUE, breaks
have to be "handed over" (see Html_add_indented and
Html_eventually_pop_dw). */
- bool_t hand_over_break;
+ bool hand_over_break;
};
/*
@@ -247,7 +247,7 @@ DilloUrl *a_Html_url_new(DilloHtml *html,
DilloImage *a_Html_add_new_image(DilloHtml *html, const char *tag,
int tagsize, DilloUrl *url,
dw::core::style::StyleAttrs *style_attrs,
- bool_t add);
+ bool add);
char *a_Html_parse_entities(DilloHtml *html, const char *token, int toksize);
void a_Html_pop_tag(DilloHtml *html, int TagIdx);