diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-04 15:02:23 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-04 15:02:23 +0000 |
commit | c3aab4628802557768ed0f1f4caef401cdc052d8 (patch) | |
tree | dbe284eee8dc0680f7ee35a3776ef260a625ab2f /NEWS | |
parent | 46e86fe1d88d50e4731c98a87fe92fb5e8d73e62 (diff) | |
download | mailutils-c3aab4628802557768ed0f1f4caef401cdc052d8.tar.gz mailutils-c3aab4628802557768ed0f1f4caef401cdc052d8.tar.bz2 |
* NEWS: Update.
* examples/header.c: New command `itr'.
(main): Empty input repeats the recent command.
* include/mailutils/header.h (mu_header_get_iterator): New
function.
* libproto/include/header0.h (struct _mu_header): New member itr.
* mailbox/Makefile.am (libmailutils_la_SOURCES): Add hdritr.c
* mailbox/hdritr.c: New file.
* mailbox/header.c (mu_header_remove): Bugfix. Invalidate the
header after removal.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1,4 +1,4 @@ -GNU mailutils NEWS -- history of user-visible changes. 2008-01-12 +GNU mailutils NEWS -- history of user-visible changes. 2008-02-04 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. See the end of file for copying conditions. @@ -143,6 +143,24 @@ approach is recommended to use instead of mu_error_set_print: mu_diag_get_debug (&debug); mu_debug_set_print (debug, new_printer, NULL); +** Header iteration + +New function `mu_header_get_iterator' returns an iterator for this +header object. Thus, the following code loops over all headers: + + mu_iterator_t itr; + mu_header_get_iterator (header, &itr); + for (mu_iterator_first (itr); !mu_iterator_is_done (itr); + mu_iterator_next (itr)) + { + const char *hdr, *val; + mu_iterator_current_kv (itr, + (const void**)&hdr, + (void**)&val)); + /* Do something with hdr and val */ + } + mu_iterator_destroy (&itr); + ** Global debugging and verbosity settings. These settings provide default values for mu_debug_t objects created |