lib/14813: Jason R. Thorpe: worm(6) no longer builds w/ new libcurses

Make baudrate a function, gc old variables, implement ospeed in terms of
baudrate, bump major number to 5, since we don't have __baset anymore.
This commit is contained in:
christos 2001-12-02 22:43:44 +00:00
parent 2a6842fe56
commit 7990d9579f
3 changed files with 18 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: curses.h,v 1.62 2001/12/02 09:14:21 blymn Exp $ */
/* $NetBSD: curses.h,v 1.63 2001/12/02 22:43:44 christos Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -76,10 +76,9 @@ typedef char bool;
#define _putchar(c) __cputchar(c)
/* Old-style terminal modes access. */
#define baudrate() (cfgetospeed(&__baset))
#define crmode() cbreak()
#define nocrmode() nocbreak()
#define ospeed (cfgetospeed(&__baset))
#define ospeed baudrate()
#endif /* _CURSES_PRIVATE */
/* Termcap capabilities. */
@ -426,8 +425,6 @@ extern chtype _acs_char[NUM_ACS];
extern WINDOW *curscr; /* Current screen. */
extern WINDOW *stdscr; /* Standard screen. */
extern struct termios __orig_termios; /* Terminal state before curses */
extern struct termios __baset; /* Our base terminal state */
extern int __tcaction; /* If terminal hardware set. */
extern int COLS; /* Columns on the screen. */
@ -613,6 +610,7 @@ __END_DECLS
/* Public function prototypes. */
__BEGIN_DECLS
int baudrate(void);
int beep(void);
int box(WINDOW *, chtype, chtype);
bool can_change_colors(void);

View File

@ -1,5 +1,5 @@
# $NetBSD: shlib_version,v 1.22 2001/12/02 09:14:23 blymn Exp $
# $NetBSD: shlib_version,v 1.23 2001/12/02 22:43:44 christos Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=4
minor=4
major=5
minor=0

View File

@ -1,4 +1,4 @@
/* $NetBSD: tty.c,v 1.25 2001/12/02 09:14:23 blymn Exp $ */
/* $NetBSD: tty.c,v 1.26 2001/12/02 22:43:44 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95";
#else
__RCSID("$NetBSD: tty.c,v 1.25 2001/12/02 09:14:23 blymn Exp $");
__RCSID("$NetBSD: tty.c,v 1.26 2001/12/02 22:43:44 christos Exp $");
#endif
#endif /* not lint */
@ -66,13 +66,6 @@ int __tcaction = 1; /* Ignore hardware settings. */
int __tcaction = 0;
#endif
/*struct termios __orig_termios, __baset;*/
/*int __endwin;
static struct termios cbreakt, rawt, *curt;
static int useraw;
static int ovmin = 1;
static int ovtime = 0;*/
#ifndef OXTABS
#ifdef XTABS /* SMI uses XTABS. */
#define OXTABS XTABS
@ -81,6 +74,16 @@ static int ovtime = 0;*/
#endif
#endif
/*
* baudrate --
* Return the current baudrate
*/
int
baudrate(void)
{
return cfgetospeed(&_cursesi_screen->baset);
}
/*
* gettmode --
* Do terminal type initialization.