X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/9385eb3d10ebe5eb398c52040ec3dbfba9b0cdcf..15de9d6b4ab2de27ae24b13b7b6c4d55fffe4aef:/locale/FreeBSD/mbsinit.c diff --git a/locale/FreeBSD/mbsinit.c b/locale/FreeBSD/mbsinit.c index 2dd765e..bbc2266 100644 --- a/locale/FreeBSD/mbsinit.c +++ b/locale/FreeBSD/mbsinit.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,23 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/locale/mbsinit.c,v 1.1 2002/08/18 06:30:10 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/locale/mbsinit.c,v 1.3 2004/05/12 14:09:04 tjr Exp $"); + +#include "xlocale_private.h" #include +#include "mblocal.h" int -mbsinit(const mbstate_t *ps __unused) +mbsinit_l(const mbstate_t *ps, locale_t loc) { - /* - * Stateful multibyte conversion is not supported; there are no - * states other than the initial state. - */ + NORMALIZE_LOCALE(loc); + return (loc->__lc_ctype->__mbsinit(ps, loc)); +} - return (1); +int +mbsinit(const mbstate_t *ps) +{ + return mbsinit_l(ps, __current_locale()); }