changeset 896:28c48c67ff1d

Minor cleanups
author Jorge Arellano Cid <jcid@dillo.org>
date Tue, 03 Feb 2009 09:17:57 -0300
parents 660448deb31a
children cdb32eeb8322
files src/html.cc src/html_common.hh
diffstat 2 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Sun Feb 01 20:53:44 2009 -0300
+++ b/src/html.cc	Tue Feb 03 09:17:57 2009 -0300
@@ -460,6 +460,9 @@
 
    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 @@
    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 @@
    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 @@
        (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 @@
    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) {
--- a/src/html_common.hh	Sun Feb 01 20:53:44 2009 -0300
+++ b/src/html_common.hh	Tue Feb 03 09:17:57 2009 -0300
@@ -204,6 +204,9 @@
 
    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 @@
    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 */