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
d0964970
...
d0964970a330298cadca3e6ac140382a08481ecf
authored
2004-06-01 13:27:03 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(main): Bugfix: fields_count had wrong type.
1 parent
92a505f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
examples/mailcap.c
examples/mailcap.c
View file @
d096497
...
...
@@ -54,9 +54,9 @@ main (int argc, char **argv)
mu_mailcap_entries_count
(
mailcap
,
&
count
);
for
(
i
=
1
;
i
<=
count
;
i
++
)
{
in
t
j
;
size_
t
j
;
mu_mailcap_entry_t
entry
=
NULL
;
in
t
fields_count
=
0
;
size_
t
fields_count
=
0
;
printf
(
"entry[%d]
\n
"
,
i
);
...
...
@@ -76,8 +76,15 @@ main (int argc, char **argv)
mu_mailcap_entry_fields_count
(
entry
,
&
fields_count
);
for
(
j
=
1
;
j
<=
fields_count
;
j
++
)
{
mu_mailcap_entry_get_field
(
entry
,
j
,
buffer
,
sizeof
(
buffer
),
NULL
);
int
status
=
mu_mailcap_entry_get_field
(
entry
,
j
,
buffer
,
sizeof
(
buffer
),
NULL
);
if
(
status
)
{
mu_error
(
"cannot retrieve field %lu: %s"
,
(
unsigned
long
)
j
,
mu_strerror
(
status
));
break
;
}
printf
(
"
\t
fields[%d]: %s
\n
"
,
j
,
buffer
);
}
printf
(
"
\n
"
);
...
...
Please
register
or
sign in
to post a comment