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
d44b221c
...
d44b221c2e2c13df8e536bd16f7c083543fb64e1
authored
2003-02-10 01:06:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mh_context_iterate): New function.
1 parent
9fff8e33
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
mh/mh_ctx.c
mh/mh_ctx.c
View file @
d44b221
...
...
@@ -138,3 +138,24 @@ mh_context_set_value (mh_context_t *ctx, const char *name, const char *value)
}
return
header_set_value
(
ctx
->
header
,
name
,
value
,
1
);
}
int
mh_context_iterate
(
mh_context_t
*
ctx
,
mh_context_iterator
fp
,
void
*
data
)
{
size_t
i
,
nfields
;
int
rc
=
0
;
header_get_field_count
(
ctx
->
header
,
&
nfields
);
for
(
i
=
1
;
i
<=
nfields
&&
rc
==
0
;
i
++
)
{
char
*
name
,
*
value
;
header_aget_field_name
(
ctx
->
header
,
i
,
&
name
);
header_aget_field_value
(
ctx
->
header
,
i
,
&
value
);
rc
=
fp
(
name
,
value
,
data
);
free
(
name
);
free
(
data
);
}
return
rc
;
}
...
...
Please
register
or
sign in
to post a comment