summaryrefslogtreecommitdiff
path: root/frm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-12-06 22:24:46 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-12-06 22:24:46 +0200
commitf88a8d059027ab10e2b6f0bd0f59764a6947474c (patch)
treef3a8fa485992e611de017a09984a1c62e4f26cbd /frm
parent1f44f1ad1f04c4d11ae4f56d2595a6126b223540 (diff)
downloadmailutils-f88a8d059027ab10e2b6f0bd0f59764a6947474c.tar.gz
mailutils-f88a8d059027ab10e2b6f0bd0f59764a6947474c.tar.bz2
frm,messages,readmsg: Use MU streams instead of stdio.
* frm/common.c: Use MU streams instead of stdio. * frm/frm.c: Likewise. * messages/messages.c: Likewise. * readmsg/readmsg.c: Likewise. * frm/frm.h: Include mailutils/stdstream.h * readmsg/readmsg.h: Likewise.
Diffstat (limited to 'frm')
-rw-r--r--frm/common.c20
-rw-r--r--frm/frm.c24
-rw-r--r--frm/frm.h1
-rw-r--r--frm/from.c2
4 files changed, 24 insertions, 23 deletions
diff --git a/frm/common.c b/frm/common.c
index c0cc46f95..dfecd2d65 100644
--- a/frm/common.c
+++ b/frm/common.c
@@ -127,7 +127,7 @@ puts_bidi (char *string)
}
if (fb_charset_num == 0)
- puts (string);
+ mu_printf ("%s\n", string);
else
{
FriBidiStrIndex len;
@@ -186,20 +186,20 @@ puts_bidi (char *string)
new_len = fribidi_unicode_to_charset (fb_charset_num,
visual + st, inlen,
outstring);
- printf ("%s", outstring);
+ mu_printf ("%s", outstring);
}
- putchar ('\n');
+ mu_printf ("\n");
}
else
{
/* Print the string as is */
- puts (string);
+ mu_printf ("%s\n", string);
}
}
}
#else
# define alloc_logical(s)
-# define puts_bidi puts
+# define puts_bidi(s) mu_stream_printf ("%s\n", s)
#endif
@@ -236,7 +236,7 @@ print_line ()
curcol = nextstart = 0;
}
else
- putchar ('\n');
+ mu_printf ("\n");
curfield = 0;
}
@@ -245,9 +245,9 @@ format_field_simple (const char *fmt, ...)
{
va_list ap;
if (curfield++)
- putchar ('\t');
+ mu_printf ("\t");
va_start (ap, fmt);
- vprintf (fmt, ap);
+ mu_stream_vprintf (mu_strout, fmt, ap);
va_end (ap);
}
@@ -266,7 +266,7 @@ format_field_align (const char *fmt, ...)
{
puts_bidi (linebuf);
linepos = 0;
- printf ("%*s", nextstart, "");
+ mu_printf ("%*s", nextstart, "");
}
else
{
@@ -526,7 +526,7 @@ frm_abort (mu_mailbox_t *mbox)
(mu_message_t). It returns non-zero if that message is to be displayed
and zero otherwise.
- Upon finishing scanning, the function places the overall number of
+ Upon finishing scanning, the function places total number of
the messages processed into the memory location pointed to by
TOTAL */
void
diff --git a/frm/frm.c b/frm/frm.c
index c0348e046..7b2b0d854 100644
--- a/frm/frm.c
+++ b/frm/frm.c
@@ -266,16 +266,16 @@ frm (char *mailbox_name)
if (show_summary)
{
if (total == 0)
- printf (_("Folder contains no messages."));
+ mu_printf (_("Folder contains no messages."));
else
{
char *delim = "";
- printf (_("Folder contains "));
+ mu_printf (_("Folder contains "));
if (counter.new)
{
- printf (ngettext ("%lu new message",
+ mu_printf (ngettext ("%lu new message",
"%lu new messages",
counter.new),
(u_long) counter.new);
@@ -284,9 +284,9 @@ frm (char *mailbox_name)
if (counter.unread)
{
- printf ("%s", delim);
+ mu_printf ("%s", delim);
- printf (ngettext ("%lu unread message",
+ mu_printf (ngettext ("%lu unread message",
"%lu unread messages",
counter.unread),
(u_long) counter.unread);
@@ -295,9 +295,9 @@ frm (char *mailbox_name)
if (counter.read)
{
- printf ("%s", delim);
+ mu_printf ("%s", delim);
- printf (ngettext ("%lu read message",
+ mu_printf (ngettext ("%lu read message",
"%lu read messages",
counter.read),
(u_long) counter.read);
@@ -309,16 +309,16 @@ frm (char *mailbox_name)
Leave it as it is unless your language requires to reorder
the parts of speach in the message
*/
- printf (_("."));
+ mu_printf (_("."));
}
- printf ("\n");
+ mu_printf ("\n");
}
else if (show_query)
{
if (total > 0)
- printf (_("There are messages in that folder.\n"));
+ mu_printf (_("There are messages in that folder.\n"));
else
- printf (_("No messages in that folder!\n"));
+ mu_printf (_("No messages in that folder!\n"));
}
/* EXIT STATUS
@@ -366,7 +366,7 @@ main (int argc, char **argv)
else
for (; c < argc; c++)
{
- printf ("%s:\n", argv[c]);
+ mu_printf ("%s:\n", argv[c]);
status = frm (argv[c]);
}
diff --git a/frm/frm.h b/frm/frm.h
index b45333e86..a286e8e3e 100644
--- a/frm/frm.h
+++ b/frm/frm.h
@@ -55,6 +55,7 @@
#include <mailutils/observer.h>
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
+#include <mailutils/stdstream.h>
#include <mailutils/url.h>
#include <mailutils/nls.h>
#include <mailutils/tls.h>
diff --git a/frm/from.c b/frm/from.c
index e621a23ae..cde808d02 100644
--- a/frm/from.c
+++ b/frm/from.c
@@ -144,7 +144,7 @@ main (int argc, char **argv)
if (count_only)
{
- printf (ngettext ("There is %lu message in your incoming mailbox.\n",
+ mu_printf (ngettext ("There is %lu message in your incoming mailbox.\n",
"There are %lu messages in your incoming mailbox.\n",
total),
(unsigned long) total);

Return to:

Send suggestions and report system problems to the System administrator.