From 2dd40f4b6cf00c2b528b64f06816d954b49b4494 Mon Sep 17 00:00:00 2001 From: jdc Date: Thu, 4 Dec 2003 21:24:36 +0000 Subject: [PATCH] Make nodelay() return an int. Now conforms to the Single Unix Specification. Fixes PR lib/23531 by usa at garbagecollect dot jp. --- lib/libcurses/curses.h | 4 ++-- lib/libcurses/nodelay.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h index 7dc517b1b5cd..8230966f1e4d 100644 --- a/lib/libcurses/curses.h +++ b/lib/libcurses/curses.h @@ -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); diff --git a/lib/libcurses/nodelay.c b/lib/libcurses/nodelay.c index 7108558a7503..12748a50555d 100644 --- a/lib/libcurses/nodelay.c +++ b/lib/libcurses/nodelay.c @@ -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 #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); }