+ In case of error, 0 is returned and memory pointed to by CLOSURE
+ remains unmodified. */
+
+static int
+cmd_bytes (const char *com, const char *val, void *closure)
+{
+ double byte_value;
+ if (!parse_bytes_helper (val, &byte_value))
+ {
+ fprintf (stderr, _("%s: %s: Invalid byte value `%s'\n"),
+ exec_name, com, val);
+ return 0;
+ }
+ *(long *)closure = (long)byte_value;
+ return 1;
+}
+
+/* Like cmd_bytes, but CLOSURE is interpreted as a pointer to
+ LARGE_INT. It works by converting the string to double, therefore
+ working with values up to 2^53-1 without loss of precision. This
+ value (8192 TB) is large enough to serve for a while. */
+
+static int
+cmd_bytes_large (const char *com, const char *val, void *closure)
+{
+ double byte_value;
+ if (!parse_bytes_helper (val, &byte_value))
+ {
+ fprintf (stderr, _("%s: %s: Invalid byte value `%s'\n"),
+ exec_name, com, val);
+ return 0;
+ }
+ *(LARGE_INT *)closure = (LARGE_INT)byte_value;