summaryrefslogtreecommitdiff
path: root/lib/argmatch.h
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-07-07 12:12:25 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-07-07 12:12:25 +0200
commitee77e5c1fef322b8c0a6596aa9b2c43323eff4d1 (patch)
tree3276afa6afa7b0b9846f68912c749616c4cc3bf5 /lib/argmatch.h
parentb979980a653ce610fe5f64935adedda425da3ca4 (diff)
downloadgnulib-ee77e5c1fef322b8c0a6596aa9b2c43323eff4d1.tar.gz
argmatch: adjust columns for help2man.
* lib/argmatch.h (argmatch_##Name##_doc_col): If some argument requires column 20 or more, return 20.
Diffstat (limited to 'lib/argmatch.h')
-rw-r--r--lib/argmatch.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/argmatch.h b/lib/argmatch.h
index 57d131f32d..897fa415d6 100644
--- a/lib/argmatch.h
+++ b/lib/argmatch.h
@@ -264,9 +264,8 @@ char const *argmatch_to_argument (void const *value,
for (int j = 0; g->args[j].arg; ++j) \
if (! memcmp (&g->args[ival].val, &g->args[j].val, size)) \
col += (col == 4 ? 0 : 2) + strlen (g->args[j].arg); \
- /* Ignore series that are too wide. */ \
- if (col <= 20 && res <= col) \
- res = col; \
+ if (res <= col) \
+ res = col <= 20 ? col : 20; \
} \
return res ? res : 20; \
} \