libncurses: Import https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.5.tar.gz changes

Change-Id: I3433d30ca01359fd2e3623ede96b531f0b39cbfa
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/ncurses/tinfo/MKkeys_list.sh b/ncurses/tinfo/MKkeys_list.sh
index 14017b0..05ac8cf 100755
--- a/ncurses/tinfo/MKkeys_list.sh
+++ b/ncurses/tinfo/MKkeys_list.sh
@@ -1,7 +1,8 @@
 #! /bin/sh
-# $Id: MKkeys_list.sh,v 1.4 2003/10/25 16:19:54 tom Exp $
+# $Id: MKkeys_list.sh,v 1.9 2024/01/19 12:26:30 tom Exp $
 ##############################################################################
-# Copyright (c) 2001,2003 Free Software Foundation, Inc.                     #
+# Copyright 2019-2022,2024 Thomas E. Dickey                                  #
+# Copyright 2001-2003,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"), #
@@ -35,24 +36,32 @@
 # Extract function-key names from the Caps file
 #
 : ${AWK-awk}
-DATA=${1-../../include/Caps}
+: ${USE_SIGWINCH-0}
+if test $# != 0
+then
+	DATA="$*"
+else
+	DATA=../../include/Caps
+fi
 
 data=data$$
-trap 'rm -f $data' 0 1 2 5 15
-sed -e 's/[	][	]*/	/g' < $DATA >$data
+trap 'rm -f $data; exit 1' 1 2 3 15
+trap 'rm -f $data' 0
+cat $DATA | sed -e 's/[	][	]*/	/g' >$data
 
 cat <<EOF
 # These definitions were generated by $0 $DATA
 KEY_BREAK
 KEY_SRESET
 KEY_RESET
-KEY_RESIZE
 EOF
+test "$USE_SIGWINCH" = 1 && echo KEY_RESIZE
 
 ${AWK-awk} <$data '
 /^#/		{next;}
 /^capalias/	{next;}
 /^infoalias/	{next;}
+/^userdef/	{next;}
 
 $5 != "-" {
 		if (substr($5, 1, 4) == "KEY_" ) {