diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-04-03 10:08:46 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-04-03 10:08:46 +0000 |
commit | b968a481ae558c26082e10d651a0f799a8033824 (patch) | |
tree | 160612912fac2d10c4733e25f2f89352e527ea00 /uid.c | |
parent | 2e4314dac9f9f7e93f639082da33cfc920274941 (diff) | |
download | fetchmail-b968a481ae558c26082e10d651a0f799a8033824.tar.gz fetchmail-b968a481ae558c26082e10d651a0f799a8033824.tar.bz2 fetchmail-b968a481ae558c26082e10d651a0f799a8033824.zip |
Reformat and document str_nr_in_list() better.
svn path=/branches/BRANCH_6-3/; revision=4775
Diffstat (limited to 'uid.c')
-rw-r--r-- | uid.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,5 +1,5 @@ -/* - * uid.c -- UIDL handling for POP3 servers without LAST +/** + * \file uid.c -- UIDL handling for POP3 servers without LAST * * For license terms, see the file COPYING in this directory. */ @@ -359,15 +359,16 @@ struct idlist *str_in_list(struct idlist **idl, const char *str, const flag case return NULL; } -int str_nr_in_list( struct idlist **idl, const char *str ) - /* return the position of str in idl */ +/** return the position of first occurrence of \a str in \a idl */ +int str_nr_in_list(struct idlist **idl, const char *str) { int nr; struct idlist *walk; - if ( !str ) + + if (!str) return -1; - for( walk = *idl, nr = 0; walk; nr ++, walk = walk->next ) - if( strcmp( str, walk->id) == 0 ) + for (walk = *idl, nr = 0; walk; nr ++, walk = walk->next) + if (strcmp(str, walk->id) == 0) return nr; return -1; } |