enum { state_start = 0, state_old_tar, state_next_word,
state_short, state_long };
- const struct bsdcat_option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct bsdcat_option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = '?';
- int required = 0;
+ int opt;
+ int required;
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = '?';
+ required = 0;
bsdcat->argument = NULL;
/* First time through, initialize everything. */
if (opt == '\0') {
/* End of this group; recurse to get next option. */
bsdcat->getopt_state = state_next_word;
- return bsdcat_getopt(bsdcat);
+ goto again;
}
/* Does this option take an argument? */
static int state = state_start;
static char *opt_word;
- const struct option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = '?';
- int required = 0;
+ int opt;
+ int required;
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = '?';
+ required = 0;
cpio->argument = NULL;
/* First time through, initialize everything. */
if (opt == '\0') {
/* End of this group; recurse to get next option. */
state = state_next_word;
- return cpio_getopt(cpio);
+ goto again;
}
/* Does this option take an argument? */
enum { state_start = 0, state_old_tar, state_next_word,
state_short, state_long };
- const struct bsdtar_option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct bsdtar_option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = '?';
- int required = 0;
+ int opt;
+ int required;
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = '?';
+ required = 0;
bsdtar->argument = NULL;
/* First time through, initialize everything. */
if (opt == '\0') {
/* End of this group; recurse to get next option. */
bsdtar->getopt_state = state_next_word;
- return bsdtar_getopt(bsdtar);
+ goto again;
}
/* Does this option take an argument? */
{
enum { state_start = 0, state_next_word, state_short, state_long };
- const struct bsdunzip_option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct bsdunzip_option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = OPTION_NONE;
- int required = 0;
-
+ int opt;
+ int required;
+
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = OPTION_NONE;
+ required = 0;
bsdunzip->argument = NULL;
/* First time through, initialize everything. */
if (opt == '\0') {
/* End of this group; recurse to get next option. */
bsdunzip->getopt_state = state_next_word;
- return bsdunzip_getopt(bsdunzip);
+ goto again;
}
/* Does this option take an argument? */