Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_fixcpp/sys/src/ape/lib/ap/gen/strchr.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <string.h>
2
 
3
char*
4
strchr(const char *s, int c)
5
{
6
	char c1;
7
 
8
	if(c == 0) {
9
		while(*s++)
10
			;
11
		return s-1;
12
	}
13
 
14
	while(c1 = *s++)
15
		if(c1 == c)
16
			return s-1;
17
	return 0;
18
}