changeset 1326:02ef25700865

trim some spaces
author corvid <corvid@lavabit.com>
date Sun, 20 Sep 2009 02:47:53 +0000
parents 23d34e319c36
children 8ed878f0350d
files dpi/bookmarks.c dpi/ftp.c dw/textblock.cc src/IO/http.c src/css.cc src/cssparser.cc src/html.cc src/jpeg.c src/keysrc src/paths.cc src/prefsparser.cc src/styleengine.cc src/uicmd.cc src/xembed.cc test/dw_anchors_test.cc test/dw_border_test.cc test/dw_example.cc test/dw_find_test.cc test/dw_images_scaled.cc test/dw_images_scaled2.cc test/dw_images_simple.cc test/dw_imgbuf_mem_test.cc test/dw_links.cc test/dw_links2.cc test/dw_lists.cc test/dw_resource_test.cc test/dw_table_aligned.cc test/fltk_browser.cc test/form.cc test/form.hh
diffstat 30 files changed, 71 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/bookmarks.c	Sun Sep 20 02:25:50 2009 +0000
+++ b/dpi/bookmarks.c	Sun Sep 20 02:47:53 2009 +0000
@@ -698,7 +698,7 @@
          if (rc == 127) {
             MSG("Bookmarks: /bin/sh could not be executed\n");
          } else if (rc == -1) {
-            MSG("Bookmarks: process creation failure: %s\n", 
+            MSG("Bookmarks: process creation failure: %s\n",
                 dStrerror(errno));
          }
          dStr_sprintf(dstr, cmd2, OldBmFile, BmFile);
@@ -706,7 +706,7 @@
          if (rc == 127) {
             MSG("Bookmarks: /bin/sh could not be executed\n");
          } else if (rc == -1) {
-            MSG("Bookmarks: process creation failure: %s\n", 
+            MSG("Bookmarks: process creation failure: %s\n",
                 dStrerror(errno));
          }
 
--- a/dpi/ftp.c	Sun Sep 20 02:25:50 2009 +0000
+++ b/dpi/ftp.c	Sun Sep 20 02:47:53 2009 +0000
@@ -279,7 +279,7 @@
    /* wget may need to write a temporary file... */
    rc = chdir("/tmp");
    if (rc == -1) {
-      MSG("paths: error changing directory to /tmp: %s\n", 
+      MSG("paths: error changing directory to /tmp: %s\n",
           dStrerror(errno));
    }
 
--- a/dw/textblock.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/dw/textblock.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -1486,7 +1486,7 @@
       word = words->getRef (wordIndex);
       lastXCursor = xCursor;
       xCursor += word->size.width + word->effSpace;
-      if (lastXCursor <= x && xCursor > x && 
+      if (lastXCursor <= x && xCursor > x &&
           y > yWidgetBase - word->size.ascent &&
           y <= yWidgetBase + word->size.descent) {
          return wordIndex;
--- a/src/IO/http.c	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/IO/http.c	Sun Sep 20 02:47:53 2009 +0000
@@ -447,7 +447,7 @@
       "Host: %s\r\n"
       "%s"
       "\r\n",
-      auth2, 
+      auth2,
       auth2,
       proxy_auth);
 
--- a/src/css.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/css.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -397,7 +397,7 @@
  *
  * The properties are set as defined by the rules in the stylesheet that
  * match at the given node in the document tree.
- */ 
+ */
 void CssStyleSheet::apply (CssPropertyList *props,
                            Doctree *docTree, const DoctreeNode *node) {
    static const int maxLists = 32;
@@ -544,7 +544,7 @@
 /**
  * \brief Create the user agent style.
  *
- * The user agent style defines how dillo renders HTML in the absence of 
+ * The user agent style defines how dillo renders HTML in the absence of
  * author or user styles.
  */
 void CssContext::buildUserAgentStyle () {
--- a/src/cssparser.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/cssparser.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -685,9 +685,9 @@
       MSG_CSS("expected integer not found in %s color\n", "rgb");
       return false;
    }
-   
+
    *cc = strtol(tval, NULL, 10);
-   
+
    nextToken();
    if (ttype == CSS_TK_CHAR && tval[0] == '%') {
       if (*percentage == 0) {
--- a/src/html.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/html.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -1750,7 +1750,7 @@
    html->styleEngine->startElement (tag_index_a);
    html->styleEngine->setPseudoVisited ();
    if (html->non_css_visited_color != -1) {
-      CssPropertyList vprops; 
+      CssPropertyList vprops;
       vprops.set (CSS_PROPERTY_COLOR, CSS_TYPE_COLOR,
                  html->non_css_visited_color);
       html->styleEngine->setNonCssHints (&vprops);
@@ -2009,7 +2009,7 @@
                  CSS_LENGTH_VALUE(l_h) : 0);
    }
    /* Check for suspicious image size request that would cause
-    * an excessive amount of memory to be allocated for the 
+    * an excessive amount of memory to be allocated for the
     * image buffer.
     * Be careful to avoid integer overflows during the checks.
     * There is an additional check in dw/image.cc to catch cases
--- a/src/jpeg.c	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/jpeg.c	Sun Sep 20 02:47:53 2009 +0000
@@ -286,7 +286,7 @@
 
          /* check max image size */
          if (jpeg->cinfo.image_width <= 0 || jpeg->cinfo.image_height <= 0 ||
-             jpeg->cinfo.image_width > 
+             jpeg->cinfo.image_width >
              IMAGE_MAX_AREA / jpeg->cinfo.image_height) {
             MSG("Jpeg_write: suspicious image size request %ux%u\n",
                 (uint_t)jpeg->cinfo.image_width,
--- a/src/keysrc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/keysrc	Sun Sep 20 02:47:53 2009 +0000
@@ -67,7 +67,7 @@
 # "goto" goes to the location bar at the top of the window.
 #<ctrl>l = goto
 
-# "stop" loading the page. 
+# "stop" loading the page.
 #(stop has no default binding)
 
 # "save" the current page.
--- a/src/paths.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/paths.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -38,7 +38,7 @@
    oldWorkingDir = dGetcwd();
    rc = chdir("/tmp");
    if (rc == -1) {
-      MSG("paths: error changing directory to /tmp: %s\n", 
+      MSG("paths: error changing directory to /tmp: %s\n",
           dStrerror(errno));
    }
 
--- a/src/prefsparser.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/prefsparser.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -48,7 +48,7 @@
       { "allow_white_bg", &prefs.allow_white_bg, PREFS_BOOL },
       { "buffered_drawing", &prefs.buffered_drawing, PREFS_INT32 },
       { "contrast_visited_color", &prefs.contrast_visited_color, PREFS_BOOL },
-      { "enterpress_forces_submit", &prefs.enterpress_forces_submit, 
+      { "enterpress_forces_submit", &prefs.enterpress_forces_submit,
         PREFS_BOOL },
       { "focus_new_tab", &prefs.focus_new_tab, PREFS_BOOL },
       { "font_cursive", &prefs.font_cursive, PREFS_STRING },
--- a/src/styleengine.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/styleengine.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -516,10 +516,10 @@
  * \brief Similar to StyleEngine::style(), but with backgroundColor set.
  * A normal style might have backgroundColor == NULL to indicate a transparent
  * background. This method ensures that backgroundColor is set.
- */ 
+ */
 Style * StyleEngine::backgroundStyle () {
    StyleAttrs attrs = *style ();
-   
+
    for (int i = stack->size () - 1; i >= 0 && ! attrs.backgroundColor; i--)
       attrs.backgroundColor = stack->getRef (i)->style->backgroundColor;
 
@@ -542,7 +542,7 @@
    // Ensure that StyleEngine::style0() has not been called before for
    // this element.
    // Style computation is expensive so limit it as much as possible.
-   // If this assertion is hit, you need to rearrange the code that is 
+   // If this assertion is hit, you need to rearrange the code that is
    // doing styleEngine calls to call setNonCssHints() before calling
    // style() or wordStyle() for each new element.
    assert (stack->getRef (stack->size () - 1)->style == NULL);
--- a/src/uicmd.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/uicmd.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -314,7 +314,7 @@
       if (e == PUSH) {
          /* WORKAROUND: FLTK raises the window on unhandled clicks,
           * which we do not want.
-          */ 
+          */
          ret = 1;
       }
       return ret;
@@ -1129,7 +1129,7 @@
       }
    }
 }
-         
+
 /*
  * Get location's text
  */
--- a/src/xembed.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/src/xembed.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -21,7 +21,7 @@
 
 #if USE_X11
 
-typedef enum { 
+typedef enum {
   XEMBED_EMBEDDED_NOTIFY        = 0,
   XEMBED_WINDOW_ACTIVATE        = 1,
   XEMBED_WINDOW_DEACTIVATE      = 2,
--- a/test/dw_anchors_test.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_anchors_test.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -56,7 +56,7 @@
 {
    Textblock *oldTop = topTextblock;
    topTextblock = new Textblock (false);
-   
+
    if (oldTop) {
       oldTop->addLinebreak (wordStyle);
       oldTop->addWidget (topTextblock, widgetStyle);
@@ -72,7 +72,7 @@
    buf[0] = toupper (buf[0]);
    topTextblock->addText (buf, headingStyle);
    topTextblock->addParbreak (5, headingStyle);
-  
+
    for (int i = 0; i < 30; i++) {
       strcpy (buf, numbers[textblockNo]);
       if (i == 0)
@@ -84,7 +84,7 @@
    }
 
    topTextblock->flush ();
-   
+
    textblockNo++;
    if (textblockNo < 10)
       ::fltk::repeat_timeout (1, textTimeout, NULL);
--- a/test/dw_border_test.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_border_test.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -88,7 +88,7 @@
 
    const char *words1[] = { "Some", "random", "text.", NULL };
    const char *words2[] = { "A", "nested", "paragraph.", NULL };
-   
+
    for(int i = 0; words1[i]; i++) {
       if(i != 0)
          textblock1->addSpace (wordStyle);
@@ -97,7 +97,7 @@
 
    for(int i = 0; i < 1; i++) {
       textblock1->addParbreak(0, wordStyle);
-      
+
       Textblock *textblock2 = new Textblock (false);
       textblock1->addWidget (textblock2, widgetStyle2);
 
--- a/test/dw_example.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_example.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -56,7 +56,7 @@
    styleAttrs.backgroundColor =
       dw::core::style::Color::create (layout, 0xffffff);
 
-   dw::core::style::Style *widgetStyle = 
+   dw::core::style::Style *widgetStyle =
       dw::core::style::Style::create (layout, &styleAttrs);
 
    dw::Textblock *textblock = new dw::Textblock (false);
--- a/test/dw_find_test.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_find_test.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -47,7 +47,7 @@
        case FindtextState::SUCCESS:
           resultLabel->label("SUCCESS");
           break;
-          
+
        case FindtextState::RESTART:
           resultLabel->label("RESTART");
           break;
--- a/test/dw_images_scaled.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_images_scaled.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -57,13 +57,13 @@
             buf[4 * x + 2] = imgRow * 255 / 199;
             buf[4 * x + 3] = (199 - imgRow) * 255 / 199;
          }
-     
+
          imgbuf->copyRow (imgRow, buf);
-         image->drawRow (imgRow);       
+         image->drawRow (imgRow);
          imgRow++;
       }
    }
-   
+
    if(imgRow < 200)
       ::fltk::repeat_timeout (0.5, imageDrawTimeout, NULL);
 }
@@ -79,13 +79,13 @@
             buf[3 * x + 1] = (399 - x) * 255 / 399;
             buf[3 * x + 2] = imgRow * 255 / 199;
          }
-     
+
          imgbuf->copyRow (imgRow, buf);
-         image->drawRow (imgRow);       
+         image->drawRow (imgRow);
          imgRow++;
       }
    }
-   
+
    if(imgRow < 200)
       ::fltk::repeat_timeout (0.5, imageDrawTimeout, NULL);
 }
@@ -132,7 +132,7 @@
 
    image = new dw::Image ("");
    textblock->addWidget (image, imageStyle);
-   textblock->addSpace (imageStyle);     
+   textblock->addSpace (imageStyle);
 
    imageStyle->unref();
 
--- a/test/dw_images_scaled2.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_images_scaled2.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -55,14 +55,14 @@
             buf[3 * x + 1] = (399 - x) * 255 / 399;
             buf[3 * x + 2] = imgRow * 255 / 199;
          }
-     
+
          imgbuf->copyRow (imgRow, buf);
-         image1->drawRow (imgRow);       
-         image2->drawRow (imgRow);       
+         image1->drawRow (imgRow);
+         image2->drawRow (imgRow);
          imgRow++;
       }
    }
-   
+
    if(imgRow < 200)
       ::fltk::repeat_timeout (0.5, imageDrawTimeout, NULL);
 }
--- a/test/dw_images_simple.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_images_simple.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -57,13 +57,13 @@
             buf[4 * x + 2] = imgRow * 255 / 199;
             buf[4 * x + 3] = (199 - imgRow) * 255 / 199;
          }
-     
+
          imgbuf->copyRow (imgRow, buf);
-         image->drawRow (imgRow);       
+         image->drawRow (imgRow);
          imgRow++;
       }
    }
