summaryrefslogtreecommitdiff
path: root/lib/libcurses/base
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcurses/base')
-rw-r--r--lib/libcurses/base/lib_addch.c8
-rw-r--r--lib/libcurses/base/lib_mouse.c19
-rw-r--r--lib/libcurses/base/lib_newterm.c10
-rw-r--r--lib/libcurses/base/lib_refresh.c13
-rw-r--r--lib/libcurses/base/lib_restart.c10
-rw-r--r--lib/libcurses/base/lib_screen.c10
-rw-r--r--lib/libcurses/base/lib_set_term.c10
7 files changed, 30 insertions, 50 deletions
diff --git a/lib/libcurses/base/lib_addch.c b/lib/libcurses/base/lib_addch.c
index cc22401c8ee..5238783668e 100644
--- a/lib/libcurses/base/lib_addch.c
+++ b/lib/libcurses/base/lib_addch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_addch.c,v 1.1 1999/01/18 19:09:34 millert Exp $ */
+/* $OpenBSD: lib_addch.c,v 1.2 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -43,7 +43,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$From: lib_addch.c,v 1.41 1998/06/28 00:10:21 tom Exp $")
+MODULE_ID("$From: lib_addch.c,v 1.42 1999/07/24 20:01:05 tom Exp $")
/*
* Ugly microtweaking alert. Everything from here to end of module is
@@ -171,8 +171,8 @@ int waddch_nosync(WINDOW *win, const chtype ch)
/* the workhorse function -- add a character to the given window */
{
int x, y;
- int t;
- const char *s;
+ int t = 0;
+ const char *s = 0;
if ((ch & A_ALTCHARSET)
|| ((t = TextOf(ch)) > 127)
diff --git a/lib/libcurses/base/lib_mouse.c b/lib/libcurses/base/lib_mouse.c
index 3a7e2851f1b..afc52ef37e9 100644
--- a/lib/libcurses/base/lib_mouse.c
+++ b/lib/libcurses/base/lib_mouse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_mouse.c,v 1.3 1999/05/08 20:29:00 millert Exp $ */
+/* $OpenBSD: lib_mouse.c,v 1.4 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999 Free Software Foundation, Inc. *
@@ -87,7 +87,7 @@
#endif
#endif
-MODULE_ID("$From: lib_mouse.c,v 1.43 1999/04/18 00:37:50 Klaus.Weide Exp $")
+MODULE_ID("$From: lib_mouse.c,v 1.44 1999/07/24 21:10:48 tom Exp $")
#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
@@ -223,19 +223,6 @@ server_state(const int state)
#endif
-/* FIXME: The list of names should be configurable */
-static int is_xterm(const char *name)
-{
- while (*name != 0) {
- if (!strncmp(name, "xterm", 5)
- || !strncmp(name, "rxvt", 4)
- || !strncmp(name, "kterm", 5))
- return TRUE;
- name++;
- }
- return FALSE;
-}
-
static int initialized;
static void _nc_mouse_init(void)
@@ -255,7 +242,7 @@ static void _nc_mouse_init(void)
/* we know how to recognize mouse events under xterm */
if (key_mouse != 0
- && is_xterm(cur_term->type.term_names))
+ && getenv("DISPLAY") != 0)
mousetype = M_XTERM;
#if USE_GPM_SUPPORT
diff --git a/lib/libcurses/base/lib_newterm.c b/lib/libcurses/base/lib_newterm.c
index ca2ce25129c..7f6632c4cc8 100644
--- a/lib/libcurses/base/lib_newterm.c
+++ b/lib/libcurses/base/lib_newterm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_newterm.c,v 1.4 1999/06/14 02:29:15 millert Exp $ */
+/* $OpenBSD: lib_newterm.c,v 1.5 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -50,7 +50,7 @@
#include <term.h> /* clear_screen, cup & friends, cur_term */
-MODULE_ID("$From: lib_newterm.c,v 1.40 1999/06/12 21:30:39 tom Exp $")
+MODULE_ID("$From: lib_newterm.c,v 1.41 1999/07/24 20:07:48 tom Exp $")
#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
#define ONLCR 0
@@ -93,7 +93,7 @@ void filter(void)
filter_mode = TRUE;
}
-SCREEN * newterm(NCURSES_CONST char *term, FILE *ofp, FILE *ifp)
+SCREEN * newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
{
int errret;
int slk_format = _nc_slk_format;
@@ -105,10 +105,10 @@ int t = _nc_getenv_num("NCURSES_TRACE");
trace(t);
#endif
- T((T_CALLED("newterm(\"%s\",%p,%p)"), term, ofp, ifp));
+ T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp));
/* this loads the capability entry, then sets LINES and COLS */
- if (setupterm(term, fileno(ofp), &errret) == ERR)
+ if (setupterm(name, fileno(ofp), &errret) == ERR)
return 0;
/* implement filter mode */
diff --git a/lib/libcurses/base/lib_refresh.c b/lib/libcurses/base/lib_refresh.c
index e841c2ac754..4d1b98cb968 100644
--- a/lib/libcurses/base/lib_refresh.c
+++ b/lib/libcurses/base/lib_refresh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_refresh.c,v 1.1 1999/01/18 19:09:57 millert Exp $ */
+/* $OpenBSD: lib_refresh.c,v 1.2 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -44,7 +44,7 @@
#include <curses.priv.h>
-MODULE_ID("$From: lib_refresh.c,v 1.23 1998/06/28 00:10:14 tom Exp $")
+MODULE_ID("$From: lib_refresh.c,v 1.24 1999/07/31 11:36:37 juergen Exp $")
int wrefresh(WINDOW *win)
{
@@ -96,14 +96,7 @@ bool wide;
begx = win->_begx;
begy = win->_begy;
- /*
- * If 'newscr' has a different background than the window that we're
- * trying to refresh, we'll have to copy the whole thing.
- */
- if (win->_bkgd != newscr->_bkgd) {
- touchwin(win);
- newscr->_bkgd = win->_bkgd;
- }
+ newscr->_bkgd = win->_bkgd;
newscr->_attrs = win->_attrs;
/* merge in change information from all subwindows of this window */
diff --git a/lib/libcurses/base/lib_restart.c b/lib/libcurses/base/lib_restart.c
index fb37b368ebd..8f2ae3f91fc 100644
--- a/lib/libcurses/base/lib_restart.c
+++ b/lib/libcurses/base/lib_restart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_restart.c,v 1.1 1999/01/18 19:09:57 millert Exp $ */
+/* $OpenBSD: lib_restart.c,v 1.2 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -49,18 +49,18 @@
#include <term.h> /* lines, columns, cur_term */
-MODULE_ID("$From: lib_restart.c,v 1.1 1998/12/27 14:40:04 tom Exp $")
+MODULE_ID("$From: lib_restart.c,v 1.2 1999/07/24 20:10:04 tom Exp $")
-int restartterm(NCURSES_CONST char *term, int filenum, int *errret)
+int restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
{
int saveecho = SP->_echo;
int savecbreak = SP->_cbreak;
int saveraw = SP->_raw;
int savenl = SP->_nl;
- T((T_CALLED("restartterm(%s,%d,%p)"), term, filenum, errret));
+ T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
- setupterm(term, filenum, errret);
+ setupterm(termp, filenum, errret);
if (saveecho)
echo();
diff --git a/lib/libcurses/base/lib_screen.c b/lib/libcurses/base/lib_screen.c
index a112dc93abc..e7f3a3a9fd7 100644
--- a/lib/libcurses/base/lib_screen.c
+++ b/lib/libcurses/base/lib_screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_screen.c,v 1.1 1999/01/18 19:09:58 millert Exp $ */
+/* $OpenBSD: lib_screen.c,v 1.2 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -40,7 +40,7 @@
#include <time.h>
#include <term.h> /* exit_ca_mode, non_rev_rmcup */
-MODULE_ID("$From: lib_screen.c,v 1.14 1999/01/02 22:56:17 tom Exp $")
+MODULE_ID("$From: lib_screen.c,v 1.15 1999/07/24 20:05:29 tom Exp $")
static time_t dumptime;
@@ -127,7 +127,7 @@ int putwin(WINDOW *win, FILE *filep)
int scr_restore(const char *file)
{
- FILE *fp;
+ FILE *fp = 0;
T((T_CALLED("scr_restore(%s)"), _nc_visbuf(file)));
@@ -145,7 +145,7 @@ int scr_restore(const char *file)
int scr_dump(const char *file)
{
- FILE *fp;
+ FILE *fp = 0;
T((T_CALLED("scr_dump(%s)"), _nc_visbuf(file)));
@@ -163,7 +163,7 @@ int scr_dump(const char *file)
int scr_init(const char *file)
{
- FILE *fp;
+ FILE *fp = 0;
struct stat stb;
T((T_CALLED("scr_init(%s)"), _nc_visbuf(file)));
diff --git a/lib/libcurses/base/lib_set_term.c b/lib/libcurses/base/lib_set_term.c
index 63a3dd87bed..d05dcffb450 100644
--- a/lib/libcurses/base/lib_set_term.c
+++ b/lib/libcurses/base/lib_set_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_set_term.c,v 1.3 1999/03/11 21:03:55 millert Exp $ */
+/* $OpenBSD: lib_set_term.c,v 1.4 1999/08/15 11:40:55 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -44,16 +44,16 @@
#include <term.h> /* cur_term */
-MODULE_ID("$From: lib_set_term.c,v 1.45 1999/03/06 22:29:13 tom Exp $")
+MODULE_ID("$From: lib_set_term.c,v 1.46 1999/07/24 20:05:49 tom Exp $")
-SCREEN * set_term(SCREEN *screen)
+SCREEN * set_term(SCREEN *screenp)
{
SCREEN *oldSP;
- T((T_CALLED("set_term(%p)"), screen));
+ T((T_CALLED("set_term(%p)"), screenp));
oldSP = SP;
- _nc_set_screen(screen);
+ _nc_set_screen(screenp);
set_curterm(SP->_term);
curscr = SP->_curscr;