Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../usr/man/man3c/uselocale.3c
Real path: /usr/share/man/man3c/uselocale.3c
Zurück
'\" te .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in The Oracle Solaris, from IEEE Std 1003.1, 2008 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2001-2008 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear in the documentation of any product containing this material. .\" Portions Copyright (c) 2014, 2020, Oracle and/or its affiliates. .TH uselocale 3C "27 Nov 2017" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME uselocale \- use locale in current thread .SH SYNOPSIS .LP .nf #include <locale.h> locale_t uselocale(locale_t newloc); .fi .SH DESCRIPTION .sp .LP The \fBuselocale()\fR function sets or query the current locale for the calling thread. .sp .LP The value for the \fBnewloc\fR argument shall be one of the following: .RS +4 .TP 1. A value returned by the \fBnewlocale()\fR or \fBduplocale()\fR functions .RE .RS +4 .TP 2. The special locale object descriptor \fBLC_GLOBAL_LOCALE\fR .RE .RS +4 .TP 3. \fB(locale_t)0\fR .RE .sp .LP If the newloc argument is \fB(locale_t)0\fR, the current locale is not changed. This value can be used to query the current locale setting. If the newloc argument is \fBLC_GLOBAL_LOCALE\fR, any thread-local locale for the calling thread is uninstalled. The thread again use the global locale as the current locale, and changes to the global locale affects the thread. Otherwise, the locale represented by \fBnewloc\fR is installed as a thread-local locale to be used as the current locale for the calling thread. .sp .LP Once the \fBuselocale()\fR function has been called to install a thread-local locale, the behavior of every interface using data from the current locale is affected for the calling thread. The current locale for other threads remains unchanged. .SH RETURN VALUES .sp .LP Upon successful completion, the \fBuselocale()\fR function returns a handle for the thread-local locale that was in use as the current locale for the calling thread on entry to the function, or \fBLC_GLOBAL_LOCALE\fR if no thread-local locale was in use. Otherwise, \fBuselocale()\fR return \fB(locale_t)0\fR and set errno to indicate the error. .SH ERRORS .sp .LP The \fBuselocale()\fR function will fail if: .sp .ne 2 .mk .na \fB\fB[EINVAL]\fR\fR .ad .RS 12n .rt \fBnewloc\fR is not a valid locale object and is not \fB(locale_t)0\fR. .RE .SH USAGE .sp .LP Unlike the \fBsetlocale()\fR function, the \fBuselocale()\fR function does not allow replacing some locale categories only. Applications that need to install a locale which differs only in a few categories must use \fBnewlocale()\fR to change a locale object equivalent to the currently used locale and install it. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level MT-Safe _ Standard See \fBstandards\fR(7) .TE .sp .SH SEE ALSO .sp .LP \fBduplocale\fR(3C), \fBfreelocale\fR(3C), \fBnewlocale\fR(3C), \fBattributes\fR(7), \fBstandards\fR(7)