diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-11-18 13:52:55 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-11-18 13:52:55 +0100 |
commit | 21fcced971129ae4fbf9c9de3cfdec4cf96a46cf (patch) | |
tree | d271caf192414f80b30df39e827bd14e2e083eb0 /src | |
parent | ec30c5e79707dfb6a52b0e5f7dd476374888e89c (diff) | |
parent | 9ab517d65bbe24869c2c449a52eb17f572d1ac8d (diff) |
Update upstream source from tag 'upstream/3.24'
Update to upstream version '3.24'
with Debian dir 0a6e08a83f1f2a2aa8e726c19c24ed27cb08f134
Diffstat (limited to 'src')
-rw-r--r-- | src/opt.c | 28 |
1 files changed, 13 insertions, 15 deletions
@@ -304,22 +304,20 @@ static void opt_to_text(const struct HXoption *opt, char *buf, size_t len, buf[i++] = opt->sh; if (!takes_void(opt->type)) i += snprintf(buf + i, len - i, " %s", htyp); + } else if (opt->sh == '\0') { + if (takes_void(opt->type)) + i += snprintf(buf + i, len - i, + "--%s", opt->ln); + else + i += snprintf(buf + i, len - i, + "--%s=%s", opt->ln, htyp); } else { - if (opt->sh == '\0') { - if (takes_void(opt->type)) - i += snprintf(buf + i, len - i, - "--%s", opt->ln); - else - i += snprintf(buf + i, len - i, - "--%s=%s", opt->ln, htyp); - } else { - if (takes_void(opt->type)) - i += snprintf(buf + i, len - i, "-%c%s--%s", - opt->sh, alt, opt->ln); - else - i += snprintf(buf + i, len - i, "-%c%s--%s%c%s", - opt->sh, alt, opt->ln, equ, htyp); - } + if (takes_void(opt->type)) + i += snprintf(buf + i, len - i, "-%c%s--%s", + opt->sh, alt, opt->ln); + else + i += snprintf(buf + i, len - i, "-%c%s--%s%c%s", + opt->sh, alt, opt->ln, equ, htyp); } if (flags & W_BRACKET) |