mirror of
git://git.sv.gnu.org/coreutils
synced 2026-06-02 14:00:19 -04:00
(isinteger): Move definition to precede use. Remove prototype.
This commit is contained in:
+19
-21
@@ -44,8 +44,6 @@
|
||||
# define GET_PRIORITY() getpriority (PRIO_PROCESS, 0)
|
||||
#endif
|
||||
|
||||
static int isinteger PARAMS ((char *s));
|
||||
|
||||
/* The name this program was run with. */
|
||||
char *program_name;
|
||||
|
||||
@@ -78,6 +76,25 @@ by default. Range goes from -20 (highest priority) to 19 (lowest).\n\
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* Return nonzero if S represents a (possibly signed) decimal integer,
|
||||
zero if not. */
|
||||
|
||||
static int
|
||||
isinteger (const char *s)
|
||||
{
|
||||
if (*s == '-' || *s == '+')
|
||||
++s;
|
||||
if (*s == 0)
|
||||
return 0;
|
||||
while (*s)
|
||||
{
|
||||
if (!ISDIGIT (*s))
|
||||
return 0;
|
||||
++s;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@@ -199,22 +216,3 @@ main (int argc, char **argv)
|
||||
exit (exit_status);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return nonzero if S represents a (possibly signed) decimal integer,
|
||||
zero if not. */
|
||||
|
||||
static int
|
||||
isinteger (char *s)
|
||||
{
|
||||
if (*s == '-' || *s == '+')
|
||||
++s;
|
||||
if (*s == 0)
|
||||
return 0;
|
||||
while (*s)
|
||||
{
|
||||
if (!ISDIGIT (*s))
|
||||
return 0;
|
||||
++s;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user