summaryrefslogtreecommitdiffstats
path: root/g10/openfile.c
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 /g10/openfile.c
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 'g10/openfile.c')
-rw-r--r--g10/openfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/openfile.c b/g10/openfile.c
index 704dcff5b..119c5670d 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -105,7 +105,7 @@ make_outfile_name( const char *iname )
return xstrdup("-");
n = strlen(iname);
- if( n > 4 && ( !CMP_FILENAME(iname+n-4, EXTSEP_S "gpg")
+ if( n > 4 && ( !CMP_FILENAME(iname+n-4, EXTSEP_S GPGEXT_GPG)
|| !CMP_FILENAME(iname+n-4, EXTSEP_S "pgp")
|| !CMP_FILENAME(iname+n-4, EXTSEP_S "sig")
|| !CMP_FILENAME(iname+n-4, EXTSEP_S "asc") ) ) {
@@ -255,7 +255,8 @@ open_outfile (int inp_fd, const char *iname, int mode, iobuf_t *a)
{
buf = xstrconcat (iname,
(mode==1 ? EXTSEP_S "asc" :
- mode==2 ? EXTSEP_S "sig" : EXTSEP_S "gpg"),
+ mode==2 ? EXTSEP_S "sig" :
+ /* */ EXTSEP_S GPGEXT_GPG),
NULL);
}
name = buf;
@@ -369,7 +370,7 @@ copy_options_file( const char *destdir )
xfree(fname);
return;
}
- strcpy(stpcpy(fname, destdir), DIRSEP_S "gpg" EXTSEP_S "conf" );
+ strcpy(stpcpy(fname, destdir), DIRSEP_S GPGEXT_GPG EXTSEP_S "conf" );
oldmask=umask(077);
if ( is_secured_filename (fname) )
{