diff options
author | Werner Koch <wk@gnupg.org> | 2013-11-18 14:09:47 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-11-18 14:09:47 +0100 |
commit | cc9a0b69b698ba436eaf777e5020532845b56236 (patch) | |
tree | cb2274c3d97fffa7020cb1e5a56373935ee094b2 /tools | |
parent | Add strusage macro replacement feature. (diff) | |
download | gnupg2-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 'tools')
-rw-r--r-- | tools/ccidmon.c | 2 | ||||
-rw-r--r-- | tools/gpg-check-pattern.c | 2 | ||||
-rw-r--r-- | tools/gpg-connect-agent.c | 6 | ||||
-rw-r--r-- | tools/gpgconf-comp.c | 16 | ||||
-rw-r--r-- | tools/gpgconf.c | 13 | ||||
-rw-r--r-- | tools/gpgsplit.c | 164 | ||||
-rw-r--r-- | tools/gpgtar-extract.c | 16 | ||||
-rw-r--r-- | tools/gpgtar.c | 2 | ||||
-rw-r--r-- | tools/symcryptrun.c | 4 | ||||
-rw-r--r-- | tools/watchgnupg.c | 2 |
10 files changed, 114 insertions, 113 deletions
diff --git a/tools/ccidmon.c b/tools/ccidmon.c index 884eab1fb..1137bab00 100644 --- a/tools/ccidmon.c +++ b/tools/ccidmon.c @@ -810,7 +810,7 @@ main (int argc, char **argv) } else if (!strcmp (*argv, "--version")) { - fputs (PGM " (GnuPG) " PACKAGE_VERSION "\n", stdout); + fputs (PGM " ("GNUPG_NAME") " PACKAGE_VERSION "\n", stdout); exit (0); } else if (!strcmp (*argv, "--help")) diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c index 12922c6ac..2db9ae53f 100644 --- a/tools/gpg-check-pattern.c +++ b/tools/gpg-check-pattern.c @@ -135,7 +135,7 @@ my_strusage (int level) const char *p; switch (level) { - case 11: p = "gpg-check-pattern (GnuPG)"; + case 11: p = "gpg-check-pattern (@GnuPG@)"; break; case 13: p = VERSION; break; case 17: p = PRINTABLE_OS_NAME; break; diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index c22e12970..6288a9783 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -182,17 +182,17 @@ my_strusage( int level ) switch (level) { - case 11: p = "gpg-connect-agent (GnuPG)"; + case 11: p = "@GPG@-connect-agent (@GNUPG@)"; break; case 13: p = VERSION; break; case 17: p = PRINTABLE_OS_NAME; break; case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break; case 1: - case 40: p = _("Usage: gpg-connect-agent [options] (-h for help)"); + case 40: p = _("Usage: @GPG@-connect-agent [options] (-h for help)"); break; case 41: - p = _("Syntax: gpg-connect-agent [options]\n" + p = _("Syntax: @GPG@-connect-agent [options]\n" "Connect to a running agent and send commands\n"); break; case 31: p = "\nHome: "; break; diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index ffe7eab09..024417ef5 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -58,7 +58,7 @@ #if defined(HAVE_W32_SYSTEM) && !defined(HAVE_W32CE_SYSTEM) #define GPGNAME "gpg2" #else -#define GPGNAME "gpg" +#define GPGNAME GPG_NAME #endif @@ -180,15 +180,15 @@ static struct } gc_backend[GC_BACKEND_NR] = { { NULL }, /* GC_BACKEND_ANY dummy entry. */ - { "GnuPG", GPGNAME, GNUPG_MODULE_NAME_GPG, + { GNUPG_NAME, GPGNAME, GNUPG_MODULE_NAME_GPG, NULL, "gpgconf-gpg.conf" }, - { "GPGSM", "gpgsm", GNUPG_MODULE_NAME_GPGSM, + { "GPGSM", GPGSM_NAME, GNUPG_MODULE_NAME_GPGSM, NULL, "gpgconf-gpgsm.conf" }, - { "GPG Agent", "gpg-agent", GNUPG_MODULE_NAME_AGENT, + { "GPG Agent", GPG_AGENT_NAME, GNUPG_MODULE_NAME_AGENT, gpg_agent_runtime_change, "gpgconf-gpg-agent.conf" }, - { "SCDaemon", "scdaemon", GNUPG_MODULE_NAME_SCDAEMON, + { "SCDaemon", SCDAEMON_NAME, GNUPG_MODULE_NAME_SCDAEMON, scdaemon_runtime_change, "gpgconf-scdaemon.conf" }, - { "DirMngr", "dirmngr", GNUPG_MODULE_NAME_DIRMNGR, + { "DirMngr", DIRMNGR_NAME, GNUPG_MODULE_NAME_DIRMNGR, NULL, "gpgconf-dirmngr.conf" }, { "DirMngr LDAP Server List", NULL, 0, NULL, "ldapserverlist-file", "LDAP Server" }, @@ -1215,8 +1215,8 @@ my_dgettext (const char *domain, const char *msgid) switched_codeset = 1; bind_textdomain_codeset (PACKAGE_GT, "utf-8"); - bindtextdomain ("dirmngr", LOCALEDIR); - bind_textdomain_codeset ("dirmngr", "utf-8"); + bindtextdomain (DIRMNGR_NAME, LOCALEDIR); + bind_textdomain_codeset (DIRMNGR_NAME, "utf-8"); } diff --git a/tools/gpgconf.c b/tools/gpgconf.c index c586bb3a3..a9bf491ec 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -98,18 +98,18 @@ my_strusage( int level ) switch (level) { - case 11: p = "gpgconf (GnuPG)"; + case 11: p = "@GPGCONF@ (@GNUPG@)"; break; case 13: p = VERSION; break; case 17: p = PRINTABLE_OS_NAME; break; case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break; case 1: - case 40: p = _("Usage: gpgconf [options] (-h for help)"); + case 40: p = _("Usage: @GPGCONF@ [options] (-h for help)"); break; case 41: - p = _("Syntax: gpgconf [options]\n" - "Manage configuration options for tools of the GnuPG system\n"); + p = _("Syntax: @GPGCONF@ [options]\n" + "Manage configuration options for tools of the @GNUPG@ system\n"); break; default: p = NULL; break; @@ -350,10 +350,11 @@ main (int argc, char **argv) es_fprintf (outfp, "dirmngr-socket:%s\n", gc_percent_escape (dirmngr_socket_name ())); { - char *infostr = getenv ("GPG_AGENT_INFO"); + char *infostr = getenv (GPG_AGENT_INFO_NAME); if (!infostr || !*infostr) - infostr = make_filename (default_homedir (), "S.gpg-agent", NULL); + infostr = make_filename (default_homedir (), + GPG_AGENT_SOCK_NAME, NULL); else { char *tmp; diff --git a/tools/gpgsplit.c b/tools/gpgsplit.c index 1c1cee45a..928e283e5 100644 --- a/tools/gpgsplit.c +++ b/tools/gpgsplit.c @@ -54,9 +54,9 @@ static void split_packets (const char *fname); enum cmd_and_opt_values { aNull = 0, oVerbose = 'v', - oPrefix = 'p', - oUncompress = 500, - oSecretToPublic, + oPrefix = 'p', + oUncompress = 500, + oSecretToPublic, oNoSplit, aTest @@ -81,7 +81,7 @@ my_strusage (int level) const char *p; switch (level) { - case 11: p = "gpgsplit (GnuPG)"; + case 11: p = "gpgsplit (@GNUPG@)"; break; case 13: p = VERSION; break; case 17: p = PRINTABLE_OS_NAME; break; @@ -95,7 +95,7 @@ my_strusage (int level) "Syntax: gpgsplit [options] [files]\n" "Split an OpenPGP message into packets\n"; break; - + default: p = NULL; } return p; @@ -114,7 +114,7 @@ main (int argc, char **argv) #endif log_set_prefix ("gpgsplit", JNLIB_LOG_WITH_PREFIX); set_strusage (my_strusage); - + pargs.argc = &argc; pargs.argv = &argv; pargs.flags= 1; /* do not remove the args */ @@ -130,7 +130,7 @@ main (int argc, char **argv) default : pargs.err = 2; break; } } - + if (log_get_errorcount(0)) g10_exit (2); @@ -138,12 +138,12 @@ main (int argc, char **argv) split_packets (NULL); else { - for ( ;argc; argc--, argv++) + for ( ;argc; argc--, argv++) split_packets (*argv); } - + g10_exit (0); - return 0; + return 0; } @@ -168,7 +168,7 @@ pkttype_to_string (int pkttype) case PKT_SECRET_KEY : s = "secret_key"; break; case PKT_PUBLIC_KEY : s = "public_key"; break; case PKT_SECRET_SUBKEY : s = "secret_subkey"; break; - case PKT_COMPRESSED : + case PKT_COMPRESSED : s = opt_uncompress? "uncompressed":"compressed"; break; case PKT_ENCRYPTED : s = "encrypted"; break; @@ -191,17 +191,17 @@ pkttype_to_string (int pkttype) /* * Create a new filename and a return a pointer to a statically - * allocated buffer + * allocated buffer */ static char * create_filename (int pkttype) { static unsigned int partno = 0; static char *name; - - if (!name) + + if (!name) name = xmalloc (strlen (opt_prefix) + 100 ); - + assert (pkttype < 1000 && pkttype >= 0 ); partno++; sprintf (name, "%s%06u-%03d" EXTSEP_S "%.40s", @@ -227,7 +227,7 @@ static int read_u32 (FILE *fp, unsigned long *rn) { size_t tmp; - + if (read_u16 (fp, &tmp)) return -1; *rn = tmp << 16; @@ -239,9 +239,9 @@ read_u32 (FILE *fp, unsigned long *rn) static int write_old_header (FILE *fp, int pkttype, unsigned int len) -{ +{ int ctb = (0x80 | ((pkttype & 15)<<2)); - + if (len < 256) ; else if (len < 65536) @@ -271,7 +271,7 @@ write_old_header (FILE *fp, int pkttype, unsigned int len) static int write_new_header (FILE *fp, int pkttype, unsigned int len) -{ +{ if ( putc ((0xc0 | (pkttype & 0x3f)), fp) == EOF ) return -1; @@ -313,9 +313,9 @@ public_key_length (const unsigned char *buf, size_t buflen) int nmpis; /* byte version number (3 or 4) - u32 creation time + u32 creation time [u16 valid days (version 3 only)] - byte algorithm + byte algorithm n MPIs (n and e) */ if (!buflen) return 0; @@ -368,7 +368,7 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout) unsigned int inbufsize, outbufsize; int c,zinit_done, zrc, nread, count; size_t n; - + memset (&zs, 0, sizeof zs); inbufsize = 2048; inbuf = xmalloc (inbufsize); @@ -376,7 +376,7 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout) outbuf = xmalloc (outbufsize); zs.avail_in = 0; zinit_done = 0; - + do { if (zs.avail_in < inbufsize) @@ -387,11 +387,11 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout) count = inbufsize - n; for (nread=0; nread < count && (c=getc (fpin)) != EOF; - nread++) + nread++) inbuf[n+nread] = c; - + n += nread; - if (nread < count && algo == 1) + if (nread < count && algo == 1) { inbuf[n] = 0xFF; /* chew dummy byte */ n++; @@ -400,12 +400,12 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout) } zs.next_out = (Bytef *) outbuf; zs.avail_out = outbufsize; - - if (!zinit_done) + + if (!zinit_done) { zrc = (algo == 1? inflateInit2 ( &zs, -13) : inflateInit ( &zs )); - if (zrc != Z_OK) + if (zrc != Z_OK) { log_fatal ("zlib problem: %s\n", zs.msg? zs.msg : zrc == Z_MEM_ERROR ? "out of core" : @@ -431,17 +431,17 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout) else log_fatal ("zlib inflate problem: rc=%d\n", zrc ); } - for (n=0; n < outbufsize - zs.avail_out; n++) + for (n=0; n < outbufsize - zs.avail_out; n++) { if (putc (outbuf[n], fpout) == EOF ) return 1; } } - } + } while (zrc != Z_STREAM_END && zrc != Z_BUF_ERROR); { int i; - + fputs ("Left over bytes:", stderr); for (i=0; i < zs.avail_in; i++) fprintf (stderr, " %02X", zs.next_in[i]); @@ -462,7 +462,7 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout) unsigned int inbufsize, outbufsize; int c,zinit_done, zrc, nread, count; size_t n; - + memset (&bzs, 0, sizeof bzs); inbufsize = 2048; inbuf = xmalloc (inbufsize); @@ -470,7 +470,7 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout) outbuf = xmalloc (outbufsize); bzs.avail_in = 0; zinit_done = 0; - + do { if (bzs.avail_in < inbufsize) @@ -481,11 +481,11 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout) count = inbufsize - n; for (nread=0; nread < count && (c=getc (fpin)) != EOF; - nread++) + nread++) inbuf[n+nread] = c; - + n += nread; - if (nread < count && algo == 1) + if (nread < count && algo == 1) { inbuf[n] = 0xFF; /* chew dummy byte */ n++; @@ -494,11 +494,11 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout) } bzs.next_out = outbuf; bzs.avail_out = outbufsize; - - if (!zinit_done) + + if (!zinit_done) { zrc = BZ2_bzDecompressInit(&bzs,0,0); - if (zrc != BZ_OK) + if (zrc != BZ_OK) log_fatal ("bz2lib problem: %d\n",zrc); zinit_done = 1; } @@ -509,13 +509,13 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout) ; /* eof */ else if (zrc != BZ_OK && zrc != BZ_PARAM_ERROR) log_fatal ("bz2lib inflate problem: %d\n", zrc ); - for (n=0; n < outbufsize - bzs.avail_out; n++) + for (n=0; n < outbufsize - bzs.avail_out; n++) { if (putc (outbuf[n], fpout) == EOF ) return 1; } } - } + } while (zrc != BZ_STREAM_END && zrc != BZ_PARAM_ERROR); BZ2_bzDecompressEnd(&bzs); @@ -532,7 +532,7 @@ write_part (FILE *fpin, unsigned long pktlen, int c, first; unsigned char *p; const char *outname = create_filename (pkttype); - + #if defined(__riscos__) && defined(USE_ZLIBRISCOS) static int initialized = 0; @@ -546,7 +546,7 @@ write_part (FILE *fpin, unsigned long pktlen, if (opt_verbose) log_info ("writing '%s'\n", outname); fpout = fopen (outname, "wb"); - if (!fpout) + if (!fpout) { log_error ("error creating '%s': %s\n", outname, strerror(errno)); /* stop right now, otherwise we would mess up the sequence @@ -563,10 +563,10 @@ write_part (FILE *fpin, unsigned long pktlen, pkttype = pkttype == PKT_SECRET_KEY? PKT_PUBLIC_KEY:PKT_PUBLIC_SUBKEY; - for (i=0; i < pktlen; i++) + for (i=0; i < pktlen; i++) { c = getc (fpin); - if (c == EOF) + if (c == EOF) goto read_error; blob[i] = c; } @@ -577,17 +577,17 @@ write_part (FILE *fpin, unsigned long pktlen, g10_exit (1); } if ( (hdr[0] & 0x40) ) - { + { if (write_new_header (fpout, pkttype, len)) goto write_error; } else - { + { if (write_old_header (fpout, pkttype, len)) goto write_error; } - for (i=0; i < len; i++) + for (i=0; i < len; i++) { if ( putc (blob[i], fpout) == EOF ) goto write_error; @@ -605,12 +605,12 @@ write_part (FILE *fpin, unsigned long pktlen, goto write_error; } } - + first = 1; while (partial) { size_t partlen; - + if (partial == 1) { /* openpgp */ if (first ) @@ -619,11 +619,11 @@ write_part (FILE *fpin, unsigned long pktlen, assert( c >= 224 && c < 255 ); first = 0; } - else if ((c = getc (fpin)) == EOF ) + else if ((c = getc (fpin)) == EOF ) goto read_error; else hdr[hdrlen++] = c; - + if (c < 192) { pktlen = c; @@ -632,7 +632,7 @@ write_part (FILE *fpin, unsigned long pktlen, else if (c < 224 ) { pktlen = (c - 192) * 256; - if ((c = getc (fpin)) == EOF) + if ((c = getc (fpin)) == EOF) goto read_error; hdr[hdrlen++] = c; pktlen += c + 192; @@ -656,9 +656,9 @@ write_part (FILE *fpin, unsigned long pktlen, goto write_error; } partlen = 1 << (c & 0x1f); - for (; partlen; partlen--) + for (; partlen; partlen--) { - if ((c = getc (fpin)) == EOF) + if ((c = getc (fpin)) == EOF) goto read_error; if ( putc (c, fpout) == EOF ) goto write_error; @@ -672,17 +672,17 @@ write_part (FILE *fpin, unsigned long pktlen, goto read_error; hdr[hdrlen++] = partlen >> 8; hdr[hdrlen++] = partlen; - for (p=hdr; hdrlen; p++, hdrlen--) + for (p=hdr; hdrlen; p++, hdrlen--) { if ( putc (*p, fpout) == EOF ) goto write_error; } if (!partlen) partial = 0; /* end of packet */ - for (; partlen; partlen--) + for (; partlen; partlen--) { c = getc (fpin); - if (c == EOF) + if (c == EOF) goto read_error; if ( putc (c, fpout) == EOF ) goto write_error; @@ -693,7 +693,7 @@ write_part (FILE *fpin, unsigned long pktlen, pktlen = 0; partial = 0; hdrlen = 0; - if (opt_uncompress) + if (opt_uncompress) { if ((c = getc (fpin)) == EOF) goto read_error; @@ -718,7 +718,7 @@ write_part (FILE *fpin, unsigned long pktlen, } else { - while ( (c=getc (fpin)) != EOF ) + while ( (c=getc (fpin)) != EOF ) { if ( putc (c, fpout) == EOF ) goto write_error; @@ -729,33 +729,33 @@ write_part (FILE *fpin, unsigned long pktlen, } } - for (p=hdr; hdrlen; p++, hdrlen--) + for (p=hdr; hdrlen; p++, hdrlen--) { if ( putc (*p, fpout) == EOF ) goto write_error; } - + /* standard packet or last segment of partial length encoded packet */ - for (; pktlen; pktlen--) + for (; pktlen; pktlen--) { c = getc (fpin); - if (c == EOF) + if (c == EOF) goto read_error; if ( putc (c, fpout) == EOF ) goto write_error; } - + ready: if ( !opt_no_split && fclose (fpout) ) log_error ("error closing '%s': %s\n", outname, strerror (errno)); return 0; - - write_error: + + write_error: log_error ("error writing '%s': %s\n", outname, strerror (errno)); if (!opt_no_split) fclose (fpout); return 2; - + read_error: if (!opt_no_split) { @@ -776,12 +776,12 @@ do_split (FILE *fp) int partial = 0; unsigned char header[20]; int header_idx = 0; - + ctb = getc (fp); if (ctb == EOF) return 3; /* ready */ header[header_idx++] = ctb; - + if (!(ctb & 0x80)) { log_error("invalid CTB %02x\n", ctb ); @@ -799,19 +799,19 @@ do_split (FILE *fp) else if ( c < 224 ) { pktlen = (c - 192) * 256; - if( (c = getc (fp)) == EOF ) + if( (c = getc (fp)) == EOF ) return -1; header[header_idx++] = c; pktlen += c + 192; } - else if ( c == 255 ) + else if ( c == 255 ) { if (read_u32 (fp, &pktlen)) return -1; header[header_idx++] = pktlen >> 24; header[header_idx++] = pktlen >> 16; header[header_idx++] = pktlen >> 8; - header[header_idx++] = pktlen; + header[header_idx++] = pktlen; } else { /* partial body length */ @@ -822,7 +822,7 @@ do_split (FILE *fp) else { int lenbytes; - + pkttype = (ctb>>2)&0xf; lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3)); if (!lenbytes ) @@ -835,13 +835,13 @@ do_split (FILE *fp) } else { - for ( ; lenbytes; lenbytes-- ) + for ( ; lenbytes; lenbytes-- ) { pktlen <<= 8; - if( (c = getc (fp)) == EOF ) + if( (c = getc (fp)) == EOF ) return -1; header[header_idx++] = c; - + pktlen |= c; } } @@ -856,18 +856,18 @@ split_packets (const char *fname) { FILE *fp; int rc; - + if (!fname || !strcmp (fname, "-")) { fp = stdin; fname = "-"; } - else if ( !(fp = fopen (fname,"rb")) ) + else if ( !(fp = fopen (fname,"rb")) ) { log_error ("can't open '%s': %s\n", fname, strerror (errno)); return; } - + while ( !(rc = do_split (fp)) ) ; if ( rc > 0 ) @@ -876,7 +876,7 @@ split_packets (const char *fname) log_error ("error reading '%s': %s\n", fname, strerror (errno)); else log_error ("premature EOF while reading '%s'\n", fname ); - + if ( fp != stdin ) fclose (fp); } diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c index d0e462083..1ea359755 100644 --- a/tools/gpgtar-extract.c +++ b/tools/gpgtar-extract.c @@ -51,7 +51,7 @@ extract_regular (estream_t stream, const char *dirname, } else err = 0; - + outfp = es_fopen (fname, "wb"); if (!outfp) { @@ -98,7 +98,7 @@ extract_directory (const char *dirname, tar_header_t hdr) gpg_error_t err; char *fname; size_t prefixlen; - + prefixlen = strlen (dirname) + 1; fname = strconcat (dirname, "/", hdr->name, NULL); if (!fname) @@ -124,7 +124,7 @@ extract_directory (const char *dirname, tar_header_t hdr) original error code in case of a failure. */ char *p; int rc = 0; - + for (p = fname+prefixlen; (p = strchr (p, '/')); p++) { *p = 0; @@ -166,8 +166,8 @@ extract (estream_t stream, const char *dirname, tar_header_t hdr) #endif /*HAVE_DOSISH_SYSTEM*/ if (!n - || strstr (hdr->name, "//") - || strstr (hdr->name, "/../") + || strstr (hdr->name, "//") + || strstr (hdr->name, "/../") || !strncmp (hdr->name, "../", 3) || (n >= 3 && !strcmp (hdr->name+n-3, "/.." ))) { @@ -208,7 +208,7 @@ create_directory (const char *dirprefix) /* Remove common suffixes. */ n = strlen (dirprefix); - if (n > 4 && (!compare_filenames (dirprefix + n - 4, EXTSEP_S "gpg") + if (n > 4 && (!compare_filenames (dirprefix + n - 4, EXTSEP_S GPGEXT_GPG) || !compare_filenames (dirprefix + n - 4, EXTSEP_S "pgp") || !compare_filenames (dirprefix + n - 4, EXTSEP_S "asc") || !compare_filenames (dirprefix + n - 4, EXTSEP_S "pem") @@ -283,7 +283,7 @@ gpgtar_extract (const char *filename) } } else - stream = es_stdin; + stream = es_stdin; if (stream == es_stdin) es_set_binary (es_stdin); @@ -323,7 +323,7 @@ gpgtar_extract (const char *filename) header = gpgtar_read_header (stream); if (!header) goto leave; - + if (extract (stream, dirname, header)) goto leave; xfree (header); diff --git a/tools/gpgtar.c b/tools/gpgtar.c index 3c3105456..e48498616 100644 --- a/tools/gpgtar.c +++ b/tools/gpgtar.c @@ -115,7 +115,7 @@ my_strusage( int level ) switch (level) { - case 11: p = "gpgtar (GnuPG)"; + case 11: p = "@GPGTAR@ (@GNUPG@)"; break; case 13: p = VERSION; break; case 17: p = PRINTABLE_OS_NAME; break; diff --git a/tools/symcryptrun.c b/tools/symcryptrun.c index 4074c6ec9..eff14c946 100644 --- a/tools/symcryptrun.c +++ b/tools/symcryptrun.c @@ -200,7 +200,7 @@ my_strusage (int level) switch (level) { - case 11: p = "symcryptrun (GnuPG)"; + case 11: p = "symcryptrun (@GNUPG@)"; break; case 13: p = VERSION; break; case 17: p = PRINTABLE_OS_NAME; break; @@ -1010,7 +1010,7 @@ main (int argc, char **argv) /* Tell simple-pwquery about the the standard socket name. */ { - char *tmp = make_filename (opt.homedir, "S.gpg-agent", NULL); + char *tmp = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL); simple_pw_set_socket (tmp); xfree (tmp); } diff --git a/tools/watchgnupg.c b/tools/watchgnupg.c index 060aa0424..4f4d54db2 100644 --- a/tools/watchgnupg.c +++ b/tools/watchgnupg.c @@ -39,7 +39,7 @@ /* Allow for a standalone build on most systems. */ #ifdef VERSION -#define MYVERSION_LINE PGM " (GnuPG) " VERSION +#define MYVERSION_LINE PGM " ("GNUPG_NAME") " VERSION #define BUGREPORT_LINE "\nReport bugs to <bug-gnupg@gnu.org>.\n" #else #define MYVERSION_LINE PGM " (standalone build) " __DATE__ |