1*39c04858Srin /* $NetBSD: version.c,v 1.4 2021/09/06 02:50:43 rin Exp $ */
2c977d4cfSroy
3c977d4cfSroy /*-
4c977d4cfSroy * Copyright (c) 2019 The NetBSD Foundation, Inc.
5c977d4cfSroy * All rights reserved.
6c977d4cfSroy *
7c977d4cfSroy * This code is derived from software contributed to The NetBSD Foundation
8c977d4cfSroy * by Roy Marples.
9c977d4cfSroy *
10c977d4cfSroy * Redistribution and use in source and binary forms, with or without
11c977d4cfSroy * modification, are permitted provided that the following conditions
12c977d4cfSroy * are met:
13c977d4cfSroy * 1. Redistributions of source code must retain the above copyright
14c977d4cfSroy * notice, this list of conditions and the following disclaimer.
15c977d4cfSroy * 2. Redistributions in binary form must reproduce the above copyright
16c977d4cfSroy * notice, this list of conditions and the following disclaimer in the
17c977d4cfSroy * documentation and/or other materials provided with the distribution.
18c977d4cfSroy *
19c977d4cfSroy * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20c977d4cfSroy * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21c977d4cfSroy * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22c977d4cfSroy * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23c977d4cfSroy * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24c977d4cfSroy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25c977d4cfSroy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26c977d4cfSroy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27c977d4cfSroy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28c977d4cfSroy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29c977d4cfSroy * POSSIBILITY OF SUCH DAMAGE.
30c977d4cfSroy */
31c977d4cfSroy
32c977d4cfSroy #include <sys/cdefs.h>
33c977d4cfSroy #ifndef lint
34*39c04858Srin __RCSID("$NetBSD: version.c,v 1.4 2021/09/06 02:50:43 rin Exp $");
35c977d4cfSroy #endif
36c977d4cfSroy
37c977d4cfSroy #include "curses.h"
38c977d4cfSroy
39cc96515fSroy #ifndef CURSES_VERSION
40cc96515fSroy /*
41cc96515fSroy * Bikeshed about what the version should be, if any:
42cc96515fSroy * https://mail-index.netbsd.org/tech-userlevel/2019/09/02/msg012101.html
43cc96515fSroy * This is the end result and should at least provide some amusement :)
44cc96515fSroy */
45cc96515fSroy #define CURSES_VERSION "believe in unicorns"
46cc96515fSroy #endif
47cc96515fSroy
48cc96515fSroy #ifdef CURSES_VERSION
49cc96515fSroy /*
50cc96515fSroy * Any version given should be braced to give some indication it's not
51cc96515fSroy * really a version recognised by NetBSD.
52cc96515fSroy * It should also have some product branding to indicate from whence
53cc96515fSroy * if came. For example, if FrobozzCo packaged it:
54cc96515fSroy * CFLAGS+= -DCURSES_VERSION="\"FrobozzCo 1.2.3\""
55cc96515fSroy */
56cc96515fSroy #define _CURSES_VERSION " (" CURSES_VERSION ")"
57cc96515fSroy #else
58cc96515fSroy #define _CURSES_VERSION
59cc96515fSroy #endif
60cc96515fSroy
61c977d4cfSroy const char *
curses_version(void)62*39c04858Srin curses_version(void)
63c977d4cfSroy {
64c977d4cfSroy
65cc96515fSroy return "NetBSD-Curses" _CURSES_VERSION;
66c977d4cfSroy }
67