Regenerate headers and source files
Commands used:
./configure --with-terminfo-dirs=/system_ext/etc/terminfo --with-default-terminfo-dir=$PWD/lib/terminfo
pushd misc ; sh run_tic.sh ; popd
./configure --enable-tcap-names --with-terminfo-dirs=/system_ext/etc/terminfo --with-default-terminfo-dir=/system_ext/etc/terminfo
make -j
for f in `find lib/terminfo -type l`; do cp $f $f.tmp; mv $f.tmp $f; done
Change-Id: I3f94b3a76ab18184638f52fbb5bd760996794f9a
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/c++/Makefile b/c++/Makefile
new file mode 100644
index 0000000..8c132ee
--- /dev/null
+++ b/c++/Makefile
@@ -0,0 +1,606 @@
+# $Id: Makefile.in,v 1.133 2021/07/03 18:53:57 tom Exp $
+##############################################################################
+# Copyright 2018-2020,2021 Thomas E. Dickey #
+# Copyright 1998-2015,2016 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Simple makefile for c++ window class demo
+
+# turn off _all_ suffix rules; we'll generate our own
+.SUFFIXES:
+
+SHELL = /bin/sh
+
+
+CF_MFLAGS =
+
+x =
+o = .o
+
+MODEL = ../objects
+DESTDIR =
+top_srcdir = ..
+srcdir = .
+prefix = /usr
+exec_prefix = ${prefix}
+bindir = ${exec_prefix}/bin
+libdir = ${exec_prefix}/lib
+includedir = ${prefix}/include
+includesubdir =
+
+INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
+
+PACKAGE = ncursesw
+
+LIBTOOL =
+LIBTOOL_OPTS =
+LIBTOOL_CLEAN =
+LIBTOOL_COMPILE =
+LIBTOOL_LINK = ${CC}
+LIBTOOL_INSTALL =
+LIBTOOL_UNINSTALL =
+LIBTOOL_VERSION = -version-number
+LT_UNDEF =
+
+INSTALL = /usr/bin/install -c
+INSTALL_LIB = $(INSTALL) -m 644 -p
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_OPT_P = -p
+
+AR = ar
+ARFLAGS = -curvU
+AWK = mawk
+LD = ld
+LN_S = ln -s -f
+
+CXX_AR = $(AR)
+CXX_ARFLAGS = $(ARFLAGS)
+RANLIB = ranlib
+
+CXX = /usr/bin/g++
+CPP = /usr/bin/g++ -E
+CXXFLAGS = -O2
+CXXLIBS =
+
+INCDIR = ../include
+CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ -I. -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG
+
+CTAGS = ctags
+ETAGS = etags
+
+CC = ${CXX}
+CCFLAGS = $(CPPFLAGS) $(CXXFLAGS)
+
+CFLAGS_LIBTOOL = $(CCFLAGS)
+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
+CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC -g -DTRACE
+CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
+CFLAGS_SHARED = $(CCFLAGS) -fPIC
+
+CFLAGS_DEFAULT = $(CFLAGS_NORMAL)
+
+NCURSES_MAJOR = 6
+NCURSES_MINOR = 5
+REL_VERSION = 6.5
+ABI_VERSION = 6
+
+LOCAL_LIBDIR = /home/micky387/Omni/external/libncurses/lib
+
+LINK = $(LIBTOOL_LINK)
+SHLIB_DIRS = -L../lib
+SHLIB_LIST = $(SHLIB_DIRS) \
+ -lformw \
+ -lmenuw \
+ -lpanelw \
+ -lncursesw
+
+LIBROOT = ncurses++
+
+LIBNAME_LIBTOOL = lib$(LIBROOT)w.la
+LIBNAME_NORMAL = lib$(LIBROOT)w.a
+LIBNAME = lib$(LIBROOT)w.a
+
+LIBRARIES = ../lib/libncurses++w.a ../lib/libncurses++w_g.a
+
+LINT =
+LINT_OPTS =
+LINT_LIBS = -lncurses
+
+LINK_FLAGS = -L../lib -l$(LIBROOT)w
+RPATH_LIST = ${libdir}
+MK_SHARED_LIB = ${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@ .${REL_VERSION}`.${ABI_VERSION},-stats,-lc -o $@
+
+LINK_LIBTOOL = -L../lib $(LIBRARIES)
+LINK_NORMAL = $(LINK_FLAGS)
+LINK_DEBUG = $(LINK_FLAGS)
+LINK_PROFILE = $(LINK_FLAGS)
+LINK_SHARED = $(LINK_FLAGS)
+
+# flags for test-programs
+TEST_LIBS = -lutil
+TEST_ARGS = -L../lib -lformw -lmenuw -lpanelw -lncursesw
+TEST_LDFLAGS = $(TEST_ARGS) \
+ $(TEST_LIBS) $(CXXLIBS)
+
+LDFLAGS_LIBTOOL = $(TEST_LDFLAGS) $(CFLAGS_LIBTOOL)
+LDFLAGS_NORMAL = $(TEST_LDFLAGS) $(CFLAGS_NORMAL)
+LDFLAGS_DEBUG = $(TEST_LDFLAGS) $(CFLAGS_DEBUG)
+LDFLAGS_PROFILE = $(TEST_LDFLAGS) $(CFLAGS_PROFILE)
+LDFLAGS_SHARED = $(TEST_LDFLAGS) $(CFLAGS_SHARED)
+
+LDFLAGS_DEFAULT = $(LINK_NORMAL) $(LDFLAGS_NORMAL)
+
+# flags for library built by this makefile
+LDFLAGS = $(TEST_ARGS) \
+ $(TEST_LIBS) $(CXXLIBS)
+
+AUTO_SRC = \
+ etip.h
+
+################################################################################
+
+.PHONY : all
+.PHONY : check
+.PHONY : clean
+.PHONY : depend
+.PHONY : distclean
+.PHONY : install
+.PHONY : install.libs
+.PHONY : libs
+.PHONY : mostlyclean
+.PHONY : realclean
+.PHONY : sources
+.PHONY : uninstall
+.PHONY : uninstall.libs
+
+all \
+libs :: $(AUTO_SRC) $(LIBRARIES)
+
+all :: demo$x
+
+depend :
+
+sources : $(AUTO_SRC)
+
+tags:
+ $(CTAGS) *.[h] *.cc
+
+$(DESTDIR)$(libdir) :
+ mkdir -p $@
+
+mostlyclean ::
+ -rm -f core tags TAGS *~ *.bak *.i *.ii *.ln *.atac trace
+
+clean :: mostlyclean
+ -$(SHELL) -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
+ -rm -rf $(MODEL)/SunWS_cache
+ -$(LIBTOOL_CLEAN) rm -f demo$x $(AUTO_SRC) $(LIBRARIES) $(OBJS_DEMO)
+ -rm -rf .libs *.dSYM
+
+distclean :: clean
+ -rm -f Makefile
+
+realclean :: distclean
+
+###############################################################################
+
+HEADER_DEPS = \
+ etip.h \
+ ../include/curses.h \
+ ../include/eti.h \
+ ../include/form.h \
+ ../include/menu.h \
+ ../include/ncurses_cfg.h \
+ ../include/ncurses_def.h \
+ ../include/ncurses_dll.h \
+ ../include/panel.h \
+ ../include/unctrl.h \
+ $(INCDIR)/nc_string.h \
+ $(srcdir)/cursesp.h \
+ $(srcdir)/cursesw.h \
+ $(srcdir)/cursslk.h \
+ $(srcdir)/internal.h
+
+cursesw_h = $(srcdir)/cursesw.h \
+ $(HEADER_DEPS)
+
+cursesp_h = $(srcdir)/cursesp.h \
+ $(cursesw_h)
+
+cursesf_h = $(srcdir)/cursesf.h \
+ $(cursesp_h)
+
+cursesm_h = $(srcdir)/cursesm.h \
+ $(cursesp_h)
+
+cursslk_h = $(srcdir)/cursslk.h \
+ $(cursesw_h)
+
+cursesapp_h = $(srcdir)/cursesapp.h \
+ $(cursslk_h)
+
+$(INCDIR)/form.h :
+ ( cd ../form && $(MAKE) $@ )
+
+$(INCDIR)/menu.h :
+ ( cd ../menu && $(MAKE) $@ )
+
+$(INCDIR)/panel.h :
+ ( cd ../panel && $(MAKE) $@ )
+
+###############################################################################
+
+OBJS_DEMO = $(MODEL)/demo$o
+
+$(MODEL)/demo$o : $(srcdir)/demo.cc \
+ $(HEADER_DEPS) \
+ $(cursesf_h) \
+ $(cursesm_h) \
+ $(cursesapp_h)
+ @echo 'compiling demo (obj_s)'
+ @( cd $(MODEL) && $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEFAULT) -c $(top_srcdir)/c++/demo.cc -o $@ )
+
+demo$x: $(OBJS_DEMO) \
+ $(LIBRARIES) \
+ ../lib/libformw.a ../lib/libmenuw.a ../lib/libpanelw.a ../lib/libncursesw.a
+ $(LINK) -o $@ $(OBJS_DEMO) $(LDFLAGS_DEFAULT)
+
+etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
+ cp $(srcdir)/etip.h.in $@
+ $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
+
+# Verify that each header-file can be compiled without including another.
+check ::
+ @$(SHELL) -c "for header in *.h;\
+ do \
+ [ \$${header} = etip.h ] && continue; \
+ echo \"** testing \$${header}\" ; \
+ echo \"#include <\$${header}>\" >headers.cc; \
+ echo \"int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }\" >>headers.cc; \
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) headers.cc; \
+ done"
+ -@rm -f headers.*
+
+###############################################################################
+# The remainder of this file is automatically generated during configuration
+###############################################################################
+
+# Generated by CF_LIB_RULES
+resulting.map:
+ mawk 'BEGIN { skip = 1; last=""; } /deprecated in ABI6/ { next; }{ sub("NCURSES([WT]+)?", "&6"); } { if ( last != "" && ( skip == 0 || $$0 !~ /}/ ) ) { print last; } skip = 0; last = $$0; } END { print last; }' < "" >$@
+
+distclean::
+ rm -f resulting.map
+
+# generated by mk-0th.awk
+# libname: c++w
+# subsets: ticlib+termlib+ext_tinfo+base+widechar+ext_funcs
+
+.SUFFIXES: .c .cc .h .i .ii
+.c.i :
+ $(CPP) $(CPPFLAGS) $< >$@
+.cc.ii :
+ $(CPP) $(CPPFLAGS) $< >$@
+.h.i :
+ $(CPP) $(CPPFLAGS) $< >$@
+
+C_SRC = \
+ $(srcdir)/cursesf.cc \
+ $(srcdir)/cursesm.cc \
+ $(srcdir)/cursesw.cc \
+ $(srcdir)/cursespad.cc \
+ $(srcdir)/cursesp.cc \
+ $(srcdir)/cursslk.cc \
+ $(srcdir)/cursesapp.cc \
+ $(srcdir)/cursesmain.cc
+
+clean ::
+ rm -f llib-lc++w.*
+
+realclean ::
+ rm -f llib-lc++w
+
+llib-lc++w : $(C_SRC)
+ cproto -a -l -DNCURSES_ENABLE_STDBOOL_H=0 -DLINT $(CPPFLAGS) $(C_SRC) >$@
+
+lintlib ::
+ sh $(srcdir)/../misc/makellib c++w $(CPPFLAGS)
+
+lint ::
+ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(C_SRC) $(LINT_LIBS)
+
+# generated by mk-1st.awk (subset=ticlib+termlib+ext_tinfo+base+widechar+ext_funcs)
+# name: ncurses++w
+# traces: DEBUG
+# MODEL: NORMAL
+# CXX_MODEL: NORMAL
+# LIB_SUFFIX: w
+# USE_LIB_SUFFIX: w
+# model: objects
+# prefix: lib
+# suffix: .a
+# subset: ticlib+termlib+ext_tinfo+base+widechar+ext_funcs
+# driver: no
+# ShlibVer: rel
+# ShlibVerInfix: no
+# SymLink: ln -s -f
+# TermlibRoot: ncursesw
+# TermlibSuffix: .a
+# ReLink: no
+# ReRanlib: no
+# DoLinks: yes
+# rmSoLocs: no
+# ldconfig: /usr/sbin/ldconfig
+# make_phony: yes
+# overwrite: yes
+# depend: ../include/ncurses_cfg.h
+# host: x86_64-pc-linux-gnu
+# libtool_version: -version-number
+
+NORMAL_OBJS = \
+ ../objects/cursesf$o \
+ ../objects/cursesm$o \
+ ../objects/cursesw$o \
+ ../objects/cursespad$o \
+ ../objects/cursesp$o \
+ ../objects/cursslk$o \
+ ../objects/cursesapp$o \
+ ../objects/cursesmain$o
+
+$(NORMAL_OBJS) : ../include/ncurses_cfg.h
+
+../lib/libncurses++w.a : $(NORMAL_OBJS)
+ @sleep 1
+ $(CXX_AR) $(CXX_ARFLAGS) $@ $?
+ $(RANLIB) $@
+
+install \
+install.libs \
+install.ncurses++w :: $(DESTDIR)$(libdir) ../lib/libncurses++w.a
+ @echo installing ../lib/libncurses++w.a as $(DESTDIR)$(libdir)/libncurses++w.a
+ $(INSTALL_DATA) ../lib/libncurses++w.a $(DESTDIR)$(libdir)/libncurses++w.a
+
+uninstall \
+uninstall.libs \
+uninstall.ncurses++w ::
+ @echo uninstalling $(DESTDIR)$(libdir)/libncurses++w.a
+ -@rm -f $(DESTDIR)$(libdir)/libncurses++w.a
+
+clean ::
+ -rm -f ../lib/libncurses++w.a
+
+mostlyclean::
+ -rm -f $(NORMAL_OBJS)
+
+# generated by mk-2nd.awk
+# model: objects
+# MODEL: NORMAL
+# echo: yes
+# subset: ticlib+termlib+ext_tinfo+base+widechar+ext_funcs
+# crenames: yes
+# cxxrenames: yes
+# traces: DEBUG
+# srcdir: .
+
+../objects/cursesf$o : $(srcdir)/cursesf.cc \
+ $(internal_h) \
+ $(cursesf_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursesf.cc -o ../objects/cursesf$o
+
+../objects/cursesm$o : $(srcdir)/cursesm.cc \
+ $(internal_h) \
+ $(cursesm_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursesm.cc -o ../objects/cursesm$o
+
+../objects/cursesw$o : $(srcdir)/cursesw.cc \
+ $(internal_h) \
+ $(cursesw_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursesw.cc -o ../objects/cursesw$o
+
+../objects/cursespad$o : $(srcdir)/cursespad.cc \
+ $(internal_h) \
+ $(cursesw_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursespad.cc -o ../objects/cursespad$o
+
+../objects/cursesp$o : $(srcdir)/cursesp.cc \
+ $(internal_h) \
+ $(cursesp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursesp.cc -o ../objects/cursesp$o
+
+../objects/cursslk$o : $(srcdir)/cursslk.cc \
+ $(internal_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursslk.cc -o ../objects/cursslk$o
+
+../objects/cursesapp$o : $(srcdir)/cursesapp.cc \
+ $(internal_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursesapp.cc -o ../objects/cursesapp$o
+
+../objects/cursesmain$o : $(srcdir)/cursesmain.cc \
+ $(internal_h) \
+ $(cursesapp_h) \
+ $(INCDIR)/nc_alloc.h
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_NORMAL) -c ../c++/cursesmain.cc -o ../objects/cursesmain$o
+
+
+# generated by mk-1st.awk (subset=ticlib+termlib+ext_tinfo+base+widechar+ext_funcs)
+# name: ncurses++w
+# traces: DEBUG
+# MODEL: DEBUG
+# CXX_MODEL: DEBUG
+# LIB_SUFFIX: w
+# USE_LIB_SUFFIX: w
+# model: obj_g
+# prefix: lib
+# suffix: _g.a
+# subset: ticlib+termlib+ext_tinfo+base+widechar+ext_funcs
+# driver: no
+# ShlibVer: rel
+# ShlibVerInfix: no
+# SymLink: ln -s -f
+# TermlibRoot: ncursesw
+# TermlibSuffix: .a
+# ReLink: no
+# ReRanlib: no
+# DoLinks: yes
+# rmSoLocs: no
+# ldconfig: /usr/sbin/ldconfig
+# make_phony: yes
+# overwrite: yes
+# depend: ../include/ncurses_cfg.h
+# host: x86_64-pc-linux-gnu
+# libtool_version: -version-number
+
+DEBUG_OBJS = \
+ ../obj_g/cursesf$o \
+ ../obj_g/cursesm$o \
+ ../obj_g/cursesw$o \
+ ../obj_g/cursespad$o \
+ ../obj_g/cursesp$o \
+ ../obj_g/cursslk$o \
+ ../obj_g/cursesapp$o \
+ ../obj_g/cursesmain$o
+
+$(DEBUG_OBJS) : ../include/ncurses_cfg.h
+
+../lib/libncurses++w_g.a : $(DEBUG_OBJS)
+ @sleep 1
+ $(CXX_AR) $(CXX_ARFLAGS) $@ $?
+ $(RANLIB) $@
+
+install \
+install.libs \
+install.ncurses++w :: $(DESTDIR)$(libdir) ../lib/libncurses++w_g.a
+ @echo installing ../lib/libncurses++w_g.a as $(DESTDIR)$(libdir)/libncurses++w_g.a
+ $(INSTALL_DATA) ../lib/libncurses++w_g.a $(DESTDIR)$(libdir)/libncurses++w_g.a
+
+uninstall \
+uninstall.libs \
+uninstall.ncurses++w ::
+ @echo uninstalling $(DESTDIR)$(libdir)/libncurses++w_g.a
+ -@rm -f $(DESTDIR)$(libdir)/libncurses++w_g.a
+
+clean ::
+ -rm -f ../lib/libncurses++w_g.a
+
+mostlyclean::
+ -rm -f $(DEBUG_OBJS)
+
+# generated by mk-2nd.awk
+# model: obj_g
+# MODEL: DEBUG
+# echo: yes
+# subset: ticlib+termlib+ext_tinfo+base+widechar+ext_funcs
+# crenames: yes
+# cxxrenames: yes
+# traces: DEBUG
+# srcdir: .
+
+../obj_g/cursesf$o : $(srcdir)/cursesf.cc \
+ $(internal_h) \
+ $(cursesf_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursesf.cc -o ../obj_g/cursesf$o
+
+../obj_g/cursesm$o : $(srcdir)/cursesm.cc \
+ $(internal_h) \
+ $(cursesm_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursesm.cc -o ../obj_g/cursesm$o
+
+../obj_g/cursesw$o : $(srcdir)/cursesw.cc \
+ $(internal_h) \
+ $(cursesw_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursesw.cc -o ../obj_g/cursesw$o
+
+../obj_g/cursespad$o : $(srcdir)/cursespad.cc \
+ $(internal_h) \
+ $(cursesw_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursespad.cc -o ../obj_g/cursespad$o
+
+../obj_g/cursesp$o : $(srcdir)/cursesp.cc \
+ $(internal_h) \
+ $(cursesp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursesp.cc -o ../obj_g/cursesp$o
+
+../obj_g/cursslk$o : $(srcdir)/cursslk.cc \
+ $(internal_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursslk.cc -o ../obj_g/cursslk$o
+
+../obj_g/cursesapp$o : $(srcdir)/cursesapp.cc \
+ $(internal_h) \
+ $(cursesapp_h)
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursesapp.cc -o ../obj_g/cursesapp$o
+
+../obj_g/cursesmain$o : $(srcdir)/cursesmain.cc \
+ $(internal_h) \
+ $(cursesapp_h) \
+ $(INCDIR)/nc_alloc.h
+ $(LIBTOOL_COMPILE) $(CXX) $(CFLAGS_DEBUG) -c ../c++/cursesmain.cc -o ../obj_g/cursesmain$o
+
+
+# generated by mk-hdr.awk
+# subset: ticlib+termlib+ext_tinfo+base+widechar+ext_funcs
+# compat: yes
+
+${INCLUDEDIR} :
+ mkdir -p $@
+
+install \
+install.libs \
+install.includes :: ${AUTO_SRC} ${INCLUDEDIR} \
+ $(srcdir)/cursesapp.h \
+ $(srcdir)/cursesf.h \
+ $(srcdir)/cursesm.h \
+ $(srcdir)/cursesp.h \
+ $(srcdir)/cursesw.h \
+ $(srcdir)/cursslk.h \
+ etip.h
+ @ (cd ${INCLUDEDIR} && rm -f cursesapp.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/cursesapp.h
+ @ (cd ${INCLUDEDIR} && rm -f cursesf.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/cursesf.h
+ @ (cd ${INCLUDEDIR} && rm -f cursesm.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/cursesm.h
+ @ (cd ${INCLUDEDIR} && rm -f cursesp.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/cursesp.h
+ @ (cd ${INCLUDEDIR} && rm -f cursesw.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/cursesw.h
+ @ (cd ${INCLUDEDIR} && rm -f cursslk.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/cursslk.h
+ @ (cd ${INCLUDEDIR} && rm -f etip.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} etip.h
+
+uninstall \
+uninstall.libs \
+uninstall.includes ::
+ -@ (cd ${INCLUDEDIR} && rm -f cursesapp.h)
+ -@ (cd ${INCLUDEDIR} && rm -f cursesf.h)
+ -@ (cd ${INCLUDEDIR} && rm -f cursesm.h)
+ -@ (cd ${INCLUDEDIR} && rm -f cursesp.h)
+ -@ (cd ${INCLUDEDIR} && rm -f cursesw.h)
+ -@ (cd ${INCLUDEDIR} && rm -f cursslk.h)
+ -@ (cd ${INCLUDEDIR} && rm -f etip.h)
diff --git a/c++/demo b/c++/demo
new file mode 100755
index 0000000..4a6ec00
--- /dev/null
+++ b/c++/demo
Binary files differ
diff --git a/c++/etip.h b/c++/etip.h
new file mode 100644
index 0000000..9244afd
--- /dev/null
+++ b/c++/etip.h
@@ -0,0 +1,406 @@
+// * This makes emacs happy -*-Mode: C++;-*-
+/****************************************************************************
+ * Copyright 2018-2021,2022 Thomas E. Dickey *
+ * Copyright 1998-2012,2017 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Juergen Pfeifer, 1997 *
+ ****************************************************************************/
+
+// $Id: etip.h.in,v 1.50 2022/08/20 20:50:00 tom Exp $
+
+#ifndef NCURSES_ETIP_H_incl
+#define NCURSES_ETIP_H_incl 1
+
+// These are substituted at configure/build time
+#ifndef HAVE_BUILTIN_H
+#define HAVE_BUILTIN_H 0
+#endif
+
+#ifndef HAVE_GXX_BUILTIN_H
+#define HAVE_GXX_BUILTIN_H 0
+#endif
+
+#ifndef HAVE_GPP_BUILTIN_H
+#define HAVE_GPP_BUILTIN_H 0
+#endif
+
+#ifndef HAVE_IOSTREAM
+#define HAVE_IOSTREAM 1
+#endif
+
+#ifndef HAVE_TYPEINFO
+#define HAVE_TYPEINFO 1
+#endif
+
+#ifndef HAVE_VALUES_H
+#define HAVE_VALUES_H 0
+#endif
+
+#ifndef ETIP_NEEDS_MATH_H
+#define ETIP_NEEDS_MATH_H 0
+#endif
+
+#ifndef ETIP_NEEDS_MATH_EXCEPTION
+#define ETIP_NEEDS_MATH_EXCEPTION 0
+#endif
+
+#ifndef CPP_HAS_OVERRIDE
+#define CPP_HAS_OVERRIDE 0
+#endif
+
+#ifndef CPP_HAS_PARAM_INIT
+#define CPP_HAS_PARAM_INIT 0
+#endif
+
+#ifndef CPP_HAS_STATIC_CAST
+#define CPP_HAS_STATIC_CAST 1
+#endif
+
+#ifndef IOSTREAM_NAMESPACE
+#define IOSTREAM_NAMESPACE 1
+#endif
+
+#ifdef __GNUG__
+# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
+# if HAVE_TYPEINFO
+# include <typeinfo>
+# endif
+# endif
+#endif
+
+#if defined(__GNUG__)
+# if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
+# if ETIP_NEEDS_MATH_H
+# if ETIP_NEEDS_MATH_EXCEPTION
+# undef exception
+# define exception math_exception
+# endif
+# include <math.h>
+# endif
+# undef exception
+# define exception builtin_exception
+# if HAVE_GPP_BUILTIN_H
+# include <gpp/builtin.h>
+# elif HAVE_GXX_BUILTIN_H
+# include <g++/builtin.h>
+# else
+# include <builtin.h>
+# endif
+# undef exception
+# endif
+#elif defined (__SUNPRO_CC)
+# include <generic.h>
+#endif
+
+#include <curses.h>
+
+extern "C" {
+#if HAVE_VALUES_H
+# include <values.h>
+#endif
+
+#include <assert.h>
+#include <eti.h>
+#include <errno.h>
+}
+
+// Language features
+#if CPP_HAS_OVERRIDE
+#define NCURSES_OVERRIDE override
+#else
+#define NCURSES_OVERRIDE /*nothing*/
+#endif
+
+#if CPP_HAS_PARAM_INIT
+#define NCURSES_PARAM_INIT(value) = value
+#else
+#define NCURSES_PARAM_INIT(value) /*nothing*/
+#endif
+
+#if CPP_HAS_STATIC_CAST
+#define STATIC_CAST(s) static_cast<s>
+#else
+#define STATIC_CAST(s) (s)
+#endif
+
+#ifndef NCURSES_CXX_IMPEXP
+#define NCURSES_CXX_IMPEXP /* nothing */
+#endif
+
+// Forward Declarations
+class NCURSES_CXX_IMPEXP NCursesPanel;
+class NCURSES_CXX_IMPEXP NCursesMenu;
+class NCURSES_CXX_IMPEXP NCursesForm;
+
+class NCURSES_CXX_IMPEXP NCursesException
+{
+public:
+ const char *message;
+ int errorno;
+
+ NCursesException (const char* msg, int err)
+ : message(msg), errorno (err)
+ {};
+
+ explicit NCursesException (const char* msg)
+ : message(msg), errorno (E_SYSTEM_ERROR)
+ {};
+
+ NCursesException& operator=(const NCursesException& rhs)
+ {
+ message = rhs.message;
+ errorno = rhs.errorno;
+ return *this;
+ }
+
+ NCursesException(const NCursesException& rhs)
+ : message(rhs.message), errorno(rhs.errorno)
+ {
+ }
+
+ virtual const char *classname() const {
+ return "NCursesWindow";
+ }
+
+ virtual ~NCursesException()
+ {
+ }
+};
+
+class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
+{
+public:
+ const NCursesPanel* p;
+
+ NCursesPanelException (const char *msg, int err) :
+ NCursesException (msg, err),
+ p (0)
+ {};
+
+ NCursesPanelException (const NCursesPanel* panel,
+ const char *msg,
+ int err) :
+ NCursesException (msg, err),
+ p (panel)
+ {};
+
+ explicit NCursesPanelException (int err) :
+ NCursesException ("panel library error", err),
+ p (0)
+ {};
+
+ NCursesPanelException (const NCursesPanel* panel,
+ int err) :
+ NCursesException ("panel library error", err),
+ p (panel)
+ {};
+
+ NCursesPanelException& operator=(const NCursesPanelException& rhs)
+ {
+ if (this != &rhs) {
+ NCursesException::operator=(rhs);
+ p = rhs.p;
+ }
+ return *this;
+ }
+
+ NCursesPanelException(const NCursesPanelException& rhs)
+ : NCursesException(rhs), p(rhs.p)
+ {
+ }
+
+ virtual const char *classname() const NCURSES_OVERRIDE {
+ return "NCursesPanel";
+ }
+
+ virtual ~NCursesPanelException()
+ {
+ }
+};
+
+class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
+{
+public:
+ const NCursesMenu* m;
+
+ NCursesMenuException (const char *msg, int err) :
+ NCursesException (msg, err),
+ m (0)
+ {};
+
+ NCursesMenuException (const NCursesMenu* menu,
+ const char *msg,
+ int err) :
+ NCursesException (msg, err),
+ m (menu)
+ {};
+
+ explicit NCursesMenuException (int err) :
+ NCursesException ("menu library error", err),
+ m (0)
+ {};
+
+ NCursesMenuException (const NCursesMenu* menu,
+ int err) :
+ NCursesException ("menu library error", err),
+ m (menu)
+ {};
+
+ NCursesMenuException& operator=(const NCursesMenuException& rhs)
+ {
+ if (this != &rhs) {
+ NCursesException::operator=(rhs);
+ m = rhs.m;
+ }
+ return *this;
+ }
+
+ NCursesMenuException(const NCursesMenuException& rhs)
+ : NCursesException(rhs), m(rhs.m)
+ {
+ }
+
+ virtual const char *classname() const NCURSES_OVERRIDE {
+ return "NCursesMenu";
+ }
+
+ virtual ~NCursesMenuException()
+ {
+ }
+};
+
+class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
+{
+public:
+ const NCursesForm* f;
+
+ NCursesFormException (const char *msg, int err) :
+ NCursesException (msg, err),
+ f (0)
+ {};
+
+ NCursesFormException (const NCursesForm* form,
+ const char *msg,
+ int err) :
+ NCursesException (msg, err),
+ f (form)
+ {};
+
+ explicit NCursesFormException (int err) :
+ NCursesException ("form library error", err),
+ f (0)
+ {};
+
+ NCursesFormException (const NCursesForm* form,
+ int err) :
+ NCursesException ("form library error", err),
+ f (form)
+ {};
+
+ NCursesFormException& operator=(const NCursesFormException& rhs)
+ {
+ if (this != &rhs) {
+ NCursesException::operator=(rhs);
+ f = rhs.f;
+ }
+ return *this;
+ }
+
+ NCursesFormException(const NCursesFormException& rhs)
+ : NCursesException(rhs), f(rhs.f)
+ {
+ }
+
+ virtual const char *classname() const NCURSES_OVERRIDE {
+ return "NCursesForm";
+ }
+
+ virtual ~NCursesFormException()
+ {
+ }
+};
+
+#if !((defined(__GNUG__) && defined(__EXCEPTIONS) && (__GNUG__ < 7)) || defined(__SUNPRO_CC))
+# if HAVE_IOSTREAM
+# include <iostream>
+# if IOSTREAM_NAMESPACE
+using std::cerr;
+using std::endl;
+# endif
+# else
+# include <iostream.h>
+# endif
+#endif
+
+inline void THROW(const NCursesException *e) {
+#if defined(__GNUG__) && defined(__EXCEPTIONS)
+# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
+ (*lib_error_handler)(e ? e->classname() : "", e ? e->message : "");
+# elif (__GNUG__ >= 7)
+ // g++ 7.0 warns about deprecation, but lacks the predefined symbols
+ ::endwin();
+ std::cerr << "Found a problem - goodbye" << std::endl;
+ exit(EXIT_FAILURE);
+# else
+# define CPP_HAS_TRY_CATCH 1
+# endif
+#elif defined(__SUNPRO_CC)
+# if !defined(__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT < 5)
+ genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
+# else
+# define CPP_HAS_TRY_CATCH 1
+# endif
+#else
+ if (e)
+ cerr << e->message << endl;
+ exit(0);
+#endif
+
+#ifndef CPP_HAS_TRY_CATCH
+#define CPP_HAS_TRY_CATCH 0
+#define NCURSES_CPP_TRY /* nothing */
+#define NCURSES_CPP_CATCH(e) if (false)
+#define THROWS(s) /* nothing */
+#define THROW2(s,t) /* nothing */
+#elif CPP_HAS_TRY_CATCH
+ throw *e;
+#define NCURSES_CPP_TRY try
+#define NCURSES_CPP_CATCH(e) catch(e)
+#if defined(__cpp_noexcept_function_type) && (__cpp_noexcept_function_type >= 201510)
+// C++17 deprecates the usage of throw().
+#define THROWS(s) /* nothing */
+#define THROW2(s,t) /* nothing */
+#else
+#define THROWS(s) throw(s)
+#define THROW2(s,t) throw(s,t)
+#endif
+#endif
+}
+
+#endif /* NCURSES_ETIP_H_incl */