-   
+
    if(imgRow < 200)
       ::fltk::repeat_timeout (0.5, imageDrawTimeout, NULL);
 }
@@ -79,13 +79,13 @@
             buf[3 * x + 1] = (399 - x) * 255 / 399;
             buf[3 * x + 2] = imgRow * 255 / 199;
          }
-     
+
          imgbuf->copyRow (imgRow, buf);
-         image->drawRow (imgRow);       
+         image->drawRow (imgRow);
          imgRow++;
       }
    }
-   
+
    if(imgRow < 200)
       ::fltk::repeat_timeout (0.5, imageDrawTimeout, NULL);
 }
@@ -130,7 +130,7 @@
 
    image = new dw::Image ("");
    textblock->addWidget (image, imageStyle);
-   textblock->addSpace (imageStyle);     
+   textblock->addSpace (imageStyle);
 
    imageStyle->unref();
 
--- a/test/dw_imgbuf_mem_test.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_imgbuf_mem_test.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -33,7 +33,7 @@
 {
    FltkPlatform *platform = new FltkPlatform ();
    Layout *layout = new Layout (platform);
-   
+
    Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100);
    rootbuf->ref (); // Extra reference by the dicache.
    printf ("=== Can be deleted? %s.\n",
@@ -48,7 +48,7 @@
    printf ("=== Can be deleted? %s.\n",
            rootbuf->lastReference () ? "Yes" : "No");
    rootbuf->unref (); // Extra reference by the dicache.
-   
+
    delete layout;
 }
 
