gcc-warnings-cleanup-20030701
[openafs.git] / src / util / isathing.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include <afsconfig.h>
11 #include <afs/param.h>
12
13 RCSID("$Header$");
14
15 #include <ctype.h>
16
17 /* checks a string to determine whether it's a non-negative decimal integer or not */
18 int util_isint(char *str)
19 {
20     char *i;
21
22     for (i=str; *i && !isspace(*i); i++) {
23         if (!isdigit(*i))
24             return 0;
25     }
26
27     return 1;
28 }