seq(1): Move long_opts up with globals

This commit is contained in:
Kyle Evans 2018-05-02 01:04:13 +00:00
parent 4899b94bac
commit ad4e78b50a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333155

View file

@ -57,6 +57,15 @@ __FBSDID("$FreeBSD$");
static const char *decimal_point = "."; /* default */
static char default_format[] = { "%g" }; /* default */
static const struct option long_opts[] =
{
{"format", required_argument, NULL, 'f'},
{"separator", required_argument, NULL, 's'},
{"terminator", required_argument, NULL, 't'},
{"equal-width", no_argument, NULL, 'w'},
{NULL, no_argument, NULL, 0}
};
/* Prototypes */
static double e_atof(const char *);
@ -68,15 +77,6 @@ static int valid_format(const char *);
static char *generate_format(double, double, double, int, char);
static char *unescape(char *);
static const struct option long_opts[] =
{
{"format", required_argument, NULL, 'f'},
{"separator", required_argument, NULL, 's'},
{"terminator", required_argument, NULL, 't'},
{"equal-width", no_argument, NULL, 'w'},
{NULL, no_argument, NULL, 0}
};
/*
* The seq command will print out a numeric sequence from 1, the default,
* to a user specified upper limit by 1. The lower bound and increment