Last change
on this file since 6099cac was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
452 bytes
|
Rev | Line | |
---|
[3ae31e9] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | strchr.c -- find a character in a string
|
---|
| 4 |
|
---|
| 5 | Return the ptr in sp at which the character c appears;
|
---|
| 6 | NULL if not found
|
---|
| 7 | =============================================================================
|
---|
| 8 | */
|
---|
| 9 |
|
---|
| 10 | #define NULL 0
|
---|
| 11 |
|
---|
| 12 | char *
|
---|
| 13 | strchr(sp, c)
|
---|
| 14 | register char *sp, c;
|
---|
| 15 | {
|
---|
| 16 | do {
|
---|
| 17 | if(*sp == c)
|
---|
| 18 | return(sp);
|
---|
| 19 | } while(*sp++);
|
---|
| 20 |
|
---|
| 21 | return((char *)NULL);
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.