|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1985 Regents of the University of California. ! 3: * All rights reserved. The Berkeley software License Agreement ! 4: * specifies the terms and conditions for redistribution. ! 5: */ ! 6: ! 7: /* ! 8: * Sys 5 compat routine... ! 9: */ ! 10: ! 11: #if defined(LIBC_SCCS) && !defined(lint) ! 12: static char sccsid[] = "@(#)strpbrk.c 5.2 (Berkeley) 86/03/09"; ! 13: #endif ! 14: ! 15: char * ! 16: strpbrk(s, brk) ! 17: register char *s, *brk; ! 18: { ! 19: register char *p; ! 20: register c; ! 21: ! 22: while (c = *s) { ! 23: for (p = brk; *p; p++) ! 24: if (c == *p) ! 25: return (s); ! 26: s++; ! 27: } ! 28: return (0); ! 29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.