[Cmake-commits] CMake branch, next, updated. v3.3.1-2937-gbf2541a

Brad King brad.king at kitware.com
Tue Sep 15 08:45:58 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  bf2541a9c24d1b9631552e2b803192bd3fcdf7a4 (commit)
       via  bd806a3353f3365d28ad212c5fca2bbbd86d58ec (commit)
      from  d76f31550c9051558da636b859283dad64919bf1 (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=bf2541a9c24d1b9631552e2b803192bd3fcdf7a4
commit bf2541a9c24d1b9631552e2b803192bd3fcdf7a4
Merge: d76f315 bd806a3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 15 08:45:57 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 15 08:45:57 2015 -0400

    Merge topic 'ccmake-portability' into next
    
    bd806a33 fixup! ccmake: Pass format string to 'printw' (#15738)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd806a3353f3365d28ad212c5fca2bbbd86d58ec
commit bd806a3353f3365d28ad212c5fca2bbbd86d58ec
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 15 08:45:30 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 15 08:45:30 2015 -0400

    fixup! ccmake: Pass format string to 'printw' (#15738)

diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 2e5e322..6144ddc 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -80,12 +80,13 @@ void cmCursesLongMessageForm::UpdateStatusBar()
   sprintf(version+sideSpace, "%s", vertmp);
   version[width] = '\0';
 
+  char fmt_s[] = "%s";
   curses_move(y-4,0);
   attron(A_STANDOUT);
-  printw("%s", bar);
+  printw(fmt_s, bar);
   attroff(A_STANDOUT);
   curses_move(y-3,0);
-  printw("%s", version);
+  printw(fmt_s, version);
   pos_form_cursor(this->Form);
 }
 
@@ -101,8 +102,9 @@ void cmCursesLongMessageForm::PrintKeys()
   char firstLine[512];
   sprintf(firstLine,  "Press [e] to exit help");
 
+  char fmt_s[] = "%s";
   curses_move(y-2,0);
-  printw("%s", firstLine);
+  printw(fmt_s, firstLine);
   pos_form_cursor(this->Form);
 
 }
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index d3a84d3..a2fc2c0 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -451,24 +451,25 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
     }
 
   curses_move(y-4,0);
+  char fmt_s[] = "%s";
   char fmt[512] = "Press [enter] to edit option";
   if ( process )
     {
     strcpy(fmt, "                           ");
     }
-  printw("%s", fmt);
+  printw(fmt_s, fmt);
   curses_move(y-3,0);
-  printw("%s", firstLine);
+  printw(fmt_s, firstLine);
   curses_move(y-2,0);
-  printw("%s", secondLine);
+  printw(fmt_s, secondLine);
   curses_move(y-1,0);
-  printw("%s", thirdLine);
+  printw(fmt_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("%s", firstLine);
+    printw(fmt_s, firstLine);
     }
 //    }
 
@@ -612,12 +613,13 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
   version[width] = '\0';
 
   // Now print both lines
+  char fmt_s[] = "%s";
   curses_move(y-5,0);
   attron(A_STANDOUT);
-  printw("%s", bar);
+  printw(fmt_s, bar);
   attroff(A_STANDOUT);
   curses_move(y-4,0);
-  printw("%s", version);
+  printw(fmt_s, version);
   pos_form_cursor(this->Form);
 }
 
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index 8be2aa0..6eb15c1 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -220,6 +220,7 @@ bool cmCursesStringWidget::PrintKeys()
     }
   if (this->InEdit)
     {
+    char fmt_s[] = "%s";
     char firstLine[512];
     // Clean the toolbar
     for(int i=0; i<512; i++)
@@ -228,16 +229,16 @@ bool cmCursesStringWidget::PrintKeys()
       }
     firstLine[511] = '\0';
     curses_move(y-4,0);
-    printw("%s", firstLine);
+    printw(fmt_s, firstLine);
     curses_move(y-3,0);
-    printw("%s", firstLine);
+    printw(fmt_s, firstLine);
     curses_move(y-2,0);
-    printw("%s", firstLine);
+    printw(fmt_s, firstLine);
     curses_move(y-1,0);
-    printw("%s", firstLine);
+    printw(fmt_s, firstLine);
 
     curses_move(y-3,0);
-    printw("Editing option, press [enter] to leave edit.");
+    printw(fmt_s, "Editing option, press [enter] to leave edit.");
     return true;
     }
   else

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

Summary of changes:
 Source/CursesDialog/cmCursesLongMessageForm.cxx |    8 +++++---
 Source/CursesDialog/cmCursesMainForm.cxx        |   16 +++++++++-------
 Source/CursesDialog/cmCursesStringWidget.cxx    |   11 ++++++-----
 3 files changed, 20 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list