summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lib/arg_helper.c8
-rw-r--r--apps/plugins/lib/arg_helper.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/apps/plugins/lib/arg_helper.c b/apps/plugins/lib/arg_helper.c
index 756549c2ad..d402300900 100644
--- a/apps/plugins/lib/arg_helper.c
+++ b/apps/plugins/lib/arg_helper.c
@@ -112,7 +112,7 @@ int bool_parse(const char **parameter, bool *choice)
return found;
}
-int longnum_parse(const char **parameter, long *number, unsigned long *decimal)
+int longnum_parse(const char **parameter, long *number, long *decimal)
{
/* passes number and or decimal portion of number base 10 only..
fractional portion is scaled by ARGPARSE_FRAC_DEC_MULTIPLIER
@@ -159,11 +159,11 @@ int longnum_parse(const char **parameter, long *number, unsigned long *decimal)
digits++;
start++;
}
- if (decimal && digits <= AP_MAX_FRAC_DIGITS)
+ if (decimal && digits <= ARGPARSE_MAX_FRAC_DIGITS)
{
- if(digits < AP_MAX_FRAC_DIGITS)
+ if(digits < ARGPARSE_MAX_FRAC_DIGITS)
{
- digits = AP_MAX_FRAC_DIGITS - digits;
+ digits = ARGPARSE_MAX_FRAC_DIGITS - digits;
while (digits--)
dec *= 10;
}
diff --git a/apps/plugins/lib/arg_helper.h b/apps/plugins/lib/arg_helper.h
index 248e8e4eaf..c7b14f7f7a 100644
--- a/apps/plugins/lib/arg_helper.h
+++ b/apps/plugins/lib/arg_helper.h
@@ -23,11 +23,12 @@
#include "plugin.h"
-#define ARGP_MAX_FRAC_DIGITS 9 /* Uses 30 bits max (0.999999999) */
+#define ARGPARSE_MAX_FRAC_DIGITS 9 /* Uses 30 bits max (0.999999999) */
#define ARGP_EXP(a, b) (a ##E## b)
#define ARGP_FRAC_DEC_MULTIPLIER(n) AP_EXP(1,n) /*1x10^n*/
-#define ARGPARSE_FRAC_DEC_MULTIPLIER (long) ARGP_FRAC_DEC_MULTIPLIER(ARGP_MAX_FRAC_DIGITS)
+#define ARGPARSE_FRAC_DEC_MULTIPLIER \
+ (long)ARGP_FRAC_DEC_MULTIPLIER(ARGPARSE_MAX_FRAC_DIGITS)
/* fills buf with a string upto buf_sz, null terminates the buffer
* strings break on WS by default but can be enclosed in single or double quotes