changeset 928:7771cf243ca6

's/if(/if (/g' 's/for(/for (/g' 's/while(/while (/g', and indentation.
author Jorge Arellano Cid <jcid@dillo.org>
date Sun, 08 Feb 2009 21:16:37 -0300
parents ee1e8682d8dc
children 09dba1aad5cd
files dlib/dlib.c dpi/datauri.c dpi/downloads.cc dpi/https.c dw/alignedtextblock.cc dw/findtext.cc dw/fltkimgbuf.cc dw/fltkplatform.cc dw/fltkpreview.cc dw/fltkui.cc dw/fltkviewbase.cc dw/fltkviewport.cc dw/image.cc dw/iterator.cc dw/layout.cc dw/style.hh lout/container.cc lout/misc.cc lout/object.cc lout/signal.cc src/css.hh src/dillo.cc
diffstat 22 files changed, 212 insertions(+), 213 deletions(-) [+]
line wrap: on
line diff
--- a/dlib/dlib.c	Sun Feb 08 19:42:35 2009 -0300
+++ b/dlib/dlib.c	Sun Feb 08 21:16:37 2009 -0300
@@ -850,10 +850,10 @@
    dReturn_val_if_fail (stream, 0);
 
    dstr = dStr_sized_new(64);
-   while((ch = fgetc(stream)) != EOF) {
+   while ((ch = fgetc(stream)) != EOF) {
       if (ch == '\\') {
          /* continue with the next line */
-         while((ch = fgetc(stream)) != EOF && ch != '\n');
+         while ((ch = fgetc(stream)) != EOF && ch != '\n') ;
          continue;
       }
       dStr_append_c(dstr, ch);
--- a/dpi/datauri.c	Sun Feb 08 19:42:35 2009 -0300
+++ b/dpi/datauri.c	Sun Feb 08 21:16:37 2009 -0300
@@ -39,63 +39,60 @@
 
 static int b64decode(unsigned char* str)
 {
-    unsigned char *cur, *start;
-    int d, dlast, phase;
-    unsigned char c;
-    static int table[256] = {
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 00-0F */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 10-1F */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,  /* 20-2F */
-        52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,  /* 30-3F */
-        -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,  /* 40-4F */
-        15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,  /* 50-5F */
-        -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,  /* 60-6F */
-        41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1,  /* 70-7F */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 80-8F */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 90-9F */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* A0-AF */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* B0-BF */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* C0-CF */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* D0-DF */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* E0-EF */
-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1   /* F0-FF */
-    };
+   unsigned char *cur, *start;
+   int d, dlast, phase;
+   unsigned char c;
+   static int table[256] = {
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 00-0F */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 10-1F */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,  /* 20-2F */
+      52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,  /* 30-3F */
+      -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,  /* 40-4F */
+      15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,  /* 50-5F */
+      -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,  /* 60-6F */
+      41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1,  /* 70-7F */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 80-8F */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* 90-9F */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* A0-AF */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* B0-BF */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* C0-CF */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* D0-DF */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,  /* E0-EF */
+      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1   /* F0-FF */
+   };
 
-    d = dlast = phase = 0;
-    start = str;
-    for (cur = str; *cur != '\0'; ++cur )
-    {
-        // jer: treat line endings as physical breaks.
-        //if (*cur == '\n' || *cur == '\r'){phase = dlast = 0; continue;}
-        d = table[(int)*cur];
-        if(d != -1)
-        {
-            switch(phase)
-            {
-            case 0:
-                ++phase;
-                break;
-            case 1:
-                c = ((dlast << 2) | ((d & 0x30) >> 4));
-                *str++ = c;
-                ++phase;
-                break;
-            case 2:
-                c = (((dlast & 0xf) << 4) | ((d & 0x3c) >> 2));
-                *str++ = c;
-                ++phase;
-                break;
-            case 3:
-                c = (((dlast & 0x03 ) << 6) | d);
-                *str++ = c;
-                phase = 0;
-                break;
-            }
-            dlast = d;
-        }
-    }
-    *str = '\0';
-    return str - start;
+   d = dlast = phase = 0;
+   start = str;
+   for (cur = str; *cur != '\0'; ++cur ) {
+      // jer: treat line endings as physical breaks.
+      //if (*cur == '\n' || *cur == '\r'){phase = dlast = 0; continue;}
+      d = table[(int)*cur];
+      if (d != -1) {
+         switch(phase) {
+         case 0:
+            ++phase;
+            break;
+         case 1:
+            c = ((dlast << 2) | ((d & 0x30) >> 4));
+            *str++ = c;
+            ++phase;
+            break;
+         case 2:
+            c = (((dlast & 0xf) << 4) | ((d & 0x3c) >> 2));
+            *str++ = c;
+            ++phase;
+            break;
+         case 3:
+            c = (((dlast & 0x03 ) << 6) | d);
+            *str++ = c;
+            phase = 0;
+            break;
+         }
+         dlast = d;
+      }
+   }
+   *str = '\0';
+   return str - start;
 }
 
 /* Modified from src/url.c --------------------------------------------------*/
@@ -113,7 +110,7 @@
       hex[2] = 0;
       hex_value = strtol(hex, &tail, 16);
       if (tail - hex == 2)
-        return hex_value;
+         return hex_value;
    }
    return -1;
 }
