util: Remove isathing
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 16 Mar 2011 15:34:54 +0000 (15:34 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 17 Mar 2011 13:37:03 +0000 (06:37 -0700)
isathing.c only provided one function - util_isint, whose behaviour
can be far better provided by careful application of strtol.
Simplify our world a little by removing the file.

Change-Id: I6a8460daaec092d4916d4a46e04df01d0dfc7ccc
Reviewed-on: http://gerrit.openafs.org/4246
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/util/Makefile.in
src/util/NTMakefile
src/util/afsutil_prototypes.h
src/util/isathing.c [deleted file]

index f30adfb..3136004 100644 (file)
@@ -18,7 +18,7 @@ HELPER_SPLINT=@HELPER_SPLINT@
 
 objects = assert.o base64.o casestrcpy.o config_file.o ktime.o volparse.o \
         hostparse.o exec.o \
-        hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
+        hputil.o kreltime.o get_krbrlm.o uuid.o serverLog.o \
         dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
         afs_atomlist.o afs_lhash.o snprintf.o pthread_glock.o \
         tabular_output.o ${REGEX_OBJ}
@@ -34,7 +34,6 @@ objects_pic = \
        exec_pic.o \
        hputil_pic.o \
        kreltime_pic.o \
-       isathing_pic.o \
        get_krbrlm_pic.o \
        uuid_pic.o \
        serverLog_pic.o \
@@ -240,9 +239,6 @@ hputil_pic.o: ${srcdir}/hputil.c ${includes}
 kreltime_pic.o: ${srcdir}/kreltime.c ${includes}
        $(SHD_CCRULE) ${srcdir}/kreltime.c
 
-isathing_pic.o: ${srcdir}/isathing.c ${includes}
-       $(SHD_CCRULE) ${srcdir}/isathing.c
-
 get_krbrlm_pic.o: ${srcdir}/get_krbrlm.c ${includes}
        $(SHD_CCRULE) ${srcdir}/get_krbrlm.c
 
@@ -367,6 +363,6 @@ include ../config/Makefile.version
 check-splint:
        sh $(HELPER_SPLINT) $(CFLAGS) \
            assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
-           hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
+           hputil.c kreltime.c get_krbrlm.c uuid.c serverLog.c \
            dirpath.c fileutil.c netutils.c flipbase64.c \
            afs_atomlist.c afs_lhash.c snprintf.c fstab.c
index e4f14cd..0665dff 100644 (file)
@@ -49,7 +49,6 @@ LIBOBJS = \
        $(OUT)\casestrcpy.obj \
        $(OUT)\get_krbrlm.obj \
        $(OUT)\hostparse.obj \
-       $(OUT)\isathing.obj \
         $(OUT)\krb5_nt.obj \
        $(OUT)\kreltime.obj \
        $(OUT)\ktime.obj \
@@ -72,7 +71,6 @@ MT_LIBOBJS = \
        $(OUT)\casestrcpy.obj \
        $(OUT)\get_krbrlm.obj \
        $(OUT)\hostparse.obj \
-       $(OUT)\isathing.obj \
         $(OUT)\krb5_nt.obj \
        $(OUT)\kreltime.obj \
        $(OUT)\ktime.obj \
index 7554c79..b7b6add 100644 (file)
@@ -101,9 +101,6 @@ extern void setlinebuf(FILE * file);
 extern void psignal(unsigned int sig, char *s);
 #endif
 
-/* isathing.c */
-extern int util_isint(char *str);
-
 /* kreltime.c */
 struct ktime;
 struct ktime_date;
diff --git a/src/util/isathing.c b/src/util/isathing.c
deleted file mode 100644 (file)
index a129327..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * This software has been released under the terms of the IBM Public
- * License.  For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-#include <afsconfig.h>
-#include <afs/param.h>
-
-
-#include <ctype.h>
-
-/* checks a string to determine whether it's a non-negative decimal integer or not */
-int
-util_isint(char *str)
-{
-    char *i;
-
-    for (i = str; *i && !isspace(*i); i++) {
-       if (!isdigit(*i))
-           return 0;
-    }
-
-    return 1;
-}