aboutsummaryrefslogtreecommitdiff
path: root/mfd
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-03-11 10:28:56 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2009-03-11 10:28:56 +0000
commit07336ea55b20a411f86bef4133c3a8988d229922 (patch)
treeca06617f95056ef1b7a57d453cb722a9111ce232 /mfd
parent267c3a787968c03c10d170562bbdec08df1d8fd0 (diff)
downloadmailfromd-07336ea55b20a411f86bef4133c3a8988d229922.tar.gz
mailfromd-07336ea55b20a411f86bef4133c3a8988d229922.tar.bz2
Minor fixes.
* mfd/prog.c (env_get_macro, instr_symbol): Minor fixes (env_capture_start): Seek to 0 after truncating the stream. Mailutils should know better and do it automatically. git-svn-id: file:///svnroot/mailfromd/trunk@1778 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'mfd')
-rw-r--r--mfd/prog.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mfd/prog.c b/mfd/prog.c
index fe6d0378..dc5c4187 100644
--- a/mfd/prog.c
+++ b/mfd/prog.c
@@ -337,7 +337,7 @@ env_get_locus(eval_environ_t env)
return &env->locus;
}
-const const char *
+const char *
env_get_macro(eval_environ_t env, const char *symbol)
{
return env->getsym(env->data, symbol);
@@ -910,7 +910,8 @@ instr_cmp(eval_environ_t env)
void
instr_symbol(eval_environ_t env)
{
- char *symbol, *s;
+ char *symbol;
+ const char *s;
get_literal(env, 0, (const char **)&symbol);
s = env->getsym(env->data, symbol);
@@ -2105,8 +2106,9 @@ env_capture_start(eval_environ_t env)
if (env->stream) {
rc = mu_stream_truncate(env->stream, 0);
- if (rc == 0)
+ if (rc == 0 && mu_stream_seek(env->stream, 0, SEEK_SET) == 0)
return 0;
+
/* If truncate fails, try to re-create the stream */
mu_stream_close(env->stream);
mu_stream_destroy(&env->stream,

Return to:

Send suggestions and report system problems to the System administrator.