1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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.
This commit is contained in:
Werner Koch 2013-11-18 14:09:47 +01:00
parent 798daaa1dd
commit cc9a0b69b6
48 changed files with 355 additions and 320 deletions

View file

@ -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) )
{