summaryrefslogtreecommitdiff
path: root/src/nice.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-08-29 20:49:07 +0000
committerJim Meyering <jim@meyering.net>1999-08-29 20:49:07 +0000
commit678cbc835ec3685652d488c79193b2000a397a3c (patch)
treeb472495fc8270554a3b4f6fba9a6339b3eccd9f9 /src/nice.c
parentde8d09d22d63186e59568bac5048e9f330bd07bd (diff)
downloadcoreutils-678cbc835ec3685652d488c79193b2000a397a3c.tar.xz
(isinteger): Move definition to precede use. Remove prototype.
Diffstat (limited to 'src/nice.c')
-rw-r--r--src/nice.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/nice.c b/src/nice.c
index 55273f936..e2a46d007 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -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;
-}