diff options
author | 2000-07-10 03:06:03 +0000 | |
---|---|---|
committer | 2000-07-10 03:06:03 +0000 | |
commit | 852c4eda9a667a259e9fed88dd1f9d35330b27e1 (patch) | |
tree | 373b6f2d9ccce83d5490347207355313f721b269 /lib/libcurses/base | |
parent | Disable ttyE0 until powerpc is updated to the latest wscons. (diff) | |
download | wireguard-openbsd-852c4eda9a667a259e9fed88dd1f9d35330b27e1.tar.xz wireguard-openbsd-852c4eda9a667a259e9fed88dd1f9d35330b27e1.zip |
ncurses 5.1
Diffstat (limited to 'lib/libcurses/base')
-rw-r--r-- | lib/libcurses/base/lib_dft_fgbg.c | 6 | ||||
-rw-r--r-- | lib/libcurses/base/lib_getch.c | 6 | ||||
-rw-r--r-- | lib/libcurses/base/lib_hline.c | 6 | ||||
-rw-r--r-- | lib/libcurses/base/lib_mouse.c | 6 | ||||
-rw-r--r-- | lib/libcurses/base/lib_newterm.c | 4 | ||||
-rw-r--r-- | lib/libcurses/base/lib_set_term.c | 43 |
6 files changed, 56 insertions, 15 deletions
diff --git a/lib/libcurses/base/lib_dft_fgbg.c b/lib/libcurses/base/lib_dft_fgbg.c index bad566299e4..3604fc151f0 100644 --- a/lib/libcurses/base/lib_dft_fgbg.c +++ b/lib/libcurses/base/lib_dft_fgbg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_dft_fgbg.c,v 1.5 2000/06/19 03:53:41 millert Exp $ */ +/* $OpenBSD: lib_dft_fgbg.c,v 1.6 2000/07/10 03:06:12 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -35,7 +35,7 @@ #include <curses.priv.h> #include <term.h> -MODULE_ID("$From: lib_dft_fgbg.c,v 1.11 2000/05/07 01:26:06 tom Exp $") +MODULE_ID("$From: lib_dft_fgbg.c,v 1.13 2000/07/07 16:50:27 tom Exp $") /* * Modify the behavior of color-pair 0 so that the library doesn't assume that @@ -63,7 +63,7 @@ assume_default_colors(int fg, int bg) if (initialize_pair) /* don't know how to handle this */ returnCode(ERR); - SP->_default_color = (fg != COLOR_WHITE) || (bg != COLOR_BLACK); + SP->_default_color = (fg < 0 || fg == C_MASK) || (bg < 0 || bg == C_MASK); SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE); SP->_default_fg = (fg >= 0) ? (fg & C_MASK) : C_MASK; SP->_default_bg = (bg >= 0) ? (bg & C_MASK) : C_MASK; diff --git a/lib/libcurses/base/lib_getch.c b/lib/libcurses/base/lib_getch.c index f7b6de9490f..4d45740a62a 100644 --- a/lib/libcurses/base/lib_getch.c +++ b/lib/libcurses/base/lib_getch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_getch.c,v 1.5 2000/06/19 03:53:41 millert Exp $ */ +/* $OpenBSD: lib_getch.c,v 1.6 2000/07/10 03:06:13 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -42,7 +42,7 @@ #include <curses.priv.h> -MODULE_ID("$From: lib_getch.c,v 1.47 2000/05/28 01:12:51 tom Exp $") +MODULE_ID("$From: lib_getch.c,v 1.48 2000/07/08 11:21:51 tom Exp $") #include <fifo_defs.h> @@ -165,7 +165,7 @@ fifo_push(void) if ((n == -1) || (n == 0)) { T(("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno)); - return ERR; + ch = ERR; } T(("read %d characters", n)); diff --git a/lib/libcurses/base/lib_hline.c b/lib/libcurses/base/lib_hline.c index 9fec35b52df..1cb06b44664 100644 --- a/lib/libcurses/base/lib_hline.c +++ b/lib/libcurses/base/lib_hline.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_hline.c,v 1.2 2000/06/19 03:53:42 millert Exp $ */ +/* $OpenBSD: lib_hline.c,v 1.3 2000/07/10 03:06:14 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -42,7 +42,7 @@ #include <curses.priv.h> -MODULE_ID("$From: lib_hline.c,v 1.5 2000/04/29 21:14:30 tom Exp $") +MODULE_ID("$From: lib_hline.c,v 1.6 2000/07/04 14:08:09 Philippe.Blain Exp $") int whline(WINDOW *win, chtype ch, int n) @@ -71,6 +71,8 @@ whline(WINDOW *win, chtype ch, int n) line->text[end] = ch; end--; } + + _nc_synchook(win); code = OK; } returnCode(code); diff --git a/lib/libcurses/base/lib_mouse.c b/lib/libcurses/base/lib_mouse.c index 44bf768e833..cd8e602ce3b 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.9 2000/03/26 16:45:03 millert Exp $ */ +/* $OpenBSD: lib_mouse.c,v 1.10 2000/07/10 03:06:14 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -86,7 +86,7 @@ #endif #endif -MODULE_ID("$From: lib_mouse.c,v 1.51 2000/03/18 22:11:42 tom Exp $") +MODULE_ID("$From: lib_mouse.c,v 1.52 2000/06/29 23:02:26 tom Exp $") #define MY_TRACE TRACE_ICALLS|TRACE_IEVENT @@ -325,7 +325,7 @@ _nc_mouse_event(SCREEN * sp GCC_UNUSED) Gpm_Event ev; if (gpm_fd >= 0 - && _nc_timed_wait(2, 0, (int *) 0) + && (_nc_timed_wait(3, 0, (int *) 0) & 2) != 0 && Gpm_GetEvent(&ev) == 1) { eventp->id = 0; /* there's only one mouse... */ diff --git a/lib/libcurses/base/lib_newterm.c b/lib/libcurses/base/lib_newterm.c index b9f274bf7d3..23a5d3d892d 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.8 2000/06/19 03:53:43 millert Exp $ */ +/* $OpenBSD: lib_newterm.c,v 1.9 2000/07/10 03:06:15 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -49,7 +49,7 @@ #include <term.h> /* clear_screen, cup & friends, cur_term */ #include <tic.h> -MODULE_ID("$From: lib_newterm.c,v 1.45 2000/05/20 23:45:57 tom Exp $"); +MODULE_ID("$From: lib_newterm.c,v 1.46 2000/07/01 22:26:22 tom Exp $") #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 diff --git a/lib/libcurses/base/lib_set_term.c b/lib/libcurses/base/lib_set_term.c index 1faa7d53fd1..438d8fade6d 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.9 2000/06/19 03:53:46 millert Exp $ */ +/* $OpenBSD: lib_set_term.c,v 1.10 2000/07/10 03:06:15 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -45,7 +45,7 @@ #include <term.h> /* cur_term */ #include <tic.h> -MODULE_ID("$From: lib_set_term.c,v 1.52 2000/05/27 23:22:36 tom Exp $"); +MODULE_ID("$From: lib_set_term.c,v 1.55 2000/07/02 00:22:18 tom Exp $") SCREEN * set_term(SCREEN * screenp) @@ -150,25 +150,49 @@ no_mouse_event(SCREEN * sp GCC_UNUSED) { return FALSE; } + static bool no_mouse_inline(SCREEN * sp GCC_UNUSED) { return FALSE; } + static bool no_mouse_parse(int code GCC_UNUSED) { return TRUE; } + static void no_mouse_resume(SCREEN * sp GCC_UNUSED) { } + static void no_mouse_wrap(SCREEN * sp GCC_UNUSED) { } +#if defined(NCURSES_EXT_FUNCS) && defined(USE_COLORFGBG) +static char * +extract_fgbg(char *src, int *result) +{ + char *dst = 0; + long value = strtol(src, &dst, 0); + + if (dst == 0) { + dst = src; + } else if (value >= 0) { + *result = value % max_colors; + } + while (*dst != 0 && *dst != ';') + dst++; + if (*dst == ';') + dst++; + return dst; +} +#endif + int _nc_setupscreen(short slines, short const scolumns, FILE * output) /* OS-independent screen initializations */ @@ -200,13 +224,28 @@ _nc_setupscreen(short slines, short const scolumns, FILE * output) SP->_cursor = -1; /* cannot know real cursor shape */ #ifdef NCURSES_NO_PADDING SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0; + TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used", + SP->_no_padding ? " not" : "")); #endif #ifdef NCURSES_EXT_FUNCS SP->_default_color = FALSE; SP->_has_sgr_39_49 = FALSE; SP->_default_fg = COLOR_WHITE; SP->_default_bg = COLOR_BLACK; +#ifdef USE_COLORFGBG + /* + * If rxvt's $COLORFGBG variable is set, use it to specify the assumed + * default colors. Note that rxvt (mis)uses bold colors, equating a bold + * color to that value plus 8. We'll only use the non-bold color for now - + * decide later if it is worth having default attributes as well. + */ + if (getenv("COLORFGBG") != 0) { + char *p = getenv("COLORFGBG"); + p = extract_fgbg(p, &(SP->_default_fg)); + p = extract_fgbg(p, &(SP->_default_bg)); + } #endif +#endif /* NCURSES_EXT_FUNCS */ SP->_maxclick = DEFAULT_MAXCLICK; SP->_mouse_event = no_mouse_event; |