catopen(3) Library Functions Manual catopen(3) NOMBRE catopen, catclose - abre/cierra un catalogo de mensajes BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include nl_catd catopen(const char *name, int flag); int catclose(nl_catd catalog); DESCRIPCION La funcion catopen() abre un catalogo de mensajes y devuelve un descriptor de catalogo. El descriptor permanece valido hasta una llamada a catclose() o execve(2). Si un descriptor de fichero es utilizado para implementar descriptores de catalogo la bandera FD_CLOEXEC es activada. 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. El argumento flag de catopen() se emplea para indicar el origen para el idioma a utilizar. Si vale NL_CAT_LOCALE usara la configuracion de localizacion actual para LC_MESSAGES. En otro caso usara la variable de entorno LANG. La funcion catclose() cierra el catalogo de mensajes identificado por catalog. Esto invalida cualquier referencia posterior al catalogo de mensajes definido por catalog. VALOR DEVUELTO 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. La funcion catclose() devuelve 0 en caso de exito, o -1 en caso de fallo. ENTORNO LC_MESSAGES Puede ser el origen de la configuracion de localizacion LC_MESSAGES, y por tanto determina el idioma a usar si flag vale NL_CAT_LOCALE. LANG El idioma a utilizar si flag vale 0. ATRIBUTOS Para obtener una explicacion de los terminos usados en esta seccion, vease attributes(7). +-----------------------------+--------------------+-------------------+ |Interfaz | Atributo | Valor | +-----------------------------+--------------------+-------------------+ |catopen() | Seguridad del hilo | MT-Safe env | +-----------------------------+--------------------+-------------------+ |catclose() | Seguridad del hilo | Multi-hilo seguro | +-----------------------------+--------------------+-------------------+ VERSIONES Esta es la descripcion de POSIX.1. El valor de glibc para NL_CAT_LOCALE es 1. El camino por defecto varia, pero normalmente se suele buscar en un numero de sitios por debajo de /usr/share/locale. ESTANDARES POSIX.1-2008. HISTORIAL POSIX.1-2001. VEASE TAMBIEN catgets(3), setlocale(3) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Sebastian Desimone , Gerardo Aburruzaga Garcia y Miguel Perez Ibars Esta traduccion es documentacion libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algun error en la traduccion de esta pagina del manual, envie un correo electronico a . Paginas de manual de Linux 6.06 31 Octubre 2023 catopen(3)