Changes to support *echochar().
Should fix PR lib/24927.
This commit is contained in:
parent
5eb61d5ca7
commit
a6a9a97d12
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.50 2004/03/23 21:56:53 jdc Exp $
|
||||
# $NetBSD: Makefile,v 1.51 2004/03/28 08:58:37 jdc Exp $
|
||||
# @(#)Makefile 8.2 (Berkeley) 1/2/94
|
||||
|
||||
.include <bsd.own.mk>
|
||||
@ -18,11 +18,11 @@ LIB= curses
|
||||
SRCS= acs.c addbytes.c addch.c addchnstr.c addnstr.c attributes.c \
|
||||
background.c bell.c border.c box.c clear.c clearok.c clrtobot.c \
|
||||
clrtoeol.c color.c copywin.c cr_put.c ctrace.c cur_hash.c curs_set.c \
|
||||
curses.c delch.c deleteln.c delwin.c erase.c flushok.c fullname.c \
|
||||
getch.c getstr.c getyx.c id_subwins.c idlok.c idcok.c inch.c \
|
||||
inchstr.c initscr.c insch.c insdelln.c insertln.c instr.c keypad.c \
|
||||
keyname.c leaveok.c line.c longname.c meta.c move.c mvwin.c newwin.c \
|
||||
nodelay.c notimeout.c overlay.c overwrite.c pause.c printw.c \
|
||||
curses.c delch.c deleteln.c delwin.c echochar.c erase.c flushok.c \
|
||||
fullname.c getch.c getstr.c getyx.c id_subwins.c idlok.c idcok.c \
|
||||
inch.c inchstr.c initscr.c insch.c insdelln.c insertln.c instr.c \
|
||||
keypad.c keyname.c leaveok.c line.c longname.c meta.c move.c mvwin.c \
|
||||
newwin.c nodelay.c notimeout.c overlay.c overwrite.c pause.c printw.c \
|
||||
putchar.c refresh.c resize.c scanw.c screen.c scroll.c scrollok.c \
|
||||
setterm.c standout.c timeout.c toucholap.c touchwin.c tscroll.c \
|
||||
tstp.c tty.c unctrl.c underscore.c
|
||||
@ -30,8 +30,8 @@ SRCS= acs.c addbytes.c addch.c addchnstr.c addnstr.c attributes.c \
|
||||
MAN= curses.3 curses_addch.3 curses_addchstr.3 curses_addstr.3 \
|
||||
curses_attributes.3 curses_background.3 curses_border.3 \
|
||||
curses_clear.3 curses_color.3 curses_cursor.3 curses_default_colors.3 \
|
||||
curses_delch.3 curses_deleteln.3 curses_inch.3 curses_input.3 \
|
||||
curses_insertch.3 curses_insertln.3 curses_insdelln.3 \
|
||||
curses_delch.3 curses_deleteln.3 curses_echochar.3 curses_inch.3 \
|
||||
curses_input.3 curses_insertch.3 curses_insertln.3 curses_insdelln.3 \
|
||||
curses_keyname.3 curses_line.3 curses_pad.3 curses_print.3 \
|
||||
curses_refresh.3 curses_scanw.3 curses_screen.3 curses_scroll.3 \
|
||||
curses_standout.3 curses_termcap.3 curses_touch.3 curses_tty.3 \
|
||||
@ -63,7 +63,7 @@ MLINKS+= curses_addch.3 addch.3 curses_addchstr.3 addchnstr.3 \
|
||||
curses_deleteln.3 deleteln.3 curses_screen.3 delscreen.3 \
|
||||
curses_window.3 delwin.3 curses_window.3 derwin.3 \
|
||||
curses_refresh.3 doupdate.3 curses_window.3 dupwin.3 \
|
||||
curses_tty.3 echo.3 \
|
||||
curses_tty.3 echo.3 curses_echochar.3 echochar.3 \
|
||||
curses_screen.3 endwin.3 curses_clear.3 erase.3 \
|
||||
curses_tty.3 erasechar.3 \
|
||||
curses_tty.3 flash.3 curses_tty.3 flushinp.3 \
|
||||
@ -115,7 +115,8 @@ MLINKS+= curses_addch.3 addch.3 curses_addchstr.3 addchnstr.3 \
|
||||
curses_tty.3 noqiflush.3 \
|
||||
curses_tty.3 noraw.3 curses_input.3 notimeout.3 \
|
||||
curses_window.3 overlay.3 curses_window.3 overwrite.3 \
|
||||
curses_color.3 pair_content.3 curses_pad.3 pnoutrefresh.3 \
|
||||
curses_color.3 pair_content.3 curses_echochar.3 pechochar.3 \
|
||||
curses_pad.3 pnoutrefresh.3 \
|
||||
curses_pad.3 prefresh.3 curses_print.3 printw.3 \
|
||||
curses_tty.3 qiflush.3 \
|
||||
curses_tty.3 raw.3 curses_refresh.3 refresh.3 \
|
||||
@ -144,6 +145,7 @@ MLINKS+= curses_addch.3 addch.3 curses_addchstr.3 addchnstr.3 \
|
||||
curses_clear.3 wclear.3 curses_clear.3 wclrtobot.3 \
|
||||
curses_clear.3 wclrtoeol.3 curses_attributes.3 wcolor_set.3 \
|
||||
curses_delch.3 wdelch.3 curses_deleteln.3 wdeleteln.3 \
|
||||
curses_echochar.3 wechochar.3 \
|
||||
curses_clear.3 werase.3 curses_input.3 wgetch.3 \
|
||||
curses_input.3 wgetnstr.3 curses_input.3 wgetstr.3 \
|
||||
curses_line.3 whline.3 curses_inch.3 winch.3 \
|
||||
|
@ -451,6 +451,13 @@ Creates an exact copy of the window
|
||||
.De
|
||||
Sets the terminal to echo characters.
|
||||
.Ds
|
||||
.Fn echochar "const chtype ch" \(dg
|
||||
.De
|
||||
Add the character
|
||||
.Vn ch
|
||||
on the window
|
||||
at the current \*y and immediately refresh the window.
|
||||
.Ds
|
||||
.Fn endwin ""
|
||||
.De
|
||||
Finish up window routines before exit.
|
||||
@ -1255,6 +1262,13 @@ become blank on
|
||||
.De
|
||||
Get the foreground and background colors of pair
|
||||
.Vn pair .
|
||||
.Ds
|
||||
.Fn pechochar "const chtype ch" \(dg
|
||||
.De
|
||||
Add the character
|
||||
.Vn ch
|
||||
on the pad
|
||||
at the current \*y and immediately refresh the pad.
|
||||
.Ds
|
||||
.Fn pnoutrefresh "WINDOW *pad" "int pbeg_y" "int pbeg_x" "int sbeg_y" "int sbeg_x" "int smax_y" "int smax_x"
|
||||
.De
|
||||
@ -1688,6 +1702,7 @@ specification of a window, rather than the use of the default
|
||||
.Fn wclrtoeol "WINDOW *win"
|
||||
.Fn wdelch "WINDOW *win"
|
||||
.Fn wdeleteln "WINDOW *win"
|
||||
.Fn wechochar "WINDOW *win" "chtype ch"
|
||||
.Fn werase "WINDOW *win"
|
||||
.Fn wgetch "WINDOW *win"
|
||||
.Fn wgetnstr "WINDOW *win" "char *str" "int len"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curses.h,v 1.85 2004/03/23 21:35:29 jdc Exp $ */
|
||||
/* $NetBSD: curses.h,v 1.86 2004/03/28 08:58:37 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -338,6 +338,7 @@ extern int ESCDELAY; /* Delay between keys in esc seq's. */
|
||||
#define color_set(c, o) wcolor_set(stdscr, c, o)
|
||||
#define delch() wdelch(stdscr)
|
||||
#define deleteln() wdeleteln(stdscr)
|
||||
#define echochar(c) wechochar(stdscr, c)
|
||||
#define erase() werase(stdscr)
|
||||
#define getch() wgetch(stdscr)
|
||||
#define getnstr(s, n) wgetnstr(stdscr, s, n)
|
||||
@ -442,6 +443,7 @@ int clrtoeol(void);
|
||||
int color_set(short, void *);
|
||||
int delch(void);
|
||||
int deleteln(void);
|
||||
int echochar(const chtype);
|
||||
int erase(void);
|
||||
int getch(void);
|
||||
int getnstr(char *, int);
|
||||
@ -600,6 +602,7 @@ int notimeout(WINDOW *, bool);
|
||||
int overlay(const WINDOW *, WINDOW *);
|
||||
int overwrite(const WINDOW *, WINDOW *);
|
||||
int pair_content(short, short *, short *);
|
||||
int pechochar(WINDOW *, const chtype);
|
||||
int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
|
||||
int prefresh(WINDOW *, int, int, int, int, int, int);
|
||||
int printw(const char *, ...)
|
||||
@ -653,6 +656,7 @@ int wclrtoeol(WINDOW *);
|
||||
int wcolor_set(WINDOW *, short, void *);
|
||||
int wdelch(WINDOW *);
|
||||
int wdeleteln(WINDOW *);
|
||||
int wechochar(WINDOW *, const chtype);
|
||||
int werase(WINDOW *);
|
||||
int wgetch(WINDOW *);
|
||||
int wgetnstr(WINDOW *, char *, int);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curses_private.h,v 1.35 2004/03/22 18:57:38 jdc Exp $ */
|
||||
/* $NetBSD: curses_private.h,v 1.36 2004/03/28 08:58:37 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998-2000 Brett Lymn
|
||||
@ -124,6 +124,9 @@ struct __window { /* Window structure. */
|
||||
attr_t battr; /* Background attributes */
|
||||
int scr_t, scr_b; /* Scrolling region top, bottom */
|
||||
SCREEN *screen; /* Screen for this window */
|
||||
int pbegy, pbegx,
|
||||
sbegy, sbegx,
|
||||
smaxy, smaxx; /* Saved prefresh() values */
|
||||
};
|
||||
|
||||
/* Set of attributes unset by 'me' - 'mb', 'md', 'mh', 'mk', 'mp' and 'mr'. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: newwin.c,v 1.41 2003/08/07 16:44:22 agc Exp $ */
|
||||
/* $NetBSD: newwin.c,v 1.42 2004/03/28 08:58:37 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: newwin.c,v 1.41 2003/08/07 16:44:22 agc Exp $");
|
||||
__RCSID("$NetBSD: newwin.c,v 1.42 2004/03/28 08:58:37 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -348,9 +348,15 @@ __makenew(SCREEN *screen, int nlines, int ncols, int by, int bx, int sub,
|
||||
win->battr = 0;
|
||||
win->scr_t = 0;
|
||||
win->scr_b = win->maxy - 1;
|
||||
if (ispad)
|
||||
if (ispad) {
|
||||
win->flags |= __ISPAD;
|
||||
else
|
||||
win->pbegy = 0;
|
||||
win->pbegx = 0;
|
||||
win->sbegy = 0;
|
||||
win->sbegx = 0;
|
||||
win->smaxy = 0;
|
||||
win->smaxx = 0;
|
||||
} else
|
||||
__swflags(win);
|
||||
#ifdef DEBUG
|
||||
__CTRACE("makenew: win->wattr = %08x\n", win->wattr);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: refresh.c,v 1.58 2003/08/07 16:44:23 agc Exp $ */
|
||||
/* $NetBSD: refresh.c,v 1.59 2004/03/28 08:58:37 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: refresh.c,v 1.58 2003/08/07 16:44:23 agc Exp $");
|
||||
__RCSID("$NetBSD: refresh.c,v 1.59 2004/03/28 08:58:37 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -340,6 +340,13 @@ prefresh(WINDOW *pad, int pbegy, int pbegx, int sbegy, int sbegx,
|
||||
#ifdef DEBUG
|
||||
__CTRACE("prefresh: pad %p, flags 0x%08x\n", pad, pad->flags);
|
||||
#endif
|
||||
/* Retain values in case pechochar() is called. */
|
||||
pad->pbegy = pbegy;
|
||||
pad->pbegx = pbegx;
|
||||
pad->sbegy = sbegy;
|
||||
pad->sbegx = sbegx;
|
||||
pad->smaxy = smaxy;
|
||||
pad->smaxx = smaxx;
|
||||
|
||||
/* Use pnoutrefresh() to avoid duplicating code here */
|
||||
retval = pnoutrefresh(pad, pbegy, pbegx, sbegy, sbegx, smaxy, smaxx);
|
||||
|
Loading…
Reference in New Issue
Block a user