Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
9a1a450b
...
9a1a450bd1132c8a5426de7f0cd0570103c4af66
authored
2003-08-12 11:34:04 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(run_editor): A wrapper around mail_execute().
(var_shell): Use run_editor.
1 parent
a86f79fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
mail/var.c
mail/var.c
View file @
9a1a450
...
...
@@ -175,7 +175,8 @@ var_shell (int argc, char **argv, compose_env_t *env)
{
int
status
;
ofile
=
env
->
ofile
;
status
=
mail_shell
(
argc
,
argv
);
++*
argv
;
status
=
mail_execute
(
1
,
argc
,
argv
);
ofile
=
env
->
file
;
return
status
;
}
...
...
@@ -298,6 +299,17 @@ var_deadletter (int argc ARG_UNUSED, char **argv ARG_UNUSED,
return
0
;
}
static
void
run_editor
(
char
*
ed
,
char
*
arg
)
{
char
*
argv
[
3
];
argv
[
0
]
=
ed
;
argv
[
1
]
=
arg
;
argv
[
2
]
=
NULL
;
return
mail_execute
(
1
,
2
,
argv
);
}
static
int
var_run_editor
(
char
*
ed
,
int
argc
,
char
**
argv
,
compose_env_t
*
env
)
{
...
...
@@ -320,7 +332,7 @@ var_run_editor (char *ed, int argc, char **argv, compose_env_t *env)
do
{
fclose
(
fp
);
util_do_command
(
"!%s %s"
,
ed
,
filename
);
run_editor
(
ed
,
filename
);
fp
=
fopen
(
filename
,
"r"
);
}
while
((
rc
=
parse_headers
(
fp
,
env
))
<
0
);
...
...
@@ -341,7 +353,7 @@ var_run_editor (char *ed, int argc, char **argv, compose_env_t *env)
{
fclose
(
env
->
file
);
ofile
=
env
->
ofile
;
util_do_command
(
"!%s %s"
,
ed
,
env
->
filename
);
run_editor
(
ed
,
env
->
filename
);
}
env
->
file
=
fopen
(
env
->
filename
,
"a+"
);
...
...
Please
register
or
sign in
to post a comment