catopen(3) Library Functions Manual catopen(3) catopen, catclose - / LIBRARY Standard C library (libc, -lc) #include nl_catd catopen(const char *name, int flag); int catclose(nl_catd catalog); catopen() . catclose() execve(2). , FD_CLOEXEC. The argument name specifies the name of the message catalog to be opened. If name specifies an absolute path (i.e., contains a '/'), then name specifies a pathname for the message catalog. Otherwise, the environment variable NLSPATH is used with name substituted for %N (see locale(7)). It is unspecified whether NLSPATH will be used when the process has root privileges. If NLSPATH does not exist in the environment, or if a message catalog cannot be opened in any of the paths specified by it, then an implementation defined path is used. This latter default path may depend on the LC_MESSAGES locale setting when the flag argument is NL_CAT_LOCALE and on the LANG environment variable when the flag argument is 0. Changing the LC_MESSAGES part of the locale may invalidate open catalog descriptors. flag catopen() . NL_CAT_LOCALE, LC_MESSAGES . LANG. catclose() , catalog. , catalog, . The function catopen() returns a message catalog descriptor of type nl_catd on success. On failure, it returns (nl_catd) -1 and sets errno to indicate the error. The possible error values include all possible values for the open(2) call. catclose() 0, -1. LC_MESSAGES LC_MESSAGES , , , flag NL_CAT_LOCALE. LANG , , flag 0. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |catopen() | | MT-Safe env | +----------------------------+----------------------------------------------------------+--------------------------+ |catclose() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1. glibc NL_CAT_LOCALE . , , , , , /usr/share/locale. POSIX.1-2008. POSIX.1-2001. . catgets(3), setlocale(3) Azamat Hackimov , Dmitriy S. Seregin , Dmitry Bolkhovskikh , Katrin Kutepova , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . catopen(3)