diff options
author | Werner Koch <wk@gnupg.org> | 2013-09-30 13:20:06 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-09-30 20:44:50 +0200 |
commit | d69a13d3d1c14ad6a6aa7cd349d6d2dfb152d422 (patch) | |
tree | 5e96dcc38220ca22368d3b4b497f02a2fc9bdba4 /mpi | |
parent | 68cefd0f1d60ac33b58031df9b1d165cb1bf0f14 (diff) | |
download | libgcrypt-d69a13d3d1c14ad6a6aa7cd349d6d2dfb152d422.tar.gz |
log: Try to print s-expressions in a more compact format.
* src/misc.c (count_closing_parens): New.
(_gcry_log_printsxp): Use new function.
* mpi/ec.c (_gcry_mpi_point_log): Take care of a NULL point.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'mpi')
-rw-r--r-- | mpi/ec.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -42,6 +42,12 @@ _gcry_mpi_point_log (const char *name, mpi_point_t point, mpi_ec_t ctx) gcry_mpi_t x, y; char buf[100]; + if (!point) + { + snprintf (buf, sizeof buf - 1, "%s.*", name); + log_mpidump (buf, NULL); + return; + } snprintf (buf, sizeof buf - 1, "%s.X", name); if (ctx) |