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 a0e5961567b370d16bb5b86876f64f600a72f5cb (commit) via 7046eedd387c97838f9daf5419e1081d75a53beb (commit) via da1a02f77f45781c325f4916851ff42cd90b85d9 (commit) via 6c442e5a899e07a85038c4f9c65dfe224ac9485e (commit) from 0b61fe05d3b02dccfba8e4adf9b21f0c294058e7 (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=a0e5961567b370d16bb5b86876f64f600a72f5cb commit a0e5961567b370d16bb5b86876f64f600a72f5cb Merge: 0b61fe0 7046eed Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Sep 16 08:43:08 2015 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Sep 16 08:43:08 2015 -0400 Merge topic 'ccmake-portability' into next 7046eedd ccmake: Use more-portable call to set_field_buffer (#15740) da1a02f7 ccmake: Avoid using non-portable 'curcol' field (#15739) 6c442e5a ccmake: Pass format string to 'printw' (#15738) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7046eedd387c97838f9daf5419e1081d75a53beb commit 7046eedd387c97838f9daf5419e1081d75a53beb Author: Thomas Klausner <t...@giga.or.at> AuthorDate: Mon Sep 14 09:32:54 2015 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Sep 16 08:42:20 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=da1a02f77f45781c325f4916851ff42cd90b85d9 commit da1a02f77f45781c325f4916851ff42cd90b85d9 Author: Joerg Sonnenberger <jo...@bec.de> AuthorDate: Sat Sep 12 16:37:35 2015 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Sep 16 08:42:20 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 eaa8739..6eb15c1 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=6c442e5a899e07a85038c4f9c65dfe224ac9485e commit 6c442e5a899e07a85038c4f9c65dfe224ac9485e Author: Joerg Sonnenberger <jo...@bec.de> AuthorDate: Sat Sep 12 16:35:36 2015 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Sep 16 08:42:20 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..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(bar); + printw(fmt_s, bar); attroff(A_STANDOUT); curses_move(y-3,0); - printw(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(firstLine); + printw(fmt_s, firstLine); pos_form_cursor(this->Form); } diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index be17a9f..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(fmt); + printw(fmt_s, fmt); curses_move(y-3,0); - printw(firstLine); + printw(fmt_s, firstLine); curses_move(y-2,0); - printw(secondLine); + printw(fmt_s, secondLine); curses_move(y-1,0); - printw(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(firstLine); + printw(fmt_s, firstLine); } // } @@ -612,13 +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); - char format[] = "%s"; - printw(format, bar); + printw(fmt_s, bar); attroff(A_STANDOUT); curses_move(y-4,0); - printw(version); + printw(fmt_s, version); pos_form_cursor(this->Form); } diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index acf262f..eaa8739 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -221,6 +221,7 @@ bool cmCursesStringWidget::PrintKeys() } if (this->InEdit) { + char fmt_s[] = "%s"; char firstLine[512]; // Clean the toolbar for(int i=0; i<512; i++) @@ -229,17 +230,16 @@ bool cmCursesStringWidget::PrintKeys() } firstLine[511] = '\0'; curses_move(y-4,0); - printw(firstLine); + printw(fmt_s, firstLine); curses_move(y-3,0); - printw(firstLine); + printw(fmt_s, firstLine); curses_move(y-2,0); - printw(firstLine); + printw(fmt_s, firstLine); curses_move(y-1,0); - printw(firstLine); + printw(fmt_s, firstLine); - sprintf(firstLine, "Editing option, press [enter] to leave edit."); curses_move(y-3,0); - printw(firstLine); + printw(fmt_s, "Editing option, press [enter] to leave edit."); return true; } else ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits