diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-11-21 14:48:50 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-11-21 14:48:50 +0100 |
commit | 5ad31a0d89fe8e3be764c6c8ed0bfe6a5f3b1dc8 (patch) | |
tree | 9965402340f61b2641e1aa26bb8b0c2d3305f95e /src | |
parent | 7f00c3a3e867d6e62167c890eae736983e5d872c (diff) | |
download | gnutls-5ad31a0d89fe8e3be764c6c8ed0bfe6a5f3b1dc8.tar.gz |
gnutls_priority_string_list: allow printing the special keywords as well.
Diffstat (limited to 'src')
-rw-r--r-- | src/cli.c | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -1354,15 +1354,38 @@ void print_priority_list(void) { unsigned int idx; const char *str; + unsigned int lineb = 0; printf("Priority strings in GnuTLS %s:\n", gnutls_check_version(NULL)); + fputs("\t", stdout); for (idx=0;;idx++) { - str = gnutls_priority_string_list(idx); + str = gnutls_priority_string_list(idx, GNUTLS_PRIORITY_LIST_INIT_KEYWORDS); if (str == NULL) break; - printf("\t%s\n", str); + lineb += printf("%s ", str); + if (lineb > 64) { + lineb = 0; + printf("\n\t"); + } + } + + printf("\n\nSpecial strings:\n"); + lineb = 0; + fputs("\t", stdout); + for (idx=0;;idx++) { + str = gnutls_priority_string_list(idx, GNUTLS_PRIORITY_LIST_SPECIAL); + if (str == NULL) + break; + if (str[0] == 0) + continue; + lineb += printf("%%%s ", str); + if (lineb > 64) { + lineb = 0; + printf("\n\t"); + } } + printf("\n"); return; } |