Debian Codegraph @

po/fr/man3/rand.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 # bubu <[email protected]>, 2022.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.22.0\n"
22 "POT-Creation-Date: 2026-06-05 06:39+0200\n"
23 "PO-Revision-Date: 2025-01-24 00:54+0100\n"
24 "Last-Translator: bubu <[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: Poedit 3.0.1\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 "rand"
38 msgstr "rand"
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-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "rand, rand_r, srand - pseudo-random number generator"
64 msgstr "rand, rand_r, srand - Générateur de nombres pseudoaléatoires"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "LIBRARY"
71 msgstr "BIBLIOTHÈQUE"
72
73 #. type: Plain text
74 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
75 #: opensuse-leap-16-1 opensuse-tumbleweed
76 msgid "Standard C library (I<libc>,\\ I<-lc>)"
77 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
78
79 #. type: SH
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "SYNOPSIS"
84 msgstr "SYNOPSIS"
85
86 #. type: Plain text
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 #, no-wrap
90 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
91 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 #, no-wrap
97 msgid ""
98 "B<int rand(void);>\n"
99 "B<void srand(unsigned int >I<seed>B<);>\n"
100 msgstr ""
101 "B<int rand(void);>\n"
102 "B<void srand(unsigned int >I<graine>B<);>\n"
103
104 #. type: Plain text
105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
107 #, no-wrap
108 msgid "B<[[deprecated]] int rand_r(unsigned int *>I<seedp>B<);>\n"
109 msgstr "B<[[deprecated]] int rand_r(unsigned int *>I<seedp>B<);>\n"
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 msgid ""
115 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
116 msgstr ""
117 "Exigences de macros de test de fonctionnalités pour la glibc (consulter "
118 "B<feature_test_macros>(7)) :"
119
120 #. type: Plain text
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 msgid "B<rand_r>():"
124 msgstr "B<rand_r>() :"
125
126 #. type: Plain text
127 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
128 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
129 #, no-wrap
130 msgid ""
131 " Since glibc 2.24:\n"
132 " _POSIX_C_SOURCE E<gt>= 199506L\n"
133 " glibc 2.23 and earlier\n"
134 " _POSIX_C_SOURCE\n"
135 msgstr ""
136 " Depuis la glibc 2.24 :\n"
137 " _POSIX_C_SOURCE E<gt>= 199506L\n"
138 " glibc 2.23 et antérieures\n"
139 " _POSIX_C_SOURCE\n"
140
141 #. type: SH
142 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
143 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
144 #, no-wrap
145 msgid "DESCRIPTION"
146 msgstr "DESCRIPTION"
147
148 #. type: Plain text
149 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
150 #: opensuse-tumbleweed
151 #, fuzzy
152 #| msgid ""
153 #| "The B<rand>() function returns a pseudo-random integer in the range 0 to "
154 #| "B<RAND_MAX> inclusive (i.e., the mathematical range [0,\\ B<RAND_MAX>])."
155 msgid ""
156 "The B<rand>() function returns a pseudo-random integer in the range 0 to "
157 "B<RAND_MAX> inclusive (i.e., the mathematical range [B<0>,\\ B<RAND_MAX>])."
158 msgstr ""
159 "La fonction B<rand>() renvoie un entier pseudoaléatoire entre B<0> et "
160 "B<RAND_MAX>, bornes incluses (c'est-à-dire dans l'intervalle mathématique "
161 "[0,\\ B<RAND_MAX>])."
162
163 #. type: Plain text
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 msgid ""
167 "The B<srand>() function sets its argument as the seed for a new sequence of "
168 "pseudo-random integers to be returned by B<rand>(). These sequences are "
169 "repeatable by calling B<srand>() with the same seed value."
170 msgstr ""
171 "La fonction B<srand>() utilise son argument comme «\\ graine\\» pour la "
172 "génération d'une nouvelle séquence de nombres pseudoaléatoires qui seront "
173 "fournis par B<rand>(). Ces séquences sont reproductibles en appelant "
174 "B<srand>() avec la même valeur de graine."
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 msgid ""
180 "If no seed value is provided, the B<rand>() function is automatically "
181 "seeded with a value of 1."
182 msgstr ""
183 "Si aucune graine originale n'est fournie, la fonction B<rand>() commence en "
184 "utilisant la valeur B<1>."
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 "The function B<rand>() is not reentrant, since it uses hidden state that is "
191 "modified on each call. This might just be the seed value to be used by the "
192 "next call, or it might be something more elaborate. In order to get "
193 "reproducible behavior in a threaded application, this state must be made "
194 "explicit; this can be done using the reentrant function B<rand_r>()."
195 msgstr ""
196 "La fonction B<rand>() n'est pas réentrante, car elle utilise un état caché "
197 "modifié à chaque appel. Il peut s'agir simplement de la valeur de graine "
198 "aléatoire pour l'appel suivant ou de quelque chose de plus compliqué. Afin "
199 "d'obtenir un comportement reproductible dans une application threadée, cet "
200 "état doit être explicite ; cela peut être fait en utilisant la fonction "
201 "réentrante B<rand_r>()."
202
203 #. type: Plain text
204 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
205 #: opensuse-tumbleweed
206 #, fuzzy
207 #| msgid ""
208 #| "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
209 #| "[0,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
210 #| "int> that is used to store state between calls. If B<rand_r>() is "
211 #| "called with the same initial value for the integer pointed to by "
212 #| "I<seedp>, and that value is not modified between calls, then the same "
213 #| "pseudo-random sequence will result."
214 msgid ""
215 "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
216 "[B<0>,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
217 "int> that is used to store state between calls. If B<rand_r>() is called "
218 "with the same initial value for the integer pointed to by I<seedp>, and that "
219 "value is not modified between calls, then the same pseudo-random sequence "
220 "will result."
221 msgstr ""
222 "Comme B<rand>(), B<rand_r>() renvoie un entier pseudoaléatoire dans "
223 "l'intervalle [0,\\ B<RAND_MAX>]. L'argument I<seedp> est un pointeur vers un "
224 "I<unsigned int> qui est utilisé pour stocker l'état entre des appels "
225 "successifs. Si la fonction B<rand_r>() est appelée avec la même valeur "
226 "initiale pour l'entier pointé par I<seedp>, et que cette valeur n'est pas "
227 "modifiée entre les appels, alors la même séquence pseudoaléatoire sera "
228 "générée."
229
230 #. type: Plain text
231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
233 msgid ""
234 "The value pointed to by the I<seedp> argument of B<rand_r>() provides only "
235 "a very small amount of state, so this function will be a weak pseudo-random "
236 "generator. Try B<drand48_r>(3) instead."
237 msgstr ""
238 "La valeur pointée par l'argument I<seedp> de B<rand_r>() ne fournit qu'une "
239 "donnée très petite pour stocker la valeur d'état, cette fonction sera donc "
240 "un générateur pseudoaléatoire faible. Essayez donc B<drand48_r>(3) à sa "
241 "place."
242
243 #. type: SH
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "RETURN VALUE"
248 msgstr "VALEUR RENVOYÉE"
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid ""
254 "The B<rand>() and B<rand_r>() functions return a value between 0 and "
255 "B<RAND_MAX> (inclusive). The B<srand>() function returns no value."
256 msgstr ""
257 "Les fonctions B<rand>() et B<rand_r>() renvoient un nombre entier entre B<0> "
258 "et B<RAND_MAX>, bornes incluses. La fonction B<srand>() ne renvoie aucune "
259 "valeur."
260
261 #. type: SH
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "ATTRIBUTES"
266 msgstr "ATTRIBUTS"
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "For an explanation of the terms used in this section, see B<attributes>(7)."
273 msgstr ""
274 "Pour une explication des termes utilisés dans cette section, consulter "
275 "B<attributes>(7)."
276
277 #. type: tbl table
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 #, no-wrap
281 msgid "Interface"
282 msgstr "Interface"
283
284 #. type: tbl table
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 #, no-wrap
288 msgid "Attribute"
289 msgstr "Attribut"
290
291 #. type: tbl table
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "Value"
296 msgstr "Valeur"
297
298 #. type: tbl table
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 #, no-wrap
302 msgid ".na\n"
303 msgstr ".na\n"
304
305 #. type: tbl table
306 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
307 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
308 #, no-wrap
309 msgid ".nh\n"
310 msgstr ".nh\n"
311
312 #. type: tbl table
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 #, no-wrap
316 msgid ""
317 "B<rand>(),\n"
318 "B<rand_r>(),\n"
319 "B<srand>()"
320 msgstr ""
321 "B<rand>(),\n"
322 "B<rand_r>(),\n"
323 "B<srand>()"
324
325 #. type: tbl table
326 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
327 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
328 #, no-wrap
329 msgid "Thread safety"
330 msgstr "Sécurité des threads"
331
332 #. type: tbl table
333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
335 #, no-wrap
336 msgid "MT-Safe"
337 msgstr "MT-Safe"
338
339 #. type: SH
340 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
341 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
342 #, no-wrap
343 msgid "VERSIONS"
344 msgstr "VERSIONS"
345
346 #. type: Plain text
347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
349 msgid ""
350 "The versions of B<rand>() and B<srand>() in the Linux C Library use the "
351 "same random number generator as B<random>(3) and B<srandom>(3), so the "
352 "lower-order bits should be as random as the higher-order bits. However, on "
353 "older B<rand>() implementations, and on current implementations on "
354 "different systems, the lower-order bits are much less random than the higher-"
355 "order bits. Do not use this function in applications intended to be "
356 "portable when good randomness is needed. (Use B<random>(3) instead.)"
357 msgstr ""
358 "Les versions de B<rand>() et B<srand>() de la bibliothèque C de Linux "
359 "utilisent le même générateur de nombres aléatoires que B<random>(3) et "
360 "B<srandom>(3), ainsi les bits de poids faible sont tout aussi imprévisibles "
361 "que les bits de poids fort. Ceci n'est pas le cas avec les anciennes "
362 "implémentations de B<rand>() ou d'actuelles implémentations sur des systèmes "
363 "différents, où les bits de poids faible n'étaient pas «\\ aussi "
364 "aléatoires\\ » que ceux de poids fort. N'utilisez pas cette fonction dans "
365 "des applications conçues pour être portables et lorsqu'un bon caractère "
366 "aléatoire est nécessaire. (Utilisez plutôt B<random>(3))"
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 "STANDARDS"
373 msgstr "NORMES"
374
375 #. type: TP
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 #, no-wrap
379 msgid "B<rand>()"
380 msgstr "B<rand_>()"
381
382 #. type: TQ
383 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
384 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
385 #, no-wrap
386 msgid "B<srand>()"
387 msgstr "B<srand>()"
388
389 #. type: Plain text
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 msgid "C11, POSIX.1-2008."
393 msgstr "C11, POSIX.1-2008."
394
395 #. type: TP
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 #, no-wrap
399 msgid "B<rand_r>()"
400 msgstr "B<rand_r>()"
401
402 #. type: Plain text
403 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
404 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
405 msgid "POSIX.1-2008."
406 msgstr "POSIX.1-2008."
407
408 #. type: SH
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, no-wrap
412 msgid "HISTORY"
413 msgstr "HISTORIQUE"
414
415 #. type: Plain text
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 msgid "SVr4, 4.3BSD, C89, POSIX.1-2001."
419 msgstr "SVr4, 4.3BSD, C89, POSIX.1-2001."
420
421 #. type: Plain text
422 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
423 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
424 msgid "POSIX.1-2001. Obsolete in POSIX.1-2008."
425 msgstr "POSIX.1-2001. Obsolète dans POSIX.1-2008."
426
427 #. type: SH
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 #, no-wrap
431 msgid "EXAMPLES"
432 msgstr "EXEMPLES"
433
434 #. type: Plain text
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 msgid ""
438 "POSIX.1-2001 gives the following example of an implementation of B<rand>() "
439 "and B<srand>(), possibly useful when one needs the same sequence on two "
440 "different machines."
441 msgstr ""
442 "POSIX.1-2001 fournit l'exemple suivant d'une implémentation de B<rand>() et "
443 "B<srand>() potentiellement utile lorsqu'on a besoin de la même séquence sur "
444 "deux machines différentes."
445
446 #. type: Plain text
447 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
448 #: opensuse-leap-16-1 opensuse-tumbleweed
449 #, no-wrap
450 msgid ""
451 "static unsigned long next = 1;\n"
452 "\\&\n"
453 "/* RAND_MAX assumed to be 32767 */\n"
454 "int myrand(void) {\n"
455 " next = next * 1103515245 + 12345;\n"
456 " return((unsigned) (next/65536) % 32768);\n"
457 "}\n"
458 "\\&\n"
459 "void mysrand(unsigned int seed) {\n"
460 " next = seed;\n"
461 "}\n"
462 msgstr ""
463 "static unsigned long next = 1;\n"
464 "\\&\n"
465 "/* RAND_MAX supposé être égal à 32767 */\n"
466 "int mon_rand(void) {\n"
467 " suivant = suivant * 1103515245 + 12345;\n"
468 " return((unsigned) (suivant/65536) % 32768);\n"
469 "}\n"
470 "\\&\n"
471 "void mon_srand(unsigned int graine) {\n"
472 " suivant = graine;\n"
473 "}\n"
474
475 #. type: Plain text
476 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
477 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
478 msgid ""
479 "The following program can be used to display the pseudo-random sequence "
480 "produced by B<rand>() when given a particular seed. When the seed is "
481 "I<-1>, the program uses a random seed."
482 msgstr ""
483 "Le programme suivant peut être utilisé pour afficher la séquence "
484 "pseudoaléatoire produite par B<rand>() avec une graine donnée. Quand la "
485 "graine est B<-1>, le programme utilise une graine aléatoire."
486
487 #. type: Plain text
488 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
489 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
490 #, no-wrap
491 msgid ""
492 "#include E<lt>stdio.hE<gt>\n"
493 "#include E<lt>stdlib.hE<gt>\n"
494 "\\&\n"
495 "int\n"
496 "main(int argc, char *argv[])\n"
497 "{\n"
498 " int r;\n"
499 " unsigned int seed, nloops;\n"
500 "\\&\n"
501 " if (argc != 3) {\n"
502 " fprintf(stderr, \"Usage: %s E<lt>seedE<gt> E<lt>nloopsE<gt>\\[rs]n\", argv[0]);\n"
503 " exit(EXIT_FAILURE);\n"
504 " }\n"
505 "\\&\n"
506 " seed = atoi(argv[1]);\n"
507 " nloops = atoi(argv[2]);\n"
508 "\\&\n"
509 " if (seed == -1) {\n"
510 " seed = arc4random();\n"
511 " printf(\"seed: %u\\[rs]n\", seed);\n"
512 " }\n"
513 "\\&\n"
514 " srand(seed);\n"
515 " for (unsigned int j = 0; j E<lt> nloops; j++) {\n"
516 " r = rand();\n"
517 " printf(\"%d\\[rs]n\", r);\n"
518 " }\n"
519 "\\&\n"
520 " exit(EXIT_SUCCESS);\n"
521 "}\n"
522 msgstr ""
523 "#include E<lt>stdio.hE<gt>\n"
524 "#include E<lt>stdlib.hE<gt>\n"
525 "\\&\n"
526 "int\n"
527 "main(int argc, char *argv[])\n"
528 "{\n"
529 " int r;\n"
530 " unsigned int graine, nloops;\n"
531 "\\&\n"
532 " if (argc != 3) {\n"
533 " fprintf(stderr, \"Utilisation : %s E<lt>graineE<gt> E<lt>nloopsE<gt>\\[rs]n\", argv[0]);\n"
534 " exit(EXIT_FAILURE);\n"
535 " }\n"
536 "\\&\n"
537 " seed = atoi(argv[1]);\n"
538 " nloops = atoi(argv[2]);\n"
539 "\\&\n"
540 " if (seed == -1) {\n"
541 " seed = arc4random();\n"
542 " printf(\"graine : %u\\[rs]n\", graine);\n"
543 " }\n"
544 "\\&\n"
545 " srand(graine);\n"
546 " for (unsigned int j = 0; j E<lt> nloops; j++) {\n"
547 " r = rand();\n"
548 " printf(\"%d\\[rs]n\", r);\n"
549 " }\n"
550 "\\&\n"
551 " exit(EXIT_SUCCESS);\n"
552 "}\n"
553
554 #. type: SH
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 #, no-wrap
558 msgid "SEE ALSO"
559 msgstr "VOIR AUSSI"
560
561 #. type: Plain text
562 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
563 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
564 msgid "B<drand48>(3), B<random>(3)"
565 msgstr "B<drand48>(3), B<random>(3)"
566
567 #. type: TH
568 #: debian-trixie
569 #, no-wrap
570 msgid "2024-06-15"
571 msgstr "15 juin 2024"
572
573 #. type: TH
574 #: debian-trixie
575 #, no-wrap
576 msgid "Linux man-pages 6.9.1"
577 msgstr "Pages du manuel de Linux 6.9.1"
578
579 #. type: Plain text
580 #: debian-trixie
581 msgid "Standard C library (I<libc>, I<-lc>)"
582 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
583
584 #. type: Plain text
585 #: debian-trixie fedora-44 fedora-rawhide
586 msgid ""
587 "The B<rand>() function returns a pseudo-random integer in the range 0 to "
588 "B<RAND_MAX> inclusive (i.e., the mathematical range [0,\\ B<RAND_MAX>])."
589 msgstr ""
590 "La fonction B<rand>() renvoie un entier pseudoaléatoire entre B<0> et "
591 "B<RAND_MAX>, bornes incluses (c'est-à-dire dans l'intervalle mathématique "
592 "[0,\\ B<RAND_MAX>])."
593
594 #. type: Plain text
595 #: debian-trixie fedora-44 fedora-rawhide
596 msgid ""
597 "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
598 "[0,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
599 "int> that is used to store state between calls. If B<rand_r>() is called "
600 "with the same initial value for the integer pointed to by I<seedp>, and that "
601 "value is not modified between calls, then the same pseudo-random sequence "
602 "will result."
603 msgstr ""
604 "Comme B<rand>(), B<rand_r>() renvoie un entier pseudoaléatoire dans "
605 "l'intervalle [0,\\ B<RAND_MAX>]. L'argument I<seedp> est un pointeur vers un "
606 "I<unsigned int> qui est utilisé pour stocker l'état entre des appels "
607 "successifs. Si la fonction B<rand_r>() est appelée avec la même valeur "
608 "initiale pour l'entier pointé par I<seedp>, et que cette valeur n'est pas "
609 "modifiée entre les appels, alors la même séquence pseudoaléatoire sera "
610 "générée."
611
612 #. type: Plain text
613 #: debian-trixie
614 #, no-wrap
615 msgid ""
616 "static unsigned long next = 1;\n"
617 "\\&\n"
618 "/* RAND_MAX assumed to be 32767 */\n"
619 "int myrand(void) {\n"
620 " next = next * 1103515245 + 12345;\n"
621 " return((unsigned)(next/65536) % 32768);\n"
622 "}\n"
623 "\\&\n"
624 "void mysrand(unsigned int seed) {\n"
625 " next = seed;\n"
626 "}\n"
627 msgstr ""
628 "static unsigned long next = 1;\n"
629 "\\&\n"
630 "/* RAND_MAX supposé être égal à 32767 */\n"
631 "int mon_rand(void) {\n"
632 " suivant = suivant * 1103515245 + 12345;\n"
633 " return((unsigned)(suivant/65536) % 32768);\n"
634 "}\n"
635 "\\&\n"
636 "void mon_srand(unsigned int graine) {\n"
637 " suivant = graine;\n"
638 "}\n"
639
640 #. type: TH
641 #: fedora-44 fedora-rawhide
642 #, no-wrap
643 msgid "2025-01-05"
644 msgstr "5 janvier 2025"
645
646 #. type: TH
647 #: fedora-44 fedora-rawhide
648 #, no-wrap
649 msgid "Linux man-pages 6.13"
650 msgstr "Pages du manuel de Linux 6.13"
651
652 #. type: TH
653 #: mageia-cauldron
654 #, no-wrap
655 msgid "Linux man-pages 6.17"
656 msgstr "Pages du manuel de Linux 6.17"
657
658 #. type: TH
659 #: opensuse-leap-16-1 opensuse-tumbleweed
660 #, no-wrap
661 msgid "Linux man-pages (unreleased)"
662 msgstr "Pages du manuel de Linux (non publiées)"