aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/html.cc18
-rw-r--r--src/html_common.hh6
2 files changed, 12 insertions, 12 deletions
diff --git a/src/html.cc b/src/html.cc
index d71fce12..5571b8bb 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -460,6 +460,9 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
attr_data = dStr_sized_new(1024);
+ link_color = -1;
+ visited_color = -1;
+
/* Init page-handling variables */
forms = new misc::SimpleVector <DilloHtmlForm*> (1);
inputs_outside_form = new misc::SimpleVector <DilloHtmlInput*> (1);
@@ -467,9 +470,6 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
images = new misc::SimpleVector <DilloLinkImage*> (16);
//a_Dw_image_map_list_init(&maps);
- link_color = -1;
- visited_color = -1;
-
/* Initialize the main widget */
initDw();
/* Hook destructor to the dw delete call */
@@ -565,7 +565,7 @@ void DilloHtml::write(char *Buf, int BufSize, int Eof)
Start_Buf = Buf;
dReturn_if (dw == NULL);
- dReturn_if (stop_parser == TRUE);
+ dReturn_if (stop_parser == true);
token_start = Html_write_raw(this, buf, bufsize, Eof);
Start_Ofs += token_start;
@@ -2736,12 +2736,12 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
(content = a_Html_get_attr(html, tag, tagsize, "content"))) {
/* Get delay, if present, and make a message with it */
- if ((delay = strtol(content, NULL, 0)))
+ if ((delay = strtol(content, NULL, 0))) {
snprintf(delay_str, 64, " after %d second%s.",
- delay, (delay > 1) ? "s" : "");
- else
+ delay, (delay > 1) ? "s" : "");
+ } else {
sprintf(delay_str, ".");
-
+ }
/* Skip to anything after "URL=" */
while (*content && *(content++) != '=') ;
@@ -3343,7 +3343,7 @@ static void Html_process_tag(DilloHtml *html, char *tag, int tagsize)
char *start = tag + 1; /* discard the '<' */
int IsCloseTag = (*start == '/');
- dReturn_if (html->stop_parser == TRUE);
+ dReturn_if (html->stop_parser == true);
ni = a_Html_tag_index(start + IsCloseTag);
if (ni == -1) {
diff --git a/src/html_common.hh b/src/html_common.hh
index 143b9458..de87ec80 100644
--- a/src/html_common.hh
+++ b/src/html_common.hh
@@ -204,6 +204,9 @@ public: //BUG: for now everything is public
Dstr *attr_data; /* Buffer for attribute value */
+ int32_t link_color;
+ int32_t visited_color;
+
/* -------------------------------------------------------------------*/
/* Variables required after parsing (for page functionality) */
/* -------------------------------------------------------------------*/
@@ -213,9 +216,6 @@ public: //BUG: for now everything is public
lout::misc::SimpleVector<DilloLinkImage*> *images;
dw::ImageMapsList maps;
- int32_t link_color;
- int32_t visited_color;
-
private:
void freeParseData();
void initDw(); /* Used by the constructor */