[haiku-commits] haiku: hrev47720 - src/apps/serialconnect 3rdparty/pulkomandy

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 21 Aug 2014 08:43:29 +0200 (CEST)

hrev47720 adds 2 changesets to branch 'master'
old head: b82ef8bc15614a52394f5f5626b719530e01cfa5
new head: 788e359072485f0439a9bed8278168aed8fe023b
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=788e359+%5Eb82ef8b

----------------------------------------------------------------------------

730d796: Style fixes.

788e359: checkstyle: Add missing check for space after switch

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 8 insertions(+), 6 deletions(-)
3rdparty/pulkomandy/checkstyle.vim  |  2 +-
src/apps/serialconnect/TermView.cpp | 12 +++++++-----

############################################################################

Commit:      730d796a176b80c8822267726afa9452230b5022
URL:         http://cgit.haiku-os.org/haiku/commit/?id=730d796
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Thu Aug 21 06:40:59 2014 UTC

Style fixes.

----------------------------------------------------------------------------

diff --git a/src/apps/serialconnect/TermView.cpp 
b/src/apps/serialconnect/TermView.cpp
index d5937f9..e1ed1b9 100644
--- a/src/apps/serialconnect/TermView.cpp
+++ b/src/apps/serialconnect/TermView.cpp
@@ -67,7 +67,8 @@ TermView::Draw(BRect updateRect)
        for (pos.row = updatedChars.start_row; pos.row <= updatedChars.end_row;
                        pos.row++) {
                int x = updatedChars.start_col * fFontWidth + kBorderSpacing;
-               int y = pos.row * fFontHeight + (int)ceil(height.ascent) + 
kBorderSpacing;
+               int y = pos.row * fFontHeight + (int)ceil(height.ascent)
+                       + kBorderSpacing;
                MovePenTo(x, y);
 
                for (pos.col = updatedChars.start_col;
@@ -143,8 +144,7 @@ void
 TermView::KeyDown(const char* bytes, int32 numBytes)
 {
        // Translate some keys to more usual VT100 escape codes
-       switch(bytes[0])
-       {
+       switch (bytes[0]) {
                case B_UP_ARROW:
                        numBytes = 3;
                        bytes = "\x1B[A";
@@ -308,7 +308,8 @@ TermView::_GetCell(VTermPos pos, VTermScreenCell& cell)
        // Try the scroll-back buffer
        if (pos.row < 0 && pos.col >= 0) {
                int offset = - pos.row - 1;
-               ScrollBufferItem* line = 
(ScrollBufferItem*)fScrollBuffer.ItemAt(offset);
+               ScrollBufferItem* line
+                       = (ScrollBufferItem*)fScrollBuffer.ItemAt(offset);
                if (line != NULL && pos.col < line->cols) {
                        cell = line->cells[pos.col];
                        return;
@@ -378,7 +379,8 @@ TermView::_PushLine(int cols, const VTermScreenCell* cells)
 
        BScrollBar* scrollBar = ScrollBar(B_VERTICAL);
        if (scrollBar != NULL) {
-               float range = (fScrollBuffer.CountItems() + availableRows) * 
fFontHeight;
+               float range = (fScrollBuffer.CountItems() + availableRows)
+                       * fFontHeight;
                scrollBar->SetRange(availableRows * fFontHeight - range, 0.0f);
                // TODO we need to adjust this in FrameResized, as 
availableRows can
                // change

############################################################################

Revision:    hrev47720
Commit:      788e359072485f0439a9bed8278168aed8fe023b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=788e359
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Thu Aug 21 06:42:36 2014 UTC

checkstyle: Add missing check for space after switch

----------------------------------------------------------------------------

diff --git a/3rdparty/pulkomandy/checkstyle.vim 
b/3rdparty/pulkomandy/checkstyle.vim
index 7d50f43..82d09a5 100644
--- a/3rdparty/pulkomandy/checkstyle.vim
+++ b/3rdparty/pulkomandy/checkstyle.vim
@@ -20,7 +20,7 @@
 :fu FuncHaikuCheck()
        call matchadd('Style', '\%>80v.\+', -1) " line over 80 char
        call matchadd('Style', '^\s* \s*', -1)  " spaces instead of tabs
-       call matchadd('Style', '\(for\|if\|select\|while\)(', -1)
+       call matchadd('Style', '\(for\|if\|select\|switch\|while\)(', -1)
                "missing space after control statement
        call matchadd('Style', '^\(\(?!\/\/\|\/\*\).\)*//\S', -1)
                " Missing space at comment start


Other related posts:

  • » [haiku-commits] haiku: hrev47720 - src/apps/serialconnect 3rdparty/pulkomandy - pulkomandy