gnupg (g10/ChangeLog g10/card-util.c g10/keyedit.c util/ttyio.c)

cvs user wk cvs at cvs.gnupg.org
Mon Mar 21 16:10:52 CET 2005


    Date: Monday, March 21, 2005 @ 16:24:48
  Author: wk
    Path: /cvs/gnupg/gnupg

Modified: g10/ChangeLog g10/card-util.c g10/keyedit.c util/ttyio.c

* keyedit.c (command_generator, keyedit_completion): Changed
indentation.
* card-util.c (command_generator, card_edit_completion): Ditto.


-----------------+
 g10/ChangeLog   |   10 ++++++++--
 g10/card-util.c |   25 ++++++++++++++++---------
 g10/keyedit.c   |   12 +++++++++---
 util/ttyio.c    |    2 +-
 4 files changed, 34 insertions(+), 15 deletions(-)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.711 gnupg/g10/ChangeLog:1.712
--- gnupg/g10/ChangeLog:1.711	Sun Mar 20 04:59:06 2005
+++ gnupg/g10/ChangeLog	Mon Mar 21 16:24:48 2005
@@ -1,3 +1,9 @@
+2005-03-21  Werner Koch  <wk at g10code.com>
+
+	* keyedit.c (command_generator, keyedit_completion): Changed
+	indentation.
+	* card-util.c (command_generator, card_edit_completion): Ditto.
+
 2005-03-19  David Shaw  <dshaw at jabberwocky.com>
 
 	* card-util.c (command_generator, card_edit_completion)
@@ -20,8 +26,8 @@
 	* Makefile.am: Calculate GNUPG_LIBEXECDIR directly.  Do not
 	redefine $libexecdir.
 
-	* options.h, keyserver.c (parse_keyserver_options,
-	keyserver_spawn): Don't treat 'verbose' and 'include-disabled' as
+	* options.h, keyserver.c (parse_keyserver_options)
+	(keyserver_spawn): Don't treat 'verbose' and 'include-disabled' as
 	special.  Just pass them through silently to the keyserver helper.
 
 2005-03-16  Werner Koch  <wk at g10code.com>
Index: gnupg/g10/card-util.c
diff -u gnupg/g10/card-util.c:1.31 gnupg/g10/card-util.c:1.32
--- gnupg/g10/card-util.c:1.31	Sun Mar 20 04:59:07 2005
+++ gnupg/g10/card-util.c	Mon Mar 21 16:24:48 2005
@@ -27,7 +27,7 @@
 
 #if GNUPG_MAJOR_VERSION != 1
 #include "gpg.h"
-#endif
+#endif /*GNUPG_MAJOR_VERSION != 1*/
 #include "util.h"
 #include "i18n.h"
 #include "ttyio.h"
@@ -39,11 +39,11 @@
 #ifdef HAVE_LIBREADLINE
 #include <stdio.h>
 #include <readline/readline.h>
-#endif
+#endif /*HAVE_LIBREADLINE*/
 #include "cardglue.h"
-#else
+#else /*GNUPG_MAJOR_VERSION!=1*/
 #include "call-agent.h"
-#endif
+#endif /*GNUPG_MAJOR_VERSION!=1*/
 
 #define CONTROL_D ('D' - 'A' + 1)
 
@@ -1275,6 +1275,10 @@
 #endif
 }
 
+
+
+/* Data used by the command parser.  This needs to be outside of the
+   function scope to allow readline based command completion.  */
 enum cmdids
   {
     cmdNOP = 0,
@@ -1315,11 +1319,13 @@
     { NULL, cmdINVCMD, 0, NULL } 
   };
 
+
 #if GNUPG_MAJOR_VERSION == 1 && defined (HAVE_LIBREADLINE)
 
 /* These two functions are used by readline for command completion. */
 
-static char *command_generator(const char *text,int state)
+static char *
+command_generator(const char *text,int state)
 {
   static int list_index,len;
   const char *name;
@@ -1344,7 +1350,8 @@
   return NULL;
 }
 
-static char **card_edit_completion(const char *text, int start, int end)
+static char **
+card_edit_completion(const char *text, int start, int end)
 {
   /* If we are at the start of a line, we try and command-complete.
      If not, just do nothing for now. */
@@ -1356,7 +1363,7 @@
 
   return NULL;
 }
-#endif
+#endif /* GNUPG_MAJOR_VERSION == 1 && HAVE_LIBREADLINE */
 
 /* Menu to edit all user changeable values on an OpenPGP card.  Only
    Key creation is not handled here. */
@@ -1424,12 +1431,12 @@
 	    if (!have_commands)
               {
 #if GNUPG_MAJOR_VERSION == 1
-		tty_enable_completion(card_edit_completion);
+		tty_enable_completion (card_edit_completion);
 #endif
 		answer = cpr_get_no_help("cardedit.prompt", _("Command> "));
 		cpr_kill_prompt();
 #if GNUPG_MAJOR_VERSION == 1
-		tty_disable_completion();
+		tty_disable_completion ();
 #endif
 	    }
 	    trim_spaces(answer);
Index: gnupg/g10/keyedit.c
diff -u gnupg/g10/keyedit.c:1.174 gnupg/g10/keyedit.c:1.175
--- gnupg/g10/keyedit.c:1.174	Fri Mar 18 23:07:12 2005
+++ gnupg/g10/keyedit.c	Mon Mar 21 16:24:47 2005
@@ -1280,6 +1280,7 @@
   return 1;
 }
 
+
 /****************
  * Menu driven key editor.  If seckey_check is true, then a secret key
  * that matches username will be looked for.  If it is false, not all
@@ -1408,11 +1409,13 @@
     { NULL, cmdNONE, 0, NULL }
   };
 
+
 #ifdef HAVE_LIBREADLINE
 
 /* These two functions are used by readline for command completion. */
 
-static char *command_generator(const char *text,int state)
+static char *
+command_generator(const char *text,int state)
 {
   static int list_index,len;
   const char *name;
@@ -1437,7 +1440,8 @@
   return NULL;
 }
 
-static char **keyedit_completion(const char *text, int start, int end)
+static char **
+keyedit_completion(const char *text, int start, int end)
 {
   /* If we are at the start of a line, we try and command-complete.
      If not, just do nothing for now. */
@@ -1449,7 +1453,8 @@
 
   return NULL;
 }
-#endif
+#endif /* HAVE_LIBREADLINE */
+
 
 void
 keyedit_menu( const char *username, STRLIST locusr,
@@ -2163,6 +2168,7 @@
 }
 
 
+
 /****************
  * show preferences of a public keyblock.
  */
Index: gnupg/util/ttyio.c
diff -u gnupg/util/ttyio.c:1.35 gnupg/util/ttyio.c:1.36
--- gnupg/util/ttyio.c:1.35	Fri Mar 18 21:17:38 2005
+++ gnupg/util/ttyio.c	Mon Mar 21 16:24:47 2005
@@ -191,7 +191,7 @@
     init_ttyfp();
   rl_inhibit_completion=1;
 }
-#endif
+#endif /*HAVE_LIBREADLINE*/
 
 int
 tty_batchmode( int onoff )




More information about the Gnupg-commits mailing list