@@ -56,7 +56,7 @@
 {
    FltkPlatform *platform = new FltkPlatform ();
    Layout *layout = new Layout (platform);
-   
+
    Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100);
    rootbuf->setDeleteOnUnref (false);
    printf ("=== Can be deleted? %s.\n",
@@ -71,7 +71,7 @@
    printf ("=== Can be deleted? %s.\n",
            !rootbuf->isReferred () ? "Yes" : "No");
    delete rootbuf;
-   
+
    delete layout;
 }
 
@@ -90,13 +90,13 @@
 {
    FltkPlatform *platform = new FltkPlatform ();
    Layout *layout = new Layout (platform);
-   
+
    Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100);
    rootbuf->connectDeletion (new RootbufDeletionReceiver ());
    Imgbuf *scaledbuf = rootbuf->getScaledBuf (50, 50);
    rootbuf->unref ();
    scaledbuf->unref ();
-   
+
    delete layout;
 }
 
--- a/test/dw_links.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_links.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -115,7 +115,7 @@
    styleAttrs.color = Color::create (layout, 0x0000ff);
    styleAttrs.textDecoration = TEXT_DECORATION_UNDERLINE;
    styleAttrs.cursor = CURSOR_POINTER;
-   
+
    for(int i = 1; i <= 10; i++) {
       char buf[4];
       sprintf(buf, "%d.", i);
@@ -132,15 +132,15 @@
          textblock->addText(words1[j], wordStyle);
          textblock->addSpace(wordStyle);
       }
