summaryrefslogtreecommitdiffstats
path: root/g13
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-11-18 14:09:47 +0100
committerWerner Koch <wk@gnupg.org>2013-11-18 14:09:47 +0100
commitcc9a0b69b698ba436eaf777e5020532845b56236 (patch)
treecb2274c3d97fffa7020cb1e5a56373935ee094b2 /g13
parentAdd strusage macro replacement feature. (diff)
downloadgnupg2-cc9a0b69b698ba436eaf777e5020532845b56236.tar.xz
gnupg2-cc9a0b69b698ba436eaf777e5020532845b56236.zip
Make use of the *_NAME etc macros.
Replace hardwired strings at many places with new macros from config.h and use the new strusage macro replacement feature. * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn sentinels. * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
Diffstat (limited to 'g13')
-rw-r--r--g13/g13.c16
-rw-r--r--g13/server.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/g13/g13.c b/g13/g13.c
index fca9e7a19..86821144d 100644
--- a/g13/g13.c
+++ b/g13/g13.c
@@ -212,17 +212,17 @@ my_strusage( int level )
switch (level)
{
- case 11: p = "g13 (GnuPG)";
+ case 11: p = "@G13@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
case 19: p = _("Please report bugs to <" PACKAGE_BUGREPORT ">.\n");
break;
case 1:
- case 40: p = _("Usage: g13 [options] [files] (-h for help)");
+ case 40: p = _("Usage: @G13@ [options] [files] (-h for help)");
break;
case 41:
- p = _("Syntax: g13 [options] [files]\n"
+ p = _("Syntax: @G13@ [options] [files]\n"
"Create, mount or unmount an encrypted file system container\n");
break;
@@ -238,7 +238,7 @@ my_strusage( int level )
static void
wrong_args (const char *text)
{
- fputs (_("usage: g13 [options] "), stderr);
+ fprintf (stderr, _("usage: %s [options] "), G13_NAME);
fputs (text, stderr);
putc ('\n', stderr);
g13_exit (2);
@@ -344,11 +344,11 @@ main ( int argc, char **argv)
/*mtrace();*/
- gnupg_reopen_std ("g13");
+ gnupg_reopen_std (G13_NAME);
set_strusage (my_strusage);
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
- log_set_prefix ("g13", 1);
+ log_set_prefix (G13_NAME, 1);
/* Make sure that our subsystems are ready. */
i18n_init ();
@@ -430,7 +430,7 @@ main ( int argc, char **argv)
/* Set the default option file */
if (default_config )
- configname = make_filename (opt.homedir, "g13.conf", NULL);
+ configname = make_filename (opt.homedir, G13_NAME".conf", NULL);
argc = orig_argc;
argv = orig_argv;
@@ -577,7 +577,7 @@ main ( int argc, char **argv)
configname = NULL;
if (!opt.config_filename)
- opt.config_filename = make_filename (opt.homedir, "g13.conf", NULL);
+ opt.config_filename = make_filename (opt.homedir, G13_NAME".conf", NULL);
if (log_get_errorcount(0))
g13_exit(2);
diff --git a/g13/server.c b/g13/server.c
index 31c961dfb..573f6706a 100644
--- a/g13/server.c
+++ b/g13/server.c
@@ -612,7 +612,7 @@ g13_server (ctrl_t ctrl)
if (opt.verbose || opt.debug)
{
char *tmp = NULL;
- const char *s1 = getenv ("GPG_AGENT_INFO");
+ const char *s1 = getenv (GPG_AGENT_INFO_NAME);
tmp = xtryasprintf ("Home: %s\n"
"Config: %s\n"