Commit 1009efa2 1009efa2a2abe6152a3846bf616d8c14c15b4570 by Sergey Poznyakoff

Update

1 parent bcf509b0
1 2007-06-26 Sergey Poznyakoff <gray@gnu.org.ua> 1 2007-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
2 2
3 * NEWS: Update
4
3 * mailbox/header.c (header_readline): Always nul-terminate the 5 * mailbox/header.c (header_readline): Always nul-terminate the
4 buffer. 6 buffer.
7 (mu_hdrent_find): Allow negative instance indices, meaning
8 scanning from the bottom up.
9
5 * include/mailutils/list.h: Fix typo 10 * include/mailutils/list.h: Fix typo
6 * libsieve/argp.c: New option --clearpath 11 * libsieve/argp.c: New option --clearpath
7 * libsieve/load.c: Minor change 12 * libsieve/load.c: Minor change
......
1 GNU mailutils NEWS -- history of user-visible changes. 2007-06-24 1 GNU mailutils NEWS -- history of user-visible changes. 2007-06-26
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
3 See the end of file for copying conditions. 3 See the end of file for copying conditions.
4 4
5 Please send mailutils bug reports to <bug-mailutils@gnu.org>. 5 Please send mailutils bug reports to <bug-mailutils@gnu.org>.
...@@ -20,12 +20,56 @@ a single double-quote character. ...@@ -20,12 +20,56 @@ a single double-quote character.
20 encapsulation line is conceptually attached to the boundary, as 20 encapsulation line is conceptually attached to the boundary, as
21 requested by RFC 1521. 21 requested by RFC 1521.
22 22
23 ** New functions `mu_property_sget_value' and `mu_property_aget_value' 23 ** Three kinds of accessors.
24 24
25 ** New functions `mu_address_sget_comments', `mu_address_sget_local_part' 25 Each MU object has now three kind of accessors. The `sget' accessor
26 `mu_address_sget_personal', `mu_address_sget_domain', 26 returns a pointer to the immutable memory allocated inside the object
27 `mu_address_sget_route', `mu_address_sget_email' 27 and holding its string representation. The `aget' accessor allocates
28 new memory chunk, copies there the string representation of the object
29 and returns the pointer to the allocated memory. Finally, the `get'
30 accessor copies the string representation to the character buffer
31 supplied by the caller. For example:
28 32
33 const char *s;
34 mu_header_sget_value (hdr, "From", &s);
35
36 char *s
37 mu_header_aget_value (hdr, "From", &s);
38 [...]
39 free (s);
40
41 char buf[SIZE];
42 size_t size;
43 mu_header_get_value (hdr, "From", buf, sizeof buf, &size);
44
45 ** RFC2822 Headers.
46
47 The RFC 2822 headers support has been rewritten from scratch. The
48 accessor functions are able to return a given header instance in case
49 of multiple headers, something which was impossible in the earlier
50 Mailutils releases. These new functions are given identifiers, ending
51 with `_n', for example:
52
53 int mu_header_sget_value_n (mu_header_t header,
54 const char *name, int n, const char **retval);
55
56 The `n' argument gives the ordinal number (1-based) of the header to return.
57 For example, to get the topmost 'Recieved' header:
58
59 mu_header_sget_value_n (header, "Received", 1, &str);
60
61 To count headers from the bottom up, pass negative value of `n',
62 e.g. to get the last 'Recieved' header:
63
64 mu_header_sget_value_n (header, "Received", -1, &str);
65
66 For backward compatibility, traditional header accessors are still
67 provided, but they are implemented as macros, expanding to the
68 corresponding `_n' style accessors.
69
70 Important note: `mu_header_aget_value' does not allocate any memory
71 if the requested header was not found. In previous releases it used
72 to return a pointer to an empty string ("") in that case.
29 73
30 ** New functions `mu_address_set_local_part', `mu_address_set_domain', 74 ** New functions `mu_address_set_local_part', `mu_address_set_domain',
31 `mu_address_set_route', `mu_address_set_email' 75 `mu_address_set_route', `mu_address_set_email'
...@@ -648,7 +692,7 @@ The first release. ...@@ -648,7 +692,7 @@ The first release.
648 ---------------------------------------------------------------------- 692 ----------------------------------------------------------------------
649 Copyright information: 693 Copyright information:
650 694
651 Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 695 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
652 696
653 Permission is granted to anyone to make or distribute verbatim copies 697 Permission is granted to anyone to make or distribute verbatim copies
654 of this document as received, in any medium, provided that the 698 of this document as received, in any medium, provided that the
......