-      
+
       styleAttrs.x_link = i;
       Style *linkStyle = Style::create (layout, &styleAttrs);
-      
+
       for(int j = 0; words2[j]; j++) {
          textblock->addText(words2[j], linkStyle);
          textblock->addSpace(wordStyle);
       }
-      
+
       linkStyle->unref ();
 
       textblock->addParbreak(10, wordStyle);
--- a/test/dw_links2.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_links2.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -143,7 +143,7 @@
    styleAttrs.color = Color::create (layout, 0x0000ff);
    styleAttrs.textDecoration = TEXT_DECORATION_UNDERLINE;
    styleAttrs.cursor = CURSOR_POINTER;
-   
+
    for(int i = 1; i <= 30; i++) {
       char buf[4];
       sprintf(buf, "%d.", i);
@@ -160,15 +160,15 @@
          textblock->addText (words1[j], wordStyle);
          textblock->addSpace(wordStyle);
       }
-      
+
       styleAttrs.x_link = i;
       Style *linkStyle = Style::create (layout, &styleAttrs);
-      
+
       for(int j = 0; words2[j]; j++) {
          textblock->addText (words2[j], linkStyle);
          textblock->addSpace(wordStyle);
       }
-      
+
       linkStyle->unref ();
 
       textblock->addParbreak(10, wordStyle);
