124191Skre /* 224191Skre * Copyright (c) 1985 Regents of the University of California. 334479Sbostic * All rights reserved. 434479Sbostic * 534479Sbostic * Redistribution and use in source and binary forms are permitted 634831Sbostic * provided that the above copyright notice and this paragraph are 734831Sbostic * duplicated in all such forms and that any documentation, 834831Sbostic * advertising materials, and other materials related to such 934831Sbostic * distribution and use acknowledge that the software was developed 1034831Sbostic * by the University of California, Berkeley. The name of the 1134831Sbostic * University may not be used to endorse or promote products derived 1234831Sbostic * from this software without specific prior written permission. 1334831Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1434831Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1534831Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1624191Skre */ 1724191Skre 1826535Sdonn #if defined(LIBC_SCCS) && !defined(lint) 19*37776Sbostic static char sccsid[] = "@(#)strpbrk.c 5.5 (Berkeley) 05/10/89"; 2034479Sbostic #endif /* LIBC_SCCS and not lint */ 2124191Skre 2224191Skre char * 23*37776Sbostic strpbrk(s1, s2) 24*37776Sbostic register char *s1, *s2; 2524191Skre { 26*37776Sbostic register int c, sc; 27*37776Sbostic register char *scanp; 2824191Skre 29*37776Sbostic for (; c = *s1; ++s1) 30*37776Sbostic for (scanp = s2; sc = *scanp++;) 31*37776Sbostic if (sc == c) 32*37776Sbostic return(s1); 33*37776Sbostic return(0); 3424191Skre } 35