--- a/dpi/downloads.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dpi/downloads.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -513,7 +513,7 @@
          if (isdigit(*q++ = *p)) {
             // keep here
          } else if (*p == 'K') {
-            for(--q; isdigit(q[-1]); --q) ; log_state = ST_discard;
+            for (--q; isdigit(q[-1]); --q) ; log_state = ST_discard;
          } else {
             log_state = ST_copy;
          }
--- a/dpi/https.c	Sun Feb 08 19:42:35 2009 -0300
+++ b/dpi/https.c	Sun Feb 08 21:16:37 2009 -0300
@@ -589,7 +589,7 @@
    snprintf(buf,4096,"%s/.dillo/certs/", dGethomedir());
    mkdir(buf, 01777);
 
-   do{
+   do {
       snprintf(buf, 4096, "%s/.dillo/certs/%lx.%u",
                dGethomedir(), X509_subject_name_hash(cert), i);
 
@@ -612,7 +612,7 @@
       }
       i++;
       /*Don't loop too many times - just give up*/
-   } while( i < 1024 );
+   } while (i < 1024);
 
    return retval;
 }
--- a/dw/alignedtextblock.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/alignedtextblock.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -54,7 +54,7 @@
    textblocks->set (pos, NULL);
    refCount--;
 
-   if(refCount == 0)
+   if (refCount == 0)
       delete this;
 }
 
