From e1d21b25d109328685f402f59776b8452f4a02e0 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Tue, 22 Dec 2020 14:33:24 -0800
Subject: [PATCH] A little more ctype (isdigit isalnum) cleanup

A couple of stragglers here, the isalnum() call caught by an MSVC exception.
---
 src/smblib/smblib.c  |  1 -
 src/smblib/smbstr.c  | 17 +----------------
 src/xpdev/ini_file.c | 16 ----------------
 src/xpdev/sockwrap.c |  3 +--
 4 files changed, 2 insertions(+), 35 deletions(-)

diff --git a/src/smblib/smblib.c b/src/smblib/smblib.c
index 9f77bbeb88..552b02bfdb 100644
--- a/src/smblib/smblib.c
+++ b/src/smblib/smblib.c
@@ -27,7 +27,6 @@
 #include <stdio.h>
 #include <stdlib.h>		/* malloc */
 #include <string.h>
-#include <ctype.h>		/* isdigit */
 #include <sys/types.h>
 #include <sys/stat.h>	/* must come after sys/types.h */
 
diff --git a/src/smblib/smbstr.c b/src/smblib/smbstr.c
index d73662d411..fe99b82645 100644
--- a/src/smblib/smbstr.c
+++ b/src/smblib/smbstr.c
@@ -1,7 +1,5 @@
 /* Synchronet message base (SMB) library routines returning strings */
 
-/* $Id: smbstr.c,v 1.38 2020/05/25 19:17:06 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,25 +13,12 @@
  * See the GNU Lesser General Public License for more details: lgpl.txt or	*
  * http://www.fsf.org/copyleft/lesser.html									*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include <ctype.h>		/* is*() */
 #include <string.h>		/* strcpy, strcat, memset, strchr */
 #include <genwrap.h> 		/* stricmp */
 #include "smblib.h"
@@ -428,7 +413,7 @@ enum smb_net_type SMBCALL smb_get_net_type_by_addr(const char* addr)
 	}
 	if(at == NULL && IS_DIGIT(*p) && *tp == '\0' && IS_DIGIT(last))
 		return NET_FIDO;
-	if(slash == NULL && (isalnum(*p) || p == colon))
+	if(slash == NULL && (IS_ALPHANUMERIC(*p) || p == colon))
 		return NET_INTERNET;
 
 	return NET_UNKNOWN;
diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c
index b096a82450..7c5601a72b 100644
--- a/src/xpdev/ini_file.c
+++ b/src/xpdev/ini_file.c
@@ -1,8 +1,5 @@
 /* Functions to create and parse .ini files */
 
-/* $Id: ini_file.c,v 1.175 2020/08/08 23:26:38 rswindell Exp $ */
-// vi: tabstop=4
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -16,28 +13,15 @@
  * See the GNU Lesser General Public License for more details: lgpl.txt or	*
  * http://www.fsf.org/copyleft/lesser.html									*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
 #include "ini_file.h"
 #include <stdlib.h>		/* strtol */
 #include <string.h>		/* strlen */
-#include <ctype.h>		/* isdigit */
 #include <math.h>		/* fmod */
 #include "xpdatetime.h"	/* isoDateTime_t */
 #include "datewrap.h"	/* ctime_r */
diff --git a/src/xpdev/sockwrap.c b/src/xpdev/sockwrap.c
index 0cf278787c..24cd894b10 100644
--- a/src/xpdev/sockwrap.c
+++ b/src/xpdev/sockwrap.c
@@ -19,7 +19,6 @@
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include <ctype.h>		/* isdigit */
 #include <stdlib.h>		/* alloca/free on FreeBSD */
 #include <string.h>		/* bzero (for FD_ZERO) on FreeBSD */
 #include <errno.h>		/* ENOMEM */
@@ -144,7 +143,7 @@ int getSocketOptionByName(const char* name, int* level)
 			return(socket_options[i].value);
 		}
 	}
-	if(!isdigit(*name))	/* unknown option name */
+	if(!IS_DIGIT(*name))	/* unknown option name */
 		return(-1);
 	return(strtol(name,NULL,0));
 }
-- 
GitLab