source: buchla-68k/orig/CLIBRARY/STRPBRK.C@ ee49131

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: 627 bytes
Line 
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
11char *
12strpbrk(string, brkset)
13register char *string, *brkset;
14{
15 register char *p;
16
17 do {
18
19 for (p = brkset; *p != '\0' && *p != *string; ++p)
20 ;
21
22 if (*p != '\0')
23 return(string);
24 }
25
26 while(*string++)
27 ;
28
29 return((char *)0);
30}
Note: See TracBrowser for help on using the repository browser.