From 53d663f543fba39d280895914774e5167d751cd8 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 1 Nov 2005 02:50:27 +0000 Subject: Changed some isdigit() calls to use idigit(). --- Src/Modules/zftp.c | 13 ++++++------- Src/Modules/zselect.c | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'Src') diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c index f97cde46f..96417f613 100644 --- a/Src/Modules/zftp.c +++ b/Src/Modules/zftp.c @@ -713,8 +713,7 @@ zfgetmsg(void) zfgetline(line, 256, tmout); ptr = line; - if (zfdrrrring || !isdigit(STOUC(*ptr)) || !isdigit(STOUC(ptr[1])) || - !isdigit(STOUC(ptr[2]))) { + if (zfdrrrring || !idigit(*ptr) || !idigit(ptr[1]) || !idigit(ptr[2])) { /* timeout, or not talking FTP. not really interested. */ zcfinish = 2; if (!zfclosing) @@ -914,7 +913,7 @@ zfopendata(char *name, union tcp_sockaddr *zdsockp, int *is_passivep) goto bad_epsv; while(ptr != end && *ptr == '0') ptr++; - if(ptr == end || (end-ptr) > 5 || !isdigit(STOUC(*ptr))) + if(ptr == end || (end-ptr) > 5 || !idigit(*ptr)) goto bad_epsv; memcpy(portbuf, ptr, (end-ptr)); portbuf[end-ptr] = 0; @@ -937,7 +936,7 @@ zfopendata(char *name, union tcp_sockaddr *zdsockp, int *is_passivep) * lastmsg already has the reply code expunged. */ for (ptr = lastmsg; *ptr; ptr++) - if (isdigit(STOUC(*ptr))) + if (idigit(*ptr)) break; if (sscanf(ptr, "%d,%d,%d,%d,%d,%d", nums, nums+1, nums+2, nums+3, nums+4, nums+5) != 6) { @@ -1103,11 +1102,11 @@ zfgetdata(char *name, char *rest, char *cmd, int getsize) char *ptr = strstr(lastmsg, "bytes"); zfstatusp[zfsessno] |= ZFST_NOSZ|ZFST_TRSZ; if (ptr) { - while (ptr > lastmsg && !isdigit(STOUC(*ptr))) + while (ptr > lastmsg && !idigit(*ptr)) ptr--; - while (ptr > lastmsg && isdigit(STOUC(ptr[-1]))) + while (ptr > lastmsg && idigit(ptr[-1])) ptr--; - if (isdigit(STOUC(*ptr))) { + if (idigit(*ptr)) { zfstatusp[zfsessno] &= ~ZFST_NOSZ; if (getsize) { off_t sz = zstrtol(ptr, NULL, 10); diff --git a/Src/Modules/zselect.c b/Src/Modules/zselect.c index ea7396e30..71a0d7e76 100644 --- a/Src/Modules/zselect.c +++ b/Src/Modules/zselect.c @@ -42,7 +42,7 @@ handle_digits(char *nam, char *argptr, fd_set *fdset, int *fdmax) int fd; char *endptr; - if (!isdigit(STOUC(*argptr))) { + if (!idigit(*argptr)) { zwarnnam(nam, "expecting file descriptor: %s", argptr, 0); return 1; } -- cgit 1.4.1