Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/newlocale.3c
Real path: /usr/share/man/man3c/newlocale.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. .\" Copyright (c) 2014, 2020, Oracle and/or its affiliates. .TH newlocale 3C "27 Nov 2017" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME newlocale \- create or modify a locale object .SH SYNOPSIS .LP .nf #include <locale.h> locale_t newlocale(int category_mask, const char *locale, locale_t base); .fi .SH DESCRIPTION .sp .LP The \fBnewlocale()\fR function creates a new locale object or modifies an existing one. If the base argument is \fB(locale_t)0\fR, a new locale object is created. It is unspecified whether the locale object pointed to by base is modified, or freed and a new locale object created. .sp .LP The \fBcategory_mask\fR argument specifies the locale categories to be set or modified. Values for \fBcategory_mask\fR shall be constructed by a bitwise-inclusive OR of the symbolic constants \fBLC_CTYPE_MASK\fR, \fBLC_NUMERIC_MASK\fR, \fBLC_TIME_MASK\fR, \fBLC_COLLATE_MASK\fR, \fBLC_MONETARY_MASK\fR, and \fBLC_MESSAGES_MASK\fR. Alternatively, the mask can be specified as \fBLC_ALL_MASK\fR, which is equivalent to ORing all of the preceding constants. .sp .LP For each category with the corresponding bit set in \fBcategory_mask\fR the data from the locale named by locale is used. In the case of modifying an existing locale object, the data from the locale named by locale replaces the existing data within the locale object. If a completely new locale object is created, the data for all sections not requested by \fBcategory_mask\fR is taken from the default locale. .sp .LP The following preset values of locale are defined for all settings of \fBcategory_mask\fR: .sp .ne 2 .mk .na \fB\fB"POSIX"\fR\fR .ad .RS 11n .rt Specifies the minimal environment for C-language translation called the POSIX locale. .RE .sp .ne 2 .mk .na \fB\fB"C"\fR\fR .ad .RS 11n .rt Equivalent to \fBPOSIX\fR. .RE .sp .ne 2 .mk .na \fB\fB""\fR\fR .ad .RS 11n .rt Specifies an implementation-defined native environment. This corresponds to the value of the associated environment variables, \fBLC_*\fR and \fBLANG\fR. .RE .sp .LP If the base argument is not \fB(locale_t)0\fR and the \fBnewlocale()\fR function call succeeds, the contents of base are unspecified. Applications shall ensure that they stop using base as a locale object before calling \fBnewlocale()\fR. If the function call fails and the base argument is not \fB(locale_t)0\fR, the contents of base remain valid and unchanged. .sp .LP The behavior is undefined if the base argument is the special locale object \fBLC_GLOBAL_LOCALE\fR, or is not a valid locale object handle and is not \fB(locale_t)0\fR. .SH RETURN VALUES .sp .LP Upon successful completion, the \fBnewlocale()\fR function returns a handle which the caller may use on subsequent calls to \fBduplocale()\fR, \fBfreelocale()\fR, and other functions taking a \fBlocale_t\fR argument. .sp .LP Upon failure, the \fBnewlocale()\fR function returns \fB(locale_t)0\fR and set errno to indicate the error. .SH ERRORS .sp .LP The \fBnewlocale()\fR function will fail if: .sp .ne 2 .mk .na \fB\fB[ENOMEM]\fR\fR .ad .RS 12n .rt There is not enough memory available to create the locale object or load the locale data. .RE .sp .ne 2 .mk .na \fB\fB[EINVAL]\fR\fR .ad .RS 12n .rt The \fBcategory_mask\fR contains a bit that does not correspond to a valid category or the locale argument is not a valid string pointer. .RE .sp .ne 2 .mk .na \fB\fB[ENOENT]\fR\fR .ad .RS 12n .rt For any of the categories in \fBcategory_mask\fR, the locale data is not available. .RE .SH USAGE .sp .LP Handles for locale objects returned by the \fBnewlocale()\fR function should either be released by a corresponding call to \fBfreelocale()\fR, or be used as a base locale to another \fBnewlocale()\fR call. .sp .LP The special locale object \fBLC_GLOBAL_LOCALE\fR must not be passed for the base argument, even when returned by the \fBuselocale()\fR function. .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), \fBuselocale\fR(3C), \fBattributes\fR(7), \fBstandards\fR(7)