Make nodelay() return an int.

Now conforms to the Single Unix Specification.
Fixes PR lib/23531 by usa at garbagecollect dot jp.
This commit is contained in:
jdc 2003-12-04 21:24:36 +00:00
parent ea73edd395
commit 2dd40f4b6c
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: curses.h,v 1.79 2003/10/05 10:13:02 jdc Exp $ */
/* $NetBSD: curses.h,v 1.80 2003/12/04 21:24:36 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -596,7 +596,7 @@ WINDOW *newwin(int, int, int, int);
int nl(void);
attr_t no_color_video(void);
int nocbreak(void);
void nodelay(WINDOW *, bool);
int nodelay(WINDOW *, bool);
int noecho(void);
int nonl(void);
void noqiflush(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nodelay.c,v 1.5 2001/06/13 10:45:58 wiz Exp $ */
/* $NetBSD: nodelay.c,v 1.6 2003/12/04 21:24:36 jdc Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn (blymn@baea.com.au, brett_lymn@yahoo.com)
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: nodelay.c,v 1.5 2001/06/13 10:45:58 wiz Exp $");
__RCSID("$NetBSD: nodelay.c,v 1.6 2003/12/04 21:24:36 jdc Exp $");
#endif /* not lint */
#include "curses.h"
@ -39,11 +39,12 @@ __RCSID("$NetBSD: nodelay.c,v 1.5 2001/06/13 10:45:58 wiz Exp $");
* Turn on and off blocking reads in getch for a
* given window.
*/
void
int
nodelay(WINDOW *win, bool bf)
{
if (bf)
win->delay = 0;
else
win->delay = -1;
return(OK);
}