aboutsummaryrefslogtreecommitdiffstats
path: root/uid.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-10-15 23:45:08 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-10-15 23:45:08 +0000
commite69274122db6f97b940b82df119afb165e295cf9 (patch)
tree73ad8769a0b644bf12ecebbb4125cd6336a7b41b /uid.c
parentb9396f9d9f0c288376197d7c0d2bea343236f539 (diff)
downloadfetchmail-e69274122db6f97b940b82df119afb165e295cf9.tar.gz
fetchmail-e69274122db6f97b940b82df119afb165e295cf9.tar.bz2
fetchmail-e69274122db6f97b940b82df119afb165e295cf9.zip
Wolfgang Wander's patches.
svn path=/trunk/; revision=1516
Diffstat (limited to 'uid.c')
-rw-r--r--uid.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/uid.c b/uid.c
index 000c0233..50d8ede6 100644
--- a/uid.c
+++ b/uid.c
@@ -197,6 +197,19 @@ int str_nr_in_list( struct idlist **idl, const char *str )
return -1;
}
+int str_nr_last_in_list( struct idlist **idl, const char *str )
+ /* return the last position of str in idl */
+{
+ int nr, ret = -1;
+ struct idlist *walk;
+ if ( !str )
+ return -1;
+ for( walk = *idl, nr = 0; walk; nr ++, walk = walk->next )
+ if( strcasecmp( str, walk->id) == 0 )
+ ret = nr;
+ return ret;
+}
+
int count_list( struct idlist **idl )
/* count the number of elements in the list */
{