113658Ssam #ifndef lint 2*17835Sralph static char sccsid[] = "@(#)index.c 5.2 (Berkeley) 01/22/85"; 313658Ssam #endif 413658Ssam 513658Ssam #include <stdio.h> 613658Ssam 7*17835Sralph /* 8*17835Sralph * return pointer to character c 913658Ssam * 1013658Ssam * return codes: 1113658Ssam * NULL - character not found 1213658Ssam * pointer - pointer to character 1313658Ssam */ 1413658Ssam 1513658Ssam char * 1613658Ssam index(str, c) 1713658Ssam register char c, *str; 1813658Ssam { 1913658Ssam for (; *str != '\0'; str++) { 2013658Ssam if (*str == c) 21*17835Sralph return str; 2213658Ssam } 2313658Ssam 24*17835Sralph return NULL; 2513658Ssam } 26