diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-10-15 23:45:08 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-10-15 23:45:08 +0000 |
commit | e69274122db6f97b940b82df119afb165e295cf9 (patch) | |
tree | 73ad8769a0b644bf12ecebbb4125cd6336a7b41b /uid.c | |
parent | b9396f9d9f0c288376197d7c0d2bea343236f539 (diff) | |
download | fetchmail-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.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 */ { |