home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume4 / settz / strchr.c < prev    next >
C/C++ Source or Header  |  1986-11-30  |  419b  |  27 lines

  1. #
  2.  
  3. /*LINTLIBRARY*/
  4.  
  5. #include "stdio.h"
  6.  
  7. #ifdef OBJECTID
  8. static char    sccsid[] = "@(#)strchr.c    7.3";
  9. #endif
  10.  
  11. /*
  12. ** For the benefit of BSD folks.
  13. ** This is written from the manual description,
  14. ** so there's no guarantee that it works the same as the "real thing."
  15. */
  16.  
  17. char *    
  18. strchr(string, c)
  19. register char *    string;
  20. register int    c;
  21. {
  22.     do if (*string == c)
  23.         return string;
  24.             while (*string++ != '\0');
  25.     return NULL;
  26. }
  27.