.\" -*- coding: UTF-8 -*- .\" Copyright 1993 Mitchum DSouza .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze .\" Modified 2001-12-14 aeb .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH CATOPEN 3 "8 août 2015" GNU "Manuel du programmeur Linux" .SH NOM catopen, catclose \- Ouverture et fermeture d'un catalogue de messages .SH SYNOPSIS \fB#include \fP .PP \fBnl_catd catopen(const char *\fP\fIname\fP\fB, int \fP\fIflag\fP\fB);\fP .PP \fBint catclose(nl_catd \fP\fIcatalog\fP\fB);\fP .SH DESCRIPTION La fonction \fBcatopen\fP() ouvre un catalogue de messages, et en retourne un descripteur. Celui\-ci reste valide jusqu'à un appel \fBcatclose\fP() ou \fBexecve\fP(2). Si un descripteur de fichier est utilisé pour implémenter le descripteur de catalogue, le drapeau \fBFD_CLOEXEC\fP sera défini. .PP L'argument \fIname\fP indique le nom du catalogue à ouvrir. Si \fIname\fP indique un chemin d'accès absolu (contenant un «\ /\ » ) alors il est employé comme chemin d'accès au catalogue. Sinon, la variable d'environnement \fBNLSPATH\fP est utilisée, après avoir substitué \fIname\fP à son argument \fB%N\fP (consultez \fBlocale\fP(7)). Lorsque le processus à des privilèges root, l'emploi éventuel de \fBNLSPATH\fP n'est pas garanti. Si \fBNLSPATH\fP n'est pas définie dans l'environnement, ou si le catalogue de messages ne peut être ouvert dans aucun des chemins qu'elle contient, alors un chemin prédéfini, dépendant de l'implémentation, est utilisé. Ce dernier peut dépendre de la catégorie de localisation \fBLC_MESSAGES\fP si l'argument \fIflag\fP vaut \fBNL_CAT_LOCALE\fP ou de la variable d'environnement \fBLANG\fP si l'argument \fIflag\fP vaut zéro. Changer la partie \fBLC_MESSAGES\fP de la localisation, peut rendre invalides les descripteurs de catalogues déjà ouverts. .PP L'argument \fIflag\fP de \fBcatopen\fP() indique l'origine du langage à utiliser. S'il vaut \fBNL_CAT_LOCALE\fP alors il utilisera la configuration actuelle de la localisation définie par \fBLC_MESSAGES\fP. Sinon, il utilisera la variable d'environnement \fBLANG\fP. .PP La fonction \fBcatclose\fP() ferme le catalogue identifié par \fIcatalog\fP. Ceci invalide toute référence ultérieure au catalogue de message défini par le descripteur \fIcatalog\fP. .SH "VALEUR RENVOYÉE" La fonction \fBcatopen\fP() renvoie un descripteur de catalogue de messages du type \fInl_catd\fP si elle réussit. En cas d'échec, elle renvoie \fI(nl_catd)\ \-1\fP et définit \fIerrno\fP avec le code d'erreur. Les erreurs possibles incluent toutes celles que peut renvoyer \fBopen\fP(2). .PP La fonction \fBcatclose\fP() renvoie 0 si elle réussit, ou \-1 en cas d'échec. .SH ENVIRONNEMENT .TP \fBLC_MESSAGES\fP Peut\-être la source de la définition de la localisation \fBLC_MESSAGES\fP et peut servir à déterminer le langage à utiliser, si \fIflag\fP vaut \fBNL_CAT_LOCALE\fP. .TP \fBLANG\fP Le langage à utiliser, si \fIflag\fP vaut zéro. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBcatopen\fP() T} Sécurité des threads MT\-Safe env T{ \fBcatclose\fP() T} Sécurité des threads MT\-Safe .TE .SH CONFORMITÉ .\" In XPG 1987, Vol. 3 it says: .\" .I "The flag argument of catopen is reserved for future use" .\" .IR "and should be set to 0" . .\" .\" It is unclear what the source was for the constants .\" .B MCLoadBySet .\" and .\" .B MCLoadAll .\" (see below). POSIX.1\-2001, POSIX.1\-2008. .SH NOTES .\" (Compare .\" .B MCLoadAll .\" below.) .\" .SS Linux notes .\" These functions are available for Linux since libc 4.4.4c. .\" In the case of linux libc4 and libc5, the catalog descriptor .\" .I nl_catd .\" is a .\" .BR mmap (2)'ed .\" area of memory and not a file descriptor. .\" The .\" .I flag .\" argument to .\" .BR catopen () .\" should be either .\" .B MCLoadBySet .\" (=0) or .\" .B MCLoadAll .\" (=1). .\" The former value indicates that a set from the catalog is to be .\" loaded when needed, whereas the latter causes the initial call to .\" .BR catopen () .\" to load the entire catalog into memory. .\" The default search path varies, but usually looks at a number of places below .\" .I /etc/locale .\" and .\" .IR /usr/lib/locale . The above is the POSIX.1 description. The glibc value for \fBNL_CAT_LOCALE\fP is 1. The default path varies, but usually looks at a number of places below \fI/usr/share/locale\fP. .SH "VOIR AUSSI" \fBcatgets\fP(3), \fBsetlocale\fP(3) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .