Last change
on this file since ee49131 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
418 bytes
|
Line | |
---|
1 | /*
|
---|
2 | ============================================================================
|
---|
3 | index.c -- BSD style index function
|
---|
4 | Version 1 -- 1987-02-11 -- D.N. Lynx Crowe
|
---|
5 | ============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | char *
|
---|
9 | index(str, c)
|
---|
10 | register char *str;
|
---|
11 | register char c;
|
---|
12 | {
|
---|
13 | while (*str) {
|
---|
14 |
|
---|
15 | if (*str == c)
|
---|
16 | return(str);
|
---|
17 |
|
---|
18 | ++str;
|
---|
19 | }
|
---|
20 |
|
---|
21 | return((char *)0);
|
---|
22 | }
|
---|
23 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.