summaryrefslogtreecommitdiff
path: root/dviware/beebe/src/strchr.h
blob: f340e3aaea2a55a202a31a62aad16872922de624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* -*-C-*- strchr.h */
/*-->strchr*/
/**********************************************************************/
/******************************* strchr *******************************/
/**********************************************************************/

#ifndef KCC_20
#define KCC_20 0
#endif

#ifndef IBM_PC_MICROSOFT
#define IBM_PC_MICROSOFT 0
#endif

#ifndef OS_VAXVMS
#define OS_VAXVMS 0
#endif


#if    (KCC_20 | IBM_PC_MICROSOFT | OS_VAXVMS)
#else
char*
strchr(s,c)	/* return address of c in s[], or (char*)NULL if not found. */
register char *s;/* c may be NUL; terminator of s[] is included in search. */
register char c;
{
    while ((*s) && ((*s) != c))
	++s;

    if ((*s) == c)
	return (s);
    else
	return ((char*)NULL);
}
#endif