|
Last change
on this file since f7428b1 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Use standard integer types.
|
-
Property mode
set to
100644
|
|
File size:
376 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 | int8_t *index(int8_t *str, int8_t c)
|
|---|
| 9 | {
|
|---|
| 10 | while (*str) {
|
|---|
| 11 |
|
|---|
| 12 | if (*str == c)
|
|---|
| 13 | return(str);
|
|---|
| 14 |
|
|---|
| 15 | ++str;
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | return((int8_t *)0);
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.