From d2b72d3cc19fe2a7d548dac38d55e069e0c9a904 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 15 Sep 2016 09:24:29 +0200 Subject: core: Minor change of the gpgme_op_edit semantics. * src/edit.c (command_handler): Handle special error code. * src/engine-gpg.c (read_status): Ditto. * src/engine-gpgsm.c (status_handler): Ditto. * src/engine-uiserver.c (status_handler): Ditto. * src/util.h (GPG_ERR_FALSE): Define for older libgpg-error versions. -- An edit callback may now simply return GPG_ERR_FALSE to indicate that it did not handled the status code. GPGME will the do the appropriate action, which is to send an empty line. Note that it is highly unlikely that GPG_ERR_FALSE has ever been used by an application as return value from an edit interactor. Signed-off-by: Werner Koch --- src/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index a3425f09..a59700f6 100644 --- a/src/util.h +++ b/src/util.h @@ -45,6 +45,11 @@ #define DIM(v) (sizeof(v)/sizeof((v)[0])) +#if GPG_ERROR_VERSION_NUMBER < 0x011500 /* 1.21 */ +# define GPG_ERR_FALSE 256 +#endif + + /*-- {posix,w32}-util.c --*/ int _gpgme_get_conf_int (const char *key, int *value); -- cgit v1.2.3