-/*
- * Given a long option, return the corresponding short option character,
- * or 0 if there is no such character.
- */
-static char lopt_to_sopt(const char *sopts, const struct option *opt)
-{
- int val = opt->val;
- const char *c;
-
- if (val <= 0 || val > CHAR_MAX)
- return 0;
-
- if (val == ':' || val == '+' || val == '-')
- return 0;
-
- c = strchr(sopts, opt->val);
- if (c)
- return *c;
- return 0;
-}
-
-/*
- * Print a string, with each line indented by i spaces. The first line
- * will be indented by w fewer spaces (to account for the cursor being in
- * some other column).
- */
-static void print_block(const char *s, int i, int w)
-{
- for (; *s; w = 0) {
- const char *nl = strchr(s, '\n');
- int n = (nl ? nl-s : -1);
-
- printf("%*s%.*s\n", i-w, "", n, s);
- if (!nl)
- break;
-
- s = nl+1;
- }
-}
-