Last change
on this file since 411371e was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
587 bytes
|
Rev | Line | |
---|
[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | strpbrk.c -- find a 'break' character in a string
|
---|
| 4 | Version 1 -- 1987-06-12
|
---|
| 5 |
|
---|
| 6 | Return ptr to first occurance of any character from `brkset'
|
---|
| 7 | in the character string `string'; NULL if none exists.
|
---|
| 8 | =============================================================================
|
---|
| 9 | */
|
---|
| 10 |
|
---|
[7258c6a] | 11 | int8_t *strpbrk(int8_t *string, int8_t *brkset)
|
---|
[f40a309] | 12 | {
|
---|
[7258c6a] | 13 | register int8_t *p;
|
---|
[f40a309] | 14 |
|
---|
| 15 | do {
|
---|
| 16 |
|
---|
| 17 | for (p = brkset; *p != '\0' && *p != *string; ++p)
|
---|
| 18 | ;
|
---|
| 19 |
|
---|
| 20 | if (*p != '\0')
|
---|
| 21 | return(string);
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | while(*string++)
|
---|
| 25 | ;
|
---|
| 26 |
|
---|
[7258c6a] | 27 | return((int8_t *)0);
|
---|
[f40a309] | 28 | }
|
---|
[7258c6a] | 29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.