aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-12-21 10:03:00 +0000
committerWerner Koch <[email protected]>2004-12-21 10:03:00 +0000
commit878cf2076633742ad5f4e4008059b0fc8d776d37 (patch)
tree07e7c9d7bab4f56a69d5496cede7ab6a3f36397a /g10
parent* configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all (diff)
downloadgnupg-878cf2076633742ad5f4e4008059b0fc8d776d37.tar.gz
gnupg-878cf2076633742ad5f4e4008059b0fc8d776d37.zip
* gpg-agent.c (main): Use default_homedir().
* protect-tool.c (main): Ditto. * signal.c (got_fatal_signal, got_usr_signal) (got_fatal_signal) [DOSISH]: Don't build. * simple-gettext.c: Include sysutils.h * homedir.c: New. * Makefile.am (libcommon_a_SOURCES): Add it. (EXTRA_DIST): Removed mkerror and mkerrtok. * gpgv.c, g10.c (main): Use default_hoemdir (). * scdaemon.c (main): Use default_homedir(). * gpgsm.c (main): Use default_homedir().
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/g10.c11
-rw-r--r--g10/gpgv.c11
3 files changed, 8 insertions, 18 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 6966bbd7b..bd4b54894 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-21 Werner Koch <[email protected]>
+
+ * gpgv.c, g10.c (main): Use default_hoemdir ().
+
2004-12-18 Werner Koch <[email protected]>
* gpg.h (map_assuan_err): Define in terms of
diff --git a/g10/g10.c b/g10/g10.c
index 039074f6b..e02ad0d13 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -1264,16 +1264,9 @@ main( int argc, char **argv )
opt.mangle_dos_filenames = 1;
opt.use_agent = 1;
-#if defined (_WIN32)
- set_homedir ( read_w32_registry_string( NULL,
- "Software\\GNU\\GnuPG", "HomeDir" ));
-#else
- set_homedir ( getenv("GNUPGHOME") );
-#endif
- if( !*opt.homedir )
- set_homedir ( GNUPG_DEFAULT_HOMEDIR );
+ set_homedir ( default_homedir () );
- /* check whether we have a config file on the commandline */
+ /* Check whether we have a config file on the commandline */
orig_argc = argc;
orig_argv = argv;
pargs.argc = &argc;
diff --git a/g10/gpgv.c b/g10/gpgv.c
index 015736c33..0a97d56b9 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -150,15 +150,8 @@ main( int argc, char **argv )
opt.trust_model = TM_ALWAYS;
opt.batch = 1;
-#if defined (_WIN32)
- opt.homedir = read_w32_registry_string( NULL, "Software\\GNU\\GnuPG",
- "HomeDir" );
-#else
- opt.homedir = getenv("GNUPGHOME");
-#endif
- if( !opt.homedir || !*opt.homedir ) {
- opt.homedir = GNUPG_DEFAULT_HOMEDIR;
- }
+ opt.homedir = default_homedir ();
+
tty_no_terminal(1);
tty_batchmode(1);
disable_dotlock();