aboutsummaryrefslogtreecommitdiff
path: root/mailutils/mail.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-17 12:34:25 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-17 12:34:25 +0100
commitb6237c0657074e8a61b2123601df36389659b603 (patch)
tree29b0dedd34e238c187fb3c270bf2e4fc2f6522c1 /mailutils/mail.c
parent25b2680056454dc4761ba3b2efde7c3414738f8c (diff)
downloadbusybox-w32-b6237c0657074e8a61b2123601df36389659b603.tar.gz
busybox-w32-b6237c0657074e8a61b2123601df36389659b603.tar.bz2
busybox-w32-b6237c0657074e8a61b2123601df36389659b603.zip
mail: commonalize send_r_n()
function old new delta send_mail_command 85 55 -30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'mailutils/mail.c')
-rw-r--r--mailutils/mail.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mailutils/mail.c b/mailutils/mail.c
index ce5267904..9735d48f6 100644
--- a/mailutils/mail.c
+++ b/mailutils/mail.c
@@ -69,6 +69,13 @@ void FAST_FUNC launch_helper(const char **argv)
69 // parent goes on 69 // parent goes on
70} 70}
71 71
72void FAST_FUNC send_r_n(const char *s)
73{
74 if (G.verbose)
75 bb_error_msg("send:'%s'", s);
76 printf("%s\r\n", s);
77}
78
72char* FAST_FUNC send_mail_command(const char *fmt, const char *param) 79char* FAST_FUNC send_mail_command(const char *fmt, const char *param)
73{ 80{
74 char *msg; 81 char *msg;
@@ -77,9 +84,7 @@ char* FAST_FUNC send_mail_command(const char *fmt, const char *param)
77 msg = (char*)fmt; 84 msg = (char*)fmt;
78 if (fmt) { 85 if (fmt) {
79 msg = xasprintf(fmt, param); 86 msg = xasprintf(fmt, param);
80 if (G.verbose) 87 send_r_n(msg);
81 bb_error_msg("send:'%s'", msg);
82 printf("%s\r\n", msg);
83 } 88 }
84 fflush_all(); 89 fflush_all();
85 return msg; 90 return msg;