summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-06-28 22:43:05 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-06-28 22:43:05 +0000
commit9e1c564f2c769245d11439dfccd0af05b685e171 (patch)
treed82dbcdb61b79f90cf08e4e654ef334ccef91f87 /examples
parent7ecfd2abb3aa7b4c853def9d5ccc57db0ac2b9ae (diff)
downloadmailutils-9e1c564f2c769245d11439dfccd0af05b685e171.tar.gz
mailutils-9e1c564f2c769245d11439dfccd0af05b685e171.tar.bz2
Replace iterator_create with list_get_iterator.
Diffstat (limited to 'examples')
-rw-r--r--examples/listop.c10
-rw-r--r--examples/nntpclient.c4
-rw-r--r--examples/pop3client.c8
3 files changed, 13 insertions, 9 deletions
diff --git a/examples/listop.c b/examples/listop.c
index a0af1c6a0..41ed66056 100644
--- a/examples/listop.c
+++ b/examples/listop.c
@@ -1,5 +1,5 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,9 +41,9 @@ print (list_t list)
iterator_t itr;
int rc;
- rc = iterator_create (&itr, list);
+ rc = list_get_iterator (list, &itr);
if (rc)
- lperror ("iterator_create", rc);
+ lperror ("list_get_iterator", rc);
for (iterator_first (itr); !iterator_is_done (itr); iterator_next (itr))
{
@@ -222,9 +222,9 @@ shell (list_t list)
for (num = 0; num < NITR; num++)
{
- rc = iterator_create (&itr[num], list);
+ rc = list_get_iterator (list, &itr[num]);
if (rc)
- lperror ("iterator_create", rc);
+ lperror ("list_get_iterator", rc);
iterator_first (itr[num]);
}
diff --git a/examples/nntpclient.c b/examples/nntpclient.c
index 1006fba3f..0fbbc417c 100644
--- a/examples/nntpclient.c
+++ b/examples/nntpclient.c
@@ -2,6 +2,8 @@
GNU Mailutils nntp functions. This application interactively allows users
to contact a nntp server.
+ Copyright (C) 2003, 2004 Free Software Foundation
+
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@@ -497,7 +499,7 @@ com_list_extensions (char *arg ARG_UNUSED)
if (status == 0)
{
iterator_t iterator = NULL;
- iterator_create (&iterator, list);
+ list_get_iterator (list, &iterator);
for (iterator_first (iterator);
!iterator_is_done (iterator); iterator_next (iterator))
{
diff --git a/examples/pop3client.c b/examples/pop3client.c
index a672f393b..3ed68c091 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -2,6 +2,8 @@
GNU Mailutils pop3 functions. This application interactively allows users
to contact a pop3 server.
+ Copyright (C) 2003, 2004 Free Software Foundation
+
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@@ -404,7 +406,7 @@ com_capa (char *arg ARG_UNUSED)
if (status == 0)
{
iterator_t iterator = NULL;
- iterator_create (&iterator, list);
+ list_get_iterator (list, &iterator);
for (iterator_first (iterator);
!iterator_is_done (iterator); iterator_next (iterator))
{
@@ -429,7 +431,7 @@ com_uidl (char *arg)
if (status == 0)
{
iterator_t uidl_iterator = NULL;
- iterator_create (&uidl_iterator, list);
+ list_get_iterator (list, &uidl_iterator);
for (iterator_first (uidl_iterator);
!iterator_is_done (uidl_iterator);
iterator_next (uidl_iterator))
@@ -465,7 +467,7 @@ com_list (char *arg)
if (status == 0)
{
iterator_t list_iterator;
- iterator_create (&list_iterator, list);
+ list_get_iterator (list, &list_iterator);
for (iterator_first (list_iterator);
!iterator_is_done (list_iterator);
iterator_next (list_iterator))

Return to:

Send suggestions and report system problems to the System administrator.