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/misc/makellib b/misc/makellib
index 0460407..fb3d3b7 100755
--- a/misc/makellib
+++ b/misc/makellib
@@ -1,6 +1,7 @@
 #!/bin/sh
 ##############################################################################
-# Copyright (c) 1998,2000 Free Software Foundation, Inc.                     #
+# Copyright 2020,2021 Thomas E. Dickey                                       #
+# Copyright 1998,2000 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"), #
@@ -29,7 +30,7 @@
 #
 # Author: Thomas E. Dickey 1996,1997,2000
 #
-# $Id: makellib,v 1.8 2000/10/28 21:37:10 tom Exp $
+# $Id: makellib,v 1.11 2021/09/04 15:49:38 tom Exp $
 # System-dependent wrapper for 'lint' that creates a lint-library via the
 # following method (XXX is the name of the library):
 #	a.  If the file llib-lXXX doesn't exist, create it using the make-rule
@@ -44,7 +45,7 @@
 #	a.  On a few systems, you'll have to manually-edit the llib-lXXX file
 #	    to get a usable lint-library (not all C-preprocessors work well).
 #	b.  The system's lint utility won't recognize -lXXX as a lint-library
-#	    (Use tdlint as a wrapper; it's designed for this).
+#	    (Use tdlint as a wrapper; it is designed for this).
 #
 # Parameters:
 #	$1 = library name
@@ -67,7 +68,7 @@
 do
 	case $1 in
 	-L*)
-		DST="$DST `echo $1|sed -e 's/^-L//'`"
+		DST="$DST `echo "$1"|sed -e 's/^-L//'`"
 		;;
 	-*)
 		OPT="$OPT $1"
@@ -93,8 +94,8 @@
 	llib="llib-l$LLIB"
 fi
 
-if test ! -f $llib ; then
-	if ( make $llib )
+if test ! -f "$llib" ; then
+	if ( make "$llib" )
 	then
 		:
 	else
@@ -102,39 +103,39 @@
 	fi
 fi
 
-rm -f $llib.ln $llib.c
+rm -f "$llib.ln" "$llib.c"
 TARGET=$LLIB
 
 case "$ARCH" in
 AIX)
 	CREATE="-uvxo$LLIB -Nn4000"
 	TARGET=$llib.c
-	ln $llib $TARGET
+	ln "$llib" "$TARGET"
 	;;
 Solaris)
 	CREATE="-C$llib"
 	TARGET=$llib.c
-	ln $llib $TARGET
+	ln "$llib" "$TARGET"
 	;;
 FreeBSD)
 	CREATE="-g -z -C$LLIB"
 	TARGET=$llib.c
-	ln $llib $TARGET
+	ln "$llib" "$TARGET"
 	;;
 CLIX)
 	CREATE="-DLINTLIBRARY -vxo$LLIB"
 	TARGET=$llib.c
-	ln $llib $TARGET
+	ln "$llib" "$TARGET"
 	;;
 IRIX*)
 	CREATE="-DLINTLIBRARY -vxyo$LLIB"
 	TARGET=$llib.c
-	ln $llib $TARGET
+	ln "$llib" "$TARGET"
 	;;
 UNIX_SV)
 	CREATE="-DLINTLIBRARY -vxyo$LLIB"
 	TARGET=$llib.c
-	ln $llib $TARGET
+	ln "$llib" "$TARGET"
 	;;
 *)
 	echo "Sorry.  I do not know how to build a lint-library for $ARCH"
@@ -144,24 +145,24 @@
 echo OPT    "$OPT"
 echo TARGET "$TARGET"
 echo LIBNAME "$llib"
-if ( lint $CREATE $OPT $TARGET )
+if ( lint "$CREATE" "$OPT" "$TARGET" )
 then
-	if test -f $llib.ln
+	if test -f "$llib.ln"
 	then
 		for p in $HOME/lib $HOME/lib/$ARCH $HOME/lib/$ARCH/lint
 		do
-			if test ! -d $p
+			if test ! -d "$p"
 			then
-				mkdir $p
+				mkdir "$p"
 			fi
 		done
 		for p in $DST
 		do
-			cp $llib.ln $p/
+			cp "$llib.ln" "$p/"
 		done
-		rm -f $llib.ln
+		rm -f "$llib.ln"
 	fi
 fi
 if test "x$TARGET" = "x$llib.c" ; then
-	rm -f $TARGET
+	rm -f "$TARGET"
 fi