- drats.
[oweals/busybox.git] / libbb / xgetlarg.c
index 06e776dc9bbb993eb472c700a35b940346f9a3b2..893cd28133e9dd55b10e9676b2bf62e5f0664bd7 100644 (file)
@@ -1,6 +1,8 @@
 /* vi: set sw=4 ts=4: */
 /*
- * Copyright (C) 2003 Erik Andersen <andersee@debian.org>
+ * Copyright (C) 2003-2004 Erik Andersen <andersen@codepoet.org>
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 
@@ -11,9 +13,9 @@
 #include <assert.h>
 #include <ctype.h>
 
-#include "busybox.h"
+#include "libbb.h"
 
-extern long bb_xgetlarg(char *arg, int base, long lower, long upper)
+long bb_xgetlarg(const char *arg, int base, long lower, long upper)
 {
        long result;
        char *endptr;
@@ -21,8 +23,10 @@ extern long bb_xgetlarg(char *arg, int base, long lower, long upper)
 
        assert(arg!=NULL);
 
-       /* Don't allow leading whitespace. */
-       if ((isspace)(*arg)) {  /* Use an actual funciton call for minimal size. */
+       /* Don't allow leading whitespace.
+        * Wrap isspace in () to make sure we call the
+        * function rather than the macro. */
+       if ((isspace)(*arg)) {
                bb_show_usage();
        }