133965Sjdp/* Portable version of strchr()
233965Sjdp   This function is in the public domain.  */
333965Sjdp
433965Sjdp/*
533965Sjdp
689857Sobrien@deftypefn Supplemental char* strchr (const char *@var{s}, int @var{c})
733965Sjdp
889857SobrienReturns a pointer to the first occurrence of the character @var{c} in
989857Sobrienthe string @var{s}, or @code{NULL} if not found.  If @var{c} is itself the
1089857Sobriennull character, the results are undefined.
1189857Sobrien
1289857Sobrien@end deftypefn
1389857Sobrien
1433965Sjdp*/
1533965Sjdp
1633965Sjdp#include <ansidecl.h>
1733965Sjdp
1833965Sjdpchar *
19218822Sdimstrchr (register const char *s, int c)
2033965Sjdp{
2133965Sjdp  do {
2233965Sjdp    if (*s == c)
2333965Sjdp      {
2433965Sjdp	return (char*)s;
2533965Sjdp      }
2633965Sjdp  } while (*s++);
2733965Sjdp  return (0);
2833965Sjdp}
29