[git] GPGME - branch, master, updated. gpgme-1.10.0-198-g49a617f

by Werner Koch cvs at cvs.gnupg.org
Wed Apr 18 11:42:00 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  49a617f8bbff116884ca5c7238c2e0ea4e26ce59 (commit)
      from  ed1052842df633bc149b14c4cb17859e3c66afe4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 49a617f8bbff116884ca5c7238c2e0ea4e26ce59
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Apr 18 11:34:16 2018 +0200

    json: Improve help meta command in gpgme-json.
    
    * src/gpgme-json.c (process_meta_commands): Add ",help CMD".
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/gpgme-json.c b/src/gpgme-json.c
index 576e63e..f63f196 100644
--- a/src/gpgme-json.c
+++ b/src/gpgme-json.c
@@ -1156,13 +1156,23 @@ process_meta_commands (const char *request)
     request++;
 
   if (!strncmp (request, "help", 4) && (spacep (request+4) || !request[4]))
-    result = process_request ("{ \"op\": \"help\","
-                              " \"interactive_help\": "
-                              "\"\\nMeta commands:\\n"
-                              "  ,read FNAME Process data from FILE\\n"
-                              "  ,help       This help\\n"
-                              "  ,quit       Terminate process\""
-                              "}");
+    {
+      if (request[4])
+        {
+          char *buf = xstrconcat ("{ \"help\":true, \"op\":\"", request+5,
+                                  "\" }", NULL);
+          result = process_request (buf);
+          xfree (buf);
+        }
+      else
+        result = process_request ("{ \"op\": \"help\","
+                                  " \"interactive_help\": "
+                                  "\"\\nMeta commands:\\n"
+                                  "  ,read FNAME Process data from FILE\\n"
+                                  "  ,help CMD   Print help for a command\\n"
+                                  "  ,quit       Terminate process\""
+                                  "}");
+    }
   else if (!strncmp (request, "quit", 4) && (spacep (request+4) || !request[4]))
     exit (0);
   else if (!strncmp (request, "read", 4) && (spacep (request+4) || !request[4]))

-----------------------------------------------------------------------

Summary of changes:
 src/gpgme-json.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list