1: #ifndef lint
2: static char sccsid[] = "@(#)index.c 5.1 (Berkeley) 7/2/83";
3: #endif
4:
5: #include <stdio.h>
6:
7: /*******
8: * char *
9: * index(str, c) return pointer to character c
10: * char c, *str;
11: *
12: * return codes:
13: * NULL - character not found
14: * pointer - pointer to character
15: */
16:
17: char *
18: index(str, c)
19: register char c, *str;
20: {
21: for (; *str != '\0'; str++) {
22: if (*str == c)
23: return(str);
24: }
25:
26: return(NULL);
27: }
Defined functions
index
defined in line
17;
never used
Defined variables
sccsid
defined in line
2;
never used