[Cmake-commits] CMake branch, next, updated. v3.3.1-2905-gc8c7983

Brad King brad.king at kitware.com
Mon Sep 14 09:51:52 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  c8c79835fc8e3a062dd3a04b1d7d7d465d7e3a61 (commit)
       via  c212867961e4ce5ce99fbc682324aed4627e7a6f (commit)
       via  045a845d4744b8604ccdddb9091d3d7177b9a690 (commit)
       via  acd9b4d39300c8b3285bdc92c0db08b0bbf75574 (commit)
      from  e9b171516ce17f0c8eb2dc964b8997ff1f4e5b30 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8c79835fc8e3a062dd3a04b1d7d7d465d7e3a61
commit c8c79835fc8e3a062dd3a04b1d7d7d465d7e3a61
Merge: e9b1715 c212867
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 14 09:51:51 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 14 09:51:51 2015 -0400

    Merge topic 'ccmake-portability' into next
    
    c2128679 ccmake: Use more-portable call to set_field_buffer (#15740)
    045a845d ccmake: Avoid using non-portable 'curcol' field (#15739)
    acd9b4d3 ccmake: Pass format string to 'printw' (#15738)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c212867961e4ce5ce99fbc682324aed4627e7a6f
commit c212867961e4ce5ce99fbc682324aed4627e7a6f
Author:     Thomas Klausner <tk at giga.or.at>
AuthorDate: Mon Sep 14 09:32:54 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 14 09:48:01 2015 -0400

    ccmake: Use more-portable call to set_field_buffer (#15740)
    
    The set_field_buffer function on NetBSD and Solaris:
    
      http://netbsd.gw.com/cgi-bin/man-cgi?set_field_buffer++NetBSD-current
      https://docs.oracle.com/cd/E36784_01/html/E36880/set-field-buffer-3curses.html
    
    has as third argument "char *" while ncurses has "const char *".  Cast
    the argument type in our call to account for the missing "const".

diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx
index e5363f4..a12e4c2 100644
--- a/Source/CursesDialog/cmCursesWidget.cxx
+++ b/Source/CursesDialog/cmCursesWidget.cxx
@@ -49,7 +49,7 @@ void cmCursesWidget::Move(int x, int y, bool isNewPage)
 void cmCursesWidget::SetValue(const std::string& value)
 {
   this->Value = value;
-  set_field_buffer(this->Field, 0, value.c_str());
+  set_field_buffer(this->Field, 0, const_cast<char *>(value.c_str()));
 }
 
 const char* cmCursesWidget::GetValue()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=045a845d4744b8604ccdddb9091d3d7177b9a690
commit 045a845d4744b8604ccdddb9091d3d7177b9a690
Author:     Joerg Sonnenberger <joerg at bec.de>
AuthorDate: Sat Sep 12 16:37:35 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 14 09:46:55 2015 -0400

    ccmake: Avoid using non-portable 'curcol' field (#15739)
    
    'curcol' is an implementation detail of ncurses so other implementations
    of 'form' may not have it.  The switch-to-previous-field logic only
    exists for overloaded requests of REQ_DEL_PREV, so no need to check for
    REQ_DEL_CHAR.  For REQ_DEL_PREV, check if the field changed and if it
    did, change it back.

diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index 1fe0945..8be2aa0 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -168,17 +168,16 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
     else if ( key == 127 ||
               key == KEY_BACKSPACE )
       {
-      if ( form->curcol > 0 )
-        {
+        FIELD *cur = current_field(form);
         form_driver(form, REQ_DEL_PREV);
-        }
+        if (current_field(form) != cur)
+          {
+          set_current_field(form, cur);
+          }
       }
     else if ( key == ctrl('d') ||key == KEY_DC )
       {
-      if ( form->curcol >= 0 )
-        {
-        form_driver(form, REQ_DEL_CHAR);
-        }
+      form_driver(form, REQ_DEL_CHAR);
       }
     else
       {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acd9b4d39300c8b3285bdc92c0db08b0bbf75574
commit acd9b4d39300c8b3285bdc92c0db08b0bbf75574
Author:     Joerg Sonnenberger <joerg at bec.de>
AuthorDate: Sat Sep 12 16:35:36 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 14 09:43:04 2015 -0400

    ccmake: Pass format string to 'printw' (#15738)
    
    printw takes a format string as first argument, so don't pass variable
    strings to it directly.

diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 67e4aab..2e5e322 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -82,10 +82,10 @@ void cmCursesLongMessageForm::UpdateStatusBar()
 
   curses_move(y-4,0);
   attron(A_STANDOUT);
-  printw(bar);
+  printw("%s", bar);
   attroff(A_STANDOUT);
   curses_move(y-3,0);
-  printw(version);
+  printw("%s", version);
   pos_form_cursor(this->Form);
 }
 
@@ -102,7 +102,7 @@ void cmCursesLongMessageForm::PrintKeys()
   sprintf(firstLine,  "Press [e] to exit help");
 
   curses_move(y-2,0);
-  printw(firstLine);
+  printw("%s", firstLine);
   pos_form_cursor(this->Form);
 
 }
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index be17a9f..d3a84d3 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -456,19 +456,19 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
     {
     strcpy(fmt, "                           ");
     }
-  printw(fmt);
+  printw("%s", fmt);
   curses_move(y-3,0);
-  printw(firstLine);
+  printw("%s", firstLine);
   curses_move(y-2,0);
-  printw(secondLine);
+  printw("%s", secondLine);
   curses_move(y-1,0);
-  printw(thirdLine);
+  printw("%s", thirdLine);
 
   if (cw)
     {
     sprintf(firstLine, "Page %d of %d", cw->GetPage(), this->NumberOfPages);
     curses_move(0,65-static_cast<unsigned int>(strlen(firstLine))-1);
-    printw(firstLine);
+    printw("%s", firstLine);
     }
 //    }
 
@@ -614,11 +614,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
   // Now print both lines
   curses_move(y-5,0);
   attron(A_STANDOUT);
-  char format[] = "%s";
-  printw(format, bar);
+  printw("%s", bar);
   attroff(A_STANDOUT);
   curses_move(y-4,0);
-  printw(version);
+  printw("%s", version);
   pos_form_cursor(this->Form);
 }
 
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index acf262f..1fe0945 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -229,17 +229,16 @@ bool cmCursesStringWidget::PrintKeys()
       }
     firstLine[511] = '\0';
     curses_move(y-4,0);
-    printw(firstLine);
+    printw("%s", firstLine);
     curses_move(y-3,0);
-    printw(firstLine);
+    printw("%s", firstLine);
     curses_move(y-2,0);
-    printw(firstLine);
+    printw("%s", firstLine);
     curses_move(y-1,0);
-    printw(firstLine);
+    printw("%s", firstLine);
 
-    sprintf(firstLine,  "Editing option, press [enter] to leave edit.");
     curses_move(y-3,0);
-    printw(firstLine);
+    printw("Editing option, press [enter] to leave edit.");
     return true;
     }
   else

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

Summary of changes:
 Source/CursesDialog/cmCursesLongMessageForm.cxx |    6 +++---
 Source/CursesDialog/cmCursesMainForm.cxx        |   15 +++++++-------
 Source/CursesDialog/cmCursesStringWidget.cxx    |   24 +++++++++++------------
 Source/CursesDialog/cmCursesWidget.cxx          |    2 +-
 4 files changed, 22 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list