diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-10 23:12:02 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-11 00:28:52 +0300 |
commit | db81e378576dcc5510032c72060e48e562f208c9 (patch) | |
tree | 914c5f277a5fad050527a5c5da815f521e8023dc /src/gpg.c | |
parent | 84db86f0151385a8f05483bf691fde86b4e4e153 (diff) | |
download | wydawca-db81e378576dcc5510032c72060e48e562f208c9.tar.gz wydawca-db81e378576dcc5510032c72060e48e562f208c9.tar.bz2 |
Remove save-cwd.
* src/pushd.c: New file.
* src/Makefile.am: Add pushd.c
* src/wydawca.h (push_dir, pop_dir): New functions.
* src/diskio.c: Use push_dir/pop_dir.
* src/exec.c: Likewise.
* src/gpg.c: Likewise.
* gnulib.modules: Remove save-cwd.
* tests/pushck.c: New file.
* tests/pushdir.at: New file.
* tests/testsuite.at: Add pushdir.at
* tests/Makefile.am: Likewise.
* tests/.gitignore: Add pushck.
Diffstat (limited to 'src/gpg.c')
-rw-r--r-- | src/gpg.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -17,7 +17,6 @@ | |||
17 | /* GPG interface functions */ | 17 | /* GPG interface functions */ |
18 | 18 | ||
19 | #include "wydawca.h" | 19 | #include "wydawca.h" |
20 | #include "save-cwd.h" | ||
21 | #include <gpgme.h> | 20 | #include <gpgme.h> |
22 | 21 | ||
23 | #define fail_if_err(expr) \ | 22 | #define fail_if_err(expr) \ |
@@ -91,16 +90,15 @@ static int | |||
91 | rmdir_r (const char *name) | 90 | rmdir_r (const char *name) |
92 | { | 91 | { |
93 | int rc; | 92 | int rc; |
94 | struct saved_cwd cwd; | ||
95 | 93 | ||
96 | if (save_cwd (&cwd)) | 94 | if (push_dir (NULL)) |
97 | { | 95 | { |
98 | logmsg (LOG_ERR, _("cannot save current directory: %s"), | 96 | logmsg (LOG_ERR, _("cannot save current directory: %s"), |
99 | strerror (errno)); | 97 | strerror (errno)); |
100 | return 1; | 98 | return 1; |
101 | } | 99 | } |
102 | rc = recursive_rmdir (name); | 100 | rc = recursive_rmdir (name); |
103 | if (restore_cwd (&cwd)) | 101 | if (pop_dir ()) |
104 | { | 102 | { |
105 | logmsg (LOG_ERR, _("cannot restore current directory: %s"), | 103 | logmsg (LOG_ERR, _("cannot restore current directory: %s"), |
106 | strerror (errno)); | 104 | strerror (errno)); |