1 /* 2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved. 3 ** Distributed under the terms of the NewOS License. 4 */ 5 6 #include <sys/types.h> 7 #include <string.h> 8 9 10 char * 11 strchr(const char *s, int c) 12 { 13 for(; *s != (char) c; ++s) 14 if (*s == '\0') 15 return NULL; 16 return (char *)s; 17 } 18 19 20 char * 21 index(const char *s, int c) 22 { 23 return strchr(s, c); 24 } 25 26