diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-01-23 12:34:53 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-01-23 12:38:16 +0100 |
commit | 0de59ff963a97014d47a2652e7216e135a39014e (patch) | |
tree | b104df2527e402dcc99808fda60271f1d701d1ef /openpgp-ffi/examples | |
parent | f94ec71325f400e19560a3199aa48b6e60d2e686 (diff) |
openpgp-ffi: Remove pgp_tpk_dump.
- This function was used early on to demonstrate the FFI layer. It
can now be expressed using pgp_tpk_debug().
Diffstat (limited to 'openpgp-ffi/examples')
-rw-r--r-- | openpgp-ffi/examples/example.c | 8 | ||||
-rw-r--r-- | openpgp-ffi/examples/reader.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/openpgp-ffi/examples/example.c b/openpgp-ffi/examples/example.c index 4d00876d..c23b4381 100644 --- a/openpgp-ffi/examples/example.c +++ b/openpgp-ffi/examples/example.c @@ -1,8 +1,9 @@ #define _GNU_SOURCE -#include <error.h> #include <errno.h> +#include <error.h> #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> @@ -37,7 +38,10 @@ main (int argc, char **argv) if (tpk == NULL) error (1, 0, "pgp_tpk_from_bytes: %s", pgp_error_string (err)); - pgp_tpk_dump (tpk); + char *debug = pgp_tpk_debug (tpk); + printf ("%s", debug); + free (debug); + pgp_tpk_free (tpk); munmap (b, st.st_size); close (fd); diff --git a/openpgp-ffi/examples/reader.c b/openpgp-ffi/examples/reader.c index f8a69adf..125b0e37 100644 --- a/openpgp-ffi/examples/reader.c +++ b/openpgp-ffi/examples/reader.c @@ -3,6 +3,7 @@ #include <errno.h> #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> @@ -39,7 +40,10 @@ main (int argc, char **argv) if (tpk == NULL) error (1, 0, "pgp_tpk_from_reader: %s", pgp_error_string (err)); - pgp_tpk_dump (tpk); + char *debug = pgp_tpk_debug (tpk); + printf ("%s", debug); + free (debug); + pgp_tpk_free (tpk); pgp_reader_free (reader); munmap (b, st.st_size); |