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

gpg: photoid: Move functions from exec.c.

* g10/exec.c (w32_system): Expose to public.
(exec_write, exec_read, exec_finish, make_tempdir, expand_args): Move
to photoid.c.
* g10/exec.h: Likewise.
* g10/photoid.c (exec_write, exec_read, exec_finish, make_tempdir)
(expand_args): Move here.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2019-07-25 11:21:58 +09:00
parent 996c497a86
commit c57c5004ec
3 changed files with 550 additions and 561 deletions

View file

@ -20,32 +20,7 @@
#ifndef _EXEC_H_
#define _EXEC_H_
#include <unistd.h>
#include <stdio.h>
#include "../common/iobuf.h"
struct exec_info
{
int progreturn;
struct
{
unsigned int binary:1;
unsigned int writeonly:1;
unsigned int madedir:1;
unsigned int use_temp_files:1;
unsigned int keep_temp_files:1;
} flags;
pid_t child;
FILE *tochild;
iobuf_t fromchild;
char *command,*name,*tempdir,*tempfile_in,*tempfile_out;
};
int exec_write(struct exec_info **info,const char *program,
const char *args_in,const char *name,int writeonly,int binary);
int exec_read(struct exec_info *info);
int exec_finish(struct exec_info *info);
int set_exec_path(const char *path);
int w32_system(const char *command);
#endif /* !_EXEC_H_ */