1 #ifndef lint 2 static char sccsid[] = "@(#)index.c 5.1 (Berkeley) 06/05/85"; 3 #endif not lint 4 5 /* 6 * Return the ptr in sp at which the character c appears; 7 * NULL if not found 8 */ 9 10 #define NULL 0 11 12 char * 13 index(sp, c) 14 register char *sp, c; 15 { 16 do { 17 if (*sp == c) 18 return(sp); 19 } while (*sp++); 20 return(NULL); 21 } 22