-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <wchar.h>
+#ifdef WCSCSPN
+# define wcscspn WCSCSPN
+#endif
/* Return the length of the maximum initial segment
of WCS which contains only wide-characters not in REJECT. */
size_t
-wcscspn (wcs, reject)
- const wchar_t *wcs;
- const wchar_t *reject;
+wcscspn (const wchar_t *wcs, const wchar_t *reject)
{
- register size_t count = 0;
+ size_t count = 0;
while (*wcs != L'\0')
if (wcschr (reject, *wcs++) == NULL)