aboutsummaryrefslogtreecommitdiff
path: root/Ada95/src
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-02-25 17:22:00 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-02-25 17:22:00 +0000
commitbf0ab54638a5ef969749f6ceae30e864f9556ea8 (patch)
tree11690c2184e55d37bcd3c7fd13f3d0d9d20dbcb0 /Ada95/src
parent72c3fc31f590566e93496732d6fa769cd353e270 (diff)
downloadsrc-vendor/ncurses.tar.gz
src-vendor/ncurses.zip
Vendor import ncurses 6.2-20210220vendor/ncurses/6.2-20210220vendor/ncurses
Diffstat (limited to 'Ada95/src')
-rw-r--r--Ada95/src/Makefile.in89
-rw-r--r--Ada95/src/library.gpr.in16
-rw-r--r--Ada95/src/terminal_interface-curses-mouse.adb5
3 files changed, 90 insertions, 20 deletions
diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in
index 384fa3cda5cb..8360779ec830 100644
--- a/Ada95/src/Makefile.in
+++ b/Ada95/src/Makefile.in
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2018-2019,2020 Thomas E. Dickey #
+# Copyright 2018-2020,2021 Thomas E. Dickey #
# Copyright 1999-2016,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -29,7 +29,7 @@
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.89 2020/02/02 23:34:34 tom Exp $
+# $Id: Makefile.in,v 1.95 2021/01/23 20:42:08 tom Exp $
#
.SUFFIXES:
@@ -64,16 +64,16 @@ AWK = @AWK@
LN_S = @LN_S@
CC = @CC@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
CPPFLAGS = @ACPPFLAGS@ @CPPFLAGS@ \
-DHAVE_CONFIG_H -I$(srcdir)
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
-CFLAGS_NORMAL = $(CCFLAGS)
-CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
-CFLAGS_PROFILE = $(CCFLAGS) -pg
+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
+CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE
+CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
@@ -184,7 +184,7 @@ $(BUILD_DIR_LIB) :
mkdir -p $@
$(GENERATED_SOURCES) :
- cd ../gen; $(MAKE) $(ADA_MFLAGS)
+ ( cd ../gen; $(MAKE) $(ADA_MFLAGS) )
sources : $(GENERATED_SOURCES)
@echo made $@
@@ -195,6 +195,7 @@ install.libs :: \
$(BUILD_DIR_LIB)/$(STATIC_LIBNAME)
@echo made $(STATIC_LIBNAME)
+#OLD:BEGIN
install \
install.libs :: \
$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) \
@@ -206,6 +207,7 @@ install.libs :: \
uninstall \
uninstall.libs ::
@rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME)
+#OLD:END
mostlyclean ::
rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] *.a
@@ -273,23 +275,71 @@ STATIC_DIRS = \
@USE_GNAT_PROJECTS@ $(STATIC_DIRS)
@USE_GNAT_PROJECTS@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@
@USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT)
-@USE_GNAT_PROJECTS@ $(SHELL) $(srcdir)/library-cfg.sh static $(srcdir)/library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT)
+@USE_GNAT_PROJECTS@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT)
@USE_GNAT_PROJECTS@ @echo "Using GNAT Project:"
-@USE_GNAT_PROJECTS@ @-$(SHELL) -c "diff -c $(srcdir)/library.gpr $(GNAT_PROJECT); exit 0"
-@USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static
-@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS)
-@USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT)
-@USE_GNAT_PROJECTS@
+@USE_GNAT_MAKE_GPR@ @-$(SHELL) -c "diff -c $(srcdir)/library.gpr $(GNAT_PROJECT); exit 0"
+@USE_GNAT_MAKE_GPR@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static
+@USE_GNAT_MAKE_GPR@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS)
+@USE_GNAT_MAKE_GPR@ -rm -f $(GNAT_PROJECT)
+@USE_GNAT_GPRBUILD@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0"
+@USE_GNAT_GPRBUILD@ gprbuild -p $(ADAMAKEFLAGS) -XLIB_KIND=static
+@USE_GNAT_GPRBUILD@ -rm -f $(GNAT_PROJECT)
+
+#OLD:BEGIN
@USE_GNAT_LIBRARIES@install \
@USE_GNAT_LIBRARIES@install.libs :: \
@USE_GNAT_LIBRARIES@ $(ADA_OBJECTS)
@USE_GNAT_LIBRARIES@ $(INSTALL_LIB) \
@USE_GNAT_LIBRARIES@ $(BUILD_DIR)/static-ali/*.ali \
@USE_GNAT_LIBRARIES@ $(ADA_OBJECTS)
-
+#OLD:END
+# While gprinstall is the "recommended" tool, it is rather brittle, with
+# hardcoded assumptions about the use of the install-name which prevent using
+# that tool to make the directory layout of older versions of the AdaCurses
+# package.
+#
+# In principle, one might just do
+# --install-name=""
+# and in dry-run mode, gprinstall pretends to handle it properly (trimming the
+# empty directory level), but without the dry-run option, it fails (tested
+# with gnat 10.1.1).
+#NEW:BEGIN
+#@USE_GNAT_LIBRARIES@install \
+#@USE_GNAT_LIBRARIES@install.libs ::
+#@USE_GNAT_LIBRARIES@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@
+#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT)
+#@USE_GNAT_LIBRARIES@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT)
+#@USE_GNAT_LIBRARIES@ @echo "Using GNAT Project:"
+#@USE_GNAT_LIBRARIES@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0"
+#@USE_GNAT_LIBRARIES@
+#@USE_GNAT_LIBRARIES@ gprinstall -m -v -f -p \
+#@USE_GNAT_LIBRARIES@ --prefix="$(DESTDIR)$(prefix)" \
+#@USE_GNAT_LIBRARIES@ $(ADAMAKEFLAGS) -XLIB_KIND=static \
+#@USE_GNAT_LIBRARIES@ --lib-subdir="$(DESTDIR)$(prefix)"/lib \
+#@USE_GNAT_LIBRARIES@ --ali-subdir="$(DESTDIR)$(prefix)"/lib/ada/adalib \
+#@USE_GNAT_LIBRARIES@ --sources-subdir="$(DESTDIR)$(prefix)"/share/ada/adainclude
+#@USE_GNAT_LIBRARIES@
+#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT)
+#NEW:END
+
+#OLD:BEGIN
uninstall \
uninstall.libs ::
@rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME)
+#OLD:END
+#NEW:BEGIN
+#@USE_GNAT_LIBRARIES@uninstall \
+#@USE_GNAT_LIBRARIES@uninstall.libs ::
+#@USE_GNAT_LIBRARIES@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@
+#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT)
+#@USE_GNAT_LIBRARIES@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT)
+#@USE_GNAT_LIBRARIES@ @echo "Using GNAT Project:"
+#@USE_GNAT_LIBRARIES@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0"
+#@USE_GNAT_LIBRARIES@
+#@USE_GNAT_LIBRARIES@ gprinstall -v -f --prefix="$(DESTDIR)$(prefix)" --uninstall $(ADAMAKEFLAGS) -XLIB_KIND=static
+#@USE_GNAT_LIBRARIES@
+#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT)
+#NEW:END
@USE_GNAT_LIBRARIES@uninstall \
@USE_GNAT_LIBRARIES@uninstall.libs ::
@@ -311,9 +361,9 @@ SHARED_DIRS = \
@MAKE_ADA_SHAREDLIB@ cp $(SHARED_OBJS) $(BUILD_DIR)/dynamic-obj/
@MAKE_ADA_SHAREDLIB@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@
@MAKE_ADA_SHAREDLIB@ -rm -f $(GNAT_PROJECT)
-@MAKE_ADA_SHAREDLIB@ $(SHELL) $(srcdir)/library-cfg.sh dynamic $(srcdir)/library.gpr $(CFLAGS_SHARED) >$(GNAT_PROJECT)
+@MAKE_ADA_SHAREDLIB@ $(SHELL) $(srcdir)/library-cfg.sh dynamic library.gpr $(CFLAGS_SHARED) >$(GNAT_PROJECT)
@MAKE_ADA_SHAREDLIB@ @echo "Making Ada shared-lib:"
-@MAKE_ADA_SHAREDLIB@ @-$(SHELL) -c "diff -c $(srcdir)/library.gpr $(GNAT_PROJECT); exit 0"
+@MAKE_ADA_SHAREDLIB@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0"
@MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
@MAKE_ADA_SHAREDLIB@ -rm -f $(GNAT_PROJECT)
@@ -341,7 +391,7 @@ uninstall.libs ::
@MAKE_ADA_SHAREDLIB@ $(INSTALL_LIB) \
@MAKE_ADA_SHAREDLIB@ $(BUILD_DIR_LIB)/$(SHARED_LIBNAME) \
@MAKE_ADA_SHAREDLIB@ $(LIBDIR)
-@MAKE_ADA_SHAREDLIB@ cd $(LIBDIR) && $(LN_S) $(SHARED_LIBNAME) $(SHARED_SYMLINK)
+@MAKE_ADA_SHAREDLIB@ ( cd $(LIBDIR) && $(LN_S) $(SHARED_LIBNAME) $(SHARED_SYMLINK) )
@MAKE_ADA_SHAREDLIB@
@MAKE_ADA_SHAREDLIB@uninstall \
@MAKE_ADA_SHAREDLIB@uninstall.libs ::
@@ -352,8 +402,13 @@ uninstall.libs ::
@MAKE_ADA_SHAREDLIB@ rm -f $(LIBDIR)/$(SHARED_SYMLINK)
@MAKE_ADA_SHAREDLIB@ rm -f $(LIBDIR)/$(SHARED_LIBNAME)
+#rm-docs :
+# gnatdoc --enable-build $(ADAMAKEFLAGS) -XLIB_KIND=static
+
clean ::
-rm -f default.cgpr
-rm -rf $(BUILD_DIR)/*-ali
-rm -rf $(BUILD_DIR)/*-obj
-rm -rf $(BUILD_DIR_LIB)
+#@USE_GNAT_PROJECTS@ gprclean $(ADAMAKEFLAGS) -XLIB_KIND=static
+#@MAKE_ADA_SHAREDLIB@ gprclean $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
diff --git a/Ada95/src/library.gpr.in b/Ada95/src/library.gpr.in
index b0f0646d1065..37cbb9d93d9b 100644
--- a/Ada95/src/library.gpr.in
+++ b/Ada95/src/library.gpr.in
@@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
--- $Id: library.gpr.in,v 1.2 2020/02/02 23:34:34 tom Exp $
+-- $Id: library.gpr.in,v 1.3 2020/06/27 20:47:40 tom Exp $
-- http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Library-Projects.html
-- http://www.adaworld.com/debian/debian-ada-policy.html
project AdaCurses is
@@ -48,10 +48,24 @@ project AdaCurses is
for Default_Switches ("Ada") use
("-g",
"-O2",
+ "-Wall",
"-gnatafno",
"-gnatVa", -- All validity checks
"-gnatwa"); -- Activate all optional errors
-- for Default_Switches ("C") use (CFLAGS)
end Compiler;
for Languages use ("C", "Ada");
+ package Install is
+ for Install_Name use "adacurses";
+ -- for Artifacts ("share/doc/adacurses") use ("../doc/Ada95.html", "../doc/ada");
+ -- for Artifacts ("share/doc/adacurses/adacurses_rm") use ("../" & Kind & "-obj" & "/gnatdoc/*");
+ for Artifacts ("lib/ada/adalib") use
+ ("../src/*.ali");
+ for Artifacts ("share/ada/adainclude") use
+ ("../src/*.ad?");
+ -- for Artifacts ("share/examples/adacurses") use
+ -- ("../samples/*.ad?", "../samples/explain.txt", "../samples/Makefile", "../samples/README");
+ -- for Artifacts ("share/man/man1") use ("../doc/adacurses-config.1");
+ for Artifacts ("bin") use ("../gen/adacurses-config");
+ end Install;
end AdaCurses;
diff --git a/Ada95/src/terminal_interface-curses-mouse.adb b/Ada95/src/terminal_interface-curses-mouse.adb
index ed66249c06f9..a8efd345f33b 100644
--- a/Ada95/src/terminal_interface-curses-mouse.adb
+++ b/Ada95/src/terminal_interface-curses-mouse.adb
@@ -36,8 +36,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.27 $
--- $Date: 2020/02/02 23:34:34 $
+-- $Revision: 1.28 $
+-- $Date: 2020/06/27 18:50:44 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -147,6 +147,7 @@ package body Terminal_Interface.Curses.Mouse is
Button := Button4;
end if;
if Button in Real_Buttons then
+ State := Released; -- preset to non real button;
L := 2 ** (6 * Mouse_Button'Pos (Button));
for I in Button_State'Range loop
if (Mask and L) /= 0 then