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
c184124d
...
c184124d67f9864bdf1fc8f1e48bb5bed72d0886
authored
2003-06-23 09:00:31 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(util_cache_command,util_run_cached_commands): New functions.
1 parent
baa0bce1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
mail/mail.h
mail/util.c
mail/mail.h
View file @
c184124
...
...
@@ -311,6 +311,8 @@ extern int util_merge_addresses __P((char **addr_str, const char *value));
extern
int
util_header_expand
__P
((
header_t
*
hdr
));
extern
int
util_get_message
__P
((
mailbox_t
mbox
,
size_t
msgno
,
message_t
*
msg
));
void
util_cache_command
__P
((
list_t
*
list
,
const
char
*
fmt
,
...));
void
util_run_cached_commands
__P
((
list_t
*
list
));
extern
int
ml_got_interrupt
__P
((
void
));
extern
void
ml_clear_interrupt
__P
((
void
));
...
...
mail/util.c
View file @
c184124
...
...
@@ -1252,3 +1252,34 @@ util_noapp ()
{
util_error
(
_
(
"No applicable messages"
));
}
void
util_cache_command
(
list_t
*
list
,
const
char
*
fmt
,
...)
{
char
*
cmd
;
va_list
ap
;
va_start
(
ap
,
fmt
);
vasprintf
(
&
cmd
,
fmt
,
ap
);
va_end
(
ap
);
if
(
!*
list
)
list_create
(
list
);
list_append
(
*
list
,
cmd
);
}
static
int
_run_and_free
(
void
*
item
,
void
*
data
)
{
util_do_command
((
char
*
)
item
);
free
(
item
);
return
0
;
}
void
util_run_cached_commands
(
list_t
*
list
)
{
list_do
(
*
list
,
_run_and_free
,
NULL
);
list_destroy
(
list
);
}
...
...
Please
register
or
sign in
to post a comment