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 | |
parent | 0084ba11e5e602ab257ba70015fbc2e4b3d8ce98 (diff) |
ncurses-4.2-990424
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcurses/base/lib_freeall.c | 19 | ||||
-rw-r--r-- | lib/libcurses/base/lib_mouse.c | 23 | ||||
-rw-r--r-- | lib/libcurses/curses.h | 4 | ||||
-rw-r--r-- | lib/libcurses/define_key.3 | 6 | ||||
-rw-r--r-- | lib/libcurses/nc_alloc.h | 5 | ||||
-rw-r--r-- | lib/libcurses/ncurses_cfg.h | 5 | ||||
-rw-r--r-- | lib/libcurses/termcap.h | 4 | ||||
-rw-r--r-- | lib/libcurses/tinfo/alloc_ttype.c | 4 | ||||
-rw-r--r-- | lib/libcurses/tinfo/doalloc.c | 4 | ||||
-rw-r--r-- | lib/libcurses/tinfo/free_ttype.c | 4 | ||||
-rw-r--r-- | lib/libcurses/tinfo/read_termcap.c | 4 | ||||
-rw-r--r-- | lib/libcurses/trace/trace_xnames.c | 4 | ||||
-rw-r--r-- | lib/libcurses/unctrl.h | 4 | ||||
-rw-r--r-- | lib/libform/form_field_buffer.3 | 6 | ||||
-rw-r--r-- | lib/libform/form_win.3 | 6 | ||||
-rw-r--r-- | lib/libmenu/m_item_new.c | 7 | ||||
-rw-r--r-- | lib/libmenu/m_item_opt.c | 4 | ||||
-rw-r--r-- | lib/libmenu/m_new.c | 5 |
18 files changed, 57 insertions, 61 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) { diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h index 9589cbee116..180ae045675 100644 --- a/lib/libcurses/curses.h +++ b/lib/libcurses/curses.h @@ -1,4 +1,4 @@ -/* $OpenBSD: curses.h,v 1.28 1999/03/28 18:01:04 millert Exp $ */ +/* $OpenBSD: curses.h,v 1.29 1999/05/08 20:28:57 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -50,7 +50,7 @@ /* These are defined only in curses.h, and are used for conditional compiles */ #define NCURSES_VERSION_MAJOR 5 #define NCURSES_VERSION_MINOR 0 -#define NCURSES_VERSION_PATCH 990327 +#define NCURSES_VERSION_PATCH 990417 /* This is defined in more than one ncurses header, for identification */ #undef NCURSES_VERSION diff --git a/lib/libcurses/define_key.3 b/lib/libcurses/define_key.3 index 292f8d0ec37..c0e10afb70c 100644 --- a/lib/libcurses/define_key.3 +++ b/lib/libcurses/define_key.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: define_key.3,v 1.3 1998/09/13 19:16:25 millert Exp $ +.\" $OpenBSD: define_key.3,v 1.4 1999/05/08 20:28:58 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998 Free Software Foundation, Inc. * @@ -30,7 +30,7 @@ .\" .\" Author: Thomas E. Dickey <dickey@clark.net> 1997 .\" -.\" $From: define_key.3x,v 1.5 1998/03/14 23:43:22 tom Exp $ +.\" $From: define_key.3x,v 1.6 1999/02/19 11:43:17 tom Exp $ .TH define_key 3 "" .SH NAME \fBdefine_key\fP \- define a keycode @@ -48,6 +48,8 @@ the predefined codes in the terminfo database. .PP If the given string is null, any existing definition for the keycode is removed. +Similarly, if the given keycode is negative or zero, any existing string +for the given definition is removed. .. .SH RETURN VALUE The keycode must be greater than zero, else ERR is returned. diff --git a/lib/libcurses/nc_alloc.h b/lib/libcurses/nc_alloc.h index 6a0075e02e4..f9b6c1e970a 100644 --- a/lib/libcurses/nc_alloc.h +++ b/lib/libcurses/nc_alloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nc_alloc.h,v 1.4 1998/11/17 03:16:21 millert Exp $ */ +/* $OpenBSD: nc_alloc.h,v 1.5 1999/05/08 20:28:58 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -31,7 +31,7 @@ /**************************************************************************** * Author: Thomas E. Dickey <dickey@clark.net> 1996,1997 * ****************************************************************************/ -/* $From: nc_alloc.h,v 1.6 1998/11/08 01:32:17 tom Exp $ */ +/* $From: nc_alloc.h,v 1.7 1999/04/03 23:15:13 tom Exp $ */ #ifndef NC_ALLOC_included #define NC_ALLOC_included 1 @@ -60,7 +60,6 @@ struct termtype; extern void _nc_free_and_exit(int) GCC_NORETURN; extern void _nc_free_tparm(void); extern void _nc_leaks_dump_entry(void); -extern void _nc_free_termtype(struct termtype *, int); #define ExitProgram(code) _nc_free_and_exit(code) #endif diff --git a/lib/libcurses/ncurses_cfg.h b/lib/libcurses/ncurses_cfg.h index 22795ed7b79..d47cd50d42a 100644 --- a/lib/libcurses/ncurses_cfg.h +++ b/lib/libcurses/ncurses_cfg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ncurses_cfg.h,v 1.11 1999/03/02 06:23:27 millert Exp $ */ +/* $OpenBSD: ncurses_cfg.h,v 1.12 1999/05/08 20:28:59 millert Exp $ */ /* include/ncurses_cfg.h. Generated automatically by configure. */ /**************************************************************************** @@ -59,6 +59,7 @@ #define HAVE_ERRNO 1 #define HAVE_FCNTL_H 1 #define HAVE_FORM_H 1 +#define HAVE_GETCWD 1 #define HAVE_GETTIMEOFDAY 1 #define HAVE_GETTTYNAM 1 #define HAVE_ISASCII 1 @@ -109,7 +110,7 @@ /* #define PURE_TERMINFO 1 */ #define RETSIGTYPE void #define STDC_HEADERS 1 -#define SYSTEM_NAME "openbsd2.4" +#define SYSTEM_NAME "openbsd2.5" #define TERMINFO_DIRS "/usr/share/terminfo" #define TYPEOF_CHTYPE long #define USE_DATABASE 1 diff --git a/lib/libcurses/termcap.h b/lib/libcurses/termcap.h index 203a03cddb9..bd5787e118c 100644 --- a/lib/libcurses/termcap.h +++ b/lib/libcurses/termcap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: termcap.h,v 1.3 1999/01/18 19:09:17 millert Exp $ */ +/* $OpenBSD: termcap.h,v 1.4 1999/05/08 20:28:59 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -39,7 +39,7 @@ #define _NCU_TERMCAP_H 1 #undef NCURSES_VERSION -#define NCURSES_VERSION "4.2" +#define NCURSES_VERSION "5.0" #ifdef __cplusplus extern "C" diff --git a/lib/libcurses/tinfo/alloc_ttype.c b/lib/libcurses/tinfo/alloc_ttype.c index b243b2dfc7f..85b88790c88 100644 --- a/lib/libcurses/tinfo/alloc_ttype.c +++ b/lib/libcurses/tinfo/alloc_ttype.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc_ttype.c,v 1.1 1999/03/02 06:23:28 millert Exp $ */ +/* $OpenBSD: alloc_ttype.c,v 1.2 1999/05/08 20:29:00 millert Exp $ */ /**************************************************************************** * Copyright (c) 1999 Free Software Foundation, Inc. * @@ -46,7 +46,7 @@ #include <tic.h> #include <term_entry.h> -MODULE_ID("$Id: alloc_ttype.c,v 1.1 1999/03/02 06:23:28 millert Exp $") +MODULE_ID("$From: alloc_ttype.c,v 1.6 1999/03/01 22:10:44 tom Exp $") #if NCURSES_XNAMES /* diff --git a/lib/libcurses/tinfo/doalloc.c b/lib/libcurses/tinfo/doalloc.c index 8a87ead7f15..2afac65e2ef 100644 --- a/lib/libcurses/tinfo/doalloc.c +++ b/lib/libcurses/tinfo/doalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: doalloc.c,v 1.3 1999/03/15 19:12:23 millert Exp $ */ +/* $OpenBSD: doalloc.c,v 1.4 1999/05/08 20:29:01 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -64,7 +64,7 @@ char *_nc_strdup(const char *src) { char *dst; if (src != 0) { - *dst = typeMalloc(char, strlen(src) + 1); + dst = typeMalloc(char, strlen(src) + 1); if (dst != 0) { (void)strcpy(dst, src); } diff --git a/lib/libcurses/tinfo/free_ttype.c b/lib/libcurses/tinfo/free_ttype.c index 68fc4cff683..2b6a053d13c 100644 --- a/lib/libcurses/tinfo/free_ttype.c +++ b/lib/libcurses/tinfo/free_ttype.c @@ -1,4 +1,4 @@ -/* $OpenBSD: free_ttype.c,v 1.1 1999/03/02 06:23:28 millert Exp $ */ +/* $OpenBSD: free_ttype.c,v 1.2 1999/05/08 20:29:01 millert Exp $ */ /**************************************************************************** * Copyright (c) 1999 Free Software Foundation, Inc. * @@ -46,7 +46,7 @@ #include <tic.h> #include <term_entry.h> -MODULE_ID("$Id: free_ttype.c,v 1.1 1999/03/02 06:23:28 millert Exp $") +MODULE_ID("$From: free_ttype.c,v 1.2 1999/03/01 00:30:35 tom Exp $") void _nc_free_termtype(TERMTYPE *ptr) { diff --git a/lib/libcurses/tinfo/read_termcap.c b/lib/libcurses/tinfo/read_termcap.c index 5f0a542132f..ab9513d5965 100644 --- a/lib/libcurses/tinfo/read_termcap.c +++ b/lib/libcurses/tinfo/read_termcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read_termcap.c,v 1.2 1999/03/02 06:23:29 millert Exp $ */ +/* $OpenBSD: read_termcap.c,v 1.3 1999/05/08 20:29:02 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -62,7 +62,7 @@ #include <fcntl.h> #endif -MODULE_ID("$From: read_termcap.c,v 1.41 1999/02/27 22:12:54 tom Exp $") +MODULE_ID("$From: read_termcap.c,v 1.43 1999/04/10 20:52:52 tom Exp $") #ifndef PURE_TERMINFO diff --git a/lib/libcurses/trace/trace_xnames.c b/lib/libcurses/trace/trace_xnames.c index 6a761ee1cc1..a7fa1cbfb65 100644 --- a/lib/libcurses/trace/trace_xnames.c +++ b/lib/libcurses/trace/trace_xnames.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trace_xnames.c,v 1.1 1999/03/02 06:23:30 millert Exp $ */ +/* $OpenBSD: trace_xnames.c,v 1.2 1999/05/08 20:29:02 millert Exp $ */ /**************************************************************************** * Copyright (c) 1999 Free Software Foundation, Inc. * @@ -38,7 +38,7 @@ #include <curses.priv.h> #include <term_entry.h> -MODULE_ID("$Id: trace_xnames.c,v 1.1 1999/03/02 06:23:30 millert Exp $") +MODULE_ID("$From: trace_xnames.c,v 1.3 1999/03/02 01:20:38 tom Exp $") void _nc_trace_xnames(TERMTYPE *tp GCC_UNUSED) { diff --git a/lib/libcurses/unctrl.h b/lib/libcurses/unctrl.h index a6113d6d2d6..128db680838 100644 --- a/lib/libcurses/unctrl.h +++ b/lib/libcurses/unctrl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unctrl.h,v 1.4 1998/07/23 21:20:08 millert Exp $ */ +/* $OpenBSD: unctrl.h,v 1.5 1999/05/08 20:28:59 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -47,7 +47,7 @@ #define _UNCTRL_H 1 #undef NCURSES_VERSION -#define NCURSES_VERSION "4.2" +#define NCURSES_VERSION "5.0" #ifdef __cplusplus extern "C" { diff --git a/lib/libform/form_field_buffer.3 b/lib/libform/form_field_buffer.3 index 9a8ae5b6bc5..9a347eb4737 100644 --- a/lib/libform/form_field_buffer.3 +++ b/lib/libform/form_field_buffer.3 @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: form_field_buffer.3,v 1.8 1999/01/22 03:30:53 millert Exp $ +.\" $OpenBSD: form_field_buffer.3,v 1.9 1999/05/08 20:29:03 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998 Free Software Foundation, Inc. * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: form_field_buffer.3x,v 1.6 1998/11/29 01:06:10 Rick.Ohnemus Exp $ +.\" $From: form_field_buffer.3x,v 1.7 1999/04/04 00:22:24 tom Exp $ .TH form_field_buffer 3 "" .SH NAME \fBform_field_buffer\fR - field buffer control @@ -51,7 +51,7 @@ The function \fBset_field_buffer\fR sets the numbered buffer of the given field to contain a given string. Buffer 0 is the displayed value of the field; other numbered buffers may be allocated by applications through the \fBnbuf\fR argument of (see \fBform_field_new\fR(3)) but are not manipulated by the forms -library. The function \fBfield_buffer\fR returns the foreground attribute. +library. The function \fBfield_buffer\fR returns the address of the buffer. The function \fBset_field_status\fR sets the associated status flag of \fIfield\fR; \fBfield_status\fR gets the current value. The status flag diff --git a/lib/libform/form_win.3 b/lib/libform/form_win.3 index ed0ddad6464..da9faf1de8a 100644 --- a/lib/libform/form_win.3 +++ b/lib/libform/form_win.3 @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: form_win.3,v 1.7 1999/01/22 03:30:54 millert Exp $ +.\" $OpenBSD: form_win.3,v 1.8 1999/05/08 20:29:03 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998 Free Software Foundation, Inc. * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: form_win.3x,v 1.7 1998/11/29 01:09:02 Rick.Ohnemus Exp $ +.\" $From: form_win.3x,v 1.8 1999/04/10 23:36:08 tom Exp $ .TH form_win 3 "" .SH NAME \fBform_win\fR - make and break form window and subwindow associations @@ -58,7 +58,7 @@ In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though it were \fBstsdcr\fR. A form argument of \fBNULL\fR is treated as a request to change the system default form window or subwindow. -The function \fBscale_window\fR returns the minimum size required for the +The function \fBscale_form\fR returns the minimum size required for the subwindow of \fIform\fR. .SH RETURN VALUE Routines that return pointers return \fBNULL\fR on error. Routines that return diff --git a/lib/libmenu/m_item_new.c b/lib/libmenu/m_item_new.c index 0589f31582a..03337b8720a 100644 --- a/lib/libmenu/m_item_new.c +++ b/lib/libmenu/m_item_new.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_item_new.c,v 1.4 1998/07/24 16:39:01 millert Exp $ */ +/* $OpenBSD: m_item_new.c,v 1.5 1999/05/08 20:29:03 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -40,7 +40,7 @@ #include "menu.priv.h" -MODULE_ID("$From: m_item_new.c,v 1.8 1998/02/11 12:13:50 tom Exp $") +MODULE_ID("$From: m_item_new.c,v 1.9 1999/03/28 18:10:24 juergen Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -180,7 +180,8 @@ int set_menu_mark(MENU * menu, const char * mark) if (menu->mark) { strcpy(menu->mark, mark); - menu->status |= _MARK_ALLOCATED; + if (menu != &_nc_Default_Menu) + menu->status |= _MARK_ALLOCATED; } else { diff --git a/lib/libmenu/m_item_opt.c b/lib/libmenu/m_item_opt.c index 8dce6114bf4..367eab91bd2 100644 --- a/lib/libmenu/m_item_opt.c +++ b/lib/libmenu/m_item_opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_item_opt.c,v 1.5 1999/02/24 06:37:12 millert Exp $ */ +/* $OpenBSD: m_item_opt.c,v 1.6 1999/05/08 20:29:03 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -101,7 +101,7 @@ int item_opts_off(ITEM *item, Item_Options opts) RETURN(E_BAD_ARGUMENT); else { - Normalize_Item(citem); + Normalize_Item(citem); opts = citem->opt & ~(opts & ALL_ITEM_OPTS); return set_item_opts( item, opts ); } diff --git a/lib/libmenu/m_new.c b/lib/libmenu/m_new.c index 001b6855a23..b808247d3f5 100644 --- a/lib/libmenu/m_new.c +++ b/lib/libmenu/m_new.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_new.c,v 1.4 1998/07/24 16:39:09 millert Exp $ */ +/* $OpenBSD: m_new.c,v 1.5 1999/05/08 20:29:04 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -39,7 +39,7 @@ #include "menu.priv.h" -MODULE_ID("$From: m_new.c,v 1.7 1998/02/11 12:13:49 tom Exp $") +MODULE_ID("$From: m_new.c,v 1.8 1999/03/28 18:10:31 juergen Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -59,6 +59,7 @@ MENU *new_menu(ITEM ** items) if (menu) { *menu = _nc_Default_Menu; + menu->status = 0; menu->rows = menu->frows; menu->cols = menu->fcols; if (items && *items) |