locale.h(3)                POSIX Programmer's Manual               locale.h(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       locale.h -- category macros

SSYYNNOOPPSSIISS
       #include <locale.h>

DDEESSCCRRIIPPTTIIOONN
       Some of the functionality described on this reference page extends the
       ISO C standard. Applications shall define the appropriate feature test
       macro (see the System Interfaces volume of POSIX.1-2008, _S_e_c_t_i_o_n _2_._2,
       _T_h_e _C_o_m_p_i_l_a_t_i_o_n _E_n_v_i_r_o_n_m_e_n_t) to enable the visibility of these symbols
       in this header.

       The _<_l_o_c_a_l_e_._h_> header shall define the llccoonnvv structure, which shall
       include at least the following members.  (See the definitions of
       _L_C___M_O_N_E_T_A_R_Y in _S_e_c_t_i_o_n _7_._3_._3, _L_C___M_O_N_E_T_A_R_Y and _S_e_c_t_i_o_n _7_._3_._4,
       _L_C___N_U_M_E_R_I_C.)

           cchhaarr    **ccuurrrreennccyy__ssyymmbbooll
           cchhaarr    **ddeecciimmaall__ppooiinntt
           cchhaarr     ffrraacc__ddiiggiittss
           cchhaarr    **ggrroouuppiinngg
           cchhaarr    **iinntt__ccuurrrr__ssyymmbbooll
           cchhaarr     iinntt__ffrraacc__ddiiggiittss
           cchhaarr     iinntt__nn__ccss__pprreecceeddeess
           cchhaarr     iinntt__nn__sseepp__bbyy__ssppaaccee
           cchhaarr     iinntt__nn__ssiiggnn__ppoossnn
           cchhaarr     iinntt__pp__ccss__pprreecceeddeess
           cchhaarr     iinntt__pp__sseepp__bbyy__ssppaaccee
           cchhaarr     iinntt__pp__ssiiggnn__ppoossnn
           cchhaarr    **mmoonn__ddeecciimmaall__ppooiinntt
           cchhaarr    **mmoonn__ggrroouuppiinngg
           cchhaarr    **mmoonn__tthhoouussaannddss__sseepp
           cchhaarr    **nneeggaattiivvee__ssiiggnn
           cchhaarr     nn__ccss__pprreecceeddeess
           cchhaarr     nn__sseepp__bbyy__ssppaaccee
           cchhaarr     nn__ssiiggnn__ppoossnn
           cchhaarr    **ppoossiittiivvee__ssiiggnn
           cchhaarr     pp__ccss__pprreecceeddeess
           cchhaarr     pp__sseepp__bbyy__ssppaaccee
           cchhaarr     pp__ssiiggnn__ppoossnn
           cchhaarr    **tthhoouussaannddss__sseepp

       The _<_l_o_c_a_l_e_._h_> header shall define NULL (as described in _<_s_t_d_d_e_f_._h_>)
       and at least the following as macros:

       LC_ALL
       LC_COLLATE
       LC_CTYPE
       LC_MESSAGES
       LC_MONETARY
       LC_NUMERIC
       LC_TIME

       which shall expand to integer constant expressions with distinct values
       for use as the first argument to the _s_e_t_l_o_c_a_l_e() function.

       Implementations may add additional masks using the form _L_C___* and an
       uppercase letter.

       The _<_l_o_c_a_l_e_._h_> header shall contain at least the following macros
       representing bitmasks for use with the _n_e_w_l_o_c_a_l_e() function for each
       supported locale category: LC_COLLATE_MASK LC_CTYPE_MASK
       LC_MESSAGES_MASK LC_MONETARY_MASK LC_NUMERIC_MASK LC_TIME_MASK

       Implementations may add additional masks using the form LC_*_MASK.

       In addition, a macro to set the bits for all categories set shall be
       defined: LC_ALL_MASK

       The _<_l_o_c_a_l_e_._h_> header shall define LC_GLOBAL_LOCALE, a special locale
       object descriptor used by the _d_u_p_l_o_c_a_l_e() and _u_s_e_l_o_c_a_l_e() functions.

       The _<_l_o_c_a_l_e_._h_> header shall define the llooccaallee__tt type, representing a
       locale object.

       The following shall be declared as functions and may also be defined as
       macros. Function prototypes shall be provided for use with ISO C
       standard compilers.

           llooccaallee__tt      dduuppllooccaallee((llooccaallee__tt));;
           vvooiidd          ffrreeeellooccaallee((llooccaallee__tt));;
           ssttrruucctt llccoonnvv **llooccaalleeccoonnvv((vvooiidd));;
           llooccaallee__tt      nneewwllooccaallee((iinntt,, ccoonnsstt cchhaarr **,, llooccaallee__tt));;
           cchhaarr         **sseettllooccaallee((iinntt,, ccoonnsstt cchhaarr **));;
           llooccaallee__tt      uusseellooccaallee ((llooccaallee__tt));;

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t _V_a_r_i_a_b_l_e_s, <<ssttddddeeff..hh>>

       The System Interfaces volume of POSIX.1-2008, _d_u_p_l_o_c_a_l_e(),
       _f_r_e_e_l_o_c_a_l_e(), _l_o_c_a_l_e_c_o_n_v(), _n_e_w_l_o_c_a_l_e(), _s_e_t_l_o_c_a_l_e(), _u_s_e_l_o_c_a_l_e()

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version 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.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                          locale.h(3)
