The newlocale() function shall initialize
a locale object. If base is
NULL, then newlocale()
shall first allocate the object; otherwise it shall use the locale
object referenced by base.
The object shall be initialized for the locale named
by locale, and for the categories selected
in category_mask. The
category_mask value is a bitwise
inclusive OR of the required
values, or the value
On success, the newlocale() function shall return
the initialized locale object. Otherwise, it shall return
NULL, and set
to indicate the error.
The newlocale() function shall fail if:
An invalid category_mask was provided, or
the locale was
For any of the categories in category_mask, the locale data is not available.
The only portable way to allocate a locale object is to call
newlocale() with a
base. The allocated object may be reinitialized
to a new locale by passing it back to newlocale().
The new object may be released by calling freelocale().