Esempio n. 1
0
void rewrite(struct rfc2045 *p, int rwmode)
{
	rfc2045_ac_check(p, rwmode);
	if (rfc2045_rewrite(p, fileno(stdin), fileno(stdout),
		"reformime (" RFC2045PKG " " RFC2045VER ")"))
	{
		perror("reformime");
		exit(1);
	}
}
Esempio n. 2
0
static int call_rfc2045_rewrite(struct rfc2045 *p, int fdin_arg, int fdout_arg,
				const char *appname)
{
	struct rfc2045src *src=rfc2045src_init_fd(fdin_arg);
	int rc;

	if (!src)
		return -1;

	rc=rfc2045_rewrite(p, src, fdout_arg, appname);
	rfc2045src_deinit(src);
	return rc;
}