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/tdlint b/misc/tdlint
index c0e652b..8ff5a40 100755
--- a/misc/tdlint
+++ b/misc/tdlint
@@ -1,6 +1,7 @@
 #!/bin/sh
 ##############################################################################
-# Copyright (c) 1998 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 <dickey@clark.net> 1996
 #
-# $Id: tdlint,v 1.5 2000/10/28 20:53:36 tom Exp $
+# $Id: tdlint,v 1.8 2021/09/04 15:55:29 tom Exp $
 #
 # Lint-script that allows user's own lint libraries, in addition to the ones
 # installed in the system.
@@ -44,16 +45,16 @@
 	exit 1
 else
 	case $ARCH in
-	AIX)	set - $* -Nn4000
+	AIX)	set - "$@" -Nn4000
 		;;
-	IRIX)	set - $* -n -lc
+	IRIX)	set - "$@" -n -lc
 		;;
-	FreeBSD) set - $* -g -p -u -v -z
+	FreeBSD) set - "$@" -g -p -u -v -z
 		;;
 	SunOS)
 		case `uname -r` in
 		5.*)	ARCH=Solaris
-			set - $* -n -lc
+			set - "$@" -n -lc
 			;;
 		esac
 		;;
@@ -62,7 +63,7 @@
 # LIBDIR=$HOME/lib/$ARCH/lint ;export LIBDIR
 for p in $HOME/lib/$ARCH/lint /usr/lib/lint /usr/lib
 do
-	if [ -d $p ]
+	if [ -d "$p" ]
 	then
 		DIRS="$DIRS $p"
 	fi
@@ -73,15 +74,15 @@
 	case $1 in
 	-D*\"*)	;;
 	-L*)
-		DIRS="`echo $1|sed -e 's/^-L//'` $DIRS"
+		DIRS="`echo "$1"|sed -e 's/^-L//'` $DIRS"
 		;;
 	-l*)
-		lib="llib-l`echo $1 | sed -e 's/^-l//'`.ln"
+		lib="llib-l`echo "$1" | sed -e 's/^-l//'`.ln"
 		found=no
 		for p in $DIRS
 		do
-			echo -n testing $p/$lib
-			if [ -f $p/$lib ]
+			printf "testing %s" "$p/$lib"
+			if [ -f "$p/$lib" ]
 			then
 				LIBS="$LIBS $p/$lib"
 				echo " (ok)"
@@ -110,4 +111,4 @@
 	shift
 done
 #
-eval lint $OPT $FILES $LIBS
+exec lint $OPT $FILES $LIBS