aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/form/fty_ipv4.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/form/fty_ipv4.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/form/fty_ipv4.c')
-rw-r--r--contrib/ncurses/form/fty_ipv4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/ncurses/form/fty_ipv4.c b/contrib/ncurses/form/fty_ipv4.c
index 064c02c8fa78..f49dcdb19567 100644
--- a/contrib/ncurses/form/fty_ipv4.c
+++ b/contrib/ncurses/form/fty_ipv4.c
@@ -13,7 +13,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_ipv4.c,v 1.2 1997/04/26 22:06:00 tom Exp $")
+MODULE_ID("$Id: fty_ipv4.c,v 1.4 2000/12/09 23:46:12 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -32,13 +32,13 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp GCC_UNUSED)
int num = 0, len;
unsigned int d1, d2, d3, d4;
- if(isdigit(*bp)) /* Must start with digit */
+ if(isdigit((unsigned char)*bp)) /* Must start with digit */
{
num = sscanf(bp, "%u.%u.%u.%u%n", &d1, &d2, &d3, &d4, &len);
if (num == 4)
{
bp += len; /* Make bp point to what sscanf() left */
- while (*bp && isspace(*bp))
+ while (*bp && isspace((unsigned char)*bp))
bp++; /* Allow trailing whitespace */
}
}
@@ -76,6 +76,6 @@ static FIELDTYPE typeIPV4 = {
NULL
};
-FIELDTYPE* TYPE_IPV4 = &typeIPV4;
+NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
/* fty_ipv4.c ends here */