13c87aa1dSDavid Chisnall.\" Copyright (c) 2011 The FreeBSD Foundation 23c87aa1dSDavid Chisnall.\" 33c87aa1dSDavid Chisnall.\" This documentation was written by David Chisnall under sponsorship from 43c87aa1dSDavid Chisnall.\" the FreeBSD Foundation. 53c87aa1dSDavid Chisnall.\" 63c87aa1dSDavid Chisnall.\" Redistribution and use in source and binary forms, with or without 73c87aa1dSDavid Chisnall.\" modification, are permitted provided that the following conditions 83c87aa1dSDavid Chisnall.\" are met: 93c87aa1dSDavid Chisnall.\" 1. Redistributions of source code must retain the above copyright 103c87aa1dSDavid Chisnall.\" notice, this list of conditions and the following disclaimer. 113c87aa1dSDavid Chisnall.\" 2. Redistributions in binary form must reproduce the above copyright 123c87aa1dSDavid Chisnall.\" notice, this list of conditions and the following disclaimer in the 133c87aa1dSDavid Chisnall.\" documentation and/or other materials provided with the distribution. 143c87aa1dSDavid Chisnall.\" 153c87aa1dSDavid Chisnall.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 163c87aa1dSDavid Chisnall.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 173c87aa1dSDavid Chisnall.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 183c87aa1dSDavid Chisnall.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 193c87aa1dSDavid Chisnall.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 203c87aa1dSDavid Chisnall.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 213c87aa1dSDavid Chisnall.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 223c87aa1dSDavid Chisnall.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 233c87aa1dSDavid Chisnall.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 243c87aa1dSDavid Chisnall.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 253c87aa1dSDavid Chisnall.\" SUCH DAMAGE. 263c87aa1dSDavid Chisnall.\" 274f79ce7bSSergey Kandaurov.Dd September 17, 2011 283c87aa1dSDavid Chisnall.Dt USELOCALE 3 293c87aa1dSDavid Chisnall.Os 303c87aa1dSDavid Chisnall.Sh NAME 313c87aa1dSDavid Chisnall.Nm uselocale 32a3fb6da9SGlen Barber.Nd Sets a thread-local locale 333c87aa1dSDavid Chisnall.Sh LIBRARY 343c87aa1dSDavid Chisnall.Lb libc 353c87aa1dSDavid Chisnall.Sh SYNOPSIS 36*58912ae7SDavid Chisnall.In locale.h 373c87aa1dSDavid Chisnall.Ft locale_t 383c87aa1dSDavid Chisnall.Fn uselocale "locale_t locale" 393c87aa1dSDavid Chisnall.Sh DESCRIPTION 4084493996SDavid E. O'BrienSpecifies the locale for this thread to use. 4184493996SDavid E. O'BrienSpecifying 423c87aa1dSDavid Chisnall.Fa LC_GLOBAL_LOCALE 4384493996SDavid E. O'Briendisables the per-thread locale, 4484493996SDavid E. O'Brienwhile NULL returns the current locale without setting a new one. 453c87aa1dSDavid Chisnall.Sh RETURN VALUES 4684493996SDavid E. O'BrienReturns the previous locale, 4784493996SDavid E. O'Brienor LC_GLOBAL_LOCALE if this thread has no locale associated with it. 483c87aa1dSDavid Chisnall.Sh SEE ALSO 493c87aa1dSDavid Chisnall.Xr duplocale 3 , 503c87aa1dSDavid Chisnall.Xr freelocale 3 , 513c87aa1dSDavid Chisnall.Xr localeconv 3 , 523c87aa1dSDavid Chisnall.Xr newlocale 3 , 533c87aa1dSDavid Chisnall.Xr querylocale 3 , 543c87aa1dSDavid Chisnall.Xr xlocale 3 553c87aa1dSDavid Chisnall.Sh STANDARDS 5684493996SDavid E. O'BrienThis function conforms to 5767ff590bSSergey Kandaurov.St -p1003.1-2008 . 58