diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-05-08 20:29:05 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-05-08 20:29:05 +0000 |
commit | 8c95f4f8701e20bcf4f2aae69d754eacd843863a (patch) | |
tree | b355b83f3d9277f0a7cf78837d36a3eb50282aaf /lib/libcurses/base | |
parent | 0084ba11e5e602ab257ba70015fbc2e4b3d8ce98 (diff) |
ncurses-4.2-990424
Diffstat (limited to 'lib/libcurses/base')
-rw-r--r-- | lib/libcurses/base/lib_freeall.c | 19 | ||||
-rw-r--r-- | lib/libcurses/base/lib_mouse.c | 23 |
2 files changed, 17 insertions, 25 deletions
diff --git a/lib/libcurses/base/lib_freeall.c b/lib/libcurses/base/lib_freeall.c index c91707f99a6..0a07e5b71c0 100644 --- a/lib/libcurses/base/lib_freeall.c +++ b/lib/libcurses/base/lib_freeall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_freeall.c,v 1.1 1999/01/18 19:09:45 millert Exp $ */ +/* $OpenBSD: lib_freeall.c,v 1.2 1999/05/08 20:29:00 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -33,7 +33,7 @@ ****************************************************************************/ #include <curses.priv.h> -#include <term.h> +#include <term_entry.h> #if HAVE_NC_FREEALL @@ -41,7 +41,7 @@ extern int malloc_errfd; /* FIXME */ #endif -MODULE_ID("$From: lib_freeall.c,v 1.13 1998/11/12 19:42:42 Alexander.V.Lukyanov Exp $") +MODULE_ID("$From: lib_freeall.c,v 1.14 1999/04/03 23:17:06 tom Exp $") static void free_slk(SLK *p) { @@ -52,16 +52,6 @@ static void free_slk(SLK *p) } } -void _nc_free_termtype(struct termtype *p, int base) -{ - if (p != 0) { - FreeIfNeeded(p->term_names); - FreeIfNeeded(p->str_table); - if (base) - free(p); - } -} - static void free_tries(struct tries *p) { struct tries *q; @@ -121,7 +111,8 @@ void _nc_freeall(void) } if (cur_term != 0) { - _nc_free_termtype(&(cur_term->type), TRUE); + _nc_free_termtype(&(cur_term->type)); + free(cur_term); } #ifdef TRACE diff --git a/lib/libcurses/base/lib_mouse.c b/lib/libcurses/base/lib_mouse.c index 487503f4c35..3a7e2851f1b 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.2 1999/01/31 20:17:09 millert Exp $ */ +/* $OpenBSD: lib_mouse.c,v 1.3 1999/05/08 20:29:00 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999 Free Software Foundation, Inc. * @@ -73,20 +73,21 @@ # define INCL_KBD # define INCL_MOU # define INCL_DOSPROCESS -# include <os2.h> /* Need to include before the others */ +# include <os2.h> /* Need to include before the others */ #endif #include <curses.priv.h> #include <term.h> #if USE_GPM_SUPPORT -#ifndef LINT /* don't need this for llib-lncurses */ -#undef buttons /* term.h defines this, and gpm uses it! */ +#ifndef LINT /* don't need this for llib-lncurses */ +#undef buttons /* term.h defines this, and gpm uses it! */ #include <gpm.h> +#include <linux/keyboard.h> /* defines KG_* macros */ #endif #endif -MODULE_ID("$From: lib_mouse.c,v 1.42 1999/01/31 01:17:53 tom Exp $") +MODULE_ID("$From: lib_mouse.c,v 1.43 1999/04/18 00:37:50 Klaus.Weide Exp $") #define MY_TRACE TRACE_ICALLS|TRACE_IEVENT @@ -262,9 +263,9 @@ static void _nc_mouse_init(void) { /* GPM: initialize connection to gpm server */ gpm_connect.eventMask = GPM_DOWN|GPM_UP; - gpm_connect.defaultMask = ~gpm_connect.eventMask; + gpm_connect.defaultMask = ~(gpm_connect.eventMask|GPM_HARD); gpm_connect.minMod = 0; - gpm_connect.maxMod = ~0; + gpm_connect.maxMod = ~((1<<KG_SHIFT)|(1<<KG_SHIFTL)|(1<<KG_SHIFTR)); if (Gpm_Open (&gpm_connect, 0) >= 0) { /* returns the file-descriptor */ mousetype = M_GPM; SP->_mouse_fd = gpm_fd; @@ -808,9 +809,9 @@ static void _nc_mouse_wrap(SCREEN *sp GCC_UNUSED) switch (mousetype) { case M_XTERM: - if (eventmask) - mouse_activate(FALSE); - break; + if (eventmask) + mouse_activate(FALSE); + break; #if USE_GPM_SUPPORT /* GPM: pass all mouse events to next client */ case M_GPM: @@ -964,7 +965,7 @@ bool wmouse_trafo(const WINDOW* win, int* pY, int* pX, bool to_screen) y -= (win->_begy + win->_yoffset); x -= win->_begx; result = TRUE; - } + } } if (result) { |