diff options
Diffstat (limited to 'lib')
50 files changed, 540 insertions, 312 deletions
diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile index c54d1670ac7..f94571ebf71 100644 --- a/lib/libcurses/Makefile +++ b/lib/libcurses/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.44 2000/03/29 06:37:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.45 2000/07/10 03:06:03 millert Exp $ # Uncomment this to enable tracing in libcurses #CURSESTRACE=-DTRACE @@ -58,9 +58,9 @@ MAN= curs_addch.3 curs_addchstr.3 curs_addstr.3 curs_attr.3 curs_beep.3 \ curs_insstr.3 curs_instr.3 curs_kernel.3 curs_mouse.3 curs_move.3 \ curs_outopts.3 curs_overlay.3 curs_pad.3 curs_print.3 curs_printw.3 \ curs_refresh.3 curs_scanw.3 curs_scr_dump.3 curs_scroll.3 curs_slk.3 \ - curs_termattrs.3 curs_touch.3 curs_util.3 curs_window.3 curses.3 \ - define_key.3 dft_fgbg.3 keybound.3 keyok.3 resizeterm.3 wresize.3 \ - termcap.3 terminfo.3 terminfo.5 term.5 term.7 + curs_termattrs.3 curs_touch.3 curs_util.3 curs_window.3 \ + curses.3 define_key.3 dft_fgbg.3 keybound.3 keyok.3 resizeterm.3 \ + wresize.3 termcap.3 terminfo.3 terminfo.5 term.5 term.7 MLINKS+=curses.3 ncurses.3 MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ curs_addch.3 mvwaddch.3 curs_addch.3 echochar.3 curs_addch.3 \ @@ -79,7 +79,8 @@ MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ curs_attr.3 attr_off.3 curs_attr.3 attr_set.3 curs_attr.3 wattr_get.3 \ curs_attr.3 wattr_on.3 curs_attr.3 wattr_off.3 curs_attr.3 attr_set.3 \ curs_attr.3 wattr_set.3 curs_attr.3 chgat.3 curs_attr.3 wchgat.3 \ - curs_attr.3 mvchgat.3 curs_attr.3 mvwchgat.3 curs_beep.3 beep.3 \ + curs_attr.3 mvchgat.3 curs_attr.3 mvwchgat.3 curs_attr.3 PAIR_NUMBER.3 \ + curs_beep.3 beep.3 \ curs_beep.3 flash.3 curs_bkgd.3 bkgdset.3 curs_bkgd.3 wbkgdset.3 \ curs_bkgd.3 bkgd.3 curs_bkgd.3 wbkgd.3 curs_bkgd.3 getbkgd.3 \ curs_border.3 border.3 curs_border.3 mvhline.3 curs_border.3 mvvline.3 \ @@ -92,6 +93,7 @@ MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ curs_color.3 start_color.3 curs_color.3 init_pair.3 curs_color.3 \ init_color.3 curs_color.3 has_colors.3 curs_color.3 can_change_color.3 \ curs_color.3 color_content.3 curs_color.3 pair_content.3 \ + curs_color.3 COLOR_PAIR.3 \ curs_delch.3 delch.3 curs_delch.3 wdelch.3 curs_delch.3 mvdelch.3 \ curs_delch.3 mvwdelch.3 curs_deleteln.3 deleteln.3 curs_deleteln.3 \ wdeleteln.3 curs_deleteln.3 insdelln.3 curs_deleteln.3 winsdelln.3 \ @@ -129,9 +131,9 @@ MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ ripoffline.3 curs_kernel.3 curs_set.3 curs_kernel.3 napms.3 \ curs_mouse.3 getmouse.3 curs_mouse.3 ungetmouse.3 curs_mouse.3 \ mousemask.3 curs_mouse.3 wenclose.3 curs_mouse.3 wmouse_trafo.3 \ - curs_mouse.3 mouseinterval.3 curs_move.3 move.3 \ - curs_move.3 wmove.3 curs_outopts.3 clearok.3 curs_outopts.3 idlok.3 \ - curs_outopts.3 idcok.3 curs_outopts.3 \ + curs_mouse.3 mouse_trafo.3 curs_mouse.3 mouseinterval.3 curs_move.3 \ + move.3 curs_move.3 wmove.3 curs_outopts.3 clearok.3 curs_outopts.3 \ + idlok.3 curs_outopts.3 idcok.3 curs_outopts.3 \ immedok.3 curs_outopts.3 leaveok.3 curs_outopts.3 setscrreg.3 \ curs_outopts.3 wsetscrreg.3 curs_outopts.3 scrollok.3 curs_outopts.3 \ nl.3 curs_outopts.3 nonl.3 curs_overlay.3 overlay.3 curs_overlay.3 \ @@ -139,7 +141,8 @@ MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ subpad.3 curs_pad.3 prefresh.3 curs_pad.3 pnoutrefresh.3 curs_pad.3 \ pechochar.3 curs_print.3 mcprint.3 curs_printw.3 printw.3 \ curs_printw.3 wprintw.3 curs_printw.3 mvprintw.3 curs_printw.3 \ - mvwprintw.3 curs_printw.3 vwprintw.3 curs_refresh.3 refresh.3 \ + mvwprintw.3 curs_printw.3 vwprintw.3 curs_printw.3 vw_printw.3 \ + curs_refresh.3 refresh.3 \ curs_refresh.3 wrefresh.3 curs_refresh.3 wnoutrefresh.3 curs_refresh.3 \ doupdate.3 curs_refresh.3 redrawwin.3 curs_refresh.3 wredrawln.3 \ curs_scanw.3 scanw.3 curs_scanw.3 wscanw.3 curs_scanw.3 mvscanw.3 \ @@ -149,8 +152,9 @@ MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ curs_scroll.3 wscrl.3 curs_slk.3 slk_attr.3 curs_slk.3 slk_init.3 \ curs_slk.3 slk_set.3 curs_slk.3 slk_refresh.3 curs_slk.3 \ slk_noutrefresh.3 curs_slk.3 slk_label.3 curs_slk.3 slk_clear.3 \ - curs_slk.3 slk_restore.3 curs_slk.3 \ - slk_touch.3 curs_slk.3 slk_attron.3 curs_slk.3 slk_attrset.3 \ + curs_slk.3 slk_restore.3 curs_slk.3 slk_touch.3 curs_slk.3 \ + slk_attr_on.3 curs_slk.3 slk_attr_set.3 curs_slk.3 slk_attr_off.3 \ + curs_slk.3 slk_attron.3 curs_slk.3 slk_attrset.3 \ curs_slk.3 slk_attroff.3 curs_slk.3 slk_color.3 curs_termattrs.3 \ baudrate.3 curs_termattrs.3 erasechar.3 curs_termattrs.3 has_ic.3 \ curs_termattrs.3 has_il.3 curs_termattrs.3 killchar.3 curs_termattrs.3 \ 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; diff --git a/lib/libcurses/curs_addch.3tbl b/lib/libcurses/curs_addch.3tbl index cd67028ef9a..e72d93dfc32 100644 --- a/lib/libcurses/curs_addch.3tbl +++ b/lib/libcurses/curs_addch.3tbl @@ -1,8 +1,8 @@ '\" t -.\" $OpenBSD: curs_addch.3tbl,v 1.8 1999/02/11 00:09:36 millert Exp $ +.\" $OpenBSD: curs_addch.3tbl,v 1.9 2000/07/10 03:06:04 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -29,12 +29,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_addch.3x,v 1.16 1999/02/07 03:47:42 tom Exp $ +.\" $From: curs_addch.3x,v 1.17 2000/07/01 19:53:01 tom Exp $ .TH curs_addch 3 "" .SH NAME \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, -\fBechochar\fR, \fBwechochar\fR - add a character (with attributes) to a -\fBcurses\fR window, then advance the cursor +\fBechochar\fR, +\fBwechochar\fR - add a character (with attributes) to a \fBcurses\fR window, then advance the cursor .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_addchstr.3 b/lib/libcurses/curs_addchstr.3 index c1dd24ba849..a69352ae2e8 100644 --- a/lib/libcurses/curs_addchstr.3 +++ b/lib/libcurses/curs_addchstr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_addchstr.3,v 1.6 1998/09/13 19:16:16 millert Exp $ +.\" $OpenBSD: curs_addchstr.3,v 1.7 2000/07/10 03:06:04 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,13 +28,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_addchstr.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_addchstr.3x,v 1.7 2000/07/01 19:53:33 tom Exp $ .TH curs_addchstr 3 "" .SH NAME \fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR, \fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR, -\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a -\fBcurses\fR window +\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_addstr.3 b/lib/libcurses/curs_addstr.3 index 092725f3485..33541a4de2d 100644 --- a/lib/libcurses/curs_addstr.3 +++ b/lib/libcurses/curs_addstr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_addstr.3,v 1.5 1998/09/13 19:16:16 millert Exp $ +.\" $OpenBSD: curs_addstr.3,v 1.6 2000/07/10 03:06:04 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_addstr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_addstr.3x,v 1.9 2000/07/01 19:54:05 tom Exp $ .TH curs_addstr 3 "" .SH NAME -\fBaddstr\fR, \fBaddnstr\fR, \fBwaddstr\fR, \fBwaddnstr\fR, -\fBmvaddstr\fR, \fBmvaddnstr\fR, \fBmvwaddstr\fR, \fBmvwaddnstr\fR - add a -string of characters to a \fBcurses\fR window and advance cursor +\fBaddstr\fR, +\fBaddnstr\fR, +\fBwaddstr\fR, +\fBwaddnstr\fR, +\fBmvaddstr\fR, +\fBmvaddnstr\fR, +\fBmvwaddstr\fR, +\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_attr.3tbl b/lib/libcurses/curs_attr.3tbl index 9df2dad05ab..0882fa30732 100644 --- a/lib/libcurses/curs_attr.3tbl +++ b/lib/libcurses/curs_attr.3tbl @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: curs_attr.3tbl,v 1.8 2000/03/10 01:35:01 millert Exp $ +.\" $OpenBSD: curs_attr.3tbl,v 1.9 2000/07/10 03:06:04 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * @@ -29,13 +29,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_attr.3x,v 1.20 2000/02/27 01:46:31 tom Exp $ +.\" $From: curs_attr.3x,v 1.22 2000/07/08 11:59:58 tom Exp $ .TH curs_attr 3 "" .SH NAME \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, \fBattrset\fR, \fBwattrset\fR, \fBcolor_set\fR, \fBwcolor_set\fR, -\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, -\fBwstandout\fR - \fBcurses\fR character and window attribute control routines +\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, \fBwstandout\fR, +\fBattr_get\fR, \fBwattr_get\fR, +\fBattr_off\fR, \fBwattr_off\fR, +\fBattr_on\fR, \fBwattr_on\fR, +\fBattr_set\fR, \fBwattr_set\fR, +\fBchgat\fR, \fBwchgat\fR, +\fBmvchgat\fR, \fBmvwchgat\fR, +\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines .SH SYNOPSIS \fB#include <curses.h>\fR .br diff --git a/lib/libcurses/curs_bkgd.3 b/lib/libcurses/curs_bkgd.3 index f73f634070a..024acb4da2c 100644 --- a/lib/libcurses/curs_bkgd.3 +++ b/lib/libcurses/curs_bkgd.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_bkgd.3,v 1.6 1998/09/13 19:16:17 millert Exp $ +.\" $OpenBSD: curs_bkgd.3,v 1.7 2000/07/10 03:06:05 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,11 +28,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_bkgd.3x,v 1.12 1998/03/14 23:43:31 tom Exp $ +.\" $From: curs_bkgd.3x,v 1.14 2000/07/01 17:39:31 tom Exp $ .TH curs_bkgd 3 "" .SH NAME -\fBbkgdset\fR, \fBwbkgdset\fR, \fBbkgd\fR, -\fBwbkgd\fR - \fBcurses\fR window background manipulation routines +\fBbkgdset\fR, \fBwbkgdset\fR, +\fBbkgd\fR, \fBwbkgd\fR, +\fBgetbkgd\fR - \fBcurses\fR window background manipulation routines .. .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_border.3 b/lib/libcurses/curs_border.3 index fd44d3c67b1..6bc6aecaed5 100644 --- a/lib/libcurses/curs_border.3 +++ b/lib/libcurses/curs_border.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_border.3,v 1.9 1999/01/31 20:17:05 millert Exp $ +.\" $OpenBSD: curs_border.3,v 1.10 2000/07/10 03:06:05 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_border.3x,v 1.11 1999/01/30 23:11:47 tom Exp $ +.\" $From: curs_border.3x,v 1.14 2000/07/01 19:54:58 tom Exp $ .TH curs_border 3 "" .SH NAME \fBborder\fR, \fBwborder\fR, \fBbox\fR, -\fBhline\fR, \fBwhline\fR, \fBvline\fR, \fBwvline\fR - create -\fBcurses\fR borders, horizontal and vertical lines +\fBhline\fR, \fBwhline\fR, +\fBvline\fR, \fBwvline\fR, +\fBmvhline\fR, \fBmvwhline\fR, +\fBmvvline\fR, \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines .SH SYNOPSIS \fB#include <curses.h>\fR .br diff --git a/lib/libcurses/curs_color.3 b/lib/libcurses/curs_color.3 index fe2ba593282..95fa9a3ee70 100644 --- a/lib/libcurses/curs_color.3 +++ b/lib/libcurses/curs_color.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_color.3,v 1.7 1998/09/13 19:16:17 millert Exp $ +.\" $OpenBSD: curs_color.3,v 1.8 2000/07/10 03:06:05 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,13 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_color.3x,v 1.10 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_color.3x,v 1.15 2000/07/08 11:59:51 tom Exp $ .TH curs_color 3 "" .SH NAME -\fBstart_color\fR, \fBinit_pair\fR, -\fBinit_color\fR, \fBhas_colors\fR, \fBcan_change_color\fR, -\fBcolor_content\fR, \fBpair_content\fR - \fBcurses\fR color -manipulation routines +\fBstart_color\fR, +\fBinit_pair\fR, +\fBinit_color\fR, +\fBhas_colors\fR, +\fBcan_change_color\fR, +\fBcolor_content\fR, +\fBpair_content\fR, +\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines .SH SYNOPSIS \fB# include <curses.h>\fR .br @@ -85,13 +89,27 @@ just turned on. The \fBinit_pair\fR routine changes the definition of a color-pair. It takes three arguments: the number of the color-pair to be changed, the foreground -color number, and the background color number. The value of the first argument -must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. The value of the second and +color number, and the background color number. +For portable applications: +.TP 5 +- +The value of the first argument +must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. +.TP 5 +- +The value of the second and third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired -to white on black and cannot be changed). If the color-pair was previously +to white on black and cannot be changed). +.PP +If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair is changed to the new definition. +As an extension, ncurses allows you to set color pair 0 via +the \fBassume_default_colors\fR routine, or to specify the use of +default colors (color number \fB-1\fR) if you first invoke the +\fBuse_default_colors\fR routine. + The \fBinit_color\fR routine changes the definition of a color. It takes four arguments: the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The value of the first @@ -162,15 +180,18 @@ the background color used when parts of a window are blanked by erasing or scrolling operations, see \fBcurs_bkgd\fR(3). Several caveats apply on 386 and 486 machines with VGA-compatible graphics: - +.TP 5 +- COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with the \fBA_BOLD\fR attribute. - +.TP 5 +- The A_BLINK attribute should in theory cause the background to go bright. This often fails to work, and even some cards for which it mostly works (such as the Paradise and compatibles) do the wrong thing when you try to set a bright "yellow" background (you get a blinking yellow foreground instead). - +.TP 5 +- Color RGB values are not settable. .SH PORTABILITY This implementation satisfies XSI Curses's minimum maximums @@ -179,6 +200,11 @@ for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR. The \fBinit_pair\fP routine accepts negative values of foreground and background color to support the \fBuse_default_colors\fP extension, but only if that routine has been first invoked. +.PP +The assumption that \fBCOLOR_BLACK\fR is the default +background color for all terminals can be modified using the +\fBassume_default_colors\fP extension, +.. .SH SEE ALSO \fBcurses\fR(3), \fBcurs_initscr\fR(3), diff --git a/lib/libcurses/curs_delch.3 b/lib/libcurses/curs_delch.3 index b0ceb604b56..17ac6bd95b5 100644 --- a/lib/libcurses/curs_delch.3 +++ b/lib/libcurses/curs_delch.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_delch.3,v 1.5 1998/09/13 19:16:18 millert Exp $ +.\" $OpenBSD: curs_delch.3,v 1.6 2000/07/10 03:06:05 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,11 +28,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_delch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_delch.3x,v 1.7 2000/07/01 19:55:37 tom Exp $ .TH curs_delch 3 "" .SH NAME -\fBdelch\fR, \fBwdelch\fR, \fBmvdelch\fR, \fBmvwdelch\fR - -delete character under the cursor in a \fBcurses\fR window +\fBdelch\fR, +\fBwdelch\fR, +\fBmvdelch\fR, +\fBmvwdelch\fR - delete character under the cursor in a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_deleteln.3 b/lib/libcurses/curs_deleteln.3 index b58e85909c1..938c5e40aa7 100644 --- a/lib/libcurses/curs_deleteln.3 +++ b/lib/libcurses/curs_deleteln.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_deleteln.3,v 1.6 1999/02/11 00:09:36 millert Exp $ +.\" $OpenBSD: curs_deleteln.3,v 1.7 2000/07/10 03:06:06 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_deleteln.3x,v 1.5 1999/02/07 03:58:20 tom Exp $ +.\" $From: curs_deleteln.3x,v 1.6 2000/07/01 19:56:12 tom Exp $ .TH curs_deleteln 3 "" .SH NAME -\fBdeleteln\fR, \fBwdeleteln\fR, \fBinsdelln\fR, -\fBwinsdelln\fR, \fBinsertln\fR, \fBwinsertln\fR - delete and insert -lines in a \fBcurses\fR window +\fBdeleteln\fR, +\fBwdeleteln\fR, +\fBinsdelln\fR, +\fBwinsdelln\fR, +\fBinsertln\fR, +\fBwinsertln\fR - delete and insert lines in a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_extend.3 b/lib/libcurses/curs_extend.3 index 141b97ec2b3..722f362b4da 100644 --- a/lib/libcurses/curs_extend.3 +++ b/lib/libcurses/curs_extend.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_extend.3,v 1.1 1999/12/28 19:17:43 millert Exp $ +.\" $OpenBSD: curs_extend.3,v 1.2 2000/07/10 03:06:06 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1999 Free Software Foundation, Inc. * +.\" Copyright (c) 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 * @@ -30,10 +30,12 @@ .\" .\" Author: Thomas E. Dickey <dickey@clark.net> 1999 .\" -.\" $From: curs_extend.3x,v 1.2 1999/12/18 21:57:44 tom Exp $ -.TH use_default_colors 3 "" +.\" $From: curs_extend.3x,v 1.4 2000/07/01 16:43:11 tom Exp $ +.TH curs_extend 3 "" .SH NAME -\fBcurs_extend\fR \- miscellaneous curses extensions +\fBcurs_extend\fR, +\fBcurses_version\fP, +\fBuse_extended_names\fP \- miscellaneous curses extensions .. .SH SYNOPSIS \fB#include <curses.h>\fP diff --git a/lib/libcurses/curs_getch.3tbl b/lib/libcurses/curs_getch.3tbl index 01ba828fc1e..8cb9a9f3a73 100644 --- a/lib/libcurses/curs_getch.3tbl +++ b/lib/libcurses/curs_getch.3tbl @@ -1,8 +1,8 @@ '\" t -.\" $OpenBSD: curs_getch.3tbl,v 1.8 2000/06/19 03:53:34 millert Exp $ +.\" $OpenBSD: curs_getch.3tbl,v 1.9 2000/07/10 03:06:06 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -29,12 +29,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_getch.3x,v 1.16 2000/05/27 22:48:05 tom Exp $ +.\" $From: curs_getch.3x,v 1.17 2000/07/01 16:45:36 tom Exp $ .TH curs_getch 3 "" .SH NAME -\fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR, -\fBmvwgetch\fR, \fBungetch\fR - get (or push back) characters from -\fBcurses\fR terminal keyboard +\fBgetch\fR, +\fBwgetch\fR, +\fBmvgetch\fR, +\fBmvwgetch\fR, +\fBungetch\fR, +\fBhas_key\fR \- get (or push back) characters from \fBcurses\fR terminal keyboard .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_getstr.3 b/lib/libcurses/curs_getstr.3 index f347ed5af74..514e68277df 100644 --- a/lib/libcurses/curs_getstr.3 +++ b/lib/libcurses/curs_getstr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_getstr.3,v 1.6 1998/09/13 19:16:18 millert Exp $ +.\" $OpenBSD: curs_getstr.3,v 1.7 2000/07/10 03:06:06 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_getstr.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_getstr.3x,v 1.9 2000/07/01 17:39:31 tom Exp $ .TH curs_getstr 3 "" .SH NAME -\fBgetstr\fR, \fBwgetstr\fR, \fBmvgetstr\fR, -\fBmvwgetstr\fR, \fBwgetnstr\fR - accept character strings from -\fBcurses\fR terminal keyboard +\fBgetstr\fR, +\fBgetnstr\fR, +\fBwgetstr\fR, +\fBwgetnstr\fR, +\fBmvgetstr\fR, +\fBmvgetnstr\fR, +\fBmvwgetstr\fR, +\fBmvwgetnstr\fR - accept character strings from \fBcurses\fR terminal keyboard .SH SYNOPSIS \fB#include <curses.h>\fR @@ -43,6 +48,8 @@ .br \fBint wgetstr(WINDOW *win, char *str);\fR .br +\fBint wgetnstr(WINDOW *win, char *str, int n);\fR +.br \fBint mvgetstr(int y, int x, char *str);\fR .br \fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR @@ -51,8 +58,6 @@ .br \fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR .br -\fBint wgetnstr(WINDOW *win, char *str, int n);\fR -.br .SH DESCRIPTION The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR, until a newline or carriage return is received (the terminating character is diff --git a/lib/libcurses/curs_inchstr.3 b/lib/libcurses/curs_inchstr.3 index 9a305c8fc19..4bf3827b29a 100644 --- a/lib/libcurses/curs_inchstr.3 +++ b/lib/libcurses/curs_inchstr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_inchstr.3,v 1.6 1998/09/13 19:16:19 millert Exp $ +.\" $OpenBSD: curs_inchstr.3,v 1.7 2000/07/10 03:06:07 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,13 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_inchstr.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_inchstr.3x,v 1.8 2000/07/01 20:16:18 tom Exp $ .TH curs_inchstr 3 "" .SH NAME -\fBinchstr\fR, \fBinchnstr\fR, \fBwinchstr\fR, -\fBwinchnstr\fR, \fBmvinchstr\fR, \fBmvinchnstr\fR, \fBmvwinchstr\fR, -\fBmvwinchnstr\fR - get a string of characters (and attributes) from a -\fBcurses\fR window +\fBinchstr\fR, +\fBinchnstr\fR, +\fBwinchstr\fR, +\fBwinchnstr\fR, +\fBmvinchstr\fR, +\fBmvinchnstr\fR, +\fBmvwinchstr\fR, +\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_initscr.3 b/lib/libcurses/curs_initscr.3 index 0404afa374e..e818e920a08 100644 --- a/lib/libcurses/curs_initscr.3 +++ b/lib/libcurses/curs_initscr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_initscr.3,v 1.6 1999/11/28 17:53:40 millert Exp $ +.\" $OpenBSD: curs_initscr.3,v 1.7 2000/07/10 03:06:07 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_initscr.3x,v 1.8 1999/09/18 23:52:30 tom Exp $ +.\" $From: curs_initscr.3x,v 1.10 2000/07/08 12:47:39 tom Exp $ .TH curs_initscr 3 "" .SH NAME -\fBinitscr\fR, \fBnewterm\fR, \fBendwin\fR, -\fBisendwin\fR, \fBset_term\fR, \fBdelscreen\fR - \fBcurses\fR screen -initialization and manipulation routines +\fBinitscr\fR, +\fBnewterm\fR, +\fBendwin\fR, +\fBisendwin\fR, +\fBset_term\fR, +\fBdelscreen\fR - \fBcurses\fR screen initialization and manipulation routines .SH SYNOPSIS \fB#include <curses.h>\fR @@ -41,7 +44,7 @@ initialization and manipulation routines .br \fBint endwin(void);\fR .br -\fBint isendwin(void);\fR +\fBbool isendwin(void);\fR .br \fBSCREEN *newterm(const char *type, FILE *outfd, FILE *infd);\fR .br diff --git a/lib/libcurses/curs_insch.3 b/lib/libcurses/curs_insch.3 index aef3fbb8bfc..73f8e2f8e44 100644 --- a/lib/libcurses/curs_insch.3 +++ b/lib/libcurses/curs_insch.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_insch.3,v 1.5 1998/09/13 19:16:20 millert Exp $ +.\" $OpenBSD: curs_insch.3,v 1.6 2000/07/10 03:06:07 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,11 +28,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_insch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_insch.3x,v 1.7 2000/07/01 19:57:21 tom Exp $ .TH curs_insch 3 "" .SH NAME -\fBinsch\fR, \fBwinsch\fR, \fBmvinsch\fR, \fBmvwinsch\fR - -insert a character before cursor in a \fBcurses\fR window +\fBinsch\fR, +\fBwinsch\fR, +\fBmvinsch\fR, +\fBmvwinsch\fR - insert a character before cursor in a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_insstr.3 b/lib/libcurses/curs_insstr.3 index 88eb4aef2f3..abc21ff7598 100644 --- a/lib/libcurses/curs_insstr.3 +++ b/lib/libcurses/curs_insstr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_insstr.3,v 1.8 1998/09/13 19:16:20 millert Exp $ +.\" $OpenBSD: curs_insstr.3,v 1.9 2000/07/10 03:06:07 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_insstr.3x,v 1.10 1998/07/25 20:32:57 Todd.Miller Exp $ +.\" $From: curs_insstr.3x,v 1.11 2000/07/01 19:57:49 tom Exp $ .TH curs_insstr 3 "" .SH NAME -\fBinsstr\fR, \fBinsnstr\fR, \fBwinsstr\fR, \fBwinsnstr\fR, -\fBmvinsstr\fR, \fBmvinsnstr\fR, \fBmvwinsstr\fR, \fBmvwinsnstr\fR - insert -string before cursor in a \fBcurses\fR window +\fBinsstr\fR, +\fBinsnstr\fR, +\fBwinsstr\fR, +\fBwinsnstr\fR, +\fBmvinsstr\fR, +\fBmvinsnstr\fR, +\fBmvwinsstr\fR, +\fBmvwinsnstr\fR - insert string before cursor in a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR .br diff --git a/lib/libcurses/curs_instr.3 b/lib/libcurses/curs_instr.3 index c954d4beeb5..dcf93b6e030 100644 --- a/lib/libcurses/curs_instr.3 +++ b/lib/libcurses/curs_instr.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_instr.3,v 1.6 1998/09/13 19:16:20 millert Exp $ +.\" $OpenBSD: curs_instr.3,v 1.7 2000/07/10 03:06:07 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_instr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_instr.3x,v 1.9 2000/07/01 20:05:03 tom Exp $ .TH curs_instr 3 "" .SH NAME -\fBinstr\fR, \fBinnstr\fR, \fBwinstr\fR, \fBwinnstr\fR, -\fBmvinstr\fR, \fBmvinnstr\fR, \fBmvwinstr\fR, \fBmvwinnstr\fR - get a string -of characters from a \fBcurses\fR window +\fBinstr\fR, +\fBinnstr\fR, +\fBwinstr\fR, +\fBwinnstr\fR, +\fBmvinstr\fR, +\fBmvinnstr\fR, +\fBmvwinstr\fR, +\fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_mouse.3tbl b/lib/libcurses/curs_mouse.3tbl index b8631842631..8c06b5aca66 100644 --- a/lib/libcurses/curs_mouse.3tbl +++ b/lib/libcurses/curs_mouse.3tbl @@ -1,8 +1,8 @@ '\" t -.\" $OpenBSD: curs_mouse.3tbl,v 1.8 1999/11/28 17:53:40 millert Exp $ +.\" $OpenBSD: curs_mouse.3tbl,v 1.9 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" 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 * @@ -29,12 +29,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.'" $From: curs_mouse.3x,v 1.13 1999/09/11 17:28:28 tom Exp $ +.'" $From: curs_mouse.3x,v 1.15 2000/07/08 12:50:08 tom Exp $ .TH curs_mouse 3 "" .SH NAME \fBgetmouse\fR, \fBungetmouse\fR, \fBmousemask\fR, \fBwenclose\fR, -\fBwmouse_trafo\fR, \fBmouseinterval\fR - mouse interface through curses +\fBmouse_trafo\fR, \fBwmouse_trafo\fR, +\fBmouseinterval\fR - mouse interface through curses .SH SYNOPSIS .nf \fB#include <curses.h>\fR @@ -58,7 +59,11 @@ MEVENT;\fR .br \fBbool wenclose(WINDOW *win, int y, int x);\fR .br -\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX, bool to_screen);\fR +\fBbool mouse_trafo(int* pY, int* pX, bool to_screen);\fR +.br +\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX,\fR +.br + \fBbool to_screen);\fR .br \fBint mouseinterval(int erval);\fR .br diff --git a/lib/libcurses/curs_overlay.3 b/lib/libcurses/curs_overlay.3 index 21daa9c2116..4a3a31627b2 100644 --- a/lib/libcurses/curs_overlay.3 +++ b/lib/libcurses/curs_overlay.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_overlay.3,v 1.6 1999/01/18 19:07:14 millert Exp $ +.\" $OpenBSD: curs_overlay.3,v 1.7 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,11 +28,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_overlay.3x,v 1.8 1998/12/26 20:08:30 tom Exp $ +.\" $From: curs_overlay.3x,v 1.9 2000/07/01 20:05:31 tom Exp $ .TH curs_overlay 3 "" .SH NAME -\fBoverlay\fR, \fBoverwrite\fR, \fBcopywin\fR - overlay and -manipulate overlapped \fBcurses\fR windows +\fBoverlay\fR, +\fBoverwrite\fR, +\fBcopywin\fR - overlay and manipulate overlapped \fBcurses\fR windows .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_pad.3 b/lib/libcurses/curs_pad.3 index 4f81f8ae486..63b204767fb 100644 --- a/lib/libcurses/curs_pad.3 +++ b/lib/libcurses/curs_pad.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_pad.3,v 1.6 1999/01/18 19:07:15 millert Exp $ +.\" $OpenBSD: curs_pad.3,v 1.7 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,11 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_pad.3x,v 1.8 1998/12/26 20:09:03 tom Exp $ +.\" $From: curs_pad.3x,v 1.9 2000/07/04 22:38:13 tom Exp $ .TH curs_pad 3 "" .SH NAME \fBnewpad\fR, \fBsubpad\fR, \fBprefresh\fR, -\fBpnoutrefresh\fR, \fBpechochar\fR - create and display \fBcurses\fR -pads +\fBpnoutrefresh\fR, \fBpechochar\fR - create and display \fBcurses\fR pads .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_printw.3 b/lib/libcurses/curs_printw.3 index e1ae42b529e..23af7f22665 100644 --- a/lib/libcurses/curs_printw.3 +++ b/lib/libcurses/curs_printw.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_printw.3,v 1.8 1999/01/18 19:07:15 millert Exp $ +.\" $OpenBSD: curs_printw.3,v 1.9 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_printw.3x,v 1.8 1998/12/26 20:09:36 tom Exp $ +.\" $From: curs_printw.3x,v 1.11 2000/07/01 20:11:32 tom Exp $ .TH curs_printw 3 "" .SH NAME -\fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR, -\fBmvwprintw\fR, \fBvwprintw\fR - print formatted output in -\fBcurses\fR windows +\fBprintw\fR, +\fBwprintw\fR, +\fBmvprintw\fR, +\fBmvwprintw\fR, +\fBvwprintw\fR, \fBvw_printw\fR - print formatted output in \fBcurses\fR windows .SH SYNOPSIS \fB#include <curses.h>\fR @@ -50,6 +52,8 @@ .br \fBint vwprintw(WINDOW *win, char *fmt, varglist);\fR .br +\fBint vw_printw(WINDOW *win, char *fmt, varglist);\fR +.br .SH DESCRIPTION The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR routines are analogous to \fBprintf\fR [see \fBprintf\fR(3)]. In diff --git a/lib/libcurses/curs_refresh.3 b/lib/libcurses/curs_refresh.3 index abcf9385ca6..3968930ce13 100644 --- a/lib/libcurses/curs_refresh.3 +++ b/lib/libcurses/curs_refresh.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_refresh.3,v 1.5 1998/09/13 19:16:22 millert Exp $ +.\" $OpenBSD: curs_refresh.3,v 1.6 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_refresh.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_refresh.3x,v 1.8 2000/07/01 20:06:14 tom Exp $ .TH curs_refresh 3 "" .SH NAME -\fBrefresh\fR, \fBwrefresh\fR, \fBwnoutrefresh\fR, -\fBdoupdate\fR, \fBredrawwin\fR, \fBwredrawln\fR - refresh -\fBcurses\fR windows and lines +\fBrefresh\fR, +\fBwrefresh\fR, +\fBwnoutrefresh\fR, +\fBdoupdate\fR, +\fBredrawwin\fR, +\fBwredrawln\fR - refresh \fBcurses\fR windows and lines .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_scanw.3 b/lib/libcurses/curs_scanw.3 index 55bf063c8e5..0c4cbd9c01c 100644 --- a/lib/libcurses/curs_scanw.3 +++ b/lib/libcurses/curs_scanw.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_scanw.3,v 1.7 1999/01/18 19:07:16 millert Exp $ +.\" $OpenBSD: curs_scanw.3,v 1.8 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_scanw.3x,v 1.8 1998/12/26 20:10:12 tom Exp $ +.\" $From: curs_scanw.3x,v 1.10 2000/07/01 20:06:29 tom Exp $ .TH curs_scanw 3 "" .SH NAME -\fBscanw\fR, \fBwscanw\fR, \fBmvscanw\fR, -\fBmvwscanw\fR, \fBvwscanw\fR - convert formatted input from a -\fBcurses\fR widow ++ \fBscanw\fR, ++ \fBwscanw\fR, ++ \fBmvscanw\fR, ++ \fBmvwscanw\fR, ++ \fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR @@ -46,6 +48,8 @@ \fBint mvwscanw(WINDOW *win, int y, int x,\fR \fBchar *fmt\fR [\fB, arg]\fR \fB...);\fR .br +\fBint vw_scanw(WINDOW *win, char *fmt, va_list varglist);\fR +.br \fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR .SH DESCRIPTION The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to diff --git a/lib/libcurses/curs_scr_dump.3 b/lib/libcurses/curs_scr_dump.3 index 6a0f490ccf0..4026e87ec1a 100644 --- a/lib/libcurses/curs_scr_dump.3 +++ b/lib/libcurses/curs_scr_dump.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_scr_dump.3,v 1.1 1998/11/17 03:51:20 millert Exp $ +.\" $OpenBSD: curs_scr_dump.3,v 1.2 2000/07/10 03:06:08 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_scr_dump.3x,v 1.1 1998/03/11 21:12:53 tom Exp $ +.\" $From: curs_scr_dump.3x,v 1.2 2000/07/01 20:06:53 tom Exp $ .TH curs_scr_dump 3 "" .SH NAME -\fBscr_dump\fR, \fBscr_restore\fR, -\fBscr_init\fR, \fBscr_set\fR - read (write) a \fBcurses\fR screen -from (to) a file +\fBscr_dump\fR, +\fBscr_restore\fR, +\fBscr_init\fR, +\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_scroll.3 b/lib/libcurses/curs_scroll.3 index 78f5dbe881b..682df113616 100644 --- a/lib/libcurses/curs_scroll.3 +++ b/lib/libcurses/curs_scroll.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_scroll.3,v 1.6 2000/01/02 22:06:50 millert Exp $ +.\" $OpenBSD: curs_scroll.3,v 1.7 2000/07/10 03:06:09 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,10 +28,10 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_scroll.3x,v 1.7 1999/12/25 21:40:45 tom Exp $ +.\" $From: curs_scroll.3x,v 1.8 2000/07/01 17:54:23 tom Exp $ .TH curs_scroll 3 "" .SH NAME -\fBscroll\fR, \fBsrcl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window +\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curs_slk.3 b/lib/libcurses/curs_slk.3 index 1f76ad60933..c6504d7e2cc 100644 --- a/lib/libcurses/curs_slk.3 +++ b/lib/libcurses/curs_slk.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_slk.3,v 1.6 1998/09/13 19:16:23 millert Exp $ +.\" $OpenBSD: curs_slk.3,v 1.7 2000/07/10 03:06:09 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,13 +28,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_slk.3x,v 1.9 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_slk.3x,v 1.10 2000/07/01 17:52:44 tom Exp $ .TH curs_slk 3 "" .SH NAME \fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR, -\fBslk_noutrefresh\fR, \fBslk_label\fR, \fBslk_clear\fR, \fBslk_restore\fR, -\fBslk_touch\fR, \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR, \fBslk_color\fR - -\fBcurses\fR soft label routines +\fBslk_noutrefresh\fR, \fBslk_label\fR, +\fBslk_clear\fR, \fBslk_restore\fR, \fBslk_touch\fR, +\fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR, +\fBslk_attr_on\fR, \fBslk_attr_set\fR, \fBslk_attr_off\fR, +\fBslk_attr\fR \fBslk_color\fR - \fBcurses\fR soft label routines .SH SYNOPSIS \fB#include <curses.h>\fR @@ -56,11 +58,19 @@ .br \fBint slk_attron(const chtype attrs);\fR .br +\fBint slk_attroff(const chtype attrs);\fR +.br \fBint slk_attrset(const chtype attrs);\fR .br -\fBattr_t slk_attr(void);\fR +\fBint slk_attr_on(attr_t attrs, void* opts);\fR .br -\fBint slk_attroff(const chtype attrs);\fR +\fBint slk_attr_off(const attr_t attrs, void * opts);\fR +.br +\fBint slk_attr_set(const attr_t attrs,\fR +.br + \fBshort color_pair_number, void* opts);\fR +.br +\fBattr_t slk_attr(void);\fR .br \fBint slk_color(short color_pair_number);\fR .br diff --git a/lib/libcurses/curs_termattrs.3 b/lib/libcurses/curs_termattrs.3 index e5920d901b7..49c1720dd27 100644 --- a/lib/libcurses/curs_termattrs.3 +++ b/lib/libcurses/curs_termattrs.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_termattrs.3,v 1.6 1998/09/13 19:16:23 millert Exp $ +.\" $OpenBSD: curs_termattrs.3,v 1.7 2000/07/10 03:06:09 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_termattrs.3x,v 1.4 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_termattrs.3x,v 1.6 2000/07/08 12:53:34 tom Exp $ .TH curs_termattrs 3 "" .SH NAME \fBbaudrate\fR, \fBerasechar\fR, \fBhas_ic\fR, @@ -41,9 +41,9 @@ .br \fBchar erasechar(void);\fR .br -\fBint has_ic(void);\fR +\fBbool has_ic(void);\fR .br -\fBint has_il(void);\fR +\fBbool has_il(void);\fR .br \fBchar killchar(void);\fR .br diff --git a/lib/libcurses/curs_touch.3 b/lib/libcurses/curs_touch.3 index 6c39ab5072b..1cd02bc1f26 100644 --- a/lib/libcurses/curs_touch.3 +++ b/lib/libcurses/curs_touch.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_touch.3,v 1.5 1998/09/13 19:16:23 millert Exp $ +.\" $OpenBSD: curs_touch.3,v 1.6 2000/07/10 03:06:09 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,12 +28,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_touch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $From: curs_touch.3x,v 1.8 2000/07/08 11:07:57 tom Exp $ .TH curs_touch 3 "" .SH NAME -\fBtouchwin\fR, \fBtouchline\fR, \fBuntouchwin\fR, -\fBwtouchln\fR, \fBis_linetouched\fR, \fBis_wintouched\fR - -\fBcurses\fR refresh control routines +\fBtouchwin\fR, +\fBtouchline\fR, +\fBuntouchwin\fR, +\fBwtouchln\fR, +\fBis_linetouched\fR, +\fBis_wintouched\fR - \fBcurses\fR refresh control routines .SH SYNOPSIS \fB#include <curses.h>\fR .br @@ -45,9 +48,9 @@ .br \fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR .br -\fBint is_linetouched(WINDOW *win, int line);\fR +\fBbool is_linetouched(WINDOW *win, int line);\fR .br -\fBint is_wintouched(WINDOW *win);\fR +\fBbool is_wintouched(WINDOW *win);\fR .br .SH DESCRIPTION The \fBtouchwin\fR and \fBtouchline\fR routines throw away all diff --git a/lib/libcurses/curs_window.3 b/lib/libcurses/curs_window.3 index ce773bc9f0a..0c51890bee4 100644 --- a/lib/libcurses/curs_window.3 +++ b/lib/libcurses/curs_window.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: curs_window.3,v 1.7 1999/03/28 18:01:04 millert Exp $ +.\" $OpenBSD: curs_window.3,v 1.8 2000/07/10 03:06:09 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,13 +28,20 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_window.3x,v 1.8 1999/03/20 22:38:46 tom Exp $ +.\" $From: curs_window.3x,v 1.9 2000/07/01 20:08:37 tom Exp $ .TH curs_window 3 "" .SH NAME -\fBnewwin\fR, \fBdelwin\fR, \fBmvwin\fR, -\fBsubwin\fR, \fBderwin\fR, \fBmvderwin\fR, \fBdupwin\fR, -\fBwsyncup\fR, \fBsyncok\fR, \fBwcursyncup\fR, \fBwsyncdown\fR - -create \fBcurses\fR windows +\fBnewwin\fR, +\fBdelwin\fR, +\fBmvwin\fR, +\fBsubwin\fR, +\fBderwin\fR, +\fBmvderwin\fR, +\fBdupwin\fR, +\fBwsyncup\fR, +\fBsyncok\fR, +\fBwcursyncup\fR, +\fBwsyncdown\fR - create \fBcurses\fR windows .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curses.3tbl b/lib/libcurses/curses.3tbl index bf21061b4bc..a69033b1f09 100644 --- a/lib/libcurses/curses.3tbl +++ b/lib/libcurses/curses.3tbl @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: curses.3tbl,v 1.13 1999/12/28 15:57:59 millert Exp $ +.\" $OpenBSD: curses.3tbl,v 1.14 2000/07/10 03:06:10 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,1999 Free Software Foundation, Inc. * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: ncurses.3x,v 1.39 1999/12/19 01:53:04 tom Exp $ +.\" $From: ncurses.3x,v 1.40 2000/07/08 13:10:31 tom Exp $ .TH ncurses 3 "" .ds n 5 .ds d /usr/share/terminfo @@ -194,6 +194,8 @@ l l l l . \fBcurses\fR Routine Name/Manual Page Name = +COLOR_PAIR/\fBcurs_color\fR(3) +PAIR_NUMBER/\fBcurs_attr\fR(3) addch/\fBcurs_addch\fR(3) addchnstr/\fBcurs_addchstr\fR(3) addchstr/\fBcurs_addchstr\fR(3) @@ -291,6 +293,7 @@ leaveok/\fBcurs_outopts\fR(3) longname/\fBcurs_termattrs\fR(3) mcprint/\fBcurs_print\fR(3)* meta/\fBcurs_inopts\fR(3) +mouse_trafo/\fBcurs_mouse\fR(3)* mouseinterval/\fBcurs_mouse\fR(3)* mousemask/\fBcurs_mouse\fR(3)* move/\fBcurs_move\fR(3) @@ -317,6 +320,7 @@ mvinsstr/\fBcurs_insstr\fR(3) mvinstr/\fBcurs_instr\fR(3) mvprintw/\fBcurs_printw\fR(3) mvscanw/\fBcurs_scanw\fR(3) +mvvline/\fBcurs_border\fR(3) mvwaddch/\fBcurs_addch\fR(3) mvwaddchnstr/\fBcurs_addchstr\fR(3) mvwaddchstr/\fBcurs_addchstr\fR(3) diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h index 6fae487222c..ca6fb556e25 100644 --- a/lib/libcurses/curses.h +++ b/lib/libcurses/curses.h @@ -1,4 +1,4 @@ -/* $OpenBSD: curses.h,v 1.51 2000/06/19 03:53:35 millert Exp $ */ +/* $OpenBSD: curses.h,v 1.52 2000/07/10 03:06:10 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -33,7 +33,7 @@ * and: Eric S. Raymond <esr@snark.thyrsus.com> * ****************************************************************************/ -/* $From: curses.h.in,v 1.92 2000/04/29 18:52:53 tom Exp $ */ +/* $From: curses.h.in,v 1.93 2000/07/08 11:07:26 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -49,12 +49,12 @@ /* 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 20000617 +#define NCURSES_VERSION_MINOR 1 +#define NCURSES_VERSION_PATCH 20000708 /* This is defined in more than one ncurses header, for identification */ #undef NCURSES_VERSION -#define NCURSES_VERSION "5.0" +#define NCURSES_VERSION "5.1" #ifdef NCURSES_NOMACROS #define NCURSES_ATTR_T attr_t @@ -728,6 +728,8 @@ extern int tigetflag(NCURSES_CONST char *); /* implemented */ extern int tigetnum(NCURSES_CONST char *); /* implemented */ extern char *tigetstr(NCURSES_CONST char *); /* implemented */ extern void timeout(int); /* generated */ +extern int touchline(WINDOW *, int, int); /* generated */ +extern int touchwin(WINDOW *); /* generated */ extern char *tparm(NCURSES_CONST char *, ...); /* implemented */ extern int typeahead(int); /* implemented */ extern int ungetch(int); /* implemented */ diff --git a/lib/libcurses/curses.priv.h b/lib/libcurses/curses.priv.h index 1fcb7103d8f..a3ca08cb086 100644 --- a/lib/libcurses/curses.priv.h +++ b/lib/libcurses/curses.priv.h @@ -1,4 +1,4 @@ -/* $OpenBSD: curses.priv.h,v 1.27 2000/06/19 03:53:35 millert Exp $ */ +/* $OpenBSD: curses.priv.h,v 1.28 2000/07/10 03:06:10 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -35,7 +35,7 @@ /* - * $From: curses.priv.h,v 1.161 2000/05/27 23:10:03 tom Exp $ + * $From: curses.priv.h,v 1.162 2000/06/24 21:06:10 tom Exp $ * * curses.priv.h * @@ -312,7 +312,7 @@ struct screen { int _cuu_cost; /* cost of (parm_cursor_up) */ int _hpa_cost; /* cost of (column_address) */ int _vpa_cost; /* cost of (row_address) */ - /* used in lib_doupdate.c, must be chars */ + /* used in tty_update.c, must be chars */ int _ed_cost; /* cost of (clr_eos) */ int _el_cost; /* cost of (clr_eol) */ int _el1_cost; /* cost of (clr_bol) */ @@ -324,6 +324,8 @@ struct screen { int _rep_cost; /* cost of (repeat_char) */ int _hpa_ch_cost; /* cost of (column_address) */ int _cup_ch_cost; /* cost of (cursor_address) */ + int _cuf_ch_cost; /* cost of (parm_cursor_right) */ + int _inline_cost; /* cost of inline-move */ int _smir_cost; /* cost of (enter_insert_mode) */ int _rmir_cost; /* cost of (exit_insert_mode) */ int _ip_cost; /* cost of (insert_padding) */ diff --git a/lib/libcurses/dft_fgbg.3 b/lib/libcurses/dft_fgbg.3 index 03f0859b347..c01f4a1a078 100644 --- a/lib/libcurses/dft_fgbg.3 +++ b/lib/libcurses/dft_fgbg.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dft_fgbg.3,v 1.5 2000/03/10 01:35:01 millert Exp $ +.\" $OpenBSD: dft_fgbg.3,v 1.6 2000/07/10 03:06:11 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -30,10 +30,12 @@ .\" .\" Author: Thomas E. Dickey <dickey@clark.net> 1997,1999 .\" -.\" $From: dft_fgbg.3x,v 1.9 2000/02/13 02:28:39 tom Exp $ -.TH use_default_colors 3 "" +.\" $From: dft_fgbg.3x,v 1.12 2000/07/04 22:31:56 tom Exp $ +.TH dft_fgbg 3 "" .SH NAME -\fBdft_fgbg\fR \- use terminal's default colors +\fBdft_fgbg\fR, +\fBuse_default_colors\fR, +\fBassume_default_colors\fR \- use terminal's default colors .. .SH SYNOPSIS \fB#include <curses.h>\fP @@ -54,7 +56,15 @@ default value (e.g., with SGR 39 or SGR 49). .PP Applications that paint a colored background over the whole screen do not take advantage of SGR 39 and SGR 49. -Some applications are designed to work with the default background. +Some applications are designed to work with the default background, +using colors only for text. +For example, there are several implementations of the \fBls\fP program +which use colors to denote different file types or permissions. +These "color ls" programs do not necessarily modify the background color, +typically using only the \fIsetaf\fP terminfo capability to set the +foreground color. +Full-screen applications that use default colors can achieve similar +visual effects. .PP The first function, .I use_default_colors() @@ -65,7 +75,10 @@ initialize pair x as default foreground on blue. .PP The other, .I assume_default_colors() -is a refinement which tells which colors to paint for color pair 0, and -1 means default terminal color. +is a refinement which tells which colors to paint for color pair 0. +This function recognizes a special color number -1, +which denotes the default terminal color. +.PP The following are equivalent: .RS .br @@ -74,9 +87,21 @@ The following are equivalent: .I assume_default_colors(-1,-1); .RE .PP -This is a ncurses extension and for other curses implementations color +These are ncurses extensions. +For other curses implementations, color number -1 does not mean anything, just as for ncurses before a -successful call of use_default_colors or assume_default_colors. +successful call of \fIuse_default_colors()\fP or \fIassume_default_colors()\fP. +.PP +Other curses implementations do not allow an application to modify color pair 0. +They assume that the background is COLOR_BLACK, +but do not ensure that the color pair 0 is painted to match the +assumption. +If your application does not use either +.I use_default_colors() +or +.I assume_default_colors() +ncurses will paint a white foreground (text) with black background +for color pair 0. .. .SH RETURN VALUE These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. diff --git a/lib/libcurses/term.h b/lib/libcurses/term.h index 4011b24e0c7..5422a62c288 100644 --- a/lib/libcurses/term.h +++ b/lib/libcurses/term.h @@ -1,4 +1,4 @@ -/* $OpenBSD: term.h,v 1.9 2000/03/13 23:53:39 millert Exp $ */ +/* $OpenBSD: term.h,v 1.10 2000/07/10 03:06:11 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -47,7 +47,7 @@ #endif #undef NCURSES_VERSION -#define NCURSES_VERSION "5.0" +#define NCURSES_VERSION "5.1" #ifdef __cplusplus extern "C" { diff --git a/lib/libcurses/termcap.3 b/lib/libcurses/termcap.3 index bac4d02c768..ab409e75698 100644 --- a/lib/libcurses/termcap.3 +++ b/lib/libcurses/termcap.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: termcap.3,v 1.4 1999/11/28 17:53:40 millert Exp $ +.\" $OpenBSD: termcap.3,v 1.5 2000/07/10 03:06:11 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,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 * @@ -28,13 +28,16 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_termcap.3x,v 1.12 1999/09/05 01:02:07 tom Exp $ +.\" $From: curs_termcap.3x,v 1.13 2000/07/01 20:10:57 tom Exp $ .TH termcap 3 "" .ds n 5 .SH NAME -\fBtgetent\fR, \fBtgetflag\fR, \fBtgetnum\fR, -\fBtgetstr\fR, \fBtgoto\fR, \fBtputs\fR - direct \fBcurses\fR -interface to the terminfo capability database +\fBtgetent\fR, +\fBtgetflag\fR, +\fBtgetnum\fR, +\fBtgetstr\fR, +\fBtgoto\fR, +\fBtputs\fR - direct \fBcurses\fR interface to the terminfo capability database .SH SYNOPSIS \fB#include <curses.h>\fR .br diff --git a/lib/libcurses/termcap.h b/lib/libcurses/termcap.h index bd5787e118c..bc6b3b9e9b6 100644 --- a/lib/libcurses/termcap.h +++ b/lib/libcurses/termcap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: termcap.h,v 1.4 1999/05/08 20:28:59 millert Exp $ */ +/* $OpenBSD: termcap.h,v 1.5 2000/07/10 03:06:11 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -39,7 +39,7 @@ #define _NCU_TERMCAP_H 1 #undef NCURSES_VERSION -#define NCURSES_VERSION "5.0" +#define NCURSES_VERSION "5.1" #ifdef __cplusplus extern "C" diff --git a/lib/libcurses/terminfo.3 b/lib/libcurses/terminfo.3 index 456bf701367..c68d17f6718 100644 --- a/lib/libcurses/terminfo.3 +++ b/lib/libcurses/terminfo.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: terminfo.3,v 1.6 1999/11/28 17:53:40 millert Exp $ +.\" $OpenBSD: terminfo.3,v 1.7 2000/07/10 03:06:11 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1999 Free Software Foundation, Inc. * +.\" Copyright (c) 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 * @@ -28,15 +28,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_terminfo.3x,v 1.12 1999/10/17 01:11:59 tom Exp $ +.\" $From: curs_terminfo.3x,v 1.13 2000/07/01 20:07:34 tom Exp $ .TH terminfo 3 "" .ds n 5 .SH NAME -\fBsetupterm\fR, \fBsetterm\fR, -\fBset_curterm\fR, \fBdel_curterm\fR, \fBrestartterm\fR, \fBtparm\fR, -\fBtputs\fR, \fBputp\fR, \fBvidputs\fR, \fBvidattr\fR, \fBmvcur\fR, -\fBtigetflag\fR, \fBtigetnum\fR, \fBtigetstr\fR - \fBcurses\fR -interfaces to terminfo database +\fBsetupterm\fR, +\fBsetterm\fR, +\fBset_curterm\fR, +\fBdel_curterm\fR, +\fBrestartterm\fR, +\fBtparm\fR, +\fBtputs\fR, +\fBputp\fR, +\fBvidputs\fR, +\fBvidattr\fR, +\fBmvcur\fR, +\fBtigetflag\fR, +\fBtigetnum\fR, +\fBtigetstr\fR - \fBcurses\fR interfaces to terminfo database .SH SYNOPSIS \fB#include <curses.h>\fR .br diff --git a/lib/libcurses/tinfo/comp_scan.c b/lib/libcurses/tinfo/comp_scan.c index 77ac5d3043c..765174d8f12 100644 --- a/lib/libcurses/tinfo/comp_scan.c +++ b/lib/libcurses/tinfo/comp_scan.c @@ -50,7 +50,7 @@ #include <term_entry.h> #include <tic.h> -MODULE_ID("$From: comp_scan.c,v 1.44 2000/06/10 21:59:21 tom Exp $") +MODULE_ID("$From: comp_scan.c,v 1.45 2000/07/08 00:43:55 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -80,6 +80,10 @@ static char separator; /* capability separator */ static int pushtype; /* type of pushback token */ static char pushname[MAX_NAME_SIZE + 1]; +#ifdef NCURSES_EXT_FUNCS +bool _nc_disable_period = FALSE; /* used by tic -a option */ +#endif + static int last_char(void); static int next_char(void); static long stream_pos(void); diff --git a/lib/libcurses/tinfo/free_ttype.c b/lib/libcurses/tinfo/free_ttype.c index f21d4ea2282..31588f3f458 100644 --- a/lib/libcurses/tinfo/free_ttype.c +++ b/lib/libcurses/tinfo/free_ttype.c @@ -1,7 +1,7 @@ -/* $OpenBSD: free_ttype.c,v 1.3 2000/03/26 16:45:04 millert Exp $ */ +/* $OpenBSD: free_ttype.c,v 1.4 2000/07/10 03:06:16 millert Exp $ */ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 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 * @@ -46,30 +46,29 @@ #include <tic.h> #include <term_entry.h> -MODULE_ID("$From: free_ttype.c,v 1.3 2000/03/19 02:03:07 tom Exp $") +MODULE_ID("$From: free_ttype.c,v 1.5 2000/07/08 00:43:58 tom Exp $") void _nc_free_termtype(TERMTYPE *ptr) { - FreeIfNeeded(ptr->str_table); - FreeIfNeeded(ptr->term_names); + FreeIfNeeded(ptr->str_table); + FreeIfNeeded(ptr->term_names); + FreeIfNeeded(ptr->Booleans); + FreeIfNeeded(ptr->Numbers); + FreeIfNeeded(ptr->Strings); #if NCURSES_XNAMES - FreeIfNeeded(ptr->ext_str_table); - FreeIfNeeded(ptr->Booleans); - FreeIfNeeded(ptr->Numbers); - FreeIfNeeded(ptr->Strings); - FreeIfNeeded(ptr->ext_Names); + FreeIfNeeded(ptr->ext_str_table); + FreeIfNeeded(ptr->ext_Names); #endif - memset(ptr, 0, sizeof(TERMTYPE)); + memset(ptr, 0, sizeof(TERMTYPE)); } #if NCURSES_XNAMES bool _nc_user_definable = TRUE; -bool _nc_disable_period = FALSE; /* used by tic -a option */ int use_extended_names(bool flag) { - int oldflag = _nc_user_definable; - _nc_user_definable = flag; - return oldflag; + int oldflag = _nc_user_definable; + _nc_user_definable = flag; + return oldflag; } #endif diff --git a/lib/libcurses/tty/lib_mvcur.c b/lib/libcurses/tty/lib_mvcur.c index a24ab8ff3e4..7672c928963 100644 --- a/lib/libcurses/tty/lib_mvcur.c +++ b/lib/libcurses/tty/lib_mvcur.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_mvcur.c,v 1.7 2000/06/19 03:53:53 millert Exp $ */ +/* $OpenBSD: lib_mvcur.c,v 1.8 2000/07/10 03:06:16 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -154,7 +154,7 @@ #include <term.h> #include <ctype.h> -MODULE_ID("$From: lib_mvcur.c,v 1.64 2000/05/14 01:25:28 tom Exp $") +MODULE_ID("$From: lib_mvcur.c,v 1.67 2000/06/24 21:13:51 tom Exp $") #define STRLEN(s) (s != 0) ? strlen(s) : 0 @@ -206,7 +206,8 @@ static int trace_cost_of(const char *capname, const char *cap, int affcnt) { int result = _nc_msec_cost(cap, affcnt); - TR(TRACE_CHARPUT | TRACE_MOVE, ("CostOf %s %d", capname, result)); + TR(TRACE_CHARPUT | TRACE_MOVE, + ("CostOf %s %d %s", capname, result, _nc_visbuf(cap))); return result; } #define CostOf(cap,affcnt) trace_cost_of(#cap,cap,affcnt); @@ -215,7 +216,8 @@ static int trace_normalized_cost(const char *capname, const char *cap, int affcnt) { int result = normalized_cost(cap, affcnt); - TR(TRACE_CHARPUT | TRACE_MOVE, ("NormalizedCost %s %d", capname, result)); + TR(TRACE_CHARPUT | TRACE_MOVE, + ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap))); return result; } #define NormalizedCost(cap,affcnt) trace_normalized_cost(#cap,cap,affcnt); @@ -251,7 +253,10 @@ _nc_msec_cost(const char *const cap, int affcnt) number += (*cp - '0') / 10.0; } - cum_cost += number * 10; +#ifdef NCURSES_NO_PADDING + if (!(SP->_no_padding)) +#endif + cum_cost += number * 10; } else cum_cost += SP->_char_padding; } @@ -397,6 +402,10 @@ _nc_mvcur_init(void) SP->_cup_ch_cost = NormalizedCost(tparm(SP->_address_cursor, 23, 23), 1); SP->_hpa_ch_cost = NormalizedCost(tparm(column_address, 23), 1); + SP->_cuf_ch_cost = NormalizedCost(tparm(parm_right_cursor, 23), 1); + SP->_inline_cost = min(SP->_cup_ch_cost, + min(SP->_hpa_ch_cost, + SP->_cuf_ch_cost)); /* pre-compute some capability lengths */ SP->_carriage_return_length = STRLEN(carriage_return); diff --git a/lib/libcurses/tty/lib_twait.c b/lib/libcurses/tty/lib_twait.c index 397be3f908b..93aff6a4edf 100644 --- a/lib/libcurses/tty/lib_twait.c +++ b/lib/libcurses/tty/lib_twait.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_twait.c,v 1.4 2000/03/10 01:35:05 millert Exp $ */ +/* $OpenBSD: lib_twait.c,v 1.5 2000/07/10 03:06:16 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -61,7 +61,7 @@ # endif #endif -MODULE_ID("$From: lib_twait.c,v 1.36 2000/02/13 01:02:34 tom Exp $") +MODULE_ID("$From: lib_twait.c,v 1.37 2000/06/29 23:03:09 tom Exp $") static long _nc_gettime(bool first) { @@ -243,7 +243,6 @@ retry: if ((mode & (1 << count)) && (fds[count].revents & POLLIN)) { result |= (1 << count); - count++; } } #elif defined(__BEOS__) diff --git a/lib/libcurses/tty/tty_update.c b/lib/libcurses/tty/tty_update.c index 976f5ee8eca..7127732c103 100644 --- a/lib/libcurses/tty/tty_update.c +++ b/lib/libcurses/tty/tty_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_update.c,v 1.9 2000/06/19 03:53:55 millert Exp $ */ +/* $OpenBSD: tty_update.c,v 1.10 2000/07/10 03:06:17 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -72,7 +72,7 @@ #include <term.h> -MODULE_ID("$From: tty_update.c,v 1.136 2000/05/20 23:28:00 tom Exp $") +MODULE_ID("$From: tty_update.c,v 1.141 2000/07/04 21:01:40 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -412,14 +412,14 @@ EmitRange(const chtype * ntext, int num) /* * The cost expression in the middle isn't exactly right. - * _cup_cost is an upper bound on the cost for moving to the + * _cup_ch_cost is an upper bound on the cost for moving to the * end of the erased area, but not the cost itself (which we * can't compute without emitting the move). This may result * in erase_chars not getting used in some situations for * which it would be marginally advantageous. */ if (erase_chars - && runcount > SP->_ech_cost + SP->_cup_cost + && runcount > SP->_ech_cost + SP->_cup_ch_cost && can_clear_with(ntext0)) { UpdateAttrs(ntext0); putp(tparm(erase_chars, runcount)); @@ -477,18 +477,17 @@ PutRange( int first, int last) { int j, run; - int cost = min(SP->_cup_ch_cost, SP->_hpa_ch_cost); TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)", otext, ntext, row, first, last)); if (otext != ntext - && (last - first + 1) > cost) { + && (last - first + 1) > SP->_inline_cost) { for (j = first, run = 0; j <= last; j++) { if (otext[j] == ntext[j]) { run++; } else { - if (run > cost) { + if (run > SP->_inline_cost) { int before_run = (j - run); EmitRange(ntext + first, before_run - first); GoTo(row, first = j); @@ -925,53 +924,38 @@ ClrToEOS(chtype blank) static int ClrBottom(int total) { - static chtype *tstLine; - static size_t lenLine; - int row; - size_t col; + int col; int top = total; int last = min(screen_columns, newscr->_maxx + 1); - size_t length = sizeof(chtype) * last; - chtype blank = newscr->_line[total - 1].text[last - 1]; /* lower right char */ - - if (!clr_eos || !can_clear_with(blank)) - return total; - - if ((tstLine == 0) || (last > (int) lenLine)) { - tstLine = typeRealloc(chtype, last, tstLine); - if (tstLine == 0) - return total; - lenLine = last; - tstLine[0] = ~blank; /* force the fill below */ - } - if (tstLine[0] != blank) { - for (col = 0; col < lenLine; col++) - tstLine[col] = blank; - } + chtype blank = ClrBlank(stdscr); + bool ok; - for (row = total - 1; row >= 0; row--) { - if (memcmp(tstLine, newscr->_line[row].text, length)) - break; - if (memcmp(tstLine, curscr->_line[row].text, length)) - top = row; - } + if (clr_eos && can_clear_with(blank)) { - /* don't use clr_eos for just one line if clr_eol available */ - if (top < total - 1 || (top < total && !clr_eol && !clr_bol)) { - GoTo(top, 0); - ClrToEOS(blank); - total = top; - if (SP->oldhash && SP->newhash) { - for (row = top; row < screen_lines; row++) - SP->oldhash[row] = SP->newhash[row]; + for (row = total - 1; row >= 0; row--) { + for (col = 0, ok = TRUE; ok && col < last; col++) { + ok = (newscr->_line[row].text[col] == blank); + } + if (!ok) break; + + for (col = 0; ok && col < last; col++) { + ok = (curscr->_line[row].text[col] == blank); + } + if (!ok) top = row; + } + + /* don't use clr_eos for just one line if clr_eol available */ + if (top < total - 1 || (top < total && !clr_eol && !clr_bol)) { + GoTo(top, 0); + ClrToEOS(blank); + total = top; + if (SP->oldhash && SP->newhash) { + for (row = top; row < screen_lines; row++) + SP->oldhash[row] = SP->newhash[row]; + } } } -#if NO_LEAKS - if (tstLine != 0) { - FreeAndNull(tstLine); - } -#endif return total; } @@ -1008,6 +992,39 @@ TransformLine(int const lineno) if (SP->oldhash && SP->newhash) SP->oldhash[lineno] = SP->newhash[lineno]; +#define ColorOf(n) ((n) & A_COLOR) +#define unColor(n) ((n) & ALL_BUT_COLOR) + /* + * If we have colors, there is the possibility of having two color pairs + * that display as the same colors. For instance, Lynx does this. Check + * for this case, and update the old line with the new line's colors when + * they are equivalent. + */ + if (SP->_coloron) { + chtype oldColor; + chtype newColor; + int oldPair; + int newPair; + + for (n = 0; n < screen_columns; n++) { + if (newLine[n] != oldLine[n]) { + oldColor = ColorOf(oldLine[n]); + newColor = ColorOf(newLine[n]); + if (oldColor != newColor + && unColor(oldLine[n]) == unColor(newLine[n])) { + oldPair = PAIR_NUMBER(oldColor); + newPair = PAIR_NUMBER(newColor); + if (oldPair < COLOR_PAIRS + && newPair < COLOR_PAIRS + && SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) { + oldLine[n] &= ~A_COLOR; + oldLine[n] |= ColorOf(newLine[n]); + } + } + } + } + } + if (ceol_standout_glitch && clr_eol) { firstChar = 0; while (firstChar < screen_columns) { @@ -1272,18 +1289,18 @@ ClearScreen(chtype blank) } else if (clr_eol) { SP->_cursrow = SP->_curscol = -1; + UpdateAttrs(blank); for (i = 0; i < screen_lines; i++) { GoTo(i, 0); - UpdateAttrs(blank); TPUTS_TRACE("clr_eol"); putp(clr_eol); } GoTo(0, 0); } } else { + UpdateAttrs(blank); for (i = 0; i < screen_lines; i++) { GoTo(i, 0); - UpdateAttrs(blank); for (j = 0; j < screen_columns; j++) PutChar(blank); } diff --git a/lib/libcurses/unctrl.h b/lib/libcurses/unctrl.h index 128db680838..74e2231ec78 100644 --- a/lib/libcurses/unctrl.h +++ b/lib/libcurses/unctrl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unctrl.h,v 1.5 1999/05/08 20:28:59 millert Exp $ */ +/* $OpenBSD: unctrl.h,v 1.6 2000/07/10 03:06:12 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -47,7 +47,7 @@ #define _UNCTRL_H 1 #undef NCURSES_VERSION -#define NCURSES_VERSION "5.0" +#define NCURSES_VERSION "5.1" #ifdef __cplusplus extern "C" { |