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
9667740b
...
9667740b1779d36125c5c6b47ab506840a25c193
authored
2004-01-13 10:09:44 +0000
by
Wojciech Polak
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mu_error()
1 parent
c00e6db2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
frm/frm.c
messages/messages.c
frm/frm.c
View file @
9667740
...
...
@@ -388,7 +388,7 @@ main (int argc, char **argv)
status
=
mailbox_create_default
(
&
mbox
,
mailbox_name
);
if
(
status
!=
0
)
{
mu_error
(
_
(
"Couldn't create mailbox <%s>: %s.
\n
"
),
mu_error
(
_
(
"Couldn't create mailbox <%s>: %s."
),
mailbox_name
?
mailbox_name
:
_
(
"default"
),
mu_strerror
(
status
));
exit
(
3
);
...
...
@@ -410,7 +410,7 @@ main (int argc, char **argv)
goto
cleanup1
;
else
{
mu_error
(
_
(
"Couldn't open mailbox <%s>: %s.
\n
"
),
mu_error
(
_
(
"Couldn't open mailbox <%s>: %s."
),
url_to_string
(
url
),
mu_strerror
(
status
));
goto
cleanup
;
}
...
...
@@ -427,7 +427,7 @@ main (int argc, char **argv)
status
=
mailbox_scan
(
mbox
,
1
,
&
total
);
if
(
status
!=
0
)
{
mu_error
(
_
(
"Couldn't scan mailbox <%s>: %s.
\n
"
),
mu_error
(
_
(
"Couldn't scan mailbox <%s>: %s."
),
url_to_string
(
url
),
mu_strerror
(
status
));
goto
cleanup
;
}
...
...
@@ -441,7 +441,7 @@ main (int argc, char **argv)
cleanup:
if
(
mailbox_close
(
mbox
)
!=
0
)
{
mu_error
(
_
(
"Couldn't close <%s>: %s.
\n
"
),
mu_error
(
_
(
"Couldn't close <%s>: %s."
),
url_to_string
(
url
),
mu_strerror
(
status
));
return
-
1
;
}
...
...
messages/messages.c
View file @
9667740
...
...
@@ -111,12 +111,14 @@ main (int argc, char **argv)
mu_register_all_mbox_formats
();
if
(
args
.
argc
<
1
&&
messages_count
(
NULL
)
<
0
)
err
=
1
;
err
=
1
;
else
if
(
args
.
argc
>=
1
)
{
for
(
i
=
0
;
i
<
args
.
argc
;
i
++
)
if
(
messages_count
(
args
.
argv
[
i
])
<
0
)
err
=
1
;
for
(
i
=
0
;
i
<
args
.
argc
;
i
++
)
{
if
(
messages_count
(
args
.
argv
[
i
])
<
0
)
err
=
1
;
}
}
return
err
;
...
...
@@ -133,9 +135,8 @@ messages_count (const char *box)
status
=
mailbox_create_default
(
&
mbox
,
box
);
if
(
status
!=
0
)
{
fprintf
(
stderr
,
_
(
"Couldn't create mailbox <%s>: %s.
\n
"
),
box
?
box
:
_
(
"default"
),
mu_strerror
(
status
));
mu_error
(
_
(
"Couldn't create mailbox <%s>: %s."
),
box
?
box
:
_
(
"default"
),
mu_strerror
(
status
));
return
-
1
;
}
...
...
@@ -145,16 +146,16 @@ messages_count (const char *box)
status
=
mailbox_open
(
mbox
,
MU_STREAM_READ
);
if
(
status
!=
0
)
{
fprintf
(
stderr
,
_
(
"Couldn't open mailbox <%s>: %s.
\n
"
),
box
,
mu_strerror
(
status
));
mu_error
(
_
(
"Couldn't open mailbox <%s>: %s.
"
),
box
,
mu_strerror
(
status
));
return
-
1
;
}
status
=
mailbox_messages_count
(
mbox
,
&
count
);
if
(
status
!=
0
)
{
fprintf
(
stderr
,
_
(
"Couldn't count messages in <%s>: %s.
\n
"
),
box
,
mu_strerror
(
status
));
mu_error
(
_
(
"Couldn't count messages in <%s>: %s.
"
),
box
,
mu_strerror
(
status
));
return
-
1
;
}
...
...
@@ -166,8 +167,8 @@ messages_count (const char *box)
status
=
mailbox_close
(
mbox
);
if
(
status
!=
0
)
{
fprintf
(
stderr
,
_
(
"Couldn't close <%s>: %s.
\n
"
),
box
,
mu_strerror
(
status
));
mu_error
(
_
(
"Couldn't close <%s>: %s.
"
),
box
,
mu_strerror
(
status
));
return
-
1
;
}
...
...
Please
register
or
sign in
to post a comment