Commit 206b664a 206b664ae62807ce41779a087251f56cdfe957bd by Sergey Poznyakoff

Minor changes

* configure.ac: Set version 3.1.91
* NEWS: Update.
* doc/texinfo/programs.texi: Minor change.
* libmailutils/mime/mime.c (_mime_part_size)
(_mime_body_lines): Fix counting. Return 0 if MIME is empty.
1 parent fdf27cc4
......@@ -5,7 +5,7 @@ See the end of file for copying conditions.
Please send mailutils bug reports to <bug-mailutils@gnu.org>.
Version 3.1.90 (Git)
Version 3.1.91 (Git)
* mail
......@@ -20,11 +20,11 @@ description), and file name:
--content-filename=NAME
Sets the file name (the "filename" parameter in the
Content-Description MIME header of the outgoing message.
Content-Description MIME header of the outgoing message).
Both options affect only the next `--attach' or `--attach-fd' option.
* Constructing attachments from command line
** Constructing attachments from command line
The new option `--attach-fd=N' instructs mail to read attachment from
file descriptor N. By default, the attachments created using this
......
......@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public License along
dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
AC_INIT([GNU Mailutils], [3.1.90], [bug-mailutils@gnu.org], [mailutils],
AC_INIT([GNU Mailutils], [3.1.91], [bug-mailutils@gnu.org], [mailutils],
[http://mailutils.org])
AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([build-aux])
......
......@@ -2879,7 +2879,7 @@ Prints additional debugging output.
@item -s @var{string}
@itemx --sender=@var{string}
Prints only mail whose @samp{From:} headers contain the supplied string.
Prints only mail with @samp{From:} header containing the supplied string.
@FIXME{Probably, this should test envelopes as well.}
@item -f @var{url}
......
......@@ -545,7 +545,10 @@ _mime_part_size (mu_mime_t mime, size_t *psize)
int ret;
if (mime->nmtp_parts == 0)
return EINVAL;
{
*psize = 0;
return 0;
}
if ((ret = _mime_set_content_type (mime)) != 0)
return ret;
......@@ -855,20 +858,26 @@ _mime_body_lines (mu_body_t body, size_t *plines)
mu_message_t msg = mu_body_get_owner (body);
mu_mime_t mime = mu_message_get_owner (msg);
int i, ret;
size_t lines;
size_t total = 0;
if (mime->nmtp_parts == 0)
return EINVAL;
{
*plines = 0;
return 0;
}
if ((ret = _mime_set_content_type (mime)) != 0)
return ret;
for (i = 0; i < mime->nmtp_parts; i++)
{
size_t lines;
mu_message_lines (mime->mtp_parts[i]->msg, &lines);
plines += lines;
total += lines;
if (mime->nmtp_parts > 1) /* boundary line */
plines++;
total++;
}
*plines = total;
return 0;
}
......
......@@ -29,7 +29,7 @@
#include <mailutils/mailutils.h>
void message_display_parts(mu_message_t msg, int indent);
void message_display_parts (mu_message_t msg, int indent);
const char *from;
const char *subject;
......