-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the need for ncurses, just a curses with libform is enough.
Bump revision.
- Loading branch information
joerg
committed
Sep 12, 2015
1 parent
df56bc8
commit 861db2f
Showing
6 changed files
with
152 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
devel/cmake/patches/patch-Source_CursesDialog_cmCursesLongMessageForm.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$NetBSD: patch-Source_CursesDialog_cmCursesLongMessageForm.cxx,v 1.1 2015/09/12 15:15:49 joerg Exp $ | ||
|
||
printw takes a format string. | ||
|
||
--- Source/CursesDialog/cmCursesLongMessageForm.cxx.orig 2015-09-07 09:50:13.000000000 +0000 | ||
+++ Source/CursesDialog/cmCursesLongMessageForm.cxx | ||
@@ -82,10 +82,10 @@ void cmCursesLongMessageForm::UpdateStat | ||
|
||
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); | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
devel/cmake/patches/patch-Source_CursesDialog_cmCursesMainForm.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
$NetBSD: patch-Source_CursesDialog_cmCursesMainForm.cxx,v 1.1 2015/09/12 15:15:49 joerg Exp $ | ||
|
||
printw takes a format string. | ||
|
||
--- Source/CursesDialog/cmCursesMainForm.cxx.orig 2015-09-07 09:50:58.000000000 +0000 | ||
+++ Source/CursesDialog/cmCursesMainForm.cxx | ||
@@ -456,19 +456,19 @@ void cmCursesMainForm::PrintKeys(int pro | ||
{ | ||
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(c | ||
// 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); | ||
} | ||
|
57 changes: 57 additions & 0 deletions
57
devel/cmake/patches/patch-Source_CursesDialog_cmCursesStringWidget.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
$NetBSD: patch-Source_CursesDialog_cmCursesStringWidget.cxx,v 1.1 2015/09/12 15:15:49 joerg Exp $ | ||
|
||
printw takes a format string. | ||
|
||
Don't use implemention-details of ncurses to see | ||
if the overloading behavior of REQ_DEL_PREV is active, just undo any | ||
damage it may have done. | ||
--- Source/CursesDialog/cmCursesStringWidget.cxx.orig 2015-08-13 14:57:00.000000000 +0000 | ||
+++ Source/CursesDialog/cmCursesStringWidget.cxx | ||
@@ -168,17 +168,16 @@ bool cmCursesStringWidget::HandleInput(i | ||
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 | ||
{ | ||
@@ -229,17 +228,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 |
15 changes: 15 additions & 0 deletions
15
devel/cmake/patches/patch-Source_CursesDialog_cmCursesWidget.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$NetBSD: patch-Source_CursesDialog_cmCursesWidget.cxx,v 1.1 2015/09/12 15:15:49 joerg Exp $ | ||
|
||
Compensate for missing const attribute in NetBSD. | ||
|
||
--- Source/CursesDialog/cmCursesWidget.cxx.orig 2015-09-07 09:53:22.000000000 +0000 | ||
+++ Source/CursesDialog/cmCursesWidget.cxx | ||
@@ -49,7 +49,7 @@ void cmCursesWidget::Move(int x, int y, | ||
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() |