--- a/test/dw_lists.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_lists.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -89,7 +89,7 @@
       "comes", "some", "more", "text", "to",
       "demonstrate", "word", "wrapping.", NULL };
 
-   
+
    for(int i = 0; wordsPar[i]; i++) {
       if(i != 0)
          textblock->addSpace (wordStyle);
--- a/test/dw_resource_test.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_resource_test.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -74,7 +74,7 @@
       (ListResource::SELECTION_AT_MOST_ONE, 4);
    //SelectionResource *res =
    //   layout->getResourceFactory()->createOptionMenuResource ();
-   
+
    Embed *embed = new Embed (res);
    textblock->addWidget (embed, widgetStyle);
    textblock->addSpace (widgetStyle);
--- a/test/dw_table_aligned.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/dw_table_aligned.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -73,7 +73,7 @@
 
    styleAttrs.borderWidth.setVal (1);
    styleAttrs.setBorderStyle (BORDER_INSET);
-  
+
    Style *cellStyle = Style::create (layout, &styleAttrs);
 
    styleAttrs.borderWidth.setVal (0);
@@ -103,7 +103,7 @@
 
       cell->addText (buf, wordStyle);
       cell->flush ();
-   } 
+   }
 
    wordStyle->unref();
    cellStyle->unref();
--- a/test/fltk_browser.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/fltk_browser.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -39,7 +39,7 @@
       new Item ("second");
       new Item ("third");
    }
-   
+
    window->resizable(browser);
    window->show();
    return run();
--- a/test/form.cc	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/form.cc	Sun Sep 20 02:47:53 2009 +0000
@@ -49,7 +49,7 @@
 
 Form::RadioButtonResourceDecorator::RadioButtonResourceDecorator
    (const char *name, RadioButtonResource *resource, const char **values):
-      Form::ResourceDecorator (name)     
+      Form::ResourceDecorator (name)
 {
    this->resource = resource;
 
@@ -99,7 +99,7 @@
 
 Form::SelectionResourceDecorator::SelectionResourceDecorator
    (const char *name, SelectionResource *resource, const char **values):
-      Form::ResourceDecorator (name)     
+      Form::ResourceDecorator (name)
 {
    this->resource = resource;
 
@@ -162,7 +162,7 @@
    delete name;
    delete[] value;
 }
-      
+
 void Form::FormClickedReceiver::clicked (Resource *resource,
                                          dw::core::EventButton *event)
 {
@@ -173,7 +173,7 @@
 {
    resources = new lout::container::typed::List <ResourceDecorator> (true);
    activateReceiver = new FormActivateReceiver (this);
-   clickedReceivers = 
+   clickedReceivers =
       new lout::container::typed::List <FormClickedReceiver> (true);
 }
 
--- a/test/form.hh	Sun Sep 20 02:25:50 2009 +0000
+++ b/test/form.hh	Sun Sep 20 02:47:53 2009 +0000
@@ -113,7 +113,7 @@
 
    public:
       inline FormActivateReceiver (Form *form) { this->form = form; }
-      
+
       void activate (dw::core::ui::Resource *resource);
       void enter (dw::core::ui::Resource *resource);
       void leave (dw::core::ui::Resource *resource);
@@ -129,7 +129,7 @@
    public:
       FormClickedReceiver (Form *form, const char *name, const char *value);
       ~FormClickedReceiver ();
-      
+
       void clicked(dw::core::ui::Resource *resource,
                    dw::core::EventButton *event);
    };