search for: strcount

Displaying 1 result from an estimated 1 matches for "strcount".

Did you mean: str_count
2004 Aug 05
1
LocalForward and RemoteForward bind patch
..._host_port); logit("Forwarding port."); out: diff -u -r openssh-3.8p1/misc.c openssh-3.8p1-localbind/misc.c --- openssh-3.8p1/misc.c 2003-11-03 01:07:14.000000000 -0800 +++ openssh-3.8p1-localbind/misc.c 2004-08-05 11:49:12.019462480 -0700 @@ -141,6 +141,19 @@ return (old); } +int strcount( char *str, char c ) +{ + int count = 0; + + if( str == NULL ) + return -1; + + while( *str != 0 && *str != ' ' && *str != '\t' ) + if( *(str++) == c ) + count++; + return count; +} + struct passwd * pwcopy(struct passwd *pw) { diff -u -r openssh-3.8p1/misc.h...