summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/commands.c b/commands.c
index 95a835d..b3f2bda 100644
--- a/commands.c
+++ b/commands.c
@@ -241,6 +241,7 @@ show_help(struct statics * stp)
{
static char *fullhelp;
char *p = NULL;
+ char *q = NULL;
if (fullhelp == NULL)
{
@@ -253,8 +254,17 @@ show_help(struct statics * stp)
{
p = "not supported";
}
- fullhelp = (char *) malloc(strlen(help_text) + strlen(p) + 2);
- sprintf(fullhelp, help_text, p);
+ if (stp->order_names != NULL)
+ {
+ q = string_list(stp->order_names_io);
+ }
+ if (q == NULL)
+ {
+ q = "not supported";
+ }
+ fullhelp = (char *) malloc(strlen(help_text) + strlen(p) + strlen(q) +
+ 2);
+ sprintf(fullhelp, help_text, p, q);
}
display_pager("Top version ");