Debian Codegraph @

po/pl/man3/rand.3.po

raw
1 # Polish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Andrzej Krzysztofowicz <[email protected]>, 2001.
5 # Michał Kułach <[email protected]>, 2024, 2025.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:39+0200\n"
10 "PO-Revision-Date: 2025-06-03 21:23+0200\n"
11 "Last-Translator: Michał Kułach <[email protected]>\n"
12 "Language-Team: Polish <[email protected]>\n"
13 "Language: pl\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
18 "|| n%100>=20) ? 1 : 2);\n"
19 "X-Generator: Lokalize 22.12.3\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "rand"
26 msgstr "rand"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 lutego 2026 r."
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, no-wrap
38 msgid "Linux man-pages 6.18"
39 msgstr "Linux man-pages 6.18"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "NAZWA"
47
48 #. type: Plain text
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 msgid "rand, rand_r, srand - pseudo-random number generator"
52 msgstr "rand, rand_r, srand - generator liczb pseudolosowych"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr "BIBLIOTEKA"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr "Standardowa biblioteka C (I<libc>,\\ I<-lc>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "SKŁADNIA"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
79 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid ""
86 "B<int rand(void);>\n"
87 "B<void srand(unsigned int >I<seed>B<);>\n"
88 msgstr ""
89 "B<int rand(void);>\n"
90 "B<void srand(unsigned int >I<seed>B<);>\n"
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<[[deprecated]] int rand_r(unsigned int *>I<seedp>B<);>\n"
97 msgstr "B<[[przestarzałe]] int rand_r(unsigned int *>I<seedp>B<);>\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 msgid ""
103 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
104 msgstr ""
105 "Wymagane ustawienia makr biblioteki glibc (patrz B<feature_test_macros>(7)):"
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 msgid "B<rand_r>():"
111 msgstr "B<rand_r>():"
112
113 #. type: Plain text
114 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
115 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
116 #, no-wrap
117 msgid ""
118 " Since glibc 2.24:\n"
119 " _POSIX_C_SOURCE E<gt>= 199506L\n"
120 " glibc 2.23 and earlier\n"
121 " _POSIX_C_SOURCE\n"
122 msgstr ""
123 " Od glibc 2.24:\n"
124 " _POSIX_C_SOURCE E<gt>= 199506L\n"
125 " glibc 2.23 i wcześniejsze\n"
126 " _POSIX_C_SOURCE\n"
127
128 #. type: SH
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 #, no-wrap
132 msgid "DESCRIPTION"
133 msgstr "OPIS"
134
135 #. type: Plain text
136 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
137 #: opensuse-tumbleweed
138 msgid ""
139 "The B<rand>() function returns a pseudo-random integer in the range 0 to "
140 "B<RAND_MAX> inclusive (i.e., the mathematical range [B<0>,\\ B<RAND_MAX>])."
141 msgstr ""
142 "Funkcja B<rand>() zwraca pseudolosową liczbę całkowitą z zakresu pomiędzy 0 "
143 "a B<RAND_MAX> włącznie (tj. matematyczny przedział [B<0>,\\ B<RAND_MAX>])."
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "The B<srand>() function sets its argument as the seed for a new sequence of "
150 "pseudo-random integers to be returned by B<rand>(). These sequences are "
151 "repeatable by calling B<srand>() with the same seed value."
152 msgstr ""
153 "Funkcja B<srand>() ustawia swój argument jako wartość początkową dla nowego "
154 "ciągu pseudolosowych liczb całkowitych zwracanych przez B<rand>(). Ciągi te "
155 "są powtarzalne poprzez wywołanie B<srand>() z tą samą wartością początkową."
156
157 #. type: Plain text
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 msgid ""
161 "If no seed value is provided, the B<rand>() function is automatically "
162 "seeded with a value of 1."
163 msgstr ""
164 "Jeśli nie podano wartości początkowej, funkcja B<rand>() automatycznie "
165 "ustawia tę wartość na 1."
166
167 #. type: Plain text
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 msgid ""
171 "The function B<rand>() is not reentrant, since it uses hidden state that is "
172 "modified on each call. This might just be the seed value to be used by the "
173 "next call, or it might be something more elaborate. In order to get "
174 "reproducible behavior in a threaded application, this state must be made "
175 "explicit; this can be done using the reentrant function B<rand_r>()."
176 msgstr ""
177 "Funkcja B<rand>() nie jest wielobieżna, ponieważ używa ukrytego stanu, który "
178 "jest modyfikowany przy każdym wywołaniu. Może to być jedynie wartość ziarna, "
179 "do wykorzystania przy następnym wywołaniu albo coś bardziej złożonego. Aby "
180 "uzyskać odtwarzalne zachowanie w aplikacji z wątkami, stan ten musi być "
181 "jawny; można to uzyskać za pomocą funkcji wielobieżnej B<rand_r>()."
182
183 #. type: Plain text
184 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
185 #: opensuse-tumbleweed
186 msgid ""
187 "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
188 "[B<0>,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
189 "int> that is used to store state between calls. If B<rand_r>() is called "
190 "with the same initial value for the integer pointed to by I<seedp>, and that "
191 "value is not modified between calls, then the same pseudo-random sequence "
192 "will result."
193 msgstr ""
194 "Podobnie jak B<rand>(), B<rand_r>() zwraca pseudolosową liczbę całkowitą z "
195 "zakresu [B<0>,\\ B<RAND_MAX>]. Argument I<seedp> jest wskaźnikiem do "
196 "I<unsigned int>, która jest używana do przechowywania stanu pomiędzy "
197 "wywołaniami. Jeśli B<rand_r>() wywoła się z tą samą wartością początkową jak "
198 "liczba wskazywana przez I<seedp>, a wartość ta nie zostanie zmodyfikowana "
199 "pomiędzy wywołaniami, to uzyska się tę samą sekwencję pseudolosową."
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 "The value pointed to by the I<seedp> argument of B<rand_r>() provides only "
206 "a very small amount of state, so this function will be a weak pseudo-random "
207 "generator. Try B<drand48_r>(3) instead."
208 msgstr ""
209 "Wartość, na którą wskazuje argument I<seedp> funkcji B<rand_r>() zapewnia "
210 "jedynie bardzo ograniczoną liczbę stanów, więc opisywana funkcja będzie "
211 "bardzo słabym generatorem pseudolosowym. Można korzystać z zamiennika w "
212 "postaci B<drand48_r>(3)."
213
214 #. type: SH
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 #, no-wrap
218 msgid "RETURN VALUE"
219 msgstr "WARTOŚĆ ZWRACANA"
220
221 #. type: Plain text
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 msgid ""
225 "The B<rand>() and B<rand_r>() functions return a value between 0 and "
226 "B<RAND_MAX> (inclusive). The B<srand>() function returns no value."
227 msgstr ""
228 "Funkcje B<rand>() i B<rand_r>() zwracają wartość z zakresu pomiędzy 0 a "
229 "B<RAND_MAX> (włącznie). Funkcja B<srand>() nie zwraca żadnej wartości."
230
231 #. type: SH
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 #, no-wrap
235 msgid "ATTRIBUTES"
236 msgstr "ATRYBUTY"
237
238 #. type: Plain text
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 msgid ""
242 "For an explanation of the terms used in this section, see B<attributes>(7)."
243 msgstr ""
244 "Informacje o pojęciach używanych w tym rozdziale można znaleźć w podręczniku "
245 "B<attributes>(7)."
246
247 #. type: tbl table
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 #, no-wrap
251 msgid "Interface"
252 msgstr "Interfejs"
253
254 #. type: tbl table
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "Attribute"
259 msgstr "Atrybut"
260
261 #. type: tbl table
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "Value"
266 msgstr "Wartość"
267
268 #. type: tbl table
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 #, no-wrap
272 msgid ".na\n"
273 msgstr ".na\n"
274
275 #. type: tbl table
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid ".nh\n"
280 msgstr ".nh\n"
281
282 #. type: tbl table
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid ""
287 "B<rand>(),\n"
288 "B<rand_r>(),\n"
289 "B<srand>()"
290 msgstr ""
291 "B<rand>(),\n"
292 "B<rand_r>(),\n"
293 "B<srand>()"
294
295 #. type: tbl table
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 #, no-wrap
299 msgid "Thread safety"
300 msgstr "Bezpieczeństwo wątkowe"
301
302 #. type: tbl table
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, no-wrap
306 msgid "MT-Safe"
307 msgstr "MT-bezpieczne"
308
309 #. type: SH
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 #, no-wrap
313 msgid "VERSIONS"
314 msgstr "WERSJE"
315
316 #. type: Plain text
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 msgid ""
320 "The versions of B<rand>() and B<srand>() in the Linux C Library use the "
321 "same random number generator as B<random>(3) and B<srandom>(3), so the "
322 "lower-order bits should be as random as the higher-order bits. However, on "
323 "older B<rand>() implementations, and on current implementations on "
324 "different systems, the lower-order bits are much less random than the higher-"
325 "order bits. Do not use this function in applications intended to be "
326 "portable when good randomness is needed. (Use B<random>(3) instead.)"
327 msgstr ""
328 "Wersje B<rand>() i B<srand>() w bibliotece C Linuksa korzystają z tego "
329 "samego generatora liczb losowych, co B<random>() i B<srandom>(), więc mniej "
330 "znaczące bity powinny być tak samo losowe jak bity bardziej znaczące. "
331 "Jednakże, w starszych implementacjach B<rand>() i aktualnych implementacjach "
332 "na różnych systemach, bity mniej znaczące są znacznie mniej losowe niż bity "
333 "bardziej znaczące. Nie należy korzystać z tej funkcji w aplikacjach, które "
334 "mają być przenośne, gdy potrzebna jest dobra losowość (proszę używać w "
335 "zamian B<random>(3))."
336
337 #. type: SH
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 #, no-wrap
341 msgid "STANDARDS"
342 msgstr "STANDARDY"
343
344 #. type: TP
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 #, no-wrap
348 msgid "B<rand>()"
349 msgstr "B<rand>()"
350
351 #. type: TQ
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 #, no-wrap
355 msgid "B<srand>()"
356 msgstr "B<srand>()"
357
358 #. type: Plain text
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 msgid "C11, POSIX.1-2008."
362 msgstr "C11, POSIX.1-2008."
363
364 #. type: TP
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 #, no-wrap
368 msgid "B<rand_r>()"
369 msgstr "B<rand_r>()"
370
371 #. type: Plain text
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 msgid "POSIX.1-2008."
375 msgstr "POSIX.1-2008."
376
377 #. type: SH
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 #, no-wrap
381 msgid "HISTORY"
382 msgstr "HISTORIA"
383
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 msgid "SVr4, 4.3BSD, C89, POSIX.1-2001."
388 msgstr "SVr4, 4.3BSD, C89, POSIX.1-2001."
389
390 #. type: Plain text
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 msgid "POSIX.1-2001. Obsolete in POSIX.1-2008."
394 msgstr "POSIX.1-2001. Przestarzałe w POSIX.1-2008."
395
396 #. type: SH
397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
399 #, no-wrap
400 msgid "EXAMPLES"
401 msgstr "PRZYKŁADY"
402
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 msgid ""
407 "POSIX.1-2001 gives the following example of an implementation of B<rand>() "
408 "and B<srand>(), possibly useful when one needs the same sequence on two "
409 "different machines."
410 msgstr ""
411 "POSIX.1-2001 daje następujący przykład implementacji B<rand>() i B<srand>(), "
412 "który może być przydatny, gdy potrzeba jest taka sama sekwencja na dwóch "
413 "różnych komputerach."
414
415 #. type: Plain text
416 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
417 #: opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid ""
420 "static unsigned long next = 1;\n"
421 "\\&\n"
422 "/* RAND_MAX assumed to be 32767 */\n"
423 "int myrand(void) {\n"
424 " next = next * 1103515245 + 12345;\n"
425 " return((unsigned) (next/65536) % 32768);\n"
426 "}\n"
427 "\\&\n"
428 "void mysrand(unsigned int seed) {\n"
429 " next = seed;\n"
430 "}\n"
431 msgstr ""
432 "static unsigned long next = 1;\n"
433 "\\&\n"
434 "/* RAND_MAX zakłada się jako 32767 */\n"
435 "int myrand(void) {\n"
436 " next = next * 1103515245 + 12345;\n"
437 " return((unsigned) (next/65536) % 32768);\n"
438 "}\n"
439 "\\&\n"
440 "void mysrand(unsigned int seed) {\n"
441 " next = seed;\n"
442 "}\n"
443
444 #. type: Plain text
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 msgid ""
448 "The following program can be used to display the pseudo-random sequence "
449 "produced by B<rand>() when given a particular seed. When the seed is "
450 "I<-1>, the program uses a random seed."
451 msgstr ""
452 "Poniższy program może być zastosowany do wyświetlenia sekwencji "
453 "pseudolosowej utworzonej przez B<rand>() , gdy zada się jej określone "
454 "ziarno. Gdy ziarno wynosi I<-1>, program używa losowego ziarna."
455
456 #. type: Plain text
457 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
458 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
459 #, no-wrap
460 msgid ""
461 "#include E<lt>stdio.hE<gt>\n"
462 "#include E<lt>stdlib.hE<gt>\n"
463 "\\&\n"
464 "int\n"
465 "main(int argc, char *argv[])\n"
466 "{\n"
467 " int r;\n"
468 " unsigned int seed, nloops;\n"
469 "\\&\n"
470 " if (argc != 3) {\n"
471 " fprintf(stderr, \"Usage: %s E<lt>seedE<gt> E<lt>nloopsE<gt>\\[rs]n\", argv[0]);\n"
472 " exit(EXIT_FAILURE);\n"
473 " }\n"
474 "\\&\n"
475 " seed = atoi(argv[1]);\n"
476 " nloops = atoi(argv[2]);\n"
477 "\\&\n"
478 " if (seed == -1) {\n"
479 " seed = arc4random();\n"
480 " printf(\"seed: %u\\[rs]n\", seed);\n"
481 " }\n"
482 "\\&\n"
483 " srand(seed);\n"
484 " for (unsigned int j = 0; j E<lt> nloops; j++) {\n"
485 " r = rand();\n"
486 " printf(\"%d\\[rs]n\", r);\n"
487 " }\n"
488 "\\&\n"
489 " exit(EXIT_SUCCESS);\n"
490 "}\n"
491 msgstr ""
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, \"Użycie: %s E<lt>ziarnoE<gt> E<lt>n-pętliE<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(\"ziarno: %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
523 #. type: SH
524 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
525 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
526 #, no-wrap
527 msgid "SEE ALSO"
528 msgstr "ZOBACZ TAKŻE"
529
530 #. type: Plain text
531 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
532 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
533 msgid "B<drand48>(3), B<random>(3)"
534 msgstr "B<drand48>(3), B<random>(3)"
535
536 #. type: TH
537 #: debian-trixie
538 #, no-wrap
539 msgid "2024-06-15"
540 msgstr "15 czerwca 2024 r."
541
542 #. type: TH
543 #: debian-trixie
544 #, no-wrap
545 msgid "Linux man-pages 6.9.1"
546 msgstr "Linux man-pages 6.9.1"
547
548 #. type: Plain text
549 #: debian-trixie
550 msgid "Standard C library (I<libc>, I<-lc>)"
551 msgstr "Standardowa biblioteka C (I<libc>, I<-lc>)"
552
553 #. type: Plain text
554 #: debian-trixie fedora-44 fedora-rawhide
555 msgid ""
556 "The B<rand>() function returns a pseudo-random integer in the range 0 to "
557 "B<RAND_MAX> inclusive (i.e., the mathematical range [0,\\ B<RAND_MAX>])."
558 msgstr ""
559 "Funkcja B<rand>() zwraca pseudolosową liczbę całkowitą z zakresu pomiędzy 0 "
560 "a B<RAND_MAX> włącznie (tj. matematyczny przedział [0,\\ B<RAND_MAX>])."
561
562 #. type: Plain text
563 #: debian-trixie fedora-44 fedora-rawhide
564 msgid ""
565 "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
566 "[0,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
567 "int> that is used to store state between calls. If B<rand_r>() is called "
568 "with the same initial value for the integer pointed to by I<seedp>, and that "
569 "value is not modified between calls, then the same pseudo-random sequence "
570 "will result."
571 msgstr ""
572 "Podobnie jak B<rand>(), B<rand_r>() zwraca pseudolosową liczbę całkowitą z "
573 "zakresu [0,\\ B<RAND_MAX>]. Argument I<seedp> jest wskaźnikiem do I<unsigned "
574 "int>, która jest używana do przechowywania stanu pomiędzy wywołaniami. Jeśli "
575 "B<rand_r>() wywoła się z tą samą wartością początkową jak liczba wskazywana "
576 "przez I<seedp>, a wartość ta nie zostanie zmodyfikowana pomiędzy "
577 "wywołaniami, to uzyska się tę samą sekwencję pseudolosową."
578
579 #. type: Plain text
580 #: debian-trixie
581 #, no-wrap
582 msgid ""
583 "static unsigned long next = 1;\n"
584 "\\&\n"
585 "/* RAND_MAX assumed to be 32767 */\n"
586 "int myrand(void) {\n"
587 " next = next * 1103515245 + 12345;\n"
588 " return((unsigned)(next/65536) % 32768);\n"
589 "}\n"
590 "\\&\n"
591 "void mysrand(unsigned int seed) {\n"
592 " next = seed;\n"
593 "}\n"
594 msgstr ""
595 "static unsigned long next = 1;\n"
596 "\\&\n"
597 "/* RAND_MAX zakłada się jako 32767 */\n"
598 "int myrand(void) {\n"
599 " next = next * 1103515245 + 12345;\n"
600 " return((unsigned)(next/65536) % 32768);\n"
601 "}\n"
602 "\\&\n"
603 "void mysrand(unsigned int seed) {\n"
604 " next = seed;\n"
605 "}\n"
606
607 #. type: TH
608 #: fedora-44 fedora-rawhide
609 #, no-wrap
610 msgid "2025-01-05"
611 msgstr "5 stycznia 2025 r."
612
613 #. type: TH
614 #: fedora-44 fedora-rawhide
615 #, no-wrap
616 msgid "Linux man-pages 6.13"
617 msgstr "Linux man-pages 6.13"
618
619 #. type: TH
620 #: mageia-cauldron
621 #, no-wrap
622 msgid "Linux man-pages 6.17"
623 msgstr "Linux man-pages 6.17"
624
625 #. type: TH
626 #: opensuse-leap-16-1 opensuse-tumbleweed
627 #, no-wrap
628 msgid "Linux man-pages (unreleased)"
629 msgstr "Linux man-pages (niewydane)"