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. ...@@ -5,7 +5,7 @@ See the end of file for copying conditions.
5 Please send mailutils bug reports to <bug-mailutils@gnu.org>. 5 Please send mailutils bug reports to <bug-mailutils@gnu.org>.
6 6
7 7
8 Version 3.1.90 (Git) 8 Version 3.1.91 (Git)
9 9
10 * mail 10 * mail
11 11
...@@ -20,11 +20,11 @@ description), and file name: ...@@ -20,11 +20,11 @@ description), and file name:
20 20
21 --content-filename=NAME 21 --content-filename=NAME
22 Sets the file name (the "filename" parameter in the 22 Sets the file name (the "filename" parameter in the
23 Content-Description MIME header of the outgoing message. 23 Content-Description MIME header of the outgoing message).
24 24
25 Both options affect only the next `--attach' or `--attach-fd' option. 25 Both options affect only the next `--attach' or `--attach-fd' option.
26 26
27 * Constructing attachments from command line 27 ** Constructing attachments from command line
28 28
29 The new option `--attach-fd=N' instructs mail to read attachment from 29 The new option `--attach-fd=N' instructs mail to read attachment from
30 file descriptor N. By default, the attachments created using this 30 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 ...@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public License along
16 dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 16 dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
17 17
18 AC_PREREQ(2.63) 18 AC_PREREQ(2.63)
19 AC_INIT([GNU Mailutils], [3.1.90], [bug-mailutils@gnu.org], [mailutils], 19 AC_INIT([GNU Mailutils], [3.1.91], [bug-mailutils@gnu.org], [mailutils],
20 [http://mailutils.org]) 20 [http://mailutils.org])
21 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c]) 21 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
22 AC_CONFIG_AUX_DIR([build-aux]) 22 AC_CONFIG_AUX_DIR([build-aux])
......
...@@ -2879,7 +2879,7 @@ Prints additional debugging output. ...@@ -2879,7 +2879,7 @@ Prints additional debugging output.
2879 2879
2880 @item -s @var{string} 2880 @item -s @var{string}
2881 @itemx --sender=@var{string} 2881 @itemx --sender=@var{string}
2882 Prints only mail whose @samp{From:} headers contain the supplied string. 2882 Prints only mail with @samp{From:} header containing the supplied string.
2883 @FIXME{Probably, this should test envelopes as well.} 2883 @FIXME{Probably, this should test envelopes as well.}
2884 2884
2885 @item -f @var{url} 2885 @item -f @var{url}
......
...@@ -545,8 +545,11 @@ _mime_part_size (mu_mime_t mime, size_t *psize) ...@@ -545,8 +545,11 @@ _mime_part_size (mu_mime_t mime, size_t *psize)
545 int ret; 545 int ret;
546 546
547 if (mime->nmtp_parts == 0) 547 if (mime->nmtp_parts == 0)
548 return EINVAL; 548 {
549 549 *psize = 0;
550 return 0;
551 }
552
550 if ((ret = _mime_set_content_type (mime)) != 0) 553 if ((ret = _mime_set_content_type (mime)) != 0)
551 return ret; 554 return ret;
552 if (mime->nmtp_parts == 1) 555 if (mime->nmtp_parts == 1)
...@@ -855,20 +858,26 @@ _mime_body_lines (mu_body_t body, size_t *plines) ...@@ -855,20 +858,26 @@ _mime_body_lines (mu_body_t body, size_t *plines)
855 mu_message_t msg = mu_body_get_owner (body); 858 mu_message_t msg = mu_body_get_owner (body);
856 mu_mime_t mime = mu_message_get_owner (msg); 859 mu_mime_t mime = mu_message_get_owner (msg);
857 int i, ret; 860 int i, ret;
858 size_t lines; 861 size_t total = 0;
859 862
860 if (mime->nmtp_parts == 0) 863 if (mime->nmtp_parts == 0)
861 return EINVAL; 864 {
862 865 *plines = 0;
866 return 0;
867 }
868
863 if ((ret = _mime_set_content_type (mime)) != 0) 869 if ((ret = _mime_set_content_type (mime)) != 0)
864 return ret; 870 return ret;
865 for (i = 0; i < mime->nmtp_parts; i++) 871 for (i = 0; i < mime->nmtp_parts; i++)
866 { 872 {
873 size_t lines;
874
867 mu_message_lines (mime->mtp_parts[i]->msg, &lines); 875 mu_message_lines (mime->mtp_parts[i]->msg, &lines);
868 plines += lines; 876 total += lines;
869 if (mime->nmtp_parts > 1) /* boundary line */ 877 if (mime->nmtp_parts > 1) /* boundary line */
870 plines++; 878 total++;
871 } 879 }
880 *plines = total;
872 return 0; 881 return 0;
873 } 882 }
874 883
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 29
30 #include <mailutils/mailutils.h> 30 #include <mailutils/mailutils.h>
31 31
32 void message_display_parts(mu_message_t msg, int indent); 32 void message_display_parts (mu_message_t msg, int indent);
33 33
34 const char *from; 34 const char *from;
35 const char *subject; 35 const char *subject;
......