From 1dd43c4c9d6d921b38288802d0560f92c90a0c08 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sun, 5 Feb 2012 15:09:37 +0100 Subject: ccmake: Factor clear line. --- Source/CursesDialog/cmCursesMainForm.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 6c7627f..6b7d89e 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -409,12 +409,11 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) char thirdLine[512]=""; if (process) { - sprintf(firstLine, - " "); - sprintf(secondLine, - " "); - sprintf(thirdLine, - " "); + const char* clearLine = + " "; + strcpy(firstLine, clearLine); + strcpy(secondLine, clearLine); + strcpy(thirdLine, clearLine); } else { -- cgit v0.12 From 415ffda7a8ca0dfea2e00353a65fb31d8fadfb75 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sun, 5 Feb 2012 16:56:47 +0100 Subject: ccmake: Extend clear line. When configuring or generating the 'ng' of the end of the second line is not cleared. This patch fixes this. The problem was introduced by commit fd632195 (ccmake: Align 'g' and 'q' key instructions, 2011-01-07) which adjusted the length of lines that need clearing. --- Source/CursesDialog/cmCursesMainForm.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 6b7d89e..4fee0bb 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -410,7 +410,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) if (process) { const char* clearLine = - " "; + " "; strcpy(firstLine, clearLine); strcpy(secondLine, clearLine); strcpy(thirdLine, clearLine); -- cgit v0.12