summaryrefslogtreecommitdiff
path: root/extra/config/lxdialog/yesno.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-11-03 23:27:46 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-11-06 22:21:59 +0100
commite286a674419d31cb0757dd2f8307d8b4756cf1f9 (patch)
tree6f79c58793acb4df16ac974b64ae6307cd28a0e2 /extra/config/lxdialog/yesno.c
parentacfc107a50344b100b9ea492678928acc047c6ae (diff)
pull kconfig from linux-3.11
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'extra/config/lxdialog/yesno.c')
-rw-r--r--extra/config/lxdialog/yesno.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/extra/config/lxdialog/yesno.c b/extra/config/lxdialog/yesno.c
index c27b1b038..676fb2f82 100644
--- a/extra/config/lxdialog/yesno.c
+++ b/extra/config/lxdialog/yesno.c
@@ -15,7 +15,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "dialog.h"
@@ -44,14 +45,14 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
WINDOW *dialog;
do_resize:
- if (getmaxy(stdscr) < (height + 4))
+ if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN))
return -ERRDISPLAYTOOSMALL;
- if (getmaxx(stdscr) < (width + 4))
+ if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL;
/* center dialog box on screen */
- x = (COLS - width) / 2;
- y = (LINES - height) / 2;
+ x = (getmaxx(stdscr) - width) / 2;
+ y = (getmaxy(stdscr) - height) / 2;
draw_shadow(stdscr, y, x, height, width);