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/form/fty_ipv4.c b/form/fty_ipv4.c
index 8dc04f8..108f7b4 100644
--- a/form/fty_ipv4.c
+++ b/form/fty_ipv4.c
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 1998-2006,2009 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            *
@@ -34,14 +35,14 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fty_ipv4.c,v 1.10 2009/11/07 20:17:58 tom Exp $")
+MODULE_ID("$Id: fty_ipv4.c,v 1.16 2021/06/17 21:11:08 tom Exp $")
 
 /*---------------------------------------------------------------------------
-|   Facility      :  libnform  
+|   Facility      :  libnform
 |   Function      :  static bool Check_IPV4_Field(
 |                                      FIELD * field,
 |                                      const void * argp)
-|   
+|
 |   Description   :  Validate buffer content to be a valid IP number (Ver. 4)
 |
 |   Return Values :  TRUE  - field is valid
@@ -52,7 +53,7 @@
 {
   char *bp = field_buffer(field, 0);
   int num = 0, len;
-  unsigned int d1, d2, d3, d4;
+  unsigned int d1 = 0, d2 = 0, d3 = 0, d4 = 0;
 
   if (isdigit(UChar(*bp)))	/* Must start with digit */
     {
@@ -69,11 +70,11 @@
 }
 
 /*---------------------------------------------------------------------------
-|   Facility      :  libnform  
+|   Facility      :  libnform
 |   Function      :  static bool Check_IPV4_Character(
-|                                      int c, 
+|                                      int c,
 |                                      const void *argp )
-|   
+|
 |   Description   :  Check a character for unsigned type or period.
 |
 |   Return Values :  TRUE  - character is valid
@@ -103,14 +104,14 @@
 #endif
 };
 
-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
+FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4 = &typeIPV4;
 
 #if NCURSES_INTEROP_FUNCS
 /* The next routines are to simplify the use of ncurses from
-   programming languages with restictions on interop with C level
+   programming languages with restrictions on interop with C level
    constructs (e.g. variable access or va_list + ellipsis constructs)
 */
-NCURSES_EXPORT(FIELDTYPE *)
+FORM_EXPORT(FIELDTYPE *)
 _nc_TYPE_IPV4(void)
 {
   return TYPE_IPV4;