X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fcmpt.c;h=bfc7b2c9ab06275ab043062187f5becd594fba43;hb=d5be8ecca466601bda9b81c28a79077fbda6ccde;hp=a07fdff13eae0c62f1fb947d7b6f3682b0406b9b;hpb=1a6058b1ec98baf1dce0574bec5079ae0db0f0c0;p=wget diff --git a/src/cmpt.c b/src/cmpt.c index a07fdff1..bfc7b2c9 100644 --- a/src/cmpt.c +++ b/src/cmpt.c @@ -1,20 +1,20 @@ /* Replacements for routines missing on some systems. Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. -This file is part of Wget. +This file is part of GNU Wget. -This program is free software; you can redistribute it and/or modify +GNU Wget is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, +GNU Wget is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software +along with Wget; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include @@ -205,6 +205,24 @@ ret0: } #endif /* not HAVE_STRSTR */ +#ifndef HAVE_STRPBRK +/* Find the first ocurrence in S of any character in ACCEPT. */ +char * +strpbrk (const char *s, const char *accept) +{ + while (*s != '\0') + { + const char *a = accept; + while (*a != '\0') + if (*a++ == *s) + return (char *) s; + ++s; + } + + return 0; +} +#endif /* HAVE_STRPBRK */ + #ifndef HAVE_MKTIME /* From GNU libc 2.0. */