Index: Makefile =================================================================== RCS file: /cvsroot/src/lib/libcurses/Makefile,v retrieving revision 1.85 diff -u -r1.85 Makefile --- Makefile 10 Jun 2018 17:55:11 -0000 1.85 +++ Makefile 29 Sep 2018 17:35:17 -0000 @@ -24,7 +24,7 @@ mvwin.c newwin.c nodelay.c notimeout.c overlay.c overwrite.c pause.c \ printw.c putchar.c refresh.c resize.c ripoffline.c scanw.c screen.c \ scroll.c scrollok.c setterm.c slk.c standout.c syncok.c timeout.c \ - toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c + toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c version.c MAN= curses.3 curses_addch.3 curses_addchstr.3 curses_addstr.3 \ curses_attributes.3 curses_background.3 curses_border.3 \ Index: curses.h =================================================================== RCS file: /cvsroot/src/lib/libcurses/curses.h,v retrieving revision 1.121 diff -u -r1.121 curses.h --- curses.h 24 Jan 2017 17:27:30 -0000 1.121 +++ curses.h 29 Sep 2018 17:35:17 -0000 @@ -980,6 +980,9 @@ bool is_leaveok(const WINDOW *); bool is_pad(const WINDOW *); +/* ncurses misc */ +char *curses_version(void); + /* Private functions that are needed for user programs prototypes. */ int __cputchar(int); int __waddbytes(WINDOW *, const char *, int, attr_t); Index: version.c =================================================================== RCS file: version.c diff -N version.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ version.c 29 Sep 2018 17:35:17 -0000 @@ -0,0 +1,46 @@ +/* $NetBSD$ */ + +/*- + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + +#include +#ifndef lint +__RCSID("$NetBSD$"); +#endif /* not lint */ + +#include "curses.h" + +/* + * curses_version -- + * Return a string of characters with curses version. + */ +char * +curses_version(void) +{ + + return "NetBSD curses"; +}