10d5acd74SJohn Marino.\" Copyright (c) 2011 The FreeBSD Foundation 20d5acd74SJohn Marino.\" All rights reserved. 30d5acd74SJohn Marino.\" 40d5acd74SJohn Marino.\" This documentation was written by David Chisnall under sponsorship from 50d5acd74SJohn Marino.\" the FreeBSD Foundation. 60d5acd74SJohn Marino.\" 70d5acd74SJohn Marino.\" Redistribution and use in source and binary forms, with or without 80d5acd74SJohn Marino.\" modification, are permitted provided that the following conditions 90d5acd74SJohn Marino.\" are met: 100d5acd74SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 110d5acd74SJohn Marino.\" notice, this list of conditions and the following disclaimer. 120d5acd74SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 130d5acd74SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 140d5acd74SJohn Marino.\" documentation and/or other materials provided with the distribution. 150d5acd74SJohn Marino.\" 160d5acd74SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 170d5acd74SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 180d5acd74SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 190d5acd74SJohn Marino.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 200d5acd74SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 210d5acd74SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 220d5acd74SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 230d5acd74SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 240d5acd74SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 250d5acd74SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 260d5acd74SJohn Marino.\" SUCH DAMAGE. 270d5acd74SJohn Marino.\" 281c87de76Szrj.\" $FreeBSD: head/lib/libc/locale/uselocale.3 281925 2015-04-24 10:17:55Z theraven $ 290d5acd74SJohn Marino.\" 300d5acd74SJohn Marino.Dd September 17, 2011 310d5acd74SJohn Marino.Dt USELOCALE 3 320d5acd74SJohn Marino.Os 330d5acd74SJohn Marino.Sh NAME 340d5acd74SJohn Marino.Nm uselocale 350d5acd74SJohn Marino.Nd Sets a thread-local locale 360d5acd74SJohn Marino.Sh LIBRARY 370d5acd74SJohn Marino.Lb libc 380d5acd74SJohn Marino.Sh SYNOPSIS 391c87de76Szrj.In locale.h 400d5acd74SJohn Marino.Ft locale_t 410d5acd74SJohn Marino.Fn uselocale "locale_t locale" 420d5acd74SJohn Marino.Sh DESCRIPTION 430d5acd74SJohn MarinoSpecifies the locale for this thread to use. 440d5acd74SJohn MarinoSpecifying 45*5a3bf4efSSascha Wildner.Dv LC_GLOBAL_LOCALE 460d5acd74SJohn Marinodisables the per-thread locale, 470d5acd74SJohn Marinowhile NULL returns the current locale without setting a new one. 480d5acd74SJohn Marino.Sh RETURN VALUES 49*5a3bf4efSSascha WildnerReturns the previous locale, or 50*5a3bf4efSSascha Wildner.Dv LC_GLOBAL_LOCALE 51*5a3bf4efSSascha Wildnerif this thread has no locale associated with it. 520d5acd74SJohn Marino.Sh SEE ALSO 530d5acd74SJohn Marino.Xr duplocale 3 , 540d5acd74SJohn Marino.Xr freelocale 3 , 550d5acd74SJohn Marino.Xr localeconv 3 , 560d5acd74SJohn Marino.Xr newlocale 3 , 570d5acd74SJohn Marino.Xr querylocale 3 , 580d5acd74SJohn Marino.Xr xlocale 3 590d5acd74SJohn Marino.Sh STANDARDS 600d5acd74SJohn MarinoThis function conforms to 610d5acd74SJohn Marino.St -p1003.1-2008 . 62