summaryrefslogtreecommitdiff
path: root/examples/sfrom.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-08-26 14:23:32 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-08-26 14:23:32 +0000
commit6178304b1670d7288d8a37b9165bda5cbc44c180 (patch)
treee17d3bce1e0b2a537937bc331efa240ce382b81e /examples/sfrom.c
parentef22616eba2aaa4e05079852ac1fa67c4ceeff08 (diff)
downloadmailutils-6178304b1670d7288d8a37b9165bda5cbc44c180.tar.gz
mailutils-6178304b1670d7288d8a37b9165bda5cbc44c180.tar.bz2
Normalize global namespace. Part 1
Diffstat (limited to 'examples/sfrom.c')
-rw-r--r--examples/sfrom.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/sfrom.c b/examples/sfrom.c
index 0e6db7808..44956094e 100644
--- a/examples/sfrom.c
+++ b/examples/sfrom.c
@@ -1,6 +1,6 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,38 +36,38 @@ main (int argc, const char **argv)
/* Register the formats. */
mu_register_all_mbox_formats ();
- status = mailbox_create_default (&mbox, argv[1]);
+ status = mu_mailbox_create_default (&mbox, argv[1]);
if (status != 0)
{
- mu_error ("mailbox_create: %s", mu_strerror (status));
+ mu_error ("mu_mailbox_create: %s", mu_strerror (status));
exit (EXIT_FAILURE);
}
- status = mailbox_open (mbox, MU_STREAM_READ);
+ status = mu_mailbox_open (mbox, MU_STREAM_READ);
if (status != 0)
{
- mu_error ("mailbox_open: %s", mu_strerror (status));
+ mu_error ("mu_mailbox_open: %s", mu_strerror (status));
exit (EXIT_FAILURE);
}
- mailbox_messages_count (mbox, &total);
+ mu_mailbox_messages_count (mbox, &total);
for (msgno = 1; msgno <= total; msgno++)
{
message_t msg;
header_t hdr;
- if ((status = mailbox_get_message (mbox, msgno, &msg)) != 0
+ if ((status = mu_mailbox_get_message (mbox, msgno, &msg)) != 0
|| (status = message_get_header (msg, &hdr)) != 0)
{
mu_error ("Error message: %s", mu_strerror (status));
exit (EXIT_FAILURE);
}
- if (header_aget_value (hdr, MU_HEADER_FROM, &from))
+ if (mu_header_aget_value (hdr, MU_HEADER_FROM, &from))
from = strdup ("(NO FROM)");
- if (header_aget_value (hdr, MU_HEADER_SUBJECT, &subject))
+ if (mu_header_aget_value (hdr, MU_HEADER_SUBJECT, &subject))
subject = strdup ("(NO SUBJECT)");
printf ("%s\t%s\n", from, subject);
@@ -75,13 +75,13 @@ main (int argc, const char **argv)
free (subject);
}
- status = mailbox_close (mbox);
+ status = mu_mailbox_close (mbox);
if (status != 0)
{
- mu_error ("mailbox_close: %s", mu_strerror (status));
+ mu_error ("mu_mailbox_close: %s", mu_strerror (status));
exit (EXIT_FAILURE);
}
- mailbox_destroy (&mbox);
+ mu_mailbox_destroy (&mbox);
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.