diff options
-rw-r--r-- | examples/listop.c | 9 | ||||
-rw-r--r-- | mailbox/testsuite/mailbox/list.exp | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/examples/listop.c b/examples/listop.c index 5b034d9ec..c131c98ed 100644 --- a/examples/listop.c +++ b/examples/listop.c @@ -253,6 +253,7 @@ shell (mu_list_t list) mu_iterator_t itr[NITR]; int rc; + memset (&itr, 0, sizeof itr); num = 0; while (1) { @@ -260,6 +261,14 @@ shell (mu_list_t list) char buf[80]; int argc; char **argv; + + if (!itr[num]) + { + rc = mu_list_get_iterator (list, &itr[num]); + if (rc) + lperror ("mu_list_get_iterator", rc); + mu_iterator_first (itr[num]); + } rc = mu_iterator_current (itr[num], (void**) &text); if (rc) diff --git a/mailbox/testsuite/mailbox/list.exp b/mailbox/testsuite/mailbox/list.exp index aaa8337c8..a9fea5348 100644 --- a/mailbox/testsuite/mailbox/list.exp +++ b/mailbox/testsuite/mailbox/list.exp @@ -1,6 +1,6 @@ # -*- tcl -*- # This file is part of Mailutils testsuite. -# Copyright (C) 2003, 2005, 2007 Free Software Foundation +# Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -63,6 +63,7 @@ prompt_text "tre" mailbox_prog_test "next 2" prompt_iterator 1 +prompt_text "en" mailbox_prog_test "iter 1" prompt_text "to" |