summaryrefslogtreecommitdiff
path: root/lib/libcurses++/cursesp.cc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-07-24 04:06:13 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-07-24 04:06:13 +0000
commit87d5e312fa223e222019a8e0a52d3c51a9db8c11 (patch)
tree3912458699fe4c774c062490d9cc7f478f2a6553 /lib/libcurses++/cursesp.cc
parent87ec33b1645ce0df4e10ca488963124aae5d6aba (diff)
Update to ncurses-5.1-20000722
Diffstat (limited to 'lib/libcurses++/cursesp.cc')
-rw-r--r--lib/libcurses++/cursesp.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libcurses++/cursesp.cc b/lib/libcurses++/cursesp.cc
index 2c5f5421056..20c6170442e 100644
--- a/lib/libcurses++/cursesp.cc
+++ b/lib/libcurses++/cursesp.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,8 +33,9 @@
#include "cursesp.h"
#include "internal.h"
+#include <string.h>
-MODULE_ID("$From: cursesp.cc,v 1.15 1999/10/30 23:59:37 tom Exp $")
+MODULE_ID("$From: cursesp.cc,v 1.16 2000/07/15 21:08:13 tom Exp $")
NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0;
@@ -42,13 +43,13 @@ void NCursesPanel::init() {
p = ::new_panel(w);
if (!p)
OnError(ERR);
-
+
UserHook* hook = new UserHook;
hook->m_user = NULL;
hook->m_back = this;
hook->m_owner = p;
::set_panel_userptr(p, (void *)hook);
-}
+}
NCursesPanel::~NCursesPanel() {
UserHook* hook = (UserHook*)::panel_userptr(p);
@@ -61,7 +62,7 @@ NCursesPanel::~NCursesPanel() {
void
NCursesPanel::redraw() {
PANEL *pan;
-
+
pan = ::panel_above(NULL);
while (pan) {
::touchwin(panel_window(pan));
@@ -95,20 +96,20 @@ NCursesPanel::frame(const char *title,const char *btitle) {
int err = OK;
if (!title && !btitle) {
err = box();
- }
+ }
else {
err = box();
if (err==OK)
- label(title,btitle);
+ label(title,btitle);
}
OnError(err);
}
void
NCursesPanel::label(const char *tLabel, const char *bLabel) {
- if (tLabel)
+ if (tLabel)
centertext(0,tLabel);
- if (bLabel)
+ if (bLabel)
centertext(maxy(),bLabel);
}