mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Replace most of the remaining stdio calls by estream calls.
--
We need to use es_fopen on Windows to cope with non-ascii file names.
This is quite a large but fortunately straightforward change. At a
very few places we keep using stdio (for example due to the use of
popen).
GnuPG-bug-id: 5098
Signed-off-by: Werner Koch <wk@gnupg.org>
Backported-from-master: 390497ea11
This commit is contained in:
parent
dd5fd4a760
commit
5c6e9b44cc
20 changed files with 208 additions and 197 deletions
|
@ -973,18 +973,18 @@ report_change (int slot, int old_status, int cur_status)
|
|||
char *homestr, *envstr;
|
||||
char *fname;
|
||||
char templ[50];
|
||||
FILE *fp;
|
||||
estream_t fp;
|
||||
|
||||
snprintf (templ, sizeof templ, "reader_%d.status", slot);
|
||||
fname = make_filename (gnupg_homedir (), templ, NULL );
|
||||
fp = fopen (fname, "w");
|
||||
fp = es_fopen (fname, "w");
|
||||
if (fp)
|
||||
{
|
||||
fprintf (fp, "%s\n",
|
||||
es_fprintf (fp, "%s\n",
|
||||
(cur_status & 1)? "USABLE":
|
||||
(cur_status & 4)? "ACTIVE":
|
||||
(cur_status & 2)? "PRESENT": "NOCARD");
|
||||
fclose (fp);
|
||||
es_fclose (fp);
|
||||
}
|
||||
xfree (fname);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue