int mult;
};
-extern unsigned long parse_number(const char *numstr, struct suffix_mult *suffixes);
+extern unsigned long parse_number(const char *numstr,
+ const struct suffix_mult *suffixes);
/* These parse entries in /etc/passwd and /etc/group. This is desirable
#include <string.h>
#include <fcntl.h>
-static struct suffix_mult dd_suffixes[] = {
+static const struct suffix_mult dd_suffixes[] = {
{ "c", 1 },
{ "w", 2 },
{ "b", 512 },
#include <unistd.h>
#include <sys/types.h>
-static struct suffix_mult tail_suffixes[] = {
+static const struct suffix_mult tail_suffixes[] = {
{ "b", 512 },
{ "k", 1024 },
{ "m", 1048576 },
};
#ifndef BB_FEATURE_SIMPLE_TAIL
-static struct suffix_mult null_suffixes[] = {
+static const struct suffix_mult null_suffixes[] = {
{ NULL, 0 }
};
#endif
#include <string.h>
#include <fcntl.h>
-static struct suffix_mult dd_suffixes[] = {
+static const struct suffix_mult dd_suffixes[] = {
{ "c", 1 },
{ "w", 2 },
{ "b", 512 },
int mult;
};
-extern unsigned long parse_number(const char *numstr, struct suffix_mult *suffixes);
+extern unsigned long parse_number(const char *numstr,
+ const struct suffix_mult *suffixes);
/* These parse entries in /etc/passwd and /etc/group. This is desirable
#include <unistd.h>
#include <sys/types.h>
-static struct suffix_mult tail_suffixes[] = {
+static const struct suffix_mult tail_suffixes[] = {
{ "b", 512 },
{ "k", 1024 },
{ "m", 1048576 },
};
#ifndef BB_FEATURE_SIMPLE_TAIL
-static struct suffix_mult null_suffixes[] = {
+static const struct suffix_mult null_suffixes[] = {
{ NULL, 0 }
};
#endif
}
#if defined BB_DD || defined BB_TAIL
-unsigned long parse_number(const char *numstr, struct suffix_mult *suffixes)
+unsigned long parse_number(const char *numstr,
+ const struct suffix_mult *suffixes)
{
- struct suffix_mult *sm;
+ const struct suffix_mult *sm;
unsigned long int ret;
int len;
char *end;