@@ -68,7 +68,7 @@
 
 void AlignedTextblock::setRefTextblock (AlignedTextblock *ref)
 {
-   if(ref == NULL)
+   if (ref == NULL)
       list = new List();
    else
       list = ref->list;
--- a/dw/findtext.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/findtext.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -96,7 +96,7 @@
 
       if (backwards) {
          /* Go to end */
-         while(iterator->next () ) ;
+         while (iterator->next () ) ;
          iterator->prev (); //We don't want to be at CharIterator::END.
       } else {
          iterator->next ();
@@ -127,7 +127,7 @@
          iterator = new CharIterator (widget);
          if (backwards) {
             /* Go to end */
-            while(iterator->next ()) ;
+            while (iterator->next ()) ;
             iterator->prev (); //We don't want to be at CharIterator::END.
          } else {
             iterator->next ();
--- a/dw/fltkimgbuf.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/fltkimgbuf.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -124,16 +124,16 @@
    int sr1 = scaledY (row);
    int sr2 = scaledY (row + 1);
    
-   for(int sr = sr1; sr < sr2; sr++) {
+   for (int sr = sr1; sr < sr2; sr++) {
       // Avoid multiple passes.
       if (copiedRows->get(sr)) continue;
 
       copiedRows->set (sr, true);
       if (sr == sr1) {
-         for(int px = 0; px < root->width; px++) {
+         for (int px = 0; px < root->width; px++) {
             int px1 = px * width / root->width;
             int px2 = (px+1) * width / root->width;
-            for(int sp = px1; sp < px2; sp++) {
+            for (int sp = px1; sp < px2; sp++) {
                memcpy(rawdata + (sr*width + sp)*bpp, data + px*bpp, bpp);
             }
          }
--- a/dw/fltkplatform.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/fltkplatform.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -48,13 +48,13 @@
    copyAttrs (attrs);
 
    int fa = 0;
-   if(weight >= 500)
+   if (weight >= 500)
       fa |= BOLD;
-   if(style != core::style::FONT_STYLE_NORMAL)
+   if (style != core::style::FONT_STYLE_NORMAL)
       fa  |= ITALIC;
 
    font = ::fltk::font(name, fa);
-   if(font == NULL) {
+   if (font == NULL) {
       /*
        * If using xft, fltk::HELVETICA just means sans, fltk::COURIER
        * means mono, and fltk::TIMES means serif.
@@ -242,7 +242,7 @@
 
 FltkPlatform::~FltkPlatform ()
 {
-   if(idleFuncRunning)
+   if (idleFuncRunning)
       remove_idle (generalStaticIdle, (void*)this);
    delete idleQueue;
    delete views;
@@ -325,7 +325,7 @@
       idleQueue->removeRef(idleFunc);
    }
 
-   if(idleQueue->isEmpty()) {
+   if (idleQueue->isEmpty()) {
       idleFuncRunning = false;
       remove_idle (generalStaticIdle, (void*)this);
    }
@@ -340,7 +340,7 @@
     * Since ... (todo) we have to wrap around fltk_add_idle. There is only one
     * idle function, the passed idle function is put into a queue.
     */
-   if(!idleFuncRunning) {
+   if (!idleFuncRunning) {
       add_idle (generalStaticIdle, (void*)this);
       idleFuncRunning = true;
    }
@@ -361,15 +361,15 @@
    container::typed::Iterator <IdleFunc> it;
    IdleFunc *idleFunc;
 
-   for(found = false, it = idleQueue->iterator(); !found && it.hasNext(); ) {
+   for (found = false, it = idleQueue->iterator(); !found && it.hasNext(); ) {
       idleFunc = it.getNext();
-      if(idleFunc->id == idleId) {
+      if (idleFunc->id == idleId) {
          idleQueue->removeRef (idleFunc);
          found = true;
       }
    }
 
-   if(idleFuncRunning && idleQueue->isEmpty())
+   if (idleFuncRunning && idleQueue->isEmpty())
       remove_idle (generalStaticIdle, (void*)this);
 }
 
--- a/dw/fltkpreview.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/fltkpreview.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -191,7 +191,7 @@
    int mx, my, width, height;
    bool warp = false;
 
-   if(preview->canvasHeight * maxWidth > maxHeight * preview->canvasWidth) {
+   if (preview->canvasHeight * maxWidth > maxHeight * preview->canvasWidth) {
       // Expand to maximal height (most likely case).
       width = preview->canvasWidth * maxHeight / preview->canvasHeight;
       height = maxHeight;
--- a/dw/fltkui.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/fltkui.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -91,7 +91,7 @@
 
    }
    delete viewsAndWidgets;
-   if(style)
+   if (style)
       style->unref ();
 }
 
@@ -152,7 +152,7 @@
 
 void FltkResource::setStyle (core::style::Style *style)
 {
-   if(this->style)
+   if (this->style)
       this->style->unref ();
 
    this->style = style;
@@ -324,12 +324,12 @@
    int s1 = ::fltk::event_state ();
    int s2 = (core::ButtonState)0;
    
-   if(s1 & ::fltk::SHIFT)   s2 |= core::SHIFT_MASK;
-   if(s1 & ::fltk::CTRL)    s2 |= core::CONTROL_MASK;
-   if(s1 & ::fltk::ALT)     s2 |= core::META_MASK;
-   if(s1 & ::fltk::BUTTON1) s2 |= core::BUTTON1_MASK;
-   if(s1 & ::fltk::BUTTON2) s2 |= core::BUTTON2_MASK;
-   if(s1 & ::fltk::BUTTON3) s2 |= core::BUTTON3_MASK;
+   if (s1 & ::fltk::SHIFT)   s2 |= core::SHIFT_MASK;
+   if (s1 & ::fltk::CTRL)    s2 |= core::CONTROL_MASK;
+   if (s1 & ::fltk::ALT)     s2 |= core::META_MASK;
+   if (s1 & ::fltk::BUTTON1) s2 |= core::BUTTON1_MASK;
+   if (s1 & ::fltk::BUTTON2) s2 |= core::BUTTON2_MASK;
+   if (s1 & ::fltk::BUTTON3) s2 |= core::BUTTON3_MASK;
 
    return (core::ButtonState)s2;
 }
@@ -1117,7 +1117,7 @@
       ::fltk::ItemGroup *group = item->createNewGroupWidget ();
       widgetStack->stack->getTop()->getTypedValue()->add (group);
       widgetStack->stack->push (new TypedPointer < ::fltk::Menu> (group));
-      if(!enabled)
+      if (!enabled)
          group->deactivate ();
    }
 }
--- a/dw/fltkviewbase.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/fltkviewbase.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -178,12 +178,12 @@
    int s1 = event_state ();
    int s2 = (core::ButtonState)0;
    
-   if(s1 & SHIFT)   s2 |= core::SHIFT_MASK;
-   if(s1 & CTRL)    s2 |= core::CONTROL_MASK;
-   if(s1 & ALT)     s2 |= core::META_MASK;
-   if(s1 & BUTTON1) s2 |= core::BUTTON1_MASK;
-   if(s1 & BUTTON2) s2 |= core::BUTTON2_MASK;
-   if(s1 & BUTTON3) s2 |= core::BUTTON3_MASK;
+   if (s1 & SHIFT)   s2 |= core::SHIFT_MASK;
+   if (s1 & CTRL)    s2 |= core::CONTROL_MASK;
+   if (s1 & ALT)     s2 |= core::META_MASK;
+   if (s1 & BUTTON1) s2 |= core::BUTTON1_MASK;
+   if (s1 & BUTTON2) s2 |= core::BUTTON2_MASK;
+   if (s1 & BUTTON3) s2 |= core::BUTTON3_MASK;
 
    return (core::ButtonState)s2;
 }
--- a/dw/fltkviewport.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/fltkviewport.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -105,8 +105,8 @@
    vscrollbar->w (SCROLLBAR_THICKNESS);
 
    int x = w () - SCROLLBAR_THICKNESS, y = h () - SCROLLBAR_THICKNESS;
-   for(Iterator <TypedPointer < ::fltk::Widget> > it = gadgets->iterator ();
-       it.hasNext (); ) {
+   for (Iterator <TypedPointer < ::fltk::Widget> > it = gadgets->iterator ();
+        it.hasNext (); ) {
       ::fltk::Widget *widget = it.getNext()->getTypedValue ();
       widget->x (0);
       widget->y (0);
@@ -168,10 +168,10 @@
 
   vp->FltkWidgetView::draw ();
 
-  for(Iterator <TypedPointer < ::fltk::Widget> > it = vp->gadgets->iterator ();
-          it.hasNext (); ) {
-          ::fltk::Widget *widget = it.getNext()->getTypedValue ();
-          vp->draw_child (*widget);
+  for (Iterator <TypedPointer < ::fltk::Widget> > it = vp->gadgets->iterator();
+       it.hasNext (); ) {
+     ::fltk::Widget *widget = it.getNext()->getTypedValue ();
+     vp->draw_child (*widget);
   }
 
   pop_clip();
--- a/dw/image.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/image.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -167,7 +167,7 @@
       }
       requisition->descent = 0;
    } else {
-      if(altText && altText[0]) {
+      if (altText && altText[0]) {
          if (altTextWidth == -1)
             altTextWidth =
                layout->textWidth (getStyle()->font, altText, strlen (altText));
@@ -310,7 +310,7 @@
                           intersection.x - dx, intersection.y - dy,
                           intersection.width, intersection.height);
    } else {
-      if(altText && altText[0]) {
+      if (altText && altText[0]) {
          if (altTextWidth == -1)
             altTextWidth =
                layout->textWidth (getStyle()->font, altText, strlen (altText));
@@ -335,7 +335,7 @@
                              + getStyle()->font->ascent,
                              altText, strlen(altText));
 
-         if(clippingView)
+         if (clippingView)
             view->mergeClippingView (clippingView);
       }
    }
--- a/dw/iterator.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/iterator.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -210,7 +210,7 @@
 
    if (content.type == otherIt->content.type)
       return 0;
-   else if(content.type == Content::START)
+   else if (content.type == Content::START)
       return -1;
    else
       return +1;
@@ -487,7 +487,7 @@
    
    //DEBUG_MSG (1, "  => %s\n", a_Dw_iterator_text (it));
 
-   if(hasContents) {
+   if (hasContents) {
       // If this widget has parents, we must construct appropriate iterators.
       //
       // \todo There may be a faster way instead of iterating through the
@@ -679,7 +679,7 @@
    if (ch == START || it->getContent()->type == Content::BREAK ||
        (it->getContent()->type == Content::TEXT &&
         it->getContent()->text[pos] == 0)) {
-      if(it->next()) {
+      if (it->next()) {
          if (it->getContent()->type == Content::BREAK)
             ch = '\n';
          else { // if (it->getContent()->type == Content::TEXT)
@@ -695,7 +695,7 @@
          ch = END;
          return false;
       }
-   } else if(ch == END)
+   } else if (ch == END)
       return false;
    else {
       // at this point, it->getContent()->type == Content::TEXT
@@ -717,7 +717,7 @@
 {
    if (ch == END || it->getContent()->type == Content::BREAK ||
        (it->getContent()->type == Content::TEXT && pos == 0)) {
-      if(it->prev()) {
+      if (it->prev()) {
          if (it->getContent()->type == Content::BREAK)
             ch = '\n';
          else { // if (it->getContent()->type == Content::TEXT)
@@ -739,7 +739,7 @@
          ch = START;
          return false;
       }
-   } else if(ch == START)
+   } else if (ch == START)
       return false;
    else {
       // at this point, it->getContent()->type == Content::TEXT
--- a/dw/layout.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/layout.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -706,7 +706,7 @@
    lastWidget = widgetAtPoint;
    moveToWidgetAtPoint (x, y, state);
 
-   if(widgetAtPoint) {
+   if (widgetAtPoint) {
       event.state = state;
       event.lastWidget = lastWidget;
       event.currentWidget = widgetAtPoint;
@@ -727,7 +727,7 @@
    lastWidget = widgetAtPoint;
    moveOutOfView (state);
 
-   if(lastWidget) {
+   if (lastWidget) {
       event.state = state;
       event.lastWidget = lastWidget;
       event.currentWidget = widgetAtPoint;
@@ -765,7 +765,7 @@
       if (newWidgetAtPoint && widgetAtPoint)
          ancestor =
             newWidgetAtPoint->getNearestCommonAncestor (widgetAtPoint);
-      else if(newWidgetAtPoint)
+      else if (newWidgetAtPoint)
          ancestor = newWidgetAtPoint->getTopLevel ();
       else
          ancestor = widgetAtPoint->getTopLevel ();
@@ -777,7 +777,7 @@
          for (w = widgetAtPoint; w != ancestor; w = w->getParent ())
             trackLen++;
       trackLen++; // for the ancestor
-      if(newWidgetAtPoint)
+      if (newWidgetAtPoint)
          // second part
          for (w = newWidgetAtPoint; w != ancestor; w = w->getParent ())
             trackLen++;
@@ -789,7 +789,7 @@
          for (w = widgetAtPoint; w != ancestor; w = w->getParent ())
             track[i++] = w;
       track[i++] = ancestor;
-      if(newWidgetAtPoint) {
+      if (newWidgetAtPoint) {
          /* second part */
          i = trackLen - 1;
          for (w = newWidgetAtPoint; w != ancestor; w = w->getParent ())
@@ -827,7 +827,7 @@
    Widget *widget;
 
    for (widget = widgetAtPoint; widget; widget = widget->getParent ()) {
-      if(!mayBeSuppressed || widget->isButtonSensitive ()) {
+      if (!mayBeSuppressed || widget->isButtonSensitive ()) {
          event->xWidget = event->xCanvas - widget->getAllocation()->x;
          event->yWidget = event->yCanvas - widget->getAllocation()->y;
 
@@ -865,7 +865,7 @@
       for (container::typed::Iterator <View> it = views->iterator ();
            it.hasNext (); ) {
          View *thisView = it.getNext();
-         if(view != thisView && thisView->usesViewport ())
+         if (view != thisView && thisView->usesViewport ())
             thisView->scrollTo (scrollX, scrollY);
       }
 
@@ -885,7 +885,7 @@
 
    /* If the width has become higher, we test again, whether the vertical
     * scrollbar (so to speak) can be hidden again. */
-   if(usesViewport && width > viewportWidth)
+   if (usesViewport && width > viewportWidth)
       canvasHeightGreater = false;
 
    /* if size changes, redraw this view.
@@ -907,7 +907,7 @@
    for (container::typed::Iterator <View> it = views->iterator ();
         it.hasNext (); ) {
       View *thisView = it.getNext();
-      if(view != thisView && thisView->usesViewport ())
+      if (view != thisView && thisView->usesViewport ())
          thisView->setViewportSize (viewportWidth, viewportHeight,
                                     actualHScrollbarThickness,
                                     actualVScrollbarThickness);
--- a/dw/style.hh	Sun Feb 08 19:42:35 2009 -0300
+++ b/dw/style.hh	Sun Feb 08 21:16:37 2009 -0300
@@ -503,7 +503,7 @@
    }
 
    inline void ref () { refCount++; }
-   inline void unref () { if(--refCount == 0) delete this; }
+   inline void unref () { if (--refCount == 0) delete this; }
 };
 
 
@@ -532,7 +532,7 @@
 
    inline void ref () { refCount++; }
    inline void unref ()
-   { if(--refCount == 0) delete this; }
+   { if (--refCount == 0) delete this; }
 
    inline void onEnter () { }
    inline void onLeave () { }
@@ -582,7 +582,7 @@
                                 char *defaultFamily);
 
    inline void ref () { refCount++; }
-   inline void unref () { if(--refCount == 0) delete this; }
+   inline void unref () { if (--refCount == 0) delete this; }
 };
 
 
@@ -635,7 +635,7 @@
 
    inline void ref () { refCount++; }
    inline void unref ()
-   { if(--refCount == 0) delete this; }
+   { if (--refCount == 0) delete this; }
 };
 
 void drawBorder (View *view, Rectangle *area,
--- a/lout/container.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/lout/container.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -43,40 +43,40 @@
 Iterator::Iterator(const Iterator &it2)
 {
    impl = it2.impl;
-   if(impl)
+   if (impl)
       impl->ref();
 }
 
 Iterator::Iterator(Iterator &it2)
 {
    impl = it2.impl;
-   if(impl)
+   if (impl)
       impl->ref();
 }
 
 Iterator &Iterator::operator=(const Iterator &it2)
 {
-   if(impl)
+   if (impl)
       impl->unref();
    impl = it2.impl;
-   if(impl)
+   if (impl)
       impl->ref();
    return *this;
 }
 
 Iterator &Iterator::operator=(Iterator &it2)
 {
-   if(impl)
+   if (impl)
       impl->unref();
    impl = it2.impl;
-   if(impl)
+   if (impl)
       impl->ref();
    return *this;
 }
 
 Iterator::~Iterator()
 {
-   if(impl)
+   if (impl)
       impl->unref(); 
 }
 
@@ -88,8 +88,8 @@
 {
    sb->append("{ ");
    bool first = true;
-   for(Iterator it = iterator(); it.hasNext(); ) {
-      if(!first)
+   for (Iterator it = iterator(); it.hasNext(); ) {
+      if (!first)
          sb->append(", ");
       it.getNext()->intoStringBuffer(sb);
       first = false;
@@ -117,27 +117,27 @@
 
 void Vector::put(Object *newElement, int newPos)
 {
-   if(newPos == -1)
+   if (newPos == -1)
       newPos = numElements;
 
    // Old entry is overwritten.
-   if(newPos < numElements) {
-      if(ownerOfObjects && array[newPos])
+   if (newPos < numElements) {
+      if (ownerOfObjects && array[newPos])
          delete array[newPos];
    }
 
    // Allocated memory has to be increased.
-   if(newPos >= numAlloc) {
+   if (newPos >= numAlloc) {
       while (newPos >= numAlloc)
          numAlloc *= 2;
       array = (Object**)realloc(array, numAlloc * sizeof(Object*));
    }
 
    // Insert NULL's into possible gap before new position.
-   for(int i = numElements; i < newPos; i++)
+   for (int i = numElements; i < newPos; i++)
       array[i] = NULL;
 
-   if(newPos >= numElements)
+   if (newPos >= numElements)
       numElements = newPos + 1;
 
    array[newPos] = newElement;
@@ -146,8 +146,8 @@
 void Vector::clear()
 {
    if (ownerOfObjects) {
-      for(int i = 0; i < numElements; i++)
-         if(array[i])
+      for (int i = 0; i < numElements; i++)
+         if (array[i])
             delete array[i];
    }
 
@@ -156,18 +156,18 @@
 
 void Vector::insert(Object *newElement, int pos)
 {
-   if(pos >= numElements)
+   if (pos >= numElements)
       put(newElement, pos);
    else {
       numElements++;
 
       // Allocated memory has to be increased.
-      if(numElements >= numAlloc) {
+      if (numElements >= numAlloc) {
          numAlloc *= 2;
          array = (Object**)realloc(array, numAlloc * sizeof(Object*));
       }
 
-      for(int i = numElements - 1; i > pos; i--)
+      for (int i = numElements - 1; i > pos; i--)
          array[i] = array[i - 1];
 
       array[pos] = newElement;
@@ -176,10 +176,10 @@
 
 void Vector::remove(int pos)
 {
-   if(ownerOfObjects && array[pos])
+   if (ownerOfObjects && array[pos])
       delete array[pos];
 
-   for(int i = pos + 1; i < numElements; i++)
+   for (int i = pos + 1; i < numElements; i++)
       array[i - 1] = array[i];
 
    numElements--;
@@ -220,8 +220,8 @@
 
 void List::clear()
 {
-   while(first) {
-      if(ownerOfObjects && first->object)
+   while (first) {
+      if (ownerOfObjects && first->object)
          delete first->object;
       Node *next = first->next;
       delete first;
@@ -238,7 +238,7 @@
    newLast->next = NULL;
    newLast->object = element;
 
-   if(last) {
+   if (last) {
       last->next = newLast;
       last = newLast;
    } else 
@@ -252,21 +252,21 @@
 {
    Node *beforeCur, *cur;
 
-   for(beforeCur = NULL, cur = first; cur; beforeCur = cur, cur = cur->next) {
+   for (beforeCur = NULL, cur = first; cur; beforeCur = cur, cur = cur->next) {
       if (compare ?
           (cur->object && element->equals(cur->object)) :
           element == cur->object) {
-         if(beforeCur) {
+         if (beforeCur) {
             beforeCur->next = cur->next;
-            if(cur->next == NULL)
+            if (cur->next == NULL)
                last = beforeCur;
          } else {
             first = cur->next;
-            if(first == NULL)
+            if (first == NULL)
                last = NULL;
          }
 
-         if(ownerOfObjects && cur->object && !doNotDeleteAtAll)
+         if (ownerOfObjects && cur->object && !doNotDeleteAtAll)
             delete cur->object;
          delete cur;
 
@@ -282,7 +282,7 @@
 {
    Object *object;
 
-   if(current) {
+   if (current) {
       object = current->object;
       current = current->next;
    } else
@@ -313,20 +313,20 @@
    this->tableSize = tableSize;
 
    table = new Node*[tableSize];
-   for(int i = 0; i < tableSize; i++)
+   for (int i = 0; i < tableSize; i++)
       table[i] = NULL;
 }
 
 HashTable::~HashTable()
 {
-   for(int i = 0; i < tableSize; i++) {
+   for (int i = 0; i < tableSize; i++) {
       Node *n1 = table[i];
-      while(n1) {
+      while (n1) {
          Node *n2 = n1->next;
 
-         if(ownerOfValues && n1->value)
+         if (ownerOfValues && n1->value)
             delete n1->value;
-         if(ownerOfKeys)
+         if (ownerOfKeys)
             delete n1->key;
          delete n1;
 
@@ -342,9 +342,9 @@
    sb->append("{ ");
 
    bool first = true;
-   for(int i = 0; i < tableSize; i++) {
-      for(Node *node = table[i]; node; node = node->next) {
-         if(!first)
+   for (int i = 0; i < tableSize; i++) {
+      for (Node *node = table[i]; node; node = node->next) {
+         if (!first)
             sb->append(", ");
          node->key->intoStringBuffer(sb);
          sb->append(" => ");
@@ -369,7 +369,7 @@
 bool HashTable::contains(Object *key)
 {
    int h = calcHashValue(key);
-   for(Node *n = table[h]; n; n = n->next) {
+   for (Node *n = table[h]; n; n = n->next) {
       if (key->equals(n->key))
          return true;
    }
@@ -380,7 +380,7 @@
 Object *HashTable::get(Object *key)
 {
    int h = calcHashValue(key);
-   for(Node *n = table[h]; n; n = n->next) {
+   for (Node *n = table[h]; n; n = n->next) {
       if (key->equals(n->key))
          return n->value;
    }
@@ -393,16 +393,16 @@
    int h = calcHashValue(key);
    Node *last, *cur;
 
-   for(last = NULL, cur = table[h]; cur; last = cur, cur = cur->next) {
+   for (last = NULL, cur = table[h]; cur; last = cur, cur = cur->next) {
       if (key->equals(cur->key)) {
-         if(last)
+         if (last)
             last->next = cur->next;
          else
             table[h] = cur->next;
 
-         if(ownerOfValues && cur->value)
+         if (ownerOfValues && cur->value)
             delete cur->value;
-         if(ownerOfKeys)
+         if (ownerOfKeys)
             delete cur->key;
          delete cur;
 
@@ -416,7 +416,7 @@
 Object *HashTable::getKey (Object *key)
 {
    int h = calcHashValue(key);
-   for(Node *n = table[h]; n; n = n->next) {
+   for (Node *n = table[h]; n; n = n->next) {
       if (key->equals(n->key))
          return n->key;
    }
@@ -434,11 +434,11 @@
 
 void HashTable::HashTableIterator::gotoNext()
 {
-   if(node)
+   if (node)
       node = node->next;
 
-   while(node == NULL) {
-      if(pos >= table->tableSize - 1)
+   while (node == NULL) {
+      if (pos >= table->tableSize - 1)
          return;
       pos++;
       node = table->table[pos];
@@ -449,7 +449,7 @@
 Object *HashTable::HashTableIterator::getNext()
 {
    Object *result;
-   if(node)
+   if (node)
       result = node->key;
    else
       result = NULL;
@@ -492,7 +492,7 @@
    newTop->prev = top;
 
    top = newTop;
-   if(bottom == NULL)
+   if (bottom == NULL)
       bottom = top;
 
    numElements++;
@@ -503,11 +503,11 @@
    Node *newBottom = new Node ();
    newBottom->object = object;
    newBottom->prev = NULL;
-   if(bottom != NULL)
+   if (bottom != NULL)
       bottom->prev = newBottom;
 
    bottom = newBottom;
-   if(top == NULL)
+   if (top == NULL)
       top = bottom;
 
    numElements++;
@@ -522,7 +522,7 @@
    delete top;
 
    top = newTop;
-   if(top == NULL)
+   if (top == NULL)
       bottom = NULL;
 
    numElements--;
@@ -532,7 +532,7 @@
 {
    Object *object;
 
-   if(current) {
+   if (current) {
       object = current->object;
       current = current->prev;
    } else
--- a/lout/misc.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/lout/misc.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -77,11 +77,11 @@
 {
    Comparable **c1 = (Comparable**)p1;
    Comparable **c2 = (Comparable**)p2;
-   if(c1 && c2)
+   if (c1 && c2)
       return ((*c1)->compareTo(*c2));
-   else if(c1)
+   else if (c1)
       return 1;
-   else if(c2)
+   else if (c2)
       return -1;
    else
       return 0;
@@ -104,7 +104,7 @@
 StringBuffer::~StringBuffer()
 {
    clear ();
-   if(str)
+   if (str)
       delete[] str;
 }
 
@@ -121,7 +121,7 @@
    node->data = str;
    node->next = NULL;
 
-   if(firstNode == NULL) {
+   if (firstNode == NULL) {
       firstNode = node;
       lastNode = node;
    } else {
@@ -141,15 +141,15 @@
  */
 const char *StringBuffer::getChars()
 {
-   if(strValid)
+   if (strValid)
       return str;
 
-   if(str)
+   if (str)
       delete[] str;
    str = new char[numChars + 1];
    char *p = str;
 
-   for(Node *node = firstNode; node; node = node->next) {
+   for (Node *node = firstNode; node; node = node->next) {
       int l = strlen(node->data);
       memcpy(p, node->data, l * sizeof(char));
       p += l;
@@ -166,7 +166,7 @@
 void StringBuffer::clear ()
 {
    Node *node, *nextNode;
-   for(node = firstNode; node; node = nextNode) {
+   for (node = firstNode; node; node = nextNode) {
       nextNode = node->next;
       delete node->data;
       delete node;
@@ -196,14 +196,14 @@
 void BitSet::intoStringBuffer(misc::StringBuffer *sb)
 {
    sb->append("[");
-   for(int i = 0; i < numBytes; i++)
+   for (int i = 0; i < numBytes; i++)
       sb->append(get(i) ? "1" : "0");
    sb->append("]");
 }
 
 bool BitSet::get(int i)
 {
-   if(8 * i >= numBytes)
+   if (8 * i >= numBytes)
       return false;
    else
       return bits[i / 8] & (1 << (i % 8));
@@ -211,9 +211,9 @@
 
 void BitSet::set(int i, bool val)
 {
-   if(8 * i >= numBytes) {
+   if (8 * i >= numBytes) {
       int newNumBytes = numBytes;
-      while(8 * i >= newNumBytes)
+      while (8 * i >= newNumBytes)
          newNumBytes *= 2;
       bits =
          (unsigned char*)realloc(bits, newNumBytes * sizeof(unsigned char));
@@ -221,7 +221,7 @@
       numBytes = newNumBytes;
    }
   
-   if(val)
+   if (val)
       bits[i / 8] |= (1 << (i % 8));
    else
       bits[i / 8] &= ~(1 << (i % 8));
--- a/lout/object.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/lout/object.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -186,11 +186,11 @@
 int ConstString::compareTo(Comparable *other)
 {
    String *otherString = (String*)other;
-   if(str && otherString->str)
+   if (str && otherString->str)
       return strcmp(str, otherString->str);
-   else if(str)
+   else if (str)
       return 1;
-   else if(otherString->str)
+   else if (otherString->str)
       return -1;
    else
       return 0;
@@ -199,7 +199,7 @@
 
 int ConstString::hashValue(const char *str)
 {
-   if(str) {
+   if (str) {
       int h = 0;
       for (int i = 0; str[i]; i++)
          h = (h * 256 + str[i]);
@@ -223,7 +223,7 @@
 
 String::~String ()
 {
-  if(str)
+  if (str)
     delete str;
 }
 
@@ -239,9 +239,9 @@
 
 PairBase::~PairBase()
 {
-   if(first)
+   if (first)
       delete first;
-   if(second)
+   if (second)
       delete second;
 }
 
@@ -267,9 +267,9 @@
 {
    int value = 0;
 
-   if(first)
+   if (first)
       value ^= first->hashValue();
-   if(second)
+   if (second)
       value ^= second->hashValue();
    
    return value;
@@ -279,14 +279,14 @@
 {
    sb->append("<pair: ");
 
-   if(first)
+   if (first)
       first->intoStringBuffer(sb);
    else
       sb->append("(nil)");
 
    sb->append(",");
 
-   if(second)
+   if (second)
       second->intoStringBuffer(sb);
    else
       sb->append("(nil)");
@@ -298,9 +298,9 @@
 {
    size_t size = 0;
 
-   if(first)
+   if (first)
       size += first->sizeOf();
-   if(second)
+   if (second)
       size += second->sizeOf();
 
    return size;
--- a/lout/signal.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/lout/signal.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -38,7 +38,7 @@
 
 Emitter::~Emitter ()
 {
-   for(Iterator<Receiver> it = receivers->iterator (); it.hasNext (); ) {
+   for (Iterator<Receiver> it = receivers->iterator (); it.hasNext (); ) {
       Receiver *receiver = it.getNext ();
       receiver->unconnectFrom (this);
    }
@@ -77,7 +77,7 @@
  */
 void Emitter::emitVoid (int signalNo, int argc, Object **argv)
 {
-   for(Iterator <Receiver> it = receivers->iterator (); it.hasNext (); ) {
+   for (Iterator <Receiver> it = receivers->iterator (); it.hasNext (); ) {
       Receiver *receiver = it.getNext();
       emitToReceiver (receiver, signalNo, argc, argv);
    }
@@ -93,7 +93,7 @@
 {
    bool b = false, bt;
 
-   for(Iterator <Receiver> it = receivers->iterator (); it.hasNext (); ) {
+   for (Iterator <Receiver> it = receivers->iterator (); it.hasNext (); ) {
       Receiver *receiver = it.getNext();
       // Note: All receivers are called, even if one returns true.
       // Therefore, something like
@@ -118,7 +118,7 @@
 
 Receiver::~Receiver()
 {
-   for(Iterator<Emitter> it = emitters->iterator(); it.hasNext(); ) {
+   for (Iterator<Emitter> it = emitters->iterator(); it.hasNext(); ) {
       Emitter *emitter = it.getNext();
       emitter->unconnect (this);
    }
--- a/src/css.hh	Sun Feb 08 19:42:35 2009 -0300
+++ b/src/css.hh	Sun Feb 08 21:16:37 2009 -0300
@@ -246,7 +246,7 @@
       void apply (CssPropertyList *props);
       void print ();
       inline void ref () { refCount++; }
-      inline void unref () { if(--refCount == 0) delete this; }
+      inline void unref () { if (--refCount == 0) delete this; }
 };
 
 class CssSimpleSelector {
@@ -300,7 +300,7 @@
       int specificity ();
       void print ();
       inline void ref () { refCount++; }
-      inline void unref () { if(--refCount == 0) delete this; }
+      inline void unref () { if (--refCount == 0) delete this; }
 };
 
 /**
@@ -340,7 +340,9 @@
             };
 
             void insert (CssRule *rule);
-            inline bool equals (lout::object::Object *other) { return this == other; };
+            inline bool equals (lout::object::Object *other) {
+               return this == other;
+            };
             inline int hashValue () { return (intptr_t) this; };
       };
 
@@ -348,7 +350,7 @@
                              <lout::object::ConstString, RuleList > {
          public:
             RuleMap () : lout::container::typed::HashTable
-                    <lout::object::ConstString, RuleList > (true, true, 256) {};
+               <lout::object::ConstString, RuleList > (true, true, 256) {};
       };
 
       static const int ntags = 90; // \todo replace 90
--- a/src/dillo.cc	Sun Feb 08 19:42:35 2009 -0300
+++ b/src/dillo.cc	Sun Feb 08 21:16:37 2009 -0300
@@ -96,7 +96,7 @@
 {
    printf("Usage: %s [OPTION]... [--] [URL|FILE]...\n"
           "Options:\n", cmdname);
-   while(options && options->help) {
+   while (options && options->help) {
       printf("%s\n", options->help);
       options++;
    }