Debian Codegraph @

po/fr/man3/getopt.3.po

raw
1 # French translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003.
5 # Stéphan Rafin <[email protected]>, 2002.
6 # Thierry Vignaud <[email protected]>, 1999, 2002.
7 # François Micaux, 2002.
8 # Alain Portal <[email protected]>, 2003-2008.
9 # Jean-Philippe Guérard <[email protected]>, 2005-2006.
10 # Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007.
11 # Julien Cristau <[email protected]>, 2006-2007.
12 # Thomas Huriaux <[email protected]>, 2006-2008.
13 # Nicolas François <[email protected]>, 2006-2008.
14 # Florentin Duneau <[email protected]>, 2006-2010.
15 # Simon Paillard <[email protected]>, 2006, 2013, 2014.
16 # Denis Barbier <[email protected]>, 2006, 2010, 2011.
17 # David Prévot <[email protected]>, 2010, 2012-2014.
18 # Lucien Gentis <[email protected]>, 2023.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: perkamon\n"
22 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
23 "PO-Revision-Date: 2025-05-29 12:24+0200\n"
24 "Last-Translator: Lucien Gentis <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: vim-gtk3\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "getopt"
38 msgstr "getopt"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2026-02-08"
45 msgstr "8 février 2026"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
62 #: opensuse-tumbleweed
63 #, fuzzy
64 #| msgid ""
65 #| "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt - "
66 #| "Parse command-line options"
67 msgid "getopt, optarg, optind, opterr, optopt - Parse command-line options"
68 msgstr ""
69 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt — "
70 "Analyser les options de la ligne de commande"
71
72 #. type: SH
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "LIBRARY"
77 msgstr "BIBLIOTHÈQUE"
78
79 #. type: Plain text
80 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
81 #: opensuse-leap-16-1 opensuse-tumbleweed
82 msgid "Standard C library (I<libc>,\\ I<-lc>)"
83 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
84
85 #. type: SH
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, no-wrap
89 msgid "SYNOPSIS"
90 msgstr "SYNOPSIS"
91
92 #. type: Plain text
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid "B<#include E<lt>unistd.hE<gt>>\n"
97 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
98
99 #. type: Plain text
100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
102 #, no-wrap
103 msgid ""
104 "B<int getopt(int >I<argc>B<, char *>I<argv>B<[],>\n"
105 "B< const char *>I<optstring>B<);>\n"
106 msgstr ""
107 "B<int getopt(int >I<argc>B<, char *>I<argv>B<[],>\n"
108 "B< const char *>I<chaine_options>B<);>\n"
109
110 #. type: Plain text
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 #, no-wrap
114 msgid ""
115 "B<extern char *>I<optarg>B<;>\n"
116 "B<extern int >I<optind>B<, >I<opterr>B<, >I<optopt>B<;>\n"
117 msgstr ""
118 "B<extern char *>I<optarg>B<;>\n"
119 "B<extern int >I<optind>B<, >I<opterr>B<, >I<optopt>B<;>\n"
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid ""
125 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
126 msgstr ""
127 "Exigences de macros de test de fonctionnalités pour la glibc (consulter "
128 "B<feature_test_macros>(7)) :"
129
130 #. type: Plain text
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 msgid "B<getopt>():"
134 msgstr "B<getopt>()\\ :"
135
136 #. type: Plain text
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 #, no-wrap
140 msgid " _POSIX_C_SOURCE E<gt>= 2 || _XOPEN_SOURCE\n"
141 msgstr " _POSIX_C_SOURCE E<gt>= 2 || _XOPEN_SOURCE\n"
142
143 #. type: SH
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "DESCRIPTION"
149
150 #. type: Plain text
151 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
152 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
153 msgid ""
154 "The B<getopt>() function parses the command-line arguments. Its arguments "
155 "I<argc> and I<argv> are the argument count and array as passed to the "
156 "I<main>() function on program invocation. An element of I<argv> that "
157 "starts with \\[aq]-\\[aq] (and is not exactly \"-\" or \"--\") is an option "
158 "element. The characters of this element (aside from the initial \\[aq]-\\"
159 "[aq]) are option characters. If B<getopt>() is called repeatedly, it "
160 "returns successively each of the option characters from each of the option "
161 "elements."
162 msgstr ""
163 "La fonction B<getopt>() analyse les arguments de la ligne de commande. Ses "
164 "arguments I<argc> et I<argv> correspondent au nombre et à la table "
165 "d'éléments qui sont transmis à la fonction I<main>() lors du lancement du "
166 "programme. Un élément de I<argv> qui commence par «\\ -\\ » (et qui n'est "
167 "pas uniquement «\\ --\\ » ou «\\ -\\ ») est considéré comme une option. Les "
168 "caractères à la suite du ou des «\\ -\\ » initiaux sont les caractères de "
169 "l'option. Si B<getopt>() est appelée à plusieurs reprises, elle renverra "
170 "successivement chaque caractère de chaque option."
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "The variable I<optind> is the index of the next element to be processed in "
177 "I<argv>. The system initializes this value to 1. The caller can reset it "
178 "to 1 to restart scanning of the same I<argv>, or when scanning a new "
179 "argument vector."
180 msgstr ""
181 "La variable I<optind> est l'index de l'élément suivant à analyser dans "
182 "I<argv>. Le système initialise cette valeur à 1. L'appelant peut la remettre "
183 "à 1 pour recommencer l'analyse du même tableau de paramètres I<argv> ou pour "
184 "en analyser un nouveau."
185
186 #. type: Plain text
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 msgid ""
190 "If B<getopt>() finds another option character, it returns that character, "
191 "updating the external variable I<optind> and a static variable I<nextchar> "
192 "so that the next call to B<getopt>() can resume the scan with the following "
193 "option character or I<argv>-element."
194 msgstr ""
195 "Si B<getopt>() trouve un autre caractère d'option, elle renvoie ce caractère "
196 "en mettant à jour la variable externe I<optind> et la variable statique "
197 "I<nextchar>, de façon à ce que l'appel suivant à B<getopt>() puisse "
198 "continuer l'analyse avec le caractère d'option suivant ou l'élément suivant "
199 "de I<argv>."
200
201 #. type: Plain text
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 msgid ""
205 "If there are no more option characters, B<getopt>() returns -1. Then "
206 "I<optind> is the index in I<argv> of the first I<argv>-element that is not "
207 "an option."
208 msgstr ""
209 "S'il n'y a plus de caractères d'option, B<getopt>() renvoie B<-1>. Alors, "
210 "I<optind> devient l'index du premier élément de I<argv> qui n'est pas une "
211 "option."
212
213 #. type: Plain text
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 msgid ""
217 "I<optstring> is a string containing the legitimate option characters. A "
218 "legitimate option character is any visible one byte B<ascii>(7) character "
219 "(for which B<isgraph>(3) would return nonzero) that is not \\[aq]-\\[aq], \\"
220 "[aq]:\\[aq], or \\[aq];\\[aq]. If such a character is followed by a colon, "
221 "the option requires an argument, so B<getopt>() places a pointer to the "
222 "following text in the same I<argv>-element, or the text of the following "
223 "I<argv>-element, in I<optarg>. Two colons mean an option takes an optional "
224 "arg; if there is text in the current I<argv>-element (i.e., in the same word "
225 "as the option name itself, for example, \"-oarg\"), then it is returned in "
226 "I<optarg>, otherwise I<optarg> is set to zero. This is a GNU extension. If "
227 "I<optstring> contains B<W> followed by a semicolon, then B<-W foo> is "
228 "treated as the long option B<--foo>. (The B<-W> option is reserved by "
229 "POSIX.2 for implementation extensions.) This behavior is a GNU extension, "
230 "not available with libraries before glibc 2."
231 msgstr ""
232 "I<chaine_options> est une chaîne contenant l'ensemble des caractères "
233 "d'option autorisés. Un caractère d'option autorisé est un caractère "
234 "B<ascii>(7) imprimable sur 1 octet (pour lequel B<isgraph>(3) renverrait une "
235 "valeur différente de zéro) autre que « - », « : » ou « ; ». Si un de ces "
236 "caractères est suivi par un deux-points (« : »), l'option nécessite un "
237 "argument, donc B<getopt>() placera dans I<optarg> un pointeur sur le texte "
238 "suivant dans le même élément de I<argv> ou sur le texte de l'élément de "
239 "I<argv> suivant. Un double deux-points (« :: ») signifie qu'une option prend "
240 "un argument facultatif. S'il existe un texte dans le même élément de I<argv> "
241 "(c'est-à-dire dans le même mot que le nom de l'option elle-même comme «\\ "
242 "-oarg\\ »), il est renvoyé dans I<optarg>, sinon I<optarg> est défini à "
243 "zéro. Il s'agit d'une extension GNU. Si I<chaine_options> contient B<W> "
244 "suivi d'un point-virgule, B<-W foo> est traité comme l'option longue B<--"
245 "foo> (l'option B<-W> est réservée par POSIX.2 pour des extensions "
246 "spécifiques à l'implémentation). Ce comportement, spécifique à la version "
247 "GNU, est pris en charge à partir de la version 2 de la bibliothèque glibc."
248
249 #. type: Plain text
250 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
251 #: opensuse-tumbleweed
252 #, fuzzy
253 #| msgid ""
254 #| "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
255 #| "that eventually all the nonoptions are at the end. Two other scanning "
256 #| "modes are also implemented. If the first character of I<optstring> is \\"
257 #| "[aq]+\\[aq] or the environment variable B<POSIXLY_CORRECT> is set, then "
258 #| "option processing stops as soon as a nonoption argument is encountered. "
259 #| "If \\[aq]+\\[aq] is not the first character of I<optstring>, it is "
260 #| "treated as a normal option. If B<POSIXLY_CORRECT> behaviour is required "
261 #| "in this case I<optstring> will contain two \\[aq]+\\[aq] symbols. If the "
262 #| "first character of I<optstring> is \\[aq]-\\[aq], then each nonoption "
263 #| "I<argv>-element is handled as if it were the argument of an option with "
264 #| "character code 1. (This is used by programs that were written to expect "
265 #| "options and other I<argv>-elements in any order and that care about the "
266 #| "ordering of the two.) The special argument \"--\" forces an end of "
267 #| "option-scanning regardless of the scanning mode."
268 msgid ""
269 "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
270 "that eventually all the nonoptions are at the end. Two other scanning modes "
271 "are also implemented. If the first character of I<optstring> is \\[aq]+\\"
272 "[aq] or the environment variable B<\\%POSIXLY_CORRECT> is set, then option "
273 "processing stops as soon as a nonoption argument is encountered. If \\[aq]+"
274 "\\[aq] is not the first character of I<optstring>, it is treated as a normal "
275 "option. If B<\\%POSIXLY_CORRECT> behavior is required in this case "
276 "I<optstring> will contain two \\[aq]+\\[aq] symbols. If the first character "
277 "of I<optstring> is \\[aq]-\\[aq], then each nonoption I<argv>-element is "
278 "handled as if it were the argument of an option with character code 1. "
279 "(This is used by programs that were written to expect options and other "
280 "I<argv>-elements in any order and that care about the ordering of the two.) "
281 "The special argument \"--\" forces an end of option-scanning regardless of "
282 "the scanning mode."
283 msgstr ""
284 "Par défaut, B<getopt>() permute les éléments de I<argv> au fur et à mesure "
285 "de son analyse, de façon à ce qu'en fin de compte, les arguments ne "
286 "constituant pas des options se trouvent à la fin. Deux autres modes "
287 "d'analyse sont également implémentés : si le premier caractère de "
288 "I<chaine_options> vaut « + » ou si la variable d'environnement "
289 "B<POSIXLY_CORRECT> est définie, l'analyse s'arrête dès qu'un argument ne "
290 "constituant pas une option est rencontré. Si le premier caractère de "
291 "I<chaine_options> est autre que « + », il est traité comme une option "
292 "normale. Si le comportement induit par la définition de B<POSIXLY_CORRECT> "
293 "est requis, I<chaine_options> contiendra deux symboles « + ». Si le premier "
294 "caractère de I<chaine_options> vaut « - », les arguments ne correspondant "
295 "pas à une option sont manipulés comme s'ils étaient des arguments d'une "
296 "option avec le code de caractère 1 (cela est utilisé par les programmes "
297 "conçus pour recevoir des options et d'autres éléments de I<argv> dans "
298 "n'importe quel ordre mais qui prennent en compte l'ordre de ces deux types "
299 "d'élément). L'argument spécial « -- » arrête l'analyse des options, quel que "
300 "soit le mode d'analyse en cours."
301
302 #. type: Plain text
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 msgid ""
306 "While processing the option list, B<getopt>() can detect two kinds of "
307 "errors: (1) an option character that was not specified in I<optstring> and "
308 "(2) a missing option argument (i.e., an option at the end of the command "
309 "line without an expected argument). Such errors are handled and reported as "
310 "follows:"
311 msgstr ""
312 "B<getopt>() peut détecter deux types d'erreur lors du traitement de la liste "
313 "d'options : (1) un caractère d'option non spécifié dans I<chaine_options> et "
314 "(2) un argument d'option manquant (c'est-à-dire une option sans son argument "
315 "attendu à la fin de la ligne de commande). Les erreurs de ce type sont "
316 "traitées et signalées comme suit :"
317
318 #. type: IP
319 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
320 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
321 #, no-wrap
322 msgid "\\[bu]"
323 msgstr "-"
324
325 #. type: Plain text
326 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
327 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
328 msgid ""
329 "By default, B<getopt>() prints an error message on standard error, places "
330 "the erroneous option character in I<optopt>, and returns \\[aq]?\\[aq] as "
331 "the function result."
332 msgstr ""
333 "Par défaut, B<getopt>() affiche un message d'erreur sur la sortie d'erreur "
334 "standard, place le caractère d'option erroné dans I<optopt> et renvoie « ? » "
335 "comme résultat."
336
337 #. type: Plain text
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 msgid ""
341 "If the caller has set the global variable I<opterr> to zero, then "
342 "B<getopt>() does not print an error message. The caller can determine that "
343 "there was an error by testing whether the function return value is \\[aq]?\\"
344 "[aq]. (By default, I<opterr> has a nonzero value.)"
345 msgstr ""
346 "Si l'appelant a défini la variable globale I<opterr> à zéro, B<getopt>() "
347 "n'affiche pas de message d'erreur. L'appelant peut détecter la présence "
348 "d'une erreur en vérifiant si la fonction a renvoyé « ? » (par défaut, "
349 "I<opterr> possède une valeur différente de zéro)."
350
351 #. type: Plain text
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 msgid ""
355 "If the first character (following any optional \\[aq]+\\[aq] or \\[aq]-\\"
356 "[aq] described above) of I<optstring> is a colon (\\[aq]:\\[aq]), then "
357 "B<getopt>() likewise does not print an error message. In addition, it "
358 "returns \\[aq]:\\[aq] instead of \\[aq]?\\[aq] to indicate a missing option "
359 "argument. This allows the caller to distinguish the two different types of "
360 "errors."
361 msgstr ""
362 "Si le premier caractère de I<chaine_options> (suivant un des caractères "
363 "facultatifs « + » ou « - » décrits ci-dessus) est un « : », là non plus, "
364 "B<getopt>() n'affiche pas de message d'erreur. En outre, elle renvoie « : » "
365 "au lieu de « ? » pour indiquer un argument d'option manquant, ce qui permet "
366 "à l'appelant de distinguer les deux types d'erreur."
367
368 #. type: SH
369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
371 #, no-wrap
372 msgid "RETURN VALUE"
373 msgstr "VALEUR RENVOYÉE"
374
375 #. type: Plain text
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 msgid ""
379 "If an option was successfully found, then B<getopt>() returns the option "
380 "character. If all command-line options have been parsed, then B<getopt>() "
381 "returns -1. If B<getopt>() encounters an option character that was not in "
382 "I<optstring>, then \\[aq]?\\[aq] is returned. If B<getopt>() encounters an "
383 "option with a missing argument, then the return value depends on the first "
384 "character in I<optstring>: if it is \\[aq]:\\[aq], then \\[aq]:\\[aq] is "
385 "returned; otherwise \\[aq]?\\[aq] is returned."
386 msgstr ""
387 "Si une option a été trouvée, B<getopt>() renvoie le caractère de l'option. "
388 "Si toutes les options de la ligne de commande ont été lues, B<getopt>() "
389 "renvoie B<-1>. Si B<getopt>() rencontre un caractère d'option qui n'est pas "
390 "dans I<chaine_options>, « ? » est renvoyé. Si B<getopt>() rencontre une "
391 "option avec un argument manquant, la valeur renvoyée dépend du premier "
392 "caractère de I<chaine_options> : si c'est « : », ce caractère est renvoyé, "
393 "sinon « ? » est renvoyé."
394
395 #. type: SH
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 #, no-wrap
399 msgid "ENVIRONMENT"
400 msgstr "ENVIRONNEMENT"
401
402 #. type: TP
403 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
404 #: opensuse-tumbleweed
405 #, fuzzy, no-wrap
406 #| msgid "B<POSIXLY_CORRECT>"
407 msgid "B<\\%POSIXLY_CORRECT>"
408 msgstr "B<POSIXLY_CORRECT>"
409
410 #. type: Plain text
411 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
412 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
413 msgid ""
414 "If this is set, then option processing stops as soon as a nonoption argument "
415 "is encountered."
416 msgstr ""
417 "Si cette variable est définie, l'analyse s'arrête dès qu'un argument ne "
418 "constituant pas une option est rencontré."
419
420 #. type: SH
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, no-wrap
424 msgid "ATTRIBUTES"
425 msgstr "ATTRIBUTS"
426
427 #. type: Plain text
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 msgid ""
431 "For an explanation of the terms used in this section, see B<attributes>(7)."
432 msgstr ""
433 "Pour une explication des termes utilisés dans cette section, consulter "
434 "B<attributes>(7)."
435
436 #. type: tbl table
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 #, no-wrap
440 msgid "Interface"
441 msgstr "Interface"
442
443 #. type: tbl table
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "Attribute"
448 msgstr "Attribut"
449
450 #. type: tbl table
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 #, no-wrap
454 msgid "Value"
455 msgstr "Valeur"
456
457 #. type: tbl table
458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
460 #, no-wrap
461 msgid ".na\n"
462 msgstr ".na\n"
463
464 #. type: tbl table
465 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
466 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
467 #, no-wrap
468 msgid ".nh\n"
469 msgstr ".nh\n"
470
471 #. type: TP
472 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
473 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
474 #, no-wrap
475 msgid "B<getopt>()"
476 msgstr "B<getopt>()"
477
478 #. type: tbl table
479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
481 #, no-wrap
482 msgid "Thread safety"
483 msgstr "Sécurité des threads"
484
485 #. type: tbl table
486 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
487 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
488 #, no-wrap
489 msgid "MT-Unsafe race:getopt env"
490 msgstr "MT-Unsafe race:getopt env"
491
492 #. type: SH
493 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
494 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
495 #, no-wrap
496 msgid "VERSIONS"
497 msgstr "VERSIONS"
498
499 #. type: Plain text
500 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
501 #: opensuse-tumbleweed
502 #, fuzzy
503 #| msgid ""
504 #| "POSIX specifies that the I<argv> array argument should be I<const>, but "
505 #| "these functions permute its elements unless the environment variable "
506 #| "B<POSIXLY_CORRECT> is set. I<const> is used in the actual prototype to "
507 #| "be compatible with other systems; however, this page doesn't show the "
508 #| "qualifier, to avoid confusing readers."
509 msgid ""
510 "POSIX specifies that the I<argv> array argument should be I<const>, but "
511 "these functions permute its elements unless the environment variable B<\\"
512 "%POSIXLY_CORRECT> is set. I<const> is used in the actual prototype to be "
513 "compatible with other systems; however, this page doesn't show the "
514 "qualifier, to avoid confusing readers."
515 msgstr ""
516 "POSIX spécifie que l'argument du tableau I<argv> doit être I<const>, mais "
517 "ces fonctions permutent ses éléments si la variable d'environnement "
518 "B<POSIXLY_CORRECT> n'est pas définie. Le prototype effectif utilise I<const> "
519 "pour être compatible avec les autres systèmes ; cette page, cependant, ne "
520 "montre pas le qualificateur pour éviter de perturber les lecteurs."
521
522 #. type: SH
523 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
524 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
525 #, no-wrap
526 msgid "STANDARDS"
527 msgstr "NORMES"
528
529 #. type: Plain text
530 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
531 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
532 msgid "POSIX.1-2008."
533 msgstr "POSIX.1-2008."
534
535 #. type: Plain text
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 msgid ""
539 "The use of \\[aq]+\\[aq] and \\[aq]-\\[aq] in I<optstring> is a GNU "
540 "extension."
541 msgstr ""
542 "L'utilisation de « + » et « - » dans I<chaine_options> est une extension GNU."
543
544 #. type: SH
545 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
546 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
547 #, no-wrap
548 msgid "HISTORY"
549 msgstr "HISTORIQUE"
550
551 #. type: Plain text
552 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
553 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
554 msgid "POSIX.1-2001, and POSIX.2."
555 msgstr "POSIX.1-2001 et POSIX.2."
556
557 #. type: Plain text
558 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
559 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
560 msgid ""
561 "On some older implementations, B<getopt>() was declared in "
562 "I<E<lt>stdio.hE<gt>>. SUSv1 permitted the declaration to appear in either "
563 "I<E<lt>unistd.hE<gt>> or I<E<lt>stdio.hE<gt>>. POSIX.1-1996 marked the use "
564 "of I<E<lt>stdio.hE<gt>> for this purpose as LEGACY. POSIX.1-2001 does not "
565 "require the declaration to appear in I<E<lt>stdio.hE<gt>>."
566 msgstr ""
567 "Sur certaines anciennes implémentations, B<getopt>() était déclarée dans "
568 "I<E<lt>stdio.hE<gt>>. SUSv1 permettait que la déclaration apparaisse soit "
569 "dans I<E<lt>unistd.hE<gt>>, soit dans I<E<lt>stdio.hE<gt>>. POSIX.1-1996 "
570 "considère la déclaration dans I<E<lt>stdio.hE<gt>> comme «\\ LEGACY\\ » "
571 "(obsolète), et POSIX.1-2001 n'exige pas que la déclaration soit dans "
572 "I<E<lt>stdio.hE<gt>>."
573
574 #. type: Plain text
575 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
576 #: opensuse-tumbleweed
577 #, fuzzy
578 #| msgid ""
579 #| "Very old versions of glibc were affected by a E<.UR https://"
580 #| "\\:sourceware.org/\\:git/\\:?"
581 #| "p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> "
582 #| "B<_>I<PID>B<_GNU_nonoption_argv_flags_> environment variable E<.UE .>"
583 msgid ""
584 "Very old versions of glibc were affected by a E<.UR https:\\://"
585 "\\:sourceware.org/\\:git/\\:?"
586 "p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> B<\\"
587 "%_>I<PID>B<_GNU_nonoption_argv_flags_> environment variable E<.UE .>"
588 msgstr ""
589 "Les versions très anciennes de la glibc étaient affectées par une E<.UR "
590 "https://\\:sourceware.org/\\:git/\\:?"
591 "p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> variable d'environnement "
592 "B<_>I<PID>B<_GNU_nonoption_argv_flags_> E<.UE .>"
593
594 #. type: SH
595 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
596 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
597 #, no-wrap
598 msgid "NOTES"
599 msgstr "NOTES"
600
601 #. type: Plain text
602 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
603 #: opensuse-tumbleweed
604 #, fuzzy
605 #| msgid ""
606 #| "A program that scans multiple argument vectors, or rescans the same "
607 #| "vector more than once, and wants to make use of GNU extensions such as \\"
608 #| "[aq]+\\[aq] and \\[aq]-\\[aq] at the start of I<optstring>, or changes "
609 #| "the value of B<POSIXLY_CORRECT> between scans, must reinitialize "
610 #| "B<getopt>() by resetting I<optind> to 0, rather than the traditional "
611 #| "value of 1. (Resetting to 0 forces the invocation of an internal "
612 #| "initialization routine that rechecks B<POSIXLY_CORRECT> and checks for "
613 #| "GNU extensions in I<optstring>.)"
614 msgid ""
615 "A program that scans multiple argument vectors, or rescans the same vector "
616 "more than once, and wants to make use of GNU extensions such as \\[aq]+\\"
617 "[aq] and \\[aq]-\\[aq] at the start of I<optstring>, or changes the value of "
618 "B<\\%POSIXLY_CORRECT> between scans, must reinitialize B<getopt>() by "
619 "resetting I<optind> to 0, rather than the traditional value of 1. "
620 "(Resetting to 0 forces the invocation of an internal initialization routine "
621 "that rechecks B<\\%POSIXLY_CORRECT> and checks for GNU extensions in "
622 "I<optstring>.)"
623 msgstr ""
624 "Un programme qui analyse plusieurs tableaux de paramètres ou analyse "
625 "plusieurs fois le même tableau et qui veut utiliser les extensions GNU "
626 "telles que « + » et « - » au début de I<chaine_options>, ou changer la "
627 "valeur de B<POSIXLY_CORRECT> entre les analyses, doit réinitialiser "
628 "B<getopt>() en remettant I<optind> à B<0>, plutôt qu'à la valeur "
629 "traditionnelle de B<1>. La remise à B<0> force l'appel d'une routine "
630 "d'initialisation interne qui revérifie la définition de B<POSIXLY_CORRECT> "
631 "et recherche les extensions GNU dans I<chaine_options>."
632
633 #. type: Plain text
634 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
635 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
636 msgid ""
637 "Command-line arguments are parsed in strict order meaning that an option "
638 "requiring an argument will consume the next argument, regardless of whether "
639 "that argument is the correctly specified option argument or simply the next "
640 "option (in the scenario the user mis-specifies the command line). For "
641 "example, if I<optstring> is specified as \"1n:\" and the user specifies the "
642 "command line arguments incorrectly as I<prog\\ -n\\ -1>, the I<-n> option "
643 "will be given the B<optarg> value \"-1\", and the I<-1> option will be "
644 "considered to have not been specified."
645 msgstr ""
646 "Les arguments de la ligne de commande sont analysés selon leur ordre strict, "
647 "ce qui signifie qu'une option nécessitant un argument va consommer "
648 "l'argument suivant, qu'il s'agisse de son argument correctement spécifié ou "
649 "de l'option suivante (auquel cas l'utilisateur aura mal rédigé la ligne de "
650 "commande). Par exemple, si I<chaine_options> contient « 1n: » et si "
651 "l'utilisateur fournit une ligne de commande incorrecte en spécifiant "
652 "I<prog\\ -n\\ -1>, l'option I<-n> se verra affecter la valeur de B<optarg> "
653 "« -1 », et l'option I<-1> sera considérée comme non spécifiée."
654
655 #. type: SH
656 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
657 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
658 #, no-wrap
659 msgid "EXAMPLES"
660 msgstr "EXEMPLES"
661
662 #. type: SS
663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
665 #, no-wrap
666 msgid "getopt()"
667 msgstr "getopt()"
668
669 #. type: Plain text
670 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
671 #: opensuse-tumbleweed
672 #, fuzzy
673 #| msgid ""
674 #| "The following trivial example program uses B<getopt>() to handle two "
675 #| "program options: I<-n>, with no associated value; and I<-t val>, which "
676 #| "expects an associated value."
677 msgid ""
678 "The following trivial example program uses B<getopt>() to handle two "
679 "program options: I<-n>, with no associated value; and I<-t\\ val>, which "
680 "expects an associated value."
681 msgstr ""
682 "Le programme d'exemple trivial suivant utilise B<getopt>() avec deux "
683 "options\\ : I<-n> sans valeur associée et I<-t val> qui nécessite une valeur."
684
685 #. type: Plain text
686 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
687 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
688 #, no-wrap
689 msgid ""
690 "#include E<lt>stdio.hE<gt>\n"
691 "#include E<lt>stdlib.hE<gt>\n"
692 "#include E<lt>unistd.hE<gt>\n"
693 "\\&\n"
694 "int\n"
695 "main(int argc, char *argv[])\n"
696 "{\n"
697 " int flags, opt;\n"
698 " int nsecs, tfnd;\n"
699 "\\&\n"
700 " nsecs = 0;\n"
701 " tfnd = 0;\n"
702 " flags = 0;\n"
703 " while ((opt = getopt(argc, argv, \"nt:\")) != -1) {\n"
704 " switch (opt) {\n"
705 " case \\[aq]n\\[aq]:\n"
706 " flags = 1;\n"
707 " break;\n"
708 " case \\[aq]t\\[aq]:\n"
709 " nsecs = atoi(optarg);\n"
710 " tfnd = 1;\n"
711 " break;\n"
712 " default: /* \\[aq]?\\[aq] */\n"
713 " fprintf(stderr, \"Usage: %s [-t nsecs] [-n] name\\[rs]n\",\n"
714 " argv[0]);\n"
715 " exit(EXIT_FAILURE);\n"
716 " }\n"
717 " }\n"
718 "\\&\n"
719 " printf(\"flags=%d; tfnd=%d; nsecs=%d; optind=%d\\[rs]n\",\n"
720 " flags, tfnd, nsecs, optind);\n"
721 "\\&\n"
722 " if (optind E<gt>= argc) {\n"
723 " fprintf(stderr, \"Expected argument after options\\[rs]n\");\n"
724 " exit(EXIT_FAILURE);\n"
725 " }\n"
726 "\\&\n"
727 " printf(\"name argument = %s\\[rs]n\", argv[optind]);\n"
728 "\\&\n"
729 " /* Other code omitted */\n"
730 "\\&\n"
731 " exit(EXIT_SUCCESS);\n"
732 "}\n"
733 msgstr ""
734 "#include E<lt>stdio.hE<gt>\n"
735 "#include E<lt>stdlib.hE<gt>\n"
736 "#include E<lt>unistd.hE<gt>\n"
737 "\\&\n"
738 "int\n"
739 "main(int argc, char *argv[])\n"
740 "{\n"
741 " int flags, opt;\n"
742 " int nsecs, tfnd;\n"
743 "\\&\n"
744 " nsecs = 0;\n"
745 " tfnd = 0;\n"
746 " flags = 0;\n"
747 " while ((opt = getopt(argc, argv, \"nt:\")) != -1) {\n"
748 " switch (opt) {\n"
749 " case \\[aq]n\\[aq]:\n"
750 " flags = 1;\n"
751 " break;\n"
752 " case \\[aq]t\\[aq]:\n"
753 " nsecs = atoi(optarg);\n"
754 " tfnd = 1;\n"
755 " break;\n"
756 " default: /* \\[aq]?\\[aq] */\n"
757 " fprintf(stderr, \"Usage : %s [-t nsecs] [-n] nom\\[rs]n\",\n"
758 " argv[0]);\n"
759 " exit(EXIT_FAILURE);\n"
760 " }\n"
761 " }\n"
762 "\\&\n"
763 " printf(\"flags=%d; tfnd=%d; nsecs=%d; optind=%d\\[rs]n\",\n"
764 " flags, tfnd, nsecs, optind);\n"
765 "\\&\n"
766 " if (optind E<gt>= argc) {\n"
767 " fprintf(stderr, \"Argument requis après les options\\[rs]n\");\n"
768 " exit(EXIT_FAILURE);\n"
769 " }\n"
770 "\\&\n"
771 " printf(\"argument nom = %s\\[rs]n\", argv[optind]);\n"
772 "\\&\n"
773 " /* Le reste du code n'est pas mentionné */\n"
774 "\\&\n"
775 " exit(EXIT_SUCCESS);\n"
776 "}\n"
777
778 #. SRC END
779 #. type: SH
780 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
781 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
782 #, no-wrap
783 msgid "SEE ALSO"
784 msgstr "VOIR AUSSI"
785
786 #. type: Plain text
787 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
788 #: opensuse-tumbleweed
789 #, fuzzy
790 #| msgid ""
791 #| "B<getopt>(),\n"
792 #| "B<getopt_long>(),\n"
793 #| "B<getopt_long_only>()"
794 msgid ""
795 "B<getopt>(1), B<getopt_long>(3), B<getopt_long_only>(3), B<getsubopt>(3)"
796 msgstr ""
797 "B<getopt>(),\n"
798 "B<getopt_long>(),\n"
799 "B<getopt_long_only>()"
800
801 #. type: TH
802 #: debian-trixie
803 #, no-wrap
804 msgid "2024-06-15"
805 msgstr "15 juin 2024"
806
807 #. type: TH
808 #: debian-trixie
809 #, no-wrap
810 msgid "Linux man-pages 6.9.1"
811 msgstr "Pages du manuel de Linux 6.9.1"
812
813 #. type: Plain text
814 #: debian-trixie fedora-44 fedora-rawhide
815 msgid ""
816 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt - "
817 "Parse command-line options"
818 msgstr ""
819 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt — "
820 "Analyser les options de la ligne de commande"
821
822 #. type: Plain text
823 #: debian-trixie
824 msgid "Standard C library (I<libc>, I<-lc>)"
825 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
826
827 #. type: Plain text
828 #: debian-trixie fedora-44 fedora-rawhide
829 #, no-wrap
830 msgid "B<#include E<lt>getopt.hE<gt>>\n"
831 msgstr "B<#include E<lt>getopt.hE<gt>>\n"
832
833 #. type: Plain text
834 #: debian-trixie fedora-44 fedora-rawhide
835 #, no-wrap
836 msgid ""
837 "B<int getopt_long(int >I<argc>B<, char *>I<argv>B<[],>\n"
838 "B< const char *>I<optstring>B<,>\n"
839 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
840 "B<int getopt_long_only(int >I<argc>B<, char *>I<argv>B<[],>\n"
841 "B< const char *>I<optstring>B<,>\n"
842 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
843 msgstr ""
844 "B<int getopt_long(int >I<argc>B<, char *>I<argv>B<[],>\n"
845 "B< const char *>I<chaine_options>B<,>\n"
846 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
847 "B<int getopt_long_only(int >I<argc>B<, char *>I<argv>B<[],>\n"
848 "B< const char *>I<chaine_options>B<,>\n"
849 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
850
851 #. type: Plain text
852 #: debian-trixie fedora-44 fedora-rawhide
853 msgid "B<getopt_long>(), B<getopt_long_only>():"
854 msgstr "B<getopt_long>(), B<getopt_long_only>() :"
855
856 #. type: Plain text
857 #: debian-trixie fedora-44 fedora-rawhide
858 #, no-wrap
859 msgid " _GNU_SOURCE\n"
860 msgstr " _GNU_SOURCE\n"
861
862 #. type: Plain text
863 #: debian-trixie fedora-44 fedora-rawhide
864 msgid ""
865 "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
866 "that eventually all the nonoptions are at the end. Two other scanning modes "
867 "are also implemented. If the first character of I<optstring> is \\[aq]+\\"
868 "[aq] or the environment variable B<POSIXLY_CORRECT> is set, then option "
869 "processing stops as soon as a nonoption argument is encountered. If \\[aq]+"
870 "\\[aq] is not the first character of I<optstring>, it is treated as a normal "
871 "option. If B<POSIXLY_CORRECT> behaviour is required in this case "
872 "I<optstring> will contain two \\[aq]+\\[aq] symbols. If the first character "
873 "of I<optstring> is \\[aq]-\\[aq], then each nonoption I<argv>-element is "
874 "handled as if it were the argument of an option with character code 1. "
875 "(This is used by programs that were written to expect options and other "
876 "I<argv>-elements in any order and that care about the ordering of the two.) "
877 "The special argument \"--\" forces an end of option-scanning regardless of "
878 "the scanning mode."
879 msgstr ""
880 "Par défaut, B<getopt>() permute les éléments de I<argv> au fur et à mesure "
881 "de son analyse, de façon à ce qu'en fin de compte, les arguments ne "
882 "constituant pas des options se trouvent à la fin. Deux autres modes "
883 "d'analyse sont également implémentés : si le premier caractère de "
884 "I<chaine_options> vaut « + » ou si la variable d'environnement "
885 "B<POSIXLY_CORRECT> est définie, l'analyse s'arrête dès qu'un argument ne "
886 "constituant pas une option est rencontré. Si le premier caractère de "
887 "I<chaine_options> est autre que « + », il est traité comme une option "
888 "normale. Si le comportement induit par la définition de B<POSIXLY_CORRECT> "
889 "est requis, I<chaine_options> contiendra deux symboles « + ». Si le premier "
890 "caractère de I<chaine_options> vaut « - », les arguments ne correspondant "
891 "pas à une option sont manipulés comme s'ils étaient des arguments d'une "
892 "option avec le code de caractère 1 (cela est utilisé par les programmes "
893 "conçus pour recevoir des options et d'autres éléments de I<argv> dans "
894 "n'importe quel ordre mais qui prennent en compte l'ordre de ces deux types "
895 "d'élément). L'argument spécial « -- » arrête l'analyse des options, quel que "
896 "soit le mode d'analyse en cours."
897
898 #. type: SS
899 #: debian-trixie fedora-44 fedora-rawhide
900 #, no-wrap
901 msgid "getopt_long() and getopt_long_only()"
902 msgstr "getopt_long() et getopt_long_only()"
903
904 #. type: Plain text
905 #: debian-trixie fedora-44 fedora-rawhide
906 msgid ""
907 "The B<getopt_long>() function works like B<getopt>() except that it also "
908 "accepts long options, started with two dashes. (If the program accepts only "
909 "long options, then I<optstring> should be specified as an empty string "
910 "(\"\"), not NULL.) Long option names may be abbreviated if the abbreviation "
911 "is unique or is an exact match for some defined option. A long option may "
912 "take a parameter, of the form B<--arg=param> or B<--arg param>."
913 msgstr ""
914 "La fonction B<getopt_long>() fonctionne comme B<getopt>() sauf qu'elle "
915 "accepte également des noms longs d'option, commençant par deux tirets (si le "
916 "programme accepte seulement les options longues, I<chaine_options> doit être "
917 "indiquée avec une chaîne vide « \"\" » et non avec NULL). Les noms longs "
918 "d'option peuvent être abrégés si l'abréviation est unique ou si elle "
919 "correspond exactement à une option définie. Une option longue peut prendre "
920 "un argument, de la forme B<--arg=param> ou B<--arg param>."
921
922 #. type: Plain text
923 #: debian-trixie fedora-44 fedora-rawhide
924 msgid ""
925 "I<longopts> is a pointer to the first element of an array of I<struct "
926 "option> declared in I<E<lt>getopt.hE<gt>> as"
927 msgstr ""
928 "I<longopts> est un pointeur sur le premier élément d'un tableau de "
929 "structures I<struct option> déclarées dans I<E<lt>getopt.hE<gt>> ainsi\\ :"
930
931 #. type: Plain text
932 #: debian-trixie fedora-44 fedora-rawhide
933 #, no-wrap
934 msgid ""
935 "struct option {\n"
936 " const char *name;\n"
937 " int has_arg;\n"
938 " int *flag;\n"
939 " int val;\n"
940 "};\n"
941 msgstr ""
942 "struct option {\n"
943 " const char *name;\n"
944 " int has_arg;\n"
945 " int *flag;\n"
946 " int val;\n"
947 "};\n"
948
949 #. type: Plain text
950 #: debian-trixie fedora-44 fedora-rawhide
951 msgid "The meanings of the different fields are:"
952 msgstr "La signification des différents champs est la suivante\\ :"
953
954 #. type: TP
955 #: debian-trixie fedora-44 fedora-rawhide
956 #, no-wrap
957 msgid "I<name>"
958 msgstr "I<nom>"
959
960 #. type: Plain text
961 #: debian-trixie fedora-44 fedora-rawhide
962 msgid "is the name of the long option."
963 msgstr "est le nom de l'option longue."
964
965 #. type: TP
966 #: debian-trixie fedora-44 fedora-rawhide
967 #, no-wrap
968 msgid "I<has_arg>"
969 msgstr "I<has_arg>"
970
971 #. type: Plain text
972 #: debian-trixie fedora-44 fedora-rawhide
973 msgid ""
974 "is: B<no_argument> (or 0) if the option does not take an argument; "
975 "B<required_argument> (or 1) if the option requires an argument; or "
976 "B<optional_argument> (or 2) if the option takes an optional argument."
977 msgstr ""
978 "vaut\\ : B<aucun_argument> (ou B<0>), si l'option ne prend pas d'argument, "
979 "B<argument_requis> (ou B<1>) si l'option prend un argument, ou "
980 "B<argument_facultatif> (ou B<2>) si l'option prend un argument optionnel."
981
982 #. type: TP
983 #: debian-trixie fedora-44 fedora-rawhide
984 #, no-wrap
985 msgid "I<flag>"
986 msgstr "I<flag>"
987
988 #. type: Plain text
989 #: debian-trixie fedora-44 fedora-rawhide
990 msgid ""
991 "specifies how results are returned for a long option. If I<flag> is NULL, "
992 "then B<getopt_long>() returns I<val>. (For example, the calling program "
993 "may set I<val> to the equivalent short option character.) Otherwise, "
994 "B<getopt_long>() returns 0, and I<flag> points to a variable which is set "
995 "to I<val> if the option is found, but left unchanged if the option is not "
996 "found."
997 msgstr ""
998 "indique la manière de renvoyer les résultats pour une option longue. Si "
999 "I<flag> vaut NULL, B<getopt_long>() renvoie I<val> (par exemple, le "
1000 "programme appelant peut remplir I<val> avec le caractère de l'option courte "
1001 "correspondante). Sinon, B<getopt_long>() renvoie B<0>, et I<flag> pointe sur "
1002 "une variable définie à I<val> si l'option est trouvée, mais reste inchangé "
1003 "si l'option est absente."
1004
1005 #. type: TP
1006 #: debian-trixie fedora-44 fedora-rawhide
1007 #, no-wrap
1008 msgid "I<val>"
1009 msgstr "I<val>"
1010
1011 #. type: Plain text
1012 #: debian-trixie fedora-44 fedora-rawhide
1013 msgid ""
1014 "is the value to return, or to load into the variable pointed to by I<flag>."
1015 msgstr ""
1016 "est la valeur à renvoyer ou à affecter à la variable pointée par I<flag>."
1017
1018 #. type: Plain text
1019 #: debian-trixie fedora-44 fedora-rawhide
1020 msgid "The last element of the array has to be filled with zeros."
1021 msgstr "Le dernier élément de la table doit être rempli avec des zéros."
1022
1023 #. type: Plain text
1024 #: debian-trixie fedora-44 fedora-rawhide
1025 msgid ""
1026 "If I<longindex> is not NULL, it points to a variable which is set to the "
1027 "index of the long option relative to I<longopts>."
1028 msgstr ""
1029 "Si I<longindex> est différent de NULL, il pointe sur une variable qui est "
1030 "définie avec l'index de l'option longue correspondant à I<longopts>."
1031
1032 #. type: Plain text
1033 #: debian-trixie fedora-44 fedora-rawhide
1034 msgid ""
1035 "B<getopt_long_only>() is like B<getopt_long>(), but \\[aq]-\\[aq] as well "
1036 "as \"--\" can indicate a long option. If an option that starts with \\[aq]-"
1037 "\\[aq] (not \"--\") doesn't match a long option, but does match a short "
1038 "option, it is parsed as a short option instead."
1039 msgstr ""
1040 "B<getopt_long_only>() fonctionne comme B<getopt_long>(), mais « - » tout "
1041 "comme « -- » peut indiquer une option longue. Si une option commençant par "
1042 "« - » (et non « -- ») ne correspond pas à une option longue, mais correspond "
1043 "à une option courte, elle est analysée en tant qu'option courte."
1044
1045 #. type: Plain text
1046 #: debian-trixie fedora-44 fedora-rawhide
1047 msgid ""
1048 "B<getopt_long>() and B<getopt_long_only>() also return the option "
1049 "character when a short option is recognized. For a long option, they return "
1050 "I<val> if I<flag> is NULL, and 0 otherwise. Error and -1 returns are the "
1051 "same as for B<getopt>(), plus \\[aq]?\\[aq] for an ambiguous match or an "
1052 "extraneous parameter."
1053 msgstr ""
1054 "B<getopt_long>() et B<getopt_long_only>() renvoient également le caractère "
1055 "d'option courte si elles en trouvent une. Pour les options longues, elles "
1056 "renvoient I<val> si I<flag> vaut NULL, et B<0> sinon. Les erreurs et la fin "
1057 "des options sont gérées comme avec B<getopt>(), en renvoyant de surcroît "
1058 "«\\ ?\\ » pour une correspondance ambiguë ou un paramètre en trop."
1059
1060 #. type: TP
1061 #: debian-trixie fedora-44 fedora-rawhide
1062 #, no-wrap
1063 msgid "B<POSIXLY_CORRECT>"
1064 msgstr "B<POSIXLY_CORRECT>"
1065
1066 #. type: TP
1067 #: debian-trixie
1068 #, no-wrap
1069 msgid "B<_E<lt>PIDE<gt>_GNU_nonoption_argv_flags_>"
1070 msgstr "B<_E<lt>PIDE<gt>_GNU_nonoption_argv_flags_>"
1071
1072 #. type: Plain text
1073 #: debian-trixie
1074 msgid ""
1075 "This variable was used by B<bash>(1) 2.0 to communicate to glibc which "
1076 "arguments are the results of wildcard expansion and so should not be "
1077 "considered as options. This behavior was removed in B<bash>(1) 2.01, but "
1078 "the support remains in glibc."
1079 msgstr ""
1080 "Cette variable est utilisée par B<bash>(1) 2.0 pour communiquer à la glibc "
1081 "les arguments résultant de l'expansion des caractères génériques et ne "
1082 "devant donc pas être considérés comme des options. Ce comportement a été "
1083 "supprimé de B<bash>(1) 2.01, mais il est toujours pris en charge par la "
1084 "glibc."
1085
1086 #. type: tbl table
1087 #: debian-trixie fedora-44 fedora-rawhide
1088 #, no-wrap
1089 msgid ""
1090 "B<getopt>(),\n"
1091 "B<getopt_long>(),\n"
1092 "B<getopt_long_only>()"
1093 msgstr ""
1094 "B<getopt>(),\n"
1095 "B<getopt_long>(),\n"
1096 "B<getopt_long_only>()"
1097
1098 #. type: Plain text
1099 #: debian-trixie fedora-44 fedora-rawhide
1100 msgid ""
1101 "POSIX specifies that the I<argv> array argument should be I<const>, but "
1102 "these functions permute its elements unless the environment variable "
1103 "B<POSIXLY_CORRECT> is set. I<const> is used in the actual prototype to be "
1104 "compatible with other systems; however, this page doesn't show the "
1105 "qualifier, to avoid confusing readers."
1106 msgstr ""
1107 "POSIX spécifie que l'argument du tableau I<argv> doit être I<const>, mais "
1108 "ces fonctions permutent ses éléments si la variable d'environnement "
1109 "B<POSIXLY_CORRECT> n'est pas définie. Le prototype effectif utilise I<const> "
1110 "pour être compatible avec les autres systèmes ; cette page, cependant, ne "
1111 "montre pas le qualificateur pour éviter de perturber les lecteurs."
1112
1113 #. type: TP
1114 #: debian-trixie fedora-44 fedora-rawhide
1115 #, no-wrap
1116 msgid "B<getopt_long>()"
1117 msgstr "B<getopt_long>()"
1118
1119 #. type: TQ
1120 #: debian-trixie fedora-44 fedora-rawhide
1121 #, no-wrap
1122 msgid "B<getopt_long_only>()"
1123 msgstr "B<getopt_long_only>()"
1124
1125 #. type: Plain text
1126 #: debian-trixie fedora-44 fedora-rawhide
1127 msgid "GNU."
1128 msgstr "GNU."
1129
1130 #. type: Plain text
1131 #: debian-trixie fedora-44 fedora-rawhide
1132 msgid ""
1133 "A program that scans multiple argument vectors, or rescans the same vector "
1134 "more than once, and wants to make use of GNU extensions such as \\[aq]+\\"
1135 "[aq] and \\[aq]-\\[aq] at the start of I<optstring>, or changes the value of "
1136 "B<POSIXLY_CORRECT> between scans, must reinitialize B<getopt>() by "
1137 "resetting I<optind> to 0, rather than the traditional value of 1. "
1138 "(Resetting to 0 forces the invocation of an internal initialization routine "
1139 "that rechecks B<POSIXLY_CORRECT> and checks for GNU extensions in "
1140 "I<optstring>.)"
1141 msgstr ""
1142 "Un programme qui analyse plusieurs tableaux de paramètres ou analyse "
1143 "plusieurs fois le même tableau et qui veut utiliser les extensions GNU "
1144 "telles que « + » et « - » au début de I<chaine_options>, ou changer la "
1145 "valeur de B<POSIXLY_CORRECT> entre les analyses, doit réinitialiser "
1146 "B<getopt>() en remettant I<optind> à B<0>, plutôt qu'à la valeur "
1147 "traditionnelle de B<1>. La remise à B<0> force l'appel d'une routine "
1148 "d'initialisation interne qui revérifie la définition de B<POSIXLY_CORRECT> "
1149 "et recherche les extensions GNU dans I<chaine_options>."
1150
1151 #. type: Plain text
1152 #: debian-trixie fedora-44 fedora-rawhide
1153 msgid ""
1154 "The following trivial example program uses B<getopt>() to handle two "
1155 "program options: I<-n>, with no associated value; and I<-t val>, which "
1156 "expects an associated value."
1157 msgstr ""
1158 "Le programme d'exemple trivial suivant utilise B<getopt>() avec deux "
1159 "options\\ : I<-n> sans valeur associée et I<-t val> qui nécessite une valeur."
1160
1161 #. SRC END
1162 #. type: SS
1163 #: debian-trixie fedora-44 fedora-rawhide
1164 #, no-wrap
1165 msgid "getopt_long()"
1166 msgstr "getopt_long()"
1167
1168 #. type: Plain text
1169 #: debian-trixie fedora-44 fedora-rawhide
1170 msgid ""
1171 "The following example program illustrates the use of B<getopt_long>() with "
1172 "most of its features."
1173 msgstr ""
1174 "Le programme suivant montre l'utilisation de B<getopt_long>() en illustrant "
1175 "la plupart de ses fonctionnalités."
1176
1177 #. type: Plain text
1178 #: debian-trixie fedora-44 fedora-rawhide
1179 #, no-wrap
1180 msgid ""
1181 "#include E<lt>getopt.hE<gt>\n"
1182 "#include E<lt>stdio.hE<gt> /* for printf */\n"
1183 "#include E<lt>stdlib.hE<gt> /* for exit */\n"
1184 "\\&\n"
1185 "int\n"
1186 "main(int argc, char *argv[])\n"
1187 "{\n"
1188 " int c;\n"
1189 " int digit_optind = 0;\n"
1190 "\\&\n"
1191 " while (1) {\n"
1192 " int this_option_optind = optind ? optind : 1;\n"
1193 " int option_index = 0;\n"
1194 " static struct option long_options[] = {\n"
1195 " {\"add\", required_argument, 0, 0 },\n"
1196 " {\"append\", no_argument, 0, 0 },\n"
1197 " {\"delete\", required_argument, 0, 0 },\n"
1198 " {\"verbose\", no_argument, 0, 0 },\n"
1199 " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n"
1200 " {\"file\", required_argument, 0, 0 },\n"
1201 " {0, 0, 0, 0 }\n"
1202 " };\n"
1203 "\\&\n"
1204 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
1205 " long_options, &option_index);\n"
1206 " if (c == -1)\n"
1207 " break;\n"
1208 "\\&\n"
1209 " switch (c) {\n"
1210 " case 0:\n"
1211 " printf(\"option %s\", long_options[option_index].name);\n"
1212 " if (optarg)\n"
1213 " printf(\" with arg %s\", optarg);\n"
1214 " printf(\"\\[rs]n\");\n"
1215 " break;\n"
1216 "\\&\n"
1217 " case \\[aq]0\\[aq]:\n"
1218 " case \\[aq]1\\[aq]:\n"
1219 " case \\[aq]2\\[aq]:\n"
1220 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
1221 " printf(\"digits occur in two different argv-elements.\\[rs]n\");\n"
1222 " digit_optind = this_option_optind;\n"
1223 " printf(\"option %c\\[rs]n\", c);\n"
1224 " break;\n"
1225 "\\&\n"
1226 " case \\[aq]a\\[aq]:\n"
1227 " printf(\"option a\\[rs]n\");\n"
1228 " break;\n"
1229 "\\&\n"
1230 " case \\[aq]b\\[aq]:\n"
1231 " printf(\"option b\\[rs]n\");\n"
1232 " break;\n"
1233 "\\&\n"
1234 " case \\[aq]c\\[aq]:\n"
1235 " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1236 " break;\n"
1237 "\\&\n"
1238 " case \\[aq]d\\[aq]:\n"
1239 " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1240 " break;\n"
1241 "\\&\n"
1242 " case \\[aq]?\\[aq]:\n"
1243 " break;\n"
1244 "\\&\n"
1245 " default:\n"
1246 " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n"
1247 " }\n"
1248 " }\n"
1249 "\\&\n"
1250 " if (optind E<lt> argc) {\n"
1251 " printf(\"non-option ARGV-elements: \");\n"
1252 " while (optind E<lt> argc)\n"
1253 " printf(\"%s \", argv[optind++]);\n"
1254 " printf(\"\\[rs]n\");\n"
1255 " }\n"
1256 "\\&\n"
1257 " exit(EXIT_SUCCESS);\n"
1258 "}\n"
1259 msgstr ""
1260 "#include E<lt>getopt.hE<gt>\n"
1261 "#include E<lt>stdio.hE<gt> /* pour printf */\n"
1262 "#include E<lt>stdlib.hE<gt> /* pour exit */\n"
1263 "\\&\n"
1264 "int\n"
1265 "main(int argc, char *argv[])\n"
1266 "{\n"
1267 " int c;\n"
1268 " int digit_optind = 0;\n"
1269 "\\&\n"
1270 " while (1) {\n"
1271 " int this_option_optind = optind ? optind : 1;\n"
1272 " int option_index = 0;\n"
1273 " static struct option long_options[] = {\n"
1274 " {\"add\", argument_requis, 0, 0 },\n"
1275 " {\"append\", aucun_argument, 0, 0 },\n"
1276 " {\"delete\", argument_requis, 0, 0 },\n"
1277 " {\"verbose\", aucun_argument, 0, 0 },\n"
1278 " {\"create\", argument_requis, 0, \\[aq]c\\[aq]},\n"
1279 " {\"file\", argument_requis, 0, 0 },\n"
1280 " {0, 0, 0, 0 }\n"
1281 " };\n"
1282 "\\&\n"
1283 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
1284 " long_options, &option_index);\n"
1285 " if (c == -1)\n"
1286 " break;\n"
1287 "\\&\n"
1288 " switch (c) {\n"
1289 " case 0:\n"
1290 " printf(\"option %s\", long_options[option_index].name);\n"
1291 " if (optarg)\n"
1292 " printf(\" avec l'argument %s\", optarg);\n"
1293 " printf(\"\\[rs]n\");\n"
1294 " break;\n"
1295 "\\&\n"
1296 " case \\[aq]0\\[aq]:\n"
1297 " case \\[aq]1\\[aq]:\n"
1298 " case \\[aq]2\\[aq]:\n"
1299 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
1300 " printf(\"des chiffres apparaissent dans deux éléments différents de argv.\\[rs]n\");\n"
1301 " digit_optind = this_option_optind;\n"
1302 " printf(\"option %c\\[rs]n\", c);\n"
1303 " break;\n"
1304 "\\&\n"
1305 " case \\[aq]a\\[aq]:\n"
1306 " printf(\"option a\\[rs]n\");\n"
1307 " break;\n"
1308 "\\&\n"
1309 " case \\[aq]b\\[aq]:\n"
1310 " printf(\"option b\\[rs]n\");\n"
1311 " break;\n"
1312 "\\&\n"
1313 " case \\[aq]c\\[aq]:\n"
1314 " printf(\"option c ayant pour valeur \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1315 " break;\n"
1316 "\\&\n"
1317 " case \\[aq]d\\[aq]:\n"
1318 " printf(\"option d ayant pour valeur \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1319 " break;\n"
1320 "\\&\n"
1321 " case \\[aq]?\\[aq]:\n"
1322 " break;\n"
1323 "\\&\n"
1324 " default:\n"
1325 " printf(\"?? getopt a renvoyé le caractère de code 0%o ??\\[rs]n\", c);\n"
1326 " }\n"
1327 " }\n"
1328 "\\&\n"
1329 " if (optind E<lt> argc) {\n"
1330 " printf(\"éléments de argv autres que des options : \");\n"
1331 " while (optind E<lt> argc)\n"
1332 " printf(\"%s \", argv[optind++]);\n"
1333 " printf(\"\\[rs]n\");\n"
1334 " }\n"
1335 "\\&\n"
1336 " exit(EXIT_SUCCESS);\n"
1337 "}\n"
1338
1339 #. type: Plain text
1340 #: debian-trixie fedora-44 fedora-rawhide
1341 msgid "B<getopt>(1), B<getsubopt>(3)"
1342 msgstr "B<getopt>(1), B<getsubopt>(3)"
1343
1344 #. type: TH
1345 #: fedora-44 fedora-rawhide
1346 #, no-wrap
1347 msgid "2024-12-19"
1348 msgstr "19 décembre 2024"
1349
1350 #. type: TH
1351 #: fedora-44 fedora-rawhide
1352 #, no-wrap
1353 msgid "Linux man-pages 6.13"
1354 msgstr "Pages du manuel de Linux 6.13"
1355
1356 #. type: Plain text
1357 #: fedora-44 fedora-rawhide
1358 msgid ""
1359 "Very old versions of glibc were affected by a E<.UR https://"
1360 "\\:sourceware.org/\\:git/\\:?"
1361 "p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> "
1362 "B<_>I<PID>B<_GNU_nonoption_argv_flags_> environment variable E<.UE .>"
1363 msgstr ""
1364 "Les versions très anciennes de la glibc étaient affectées par une E<.UR "
1365 "https://\\:sourceware.org/\\:git/\\:?"
1366 "p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> variable d'environnement "
1367 "B<_>I<PID>B<_GNU_nonoption_argv_flags_> E<.UE .>"
1368
1369 #. type: TH
1370 #: mageia-cauldron
1371 #, no-wrap
1372 msgid "Linux man-pages 6.17"
1373 msgstr "Pages du manuel de Linux 6.17"
1374
1375 #. type: TH
1376 #: opensuse-leap-16-1 opensuse-tumbleweed
1377 #, no-wrap
1378 msgid "Linux man-pages (unreleased)"
1379 msgstr "Pages du manuel de Linux (non publiées)"