Debian Codegraph @

po/ro/man3/getprotoent_r.3.po

raw
1 # Romanian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Remus-Gabriel Chelu <[email protected]>, 2024, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.21.0\n"
8 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
9 "PO-Revision-Date: 2025-11-05 13:02+0100\n"
10 "Last-Translator: Remus-Gabriel Chelu <[email protected]>\n"
11 "Language-Team: Romanian <[email protected]>\n"
12 "Language: ro\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
17 "20)) ? 1 : 2;\n"
18 "X-Generator: Poedit 3.6\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "getprotoent_r"
25 msgstr "getprotoent_r"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2025-09-21"
32 msgstr "21 septembrie 2025"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Pagini de manual de Linux 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NUME"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid ""
51 "getprotoent_r, getprotobyname_r, getprotobynumber_r - get protocol entry "
52 "(reentrant)"
53 msgstr ""
54 "getprotoent_r, getprotobyname_r, getprotobynumber_r - obține intrarea "
55 "protocolului (reentrante)"
56
57 #. type: SH
58 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
59 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
60 #, no-wrap
61 msgid "LIBRARY"
62 msgstr "BIBLIOTECA"
63
64 #. type: Plain text
65 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
66 #: opensuse-leap-16-1 opensuse-tumbleweed
67 msgid "Standard C library (I<libc>,\\ I<-lc>)"
68 msgstr "Biblioteca C standard (I<libc>, I<-lc>)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "SYNOPSIS"
75 msgstr "SINOPSIS"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid "B<#include E<lt>netdb.hE<gt>>\n"
82 msgstr "B<#include E<lt>netdb.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
86 #: opensuse-tumbleweed
87 #, no-wrap
88 msgid ""
89 "B<int getprotoent_r(>size_t size;\n"
90 "B< struct protoent *restrict >I<result_buf>B<,>\n"
91 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
92 "B< struct protoent **restrict >I<result>B<);>\n"
93 "B<int getprotobyname_r(>size_t size;\n"
94 "B< const char *restrict >I<name>B<,>\n"
95 "B< struct protoent *restrict >I<result_buf>B<,>\n"
96 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
97 "B< struct protoent **restrict >I<result>B<);>\n"
98 "B<int getprotobynumber_r(>size_t size;\n"
99 "B< int >I<proto>B<,>\n"
100 "B< struct protoent *restrict >I<result_buf>B<,>\n"
101 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
102 "B< struct protoent **restrict >I<result>B<);>\n"
103 msgstr ""
104 "B<int getprotoent_r(>size_t size;\n"
105 "B< struct protoent *restrict >I<result_buf>B<,>\n"
106 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
107 "B< struct protoent **restrict >I<result>B<);>\n"
108 "B<int getprotobyname_r(>size_t size;\n"
109 "B< const char *restrict >I<name>B<,>\n"
110 "B< struct protoent *restrict >I<result_buf>B<,>\n"
111 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
112 "B< struct protoent **restrict >I<result>B<);>\n"
113 "B<int getprotobynumber_r(>size_t size;\n"
114 "B< int >I<proto>B<,>\n"
115 "B< struct protoent *restrict >I<result_buf>B<,>\n"
116 "B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n"
117 "B< struct protoent **restrict >I<result>B<);>\n"
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
124 msgstr ""
125 "Cerințe pentru macrocomenzi de testare a caracteristicilor pentru glibc "
126 "(consultați B<feature_test_macros>(7)):"
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 msgid "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
132 msgstr "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 #, no-wrap
138 msgid ""
139 " Since glibc 2.19:\n"
140 " _DEFAULT_SOURCE\n"
141 " glibc 2.19 and earlier:\n"
142 " _BSD_SOURCE || _SVID_SOURCE\n"
143 msgstr ""
144 " Începând cu glibc 2.19:\n"
145 " _DEFAULT_SOURCE\n"
146 " glibc 2.19 și versiunile anterioare:\n"
147 " _BSD_SOURCE || _SVID_SOURCE\n"
148
149 #. type: SH
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 #, no-wrap
153 msgid "DESCRIPTION"
154 msgstr "DESCRIERE"
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 msgid ""
160 "The B<getprotoent_r>(), B<getprotobyname_r>(), and B<getprotobynumber_r>() "
161 "functions are the reentrant equivalents of, respectively, B<getprotoent>(3), "
162 "B<getprotobyname>(3), and B<getprotobynumber>(3). They differ in the way "
163 "that the I<protoent> structure is returned, and in the function calling "
164 "signature and return value. This manual page describes just the differences "
165 "from the nonreentrant functions."
166 msgstr ""
167 "Funcțiile B<getprotoent_r>(), B<getprotobyname_r>() și "
168 "B<getprotobynumber_r>() sunt echivalentele reentrante ale funcțiilor "
169 "B<getprotoent>(3), B<getprotobyname>(3) și B<getprotobynumber>(3). Ele "
170 "diferă prin modul în care este returnată structura I<protoent>, precum și "
171 "prin semnătura de apelare a funcției și valoarea de returnare. Această "
172 "pagină de manual descrie doar diferențele față de funcțiile nereentrante."
173
174 #. type: Plain text
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 msgid ""
178 "Instead of returning a pointer to a statically allocated I<protoent> "
179 "structure as the function result, these functions copy the structure into "
180 "the location pointed to by I<result_buf>."
181 msgstr ""
182 "În loc să returneze un indicator la o structură I<protoent> alocată static "
183 "ca rezultat al funcției, aceste funcții copiază structura în locația "
184 "indicată de I<result_buf>."
185
186 #. #-#-#-#-# archlinux: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
187 #. I can find no information on the required/recommended buffer size;
188 #. the nonreentrant functions use a 1024 byte buffer.
189 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
190 #. type: Plain text
191 #. #-#-#-#-# debian-unstable: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
192 #. I can find no information on the required/recommended buffer size;
193 #. the nonreentrant functions use a 1024 byte buffer.
194 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
195 #. type: Plain text
196 #. #-#-#-#-# fedora-44: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
197 #. I can find no information on the required/recommended buffer size;
198 #. the nonreentrant functions use a 1024 byte buffer.
199 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
200 #. type: Plain text
201 #. #-#-#-#-# fedora-rawhide: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
202 #. I can find no information on the required/recommended buffer size;
203 #. the nonreentrant functions use a 1024 byte buffer.
204 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
205 #. type: Plain text
206 #. #-#-#-#-# mageia-cauldron: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
207 #. I can find no information on the required/recommended buffer size;
208 #. the nonreentrant functions use a 1024 byte buffer.
209 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
210 #. type: Plain text
211 #. #-#-#-#-# opensuse-leap-16-1: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
212 #. I can find no information on the required/recommended buffer size;
213 #. the nonreentrant functions use a 1024 byte buffer.
214 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
215 #. type: Plain text
216 #. #-#-#-#-# opensuse-tumbleweed: getprotoent_r.3.pot (PACKAGE VERSION) #-#-#-#-#
217 #. I can find no information on the required/recommended buffer size;
218 #. the nonreentrant functions use a 1024 byte buffer.
219 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
220 #. type: Plain text
221 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
222 #: opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "The I<buf> array is used to store the string fields pointed to by the "
225 "returned I<protoent> structure. (The nonreentrant functions allocate these "
226 "strings in static storage.) The size of this array is specified in "
227 "I<size>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
228 "and the caller must try again with a larger buffer. (A buffer of size 1024 "
229 "bytes should be sufficient for most applications.)"
230 msgstr ""
231 "Matricea I<buf> este utilizată pentru a stoca câmpurile de șiruri de "
232 "caractere indicate de structura I<protoent> returnată; (funcțiile "
233 "nereentrante alocă aceste șiruri de caractere în memoria statică). "
234 "Dimensiunea acestei matrice este specificată în I<size>. Dacă I<buf> este "
235 "prea mică, apelul eșuează cu eroarea B<ERANGE>, iar apelantul trebuie să "
236 "încerce din nou cu o memorie tampon mai mare; (o memorie tampon cu o "
237 "dimensiune de 1024 octeți ar trebui să fie suficientă pentru majoritatea "
238 "aplicațiilor)."
239
240 #. type: Plain text
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 msgid ""
244 "If the function call successfully obtains a protocol record, then I<*result> "
245 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
246 msgstr ""
247 "Dacă apelul funcției obține cu succes o înregistrare de protocol, atunci "
248 "I<*result> este stabilit la I<result_buf>; în caz contrar, I<*result> este "
249 "stabilit la NULL."
250
251 #. type: SH
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 #, no-wrap
255 msgid "RETURN VALUE"
256 msgstr "VALOAREA RETURNATĂ"
257
258 #. type: Plain text
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 msgid ""
262 "On success, these functions return 0. On error, they return one of the "
263 "positive error numbers listed in ERRORS."
264 msgstr ""
265 "În caz de succes, aceste funcții returnează 0. În caz de eroare, acestea "
266 "returnează unul dintre numerele pozitive de eroare enumerate în ERORI."
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 "On error, record not found (B<getprotobyname_r>(), B<getprotobynumber_r>()), "
273 "or end of input (B<getprotoent_r>()) I<result> is set to NULL."
274 msgstr ""
275 "În caz de eroare, înregistrare nedescoperită (B<getprotobyname_r>(), "
276 "B<getprotobynumber_r>()), sau sfârșit de intrare (B<getprotoent_r>()) "
277 "I<result> este stabilit la NULL."
278
279 #. type: SH
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 #, no-wrap
283 msgid "ERRORS"
284 msgstr "ERORI-IEȘIRE"
285
286 #. type: TP
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 #, no-wrap
290 msgid "B<ENOENT>"
291 msgstr "B<ENOENT>"
292
293 #. type: Plain text
294 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
295 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
296 msgid "(B<getprotoent_r>()) No more records in database."
297 msgstr "(B<getprotoent_r>()) Nu mai există înregistrări în baza de date."
298
299 #. type: TP
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 #, no-wrap
303 msgid "B<ERANGE>"
304 msgstr "B<ERANGE>"
305
306 #. type: Plain text
307 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
308 #: opensuse-leap-16-1 opensuse-tumbleweed
309 msgid ""
310 "I<buf> is too small. Try again with a larger buffer (and increased I<size>)."
311 msgstr ""
312 "I<buf> este prea mic. Încercați din nou cu o memorie tampon mai mare (și cu "
313 "I<size> mărită)."
314
315 #. type: SH
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 #, no-wrap
319 msgid "ATTRIBUTES"
320 msgstr "ATRIBUTE"
321
322 #. type: Plain text
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 msgid ""
326 "For an explanation of the terms used in this section, see B<attributes>(7)."
327 msgstr ""
328 "Pentru o explicație a termenilor folosiți în această secțiune, a se vedea "
329 "B<attributes>(7)."
330
331 #. type: tbl table
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 #, no-wrap
335 msgid "Interface"
336 msgstr "Interfață"
337
338 #. type: tbl table
339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
341 #, no-wrap
342 msgid "Attribute"
343 msgstr "Atribut"
344
345 #. type: tbl table
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "Value"
350 msgstr "Valoare"
351
352 #. type: tbl table
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 #, no-wrap
356 msgid ".na\n"
357 msgstr ".na\n"
358
359 #. type: tbl table
360 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
361 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
362 #, no-wrap
363 msgid ".nh\n"
364 msgstr ".nh\n"
365
366 #. type: tbl table
367 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
368 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
369 #, no-wrap
370 msgid ""
371 "B<getprotoent_r>(),\n"
372 "B<getprotobyname_r>(),\n"
373 "B<getprotobynumber_r>()"
374 msgstr ""
375 "B<getprotoent_r>(),\n"
376 "B<getprotobyname_r>(),\n"
377 "B<getprotobynumber_r>()"
378
379 #. type: tbl table
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 #, no-wrap
383 msgid "Thread safety"
384 msgstr "Siguranța firelor"
385
386 #. type: tbl table
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid "MT-Safe locale"
391 msgstr "MT-Safe locale"
392
393 #. type: SH
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, no-wrap
397 msgid "VERSIONS"
398 msgstr "VERSIUNI"
399
400 #. type: Plain text
401 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
402 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
403 msgid ""
404 "Functions with similar names exist on some other systems, though typically "
405 "with different calling signatures."
406 msgstr ""
407 "Funcții cu nume similare există și pe alte sisteme, deși, de obicei, cu "
408 "semnături de apelare diferite."
409
410 #. type: SH
411 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
412 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
413 #, no-wrap
414 msgid "STANDARDS"
415 msgstr "STANDARDE"
416
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 msgid "GNU."
421 msgstr "GNU."
422
423 #. type: SH
424 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
425 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
426 #, no-wrap
427 msgid "EXAMPLES"
428 msgstr "EXEMPLE"
429
430 #. type: Plain text
431 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
432 #: opensuse-leap-16-1 opensuse-tumbleweed
433 msgid ""
434 "The program below uses B<getprotobyname_r>() to retrieve the protocol "
435 "record for the protocol named in its first command-line argument. If a "
436 "second (integer) command-line argument is supplied, it is used as the "
437 "initial value for I<size>; if B<getprotobyname_r>() fails with the error "
438 "B<ERANGE>, the program retries with larger buffer sizes. The following "
439 "shell session shows a couple of sample runs:"
440 msgstr ""
441 "Programul de mai jos utilizează B<getprotobyname_r>() pentru a prelua "
442 "înregistrarea protocolului pentru protocolul numit în primul său argument de "
443 "linie de comandă. În cazul în care se furnizează un al doilea argument de "
444 "linie de comandă (întreg), acesta este utilizat ca valoare inițială pentru "
445 "I<size>; dacă B<getprotobyname_r>() eșuează cu eroarea B<ERANGE>, programul "
446 "încearcă din nou cu dimensiuni mai mari ale memoriei tampon. Următoarea "
447 "sesiune shell prezintă câteva exemple de execuție:"
448
449 #. type: Plain text
450 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
451 #: opensuse-leap-16-1 opensuse-tumbleweed
452 #, no-wrap
453 msgid ""
454 "$B< ./a.out tcp 1>\n"
455 "ERANGE! Retrying with larger buffer\n"
456 "getprotobyname_r() returned: 0 (success) (size=78)\n"
457 "p_name=tcp; p_proto=6; aliases=TCP\n"
458 "$B< ./a.out xxx 1>\n"
459 "ERANGE! Retrying with larger buffer\n"
460 "getprotobyname_r() returned: 0 (success) (size=100)\n"
461 "Call failed/record not found\n"
462 msgstr ""
463 "$B< ./a.out tcp 1>\n"
464 "ERANGE! Reîncercare cu o memorie tampon mai mare\n"
465 "getprotobyname_r() returned: 0 (success) (size=78)\n"
466 "p_name=tcp; p_proto=6; aliases=TCP\n"
467 "$B< ./a.out xxx 1>\n"
468 "ERANGE! Reîncercare cu o memorie tampon mai mare\n"
469 "getprotobyname_r() returned: 0 (success) (size=100)\n"
470 "Apel eșuat/înregistrarea nu a fost găsită\n"
471
472 #. type: SS
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 #, no-wrap
476 msgid "Program source"
477 msgstr "Sursa programului"
478
479 #. type: Plain text
480 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
481 #: opensuse-tumbleweed
482 #, no-wrap
483 msgid ""
484 "#define _GNU_SOURCE\n"
485 "#include E<lt>ctype.hE<gt>\n"
486 "#include E<lt>errno.hE<gt>\n"
487 "#include E<lt>netdb.hE<gt>\n"
488 "#include E<lt>stdio.hE<gt>\n"
489 "#include E<lt>stdlib.hE<gt>\n"
490 "#include E<lt>string.hE<gt>\n"
491 "\\&\n"
492 "#define MAX_BUF 10000\n"
493 "\\&\n"
494 "int\n"
495 "main(int argc, char *argv[])\n"
496 "{\n"
497 " int size, erange_cnt, s;\n"
498 " struct protoent result_buf;\n"
499 " struct protoent *result;\n"
500 " char buf[MAX_BUF];\n"
501 "\\&\n"
502 " if (argc E<lt> 2) {\n"
503 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
504 " exit(EXIT_FAILURE);\n"
505 " }\n"
506 "\\&\n"
507 " size = 1024;\n"
508 " if (argc E<gt> 2)\n"
509 " size = atoi(argv[2]);\n"
510 "\\&\n"
511 " if (size E<gt> MAX_BUF) {\n"
512 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
513 " exit(EXIT_FAILURE);\n"
514 " }\n"
515 "\\&\n"
516 " erange_cnt = 0;\n"
517 " do {\n"
518 " s = getprotobyname_r(argv[1], &result_buf,\n"
519 " buf, size, &result);\n"
520 " if (s == ERANGE) {\n"
521 " if (erange_cnt == 0)\n"
522 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
523 " erange_cnt++;\n"
524 "\\&\n"
525 " /* Increment a byte at a time so we can see exactly\n"
526 " what size buffer was required. */\n"
527 "\\&\n"
528 " size++;\n"
529 "\\&\n"
530 " if (size E<gt> MAX_BUF) {\n"
531 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
532 " exit(EXIT_FAILURE);\n"
533 " }\n"
534 " }\n"
535 " } while (s == ERANGE);\n"
536 "\\&\n"
537 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
538 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
539 " strerror(s), size);\n"
540 "\\&\n"
541 " if (s != 0 || result == NULL) {\n"
542 " printf(\"Call failed/record not found\\[rs]n\");\n"
543 " exit(EXIT_FAILURE);\n"
544 " }\n"
545 "\\&\n"
546 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
547 " result_buf.p_name, result_buf.p_proto);\n"
548 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
549 " printf(\"%s \", *p);\n"
550 " printf(\"\\[rs]n\");\n"
551 "\\&\n"
552 " exit(EXIT_SUCCESS);\n"
553 "}\n"
554 msgstr ""
555 "#define _GNU_SOURCE\n"
556 "#include E<lt>ctype.hE<gt>\n"
557 "#include E<lt>errno.hE<gt>\n"
558 "#include E<lt>netdb.hE<gt>\n"
559 "#include E<lt>stdio.hE<gt>\n"
560 "#include E<lt>stdlib.hE<gt>\n"
561 "#include E<lt>string.hE<gt>\n"
562 "\\&\n"
563 "#define MAX_BUF 10000\n"
564 "\\&\n"
565 "int\n"
566 "main(int argc, char *argv[])\n"
567 "{\n"
568 " int size, erange_cnt, s;\n"
569 " struct protoent result_buf;\n"
570 " struct protoent *result;\n"
571 " char buf[MAX_BUF];\n"
572 "\\&\n"
573 " if (argc E<lt> 2) {\n"
574 " printf(\"Utilizare: %s proto-name [size]\\[rs]n\", argv[0]);\n"
575 " exit(EXIT_FAILURE);\n"
576 " }\n"
577 "\\&\n"
578 " size = 1024;\n"
579 " if (argc E<gt> 2)\n"
580 " size = atoi(argv[2]);\n"
581 "\\&\n"
582 " if (size E<gt> MAX_BUF) {\n"
583 " printf(\"Limita memoriei tampon a fost depășită (%d)\\[rs]n\", MAX_BUF);\n"
584 " exit(EXIT_FAILURE);\n"
585 " }\n"
586 "\\&\n"
587 " erange_cnt = 0;\n"
588 " do {\n"
589 " s = getprotobyname_r(argv[1], &result_buf,\n"
590 " buf, size, &result);\n"
591 " if (s == ERANGE) {\n"
592 " if (erange_cnt == 0)\n"
593 " printf(\"ERANGE! Reîncercare cu o memorie tampon mai mare\\[rs]n\");\n"
594 " erange_cnt++;\n"
595 "\\&\n"
596 " /* Incrementăm câte un octet pe rând, ca să putem vedea exact\n"
597 " ce dimensiune a fost necesară pentru memoria tampon. */\n"
598 "\\&\n"
599 " size++;\n"
600 "\\&\n"
601 " if (size E<gt> MAX_BUF) {\n"
602 " printf(\"Limita memoriei tampon a fost depășită (%d)\\[rs]n\", MAX_BUF);\n"
603 " exit(EXIT_FAILURE);\n"
604 " }\n"
605 " }\n"
606 " } while (s == ERANGE);\n"
607 "\\&\n"
608 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
609 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
610 " strerror(s), size);\n"
611 "\\&\n"
612 " if (s != 0 || result == NULL) {\n"
613 " printf(\"Apel eșuat/înregistrarea nu a fost găsită\\[rs]n\");\n"
614 " exit(EXIT_FAILURE);\n"
615 " }\n"
616 "\\&\n"
617 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
618 " result_buf.p_name, result_buf.p_proto);\n"
619 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
620 " printf(\"%s \", *p);\n"
621 " printf(\"\\[rs]n\");\n"
622 "\\&\n"
623 " exit(EXIT_SUCCESS);\n"
624 "}\n"
625
626 #. SRC END
627 #. type: SH
628 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
629 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
630 #, no-wrap
631 msgid "SEE ALSO"
632 msgstr "CONSULTAȚI ȘI"
633
634 #. type: Plain text
635 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
636 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
637 msgid "B<getprotoent>(3), B<protocols>(5)"
638 msgstr "B<getprotoent>(3), B<protocols>(5)"
639
640 #. type: TH
641 #: debian-trixie
642 #, no-wrap
643 msgid "2024-06-15"
644 msgstr "15 iunie 2024"
645
646 #. type: TH
647 #: debian-trixie
648 #, no-wrap
649 msgid "Linux man-pages 6.9.1"
650 msgstr "Pagini de manual de Linux 6.9.1"
651
652 #. type: Plain text
653 #: debian-trixie
654 msgid "Standard C library (I<libc>, I<-lc>)"
655 msgstr "Biblioteca C standard (I<libc>, I<-lc>)"
656
657 #. type: Plain text
658 #: debian-trixie
659 #, no-wrap
660 msgid ""
661 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
662 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
663 "B< struct protoent **restrict >I<result>B<);>\n"
664 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
665 "B< struct protoent *restrict >I<result_buf>B<,>\n"
666 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
667 "B< struct protoent **restrict >I<result>B<);>\n"
668 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
669 "B< struct protoent *restrict >I<result_buf>B<,>\n"
670 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
671 "B< struct protoent **restrict >I<result>B<);>\n"
672 msgstr ""
673 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
674 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
675 "B< struct protoent **restrict >I<result>B<);>\n"
676 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
677 "B< struct protoent *restrict >I<result_buf>B<,>\n"
678 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
679 "B< struct protoent **restrict >I<result>B<);>\n"
680 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
681 "B< struct protoent *restrict >I<result_buf>B<,>\n"
682 "B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n"
683 "B< struct protoent **restrict >I<result>B<);>\n"
684
685 #. I can find no information on the required/recommended buffer size;
686 #. the nonreentrant functions use a 1024 byte buffer.
687 #. The 1024 byte value is also what the Solaris man page suggests. -- mtk
688 #. type: Plain text
689 #: debian-trixie
690 msgid ""
691 "The I<buf> array is used to store the string fields pointed to by the "
692 "returned I<protoent> structure. (The nonreentrant functions allocate these "
693 "strings in static storage.) The size of this array is specified in "
694 "I<buflen>. If I<buf> is too small, the call fails with the error B<ERANGE>, "
695 "and the caller must try again with a larger buffer. (A buffer of length "
696 "1024 bytes should be sufficient for most applications.)"
697 msgstr ""
698 "Matricea I<buf> este utilizată pentru a stoca câmpurile de șiruri de "
699 "caractere indicate de structura I<protoent> returnată; (funcțiile "
700 "nereentrante alocă aceste șiruri de caractere în memoria statică). "
701 "Dimensiunea acestei matrice este specificată în I<buflen>. Dacă I<buf> este "
702 "prea mică, apelul eșuează cu eroarea B<ERANGE>, iar apelantul trebuie să "
703 "încerce din nou cu o memorie tampon mai mare; (o memorie tampon cu o lungime "
704 "de 1024 octeți ar trebui să fie suficientă pentru majoritatea aplicațiilor)."
705
706 #. type: Plain text
707 #: debian-trixie
708 msgid ""
709 "I<buf> is too small. Try again with a larger buffer (and increased "
710 "I<buflen>)."
711 msgstr ""
712 "I<buf> este prea mic. Încercați din nou cu o memorie tampon mai mare (și cu "
713 "I<buflen> mărit)."
714
715 #. type: Plain text
716 #: debian-trixie
717 msgid ""
718 "The program below uses B<getprotobyname_r>() to retrieve the protocol "
719 "record for the protocol named in its first command-line argument. If a "
720 "second (integer) command-line argument is supplied, it is used as the "
721 "initial value for I<buflen>; if B<getprotobyname_r>() fails with the error "
722 "B<ERANGE>, the program retries with larger buffer sizes. The following "
723 "shell session shows a couple of sample runs:"
724 msgstr ""
725 "Programul de mai jos utilizează B<getprotobyname_r>() pentru a prelua "
726 "înregistrarea protocolului pentru protocolul numit în primul său argument de "
727 "linie de comandă. În cazul în care se furnizează un al doilea argument de "
728 "linie de comandă (întreg), acesta este utilizat ca valoare inițială pentru "
729 "I<buflen>; dacă B<getprotobyname_r>() eșuează cu eroarea B<ERANGE>, "
730 "programul încearcă din nou cu dimensiuni mai mari ale memoriei tampon. "
731 "Următoarea sesiune shell prezintă câteva exemple de execuție:"
732
733 #. type: Plain text
734 #: debian-trixie
735 #, no-wrap
736 msgid ""
737 "$B< ./a.out tcp 1>\n"
738 "ERANGE! Retrying with larger buffer\n"
739 "getprotobyname_r() returned: 0 (success) (buflen=78)\n"
740 "p_name=tcp; p_proto=6; aliases=TCP\n"
741 "$B< ./a.out xxx 1>\n"
742 "ERANGE! Retrying with larger buffer\n"
743 "getprotobyname_r() returned: 0 (success) (buflen=100)\n"
744 "Call failed/record not found\n"
745 msgstr ""
746 "$B< ./a.out tcp 1>\n"
747 "ERANGE! Reîncercare cu o memorie tampon mai mare\n"
748 "getprotobyname_r() returned: 0 (success) (buflen=78)\n"
749 "p_name=tcp; p_proto=6; aliases=TCP\n"
750 "$B< ./a.out xxx 1>\n"
751 "ERANGE! Reîncercare cu o memorie tampon mai mare\n"
752 "getprotobyname_r() returned: 0 (success) (buflen=100)\n"
753 "Apel eșuat/înregistrarea nu a fost găsită\n"
754
755 #. type: Plain text
756 #: debian-trixie
757 #, no-wrap
758 msgid ""
759 "#define _GNU_SOURCE\n"
760 "#include E<lt>ctype.hE<gt>\n"
761 "#include E<lt>errno.hE<gt>\n"
762 "#include E<lt>netdb.hE<gt>\n"
763 "#include E<lt>stdio.hE<gt>\n"
764 "#include E<lt>stdlib.hE<gt>\n"
765 "#include E<lt>string.hE<gt>\n"
766 "\\&\n"
767 "#define MAX_BUF 10000\n"
768 "\\&\n"
769 "int\n"
770 "main(int argc, char *argv[])\n"
771 "{\n"
772 " int buflen, erange_cnt, s;\n"
773 " struct protoent result_buf;\n"
774 " struct protoent *result;\n"
775 " char buf[MAX_BUF];\n"
776 "\\&\n"
777 " if (argc E<lt> 2) {\n"
778 " printf(\"Usage: %s proto-name [buflen]\\[rs]n\", argv[0]);\n"
779 " exit(EXIT_FAILURE);\n"
780 " }\n"
781 "\\&\n"
782 " buflen = 1024;\n"
783 " if (argc E<gt> 2)\n"
784 " buflen = atoi(argv[2]);\n"
785 "\\&\n"
786 " if (buflen E<gt> MAX_BUF) {\n"
787 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
788 " exit(EXIT_FAILURE);\n"
789 " }\n"
790 "\\&\n"
791 " erange_cnt = 0;\n"
792 " do {\n"
793 " s = getprotobyname_r(argv[1], &result_buf,\n"
794 " buf, buflen, &result);\n"
795 " if (s == ERANGE) {\n"
796 " if (erange_cnt == 0)\n"
797 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
798 " erange_cnt++;\n"
799 "\\&\n"
800 " /* Increment a byte at a time so we can see exactly\n"
801 " what size buffer was required. */\n"
802 "\\&\n"
803 " buflen++;\n"
804 "\\&\n"
805 " if (buflen E<gt> MAX_BUF) {\n"
806 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
807 " exit(EXIT_FAILURE);\n"
808 " }\n"
809 " }\n"
810 " } while (s == ERANGE);\n"
811 "\\&\n"
812 " printf(\"getprotobyname_r() returned: %s (buflen=%d)\\[rs]n\",\n"
813 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
814 " strerror(s), buflen);\n"
815 "\\&\n"
816 " if (s != 0 || result == NULL) {\n"
817 " printf(\"Call failed/record not found\\[rs]n\");\n"
818 " exit(EXIT_FAILURE);\n"
819 " }\n"
820 "\\&\n"
821 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
822 " result_buf.p_name, result_buf.p_proto);\n"
823 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
824 " printf(\"%s \", *p);\n"
825 " printf(\"\\[rs]n\");\n"
826 "\\&\n"
827 " exit(EXIT_SUCCESS);\n"
828 "}\n"
829 msgstr ""
830 "#define _GNU_SOURCE\n"
831 "#include E<lt>ctype.hE<gt>\n"
832 "#include E<lt>errno.hE<gt>\n"
833 "#include E<lt>netdb.hE<gt>\n"
834 "#include E<lt>stdio.hE<gt>\n"
835 "#include E<lt>stdlib.hE<gt>\n"
836 "#include E<lt>string.hE<gt>\n"
837 "\\&\n"
838 "#define MAX_BUF 10000\n"
839 "\\&\n"
840 "int\n"
841 "main(int argc, char *argv[])\n"
842 "{\n"
843 " int buflen, erange_cnt, s;\n"
844 " struct protoent result_buf;\n"
845 " struct protoent *result;\n"
846 " char buf[MAX_BUF];\n"
847 "\\&\n"
848 " if (argc E<lt> 2) {\n"
849 " printf(\"Utilizare: %s proto-name [buflen]\\[rs]n\", argv[0]);\n"
850 " exit(EXIT_FAILURE);\n"
851 " }\n"
852 "\\&\n"
853 " buflen = 1024;\n"
854 " if (argc E<gt> 2)\n"
855 " buflen = atoi(argv[2]);\n"
856 "\\&\n"
857 " if (buflen E<gt> MAX_BUF) {\n"
858 " printf(\"Limita memoriei tampon a fost depășită (%d)\\[rs]n\", MAX_BUF);\n"
859 " exit(EXIT_FAILURE);\n"
860 " }\n"
861 "\\&\n"
862 " erange_cnt = 0;\n"
863 " do {\n"
864 " s = getprotobyname_r(argv[1], &result_buf,\n"
865 " buf, buflen, &result);\n"
866 " if (s == ERANGE) {\n"
867 " if (erange_cnt == 0)\n"
868 " printf(\"ERANGE! Reîncercare cu o memorie tampon mai mare\\[rs]n\");\n"
869 " erange_cnt++;\n"
870 "\\&\n"
871 " /* Incrementăm câte un octet pe rând, ca să putem vedea exact\n"
872 " ce dimensiune a fost necesară pentru memoria tampon. */\n"
873 "\\&\n"
874 " buflen++;\n"
875 "\\&\n"
876 " if (buflen E<gt> MAX_BUF) {\n"
877 " printf(\"Limita memoriei tampon a fost depășită (%d)\\[rs]n\", MAX_BUF);\n"
878 " exit(EXIT_FAILURE);\n"
879 " }\n"
880 " }\n"
881 " } while (s == ERANGE);\n"
882 "\\&\n"
883 " printf(\"getprotobyname_r() returned: %s (buflen=%d)\\[rs]n\",\n"
884 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
885 " strerror(s), buflen);\n"
886 "\\&\n"
887 " if (s != 0 || result == NULL) {\n"
888 " printf(\"Apel eșuat/înregistrarea nu a fost găsită\\[rs]n\");\n"
889 " exit(EXIT_FAILURE);\n"
890 " }\n"
891 "\\&\n"
892 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
893 " result_buf.p_name, result_buf.p_proto);\n"
894 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
895 " printf(\"%s \", *p);\n"
896 " printf(\"\\[rs]n\");\n"
897 "\\&\n"
898 " exit(EXIT_SUCCESS);\n"
899 "}\n"
900
901 #. type: TH
902 #: fedora-44 fedora-rawhide
903 #, no-wrap
904 msgid "2024-12-24"
905 msgstr "24 decembrie 2024"
906
907 #. type: TH
908 #: fedora-44 fedora-rawhide
909 #, no-wrap
910 msgid "Linux man-pages 6.13"
911 msgstr "Pagini de manual de Linux 6.13"
912
913 #. type: Plain text
914 #: fedora-44 fedora-rawhide
915 #, no-wrap
916 msgid ""
917 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
918 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
919 "B< struct protoent **restrict >I<result>B<);>\n"
920 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
921 "B< struct protoent *restrict >I<result_buf>B<,>\n"
922 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
923 "B< struct protoent **restrict >I<result>B<);>\n"
924 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
925 "B< struct protoent *restrict >I<result_buf>B<,>\n"
926 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
927 "B< struct protoent **restrict >I<result>B<);>\n"
928 msgstr ""
929 "B<int getprotoent_r(struct protoent *restrict >I<result_buf>B<,>\n"
930 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
931 "B< struct protoent **restrict >I<result>B<);>\n"
932 "B<int getprotobyname_r(const char *restrict >I<name>B<,>\n"
933 "B< struct protoent *restrict >I<result_buf>B<,>\n"
934 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
935 "B< struct protoent **restrict >I<result>B<);>\n"
936 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
937 "B< struct protoent *restrict >I<result_buf>B<,>\n"
938 "B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n"
939 "B< struct protoent **restrict >I<result>B<);>\n"
940
941 #. type: Plain text
942 #: fedora-44 fedora-rawhide
943 #, no-wrap
944 msgid ""
945 "#define _GNU_SOURCE\n"
946 "#include E<lt>ctype.hE<gt>\n"
947 "#include E<lt>errno.hE<gt>\n"
948 "#include E<lt>netdb.hE<gt>\n"
949 "#include E<lt>stdio.hE<gt>\n"
950 "#include E<lt>stdlib.hE<gt>\n"
951 "#include E<lt>string.hE<gt>\n"
952 "\\&\n"
953 "#define MAX_BUF 10000\n"
954 "\\&\n"
955 "int\n"
956 "main(int argc, char *argv[])\n"
957 "{\n"
958 " int size, erange_cnt, s;\n"
959 " struct protoent result_buf;\n"
960 " struct protoent *result;\n"
961 " char buf[MAX_BUF];\n"
962 "\\&\n"
963 " if (argc E<lt> 2) {\n"
964 " printf(\"Usage: %s proto-name [size]\\[rs]n\", argv[0]);\n"
965 " exit(EXIT_FAILURE);\n"
966 " }\n"
967 "\\&\n"
968 " size = 1024;\n"
969 " if (argc E<gt> 2)\n"
970 " size = atoi(argv[2]);\n"
971 "\\&\n"
972 " if (size E<gt> MAX_BUF) {\n"
973 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
974 " exit(EXIT_FAILURE);\n"
975 " }\n"
976 "\\&\n"
977 " erange_cnt = 0;\n"
978 " do {\n"
979 " s = getprotobyname_r(argv[1], &result_buf,\n"
980 " buf, size, &result);\n"
981 " if (s == ERANGE) {\n"
982 " if (erange_cnt == 0)\n"
983 " printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n"
984 " erange_cnt++;\n"
985 "\\&\n"
986 " /* Increment a byte at a time so we can see exactly\n"
987 " what size buffer was required. */\n"
988 "\\&\n"
989 " size++;\n"
990 "\\&\n"
991 " if (size E<gt> MAX_BUF) {\n"
992 " printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n"
993 " exit(EXIT_FAILURE);\n"
994 " }\n"
995 " }\n"
996 " } while (s == ERANGE);\n"
997 "\\&\n"
998 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
999 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1000 " strerror(s), size);\n"
1001 "\\&\n"
1002 " if (s != 0 || result == NULL) {\n"
1003 " printf(\"Call failed/record not found\\[rs]n\");\n"
1004 " exit(EXIT_FAILURE);\n"
1005 " }\n"
1006 "\\&\n"
1007 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
1008 " result_buf.p_name, result_buf.p_proto);\n"
1009 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
1010 " printf(\"%s \", *p);\n"
1011 " printf(\"\\[rs]n\");\n"
1012 "\\&\n"
1013 " exit(EXIT_SUCCESS);\n"
1014 "}\n"
1015 msgstr ""
1016 "#define _GNU_SOURCE\n"
1017 "#include E<lt>ctype.hE<gt>\n"
1018 "#include E<lt>errno.hE<gt>\n"
1019 "#include E<lt>netdb.hE<gt>\n"
1020 "#include E<lt>stdio.hE<gt>\n"
1021 "#include E<lt>stdlib.hE<gt>\n"
1022 "#include E<lt>string.hE<gt>\n"
1023 "\\&\n"
1024 "#define MAX_BUF 10000\n"
1025 "\\&\n"
1026 "int\n"
1027 "main(int argc, char *argv[])\n"
1028 "{\n"
1029 " int size, erange_cnt, s;\n"
1030 " struct protoent result_buf;\n"
1031 " struct protoent *result;\n"
1032 " char buf[MAX_BUF];\n"
1033 "\\&\n"
1034 " if (argc E<lt> 2) {\n"
1035 " printf(\"Utilizare: %s proto-name [size]\\[rs]n\", argv[0]);\n"
1036 " exit(EXIT_FAILURE);\n"
1037 " }\n"
1038 "\\&\n"
1039 " size = 1024;\n"
1040 " if (argc E<gt> 2)\n"
1041 " size = atoi(argv[2]);\n"
1042 "\\&\n"
1043 " if (size E<gt> MAX_BUF) {\n"
1044 " printf(\"Limita memoriei tampon a fost depășită (%d)\\[rs]n\", MAX_BUF);\n"
1045 " exit(EXIT_FAILURE);\n"
1046 " }\n"
1047 "\\&\n"
1048 " erange_cnt = 0;\n"
1049 " do {\n"
1050 " s = getprotobyname_r(argv[1], &result_buf,\n"
1051 " buf, size, &result);\n"
1052 " if (s == ERANGE) {\n"
1053 " if (erange_cnt == 0)\n"
1054 " printf(\"ERANGE! Reîncercare cu o memorie tampon mai mare\\[rs]n\");\n"
1055 " erange_cnt++;\n"
1056 "\\&\n"
1057 " /* Incrementăm câte un octet pe rând, ca să putem vedea exact\n"
1058 " ce dimensiune a fost necesară pentru memoria tampon. */\n"
1059 "\\&\n"
1060 " size++;\n"
1061 "\\&\n"
1062 " if (size E<gt> MAX_BUF) {\n"
1063 " printf(\"Limita memoriei tampon a fost depășită (%d)\\[rs]n\", MAX_BUF);\n"
1064 " exit(EXIT_FAILURE);\n"
1065 " }\n"
1066 " }\n"
1067 " } while (s == ERANGE);\n"
1068 "\\&\n"
1069 " printf(\"getprotobyname_r() returned: %s (size=%d)\\[rs]n\",\n"
1070 " (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
1071 " strerror(s), size);\n"
1072 "\\&\n"
1073 " if (s != 0 || result == NULL) {\n"
1074 " printf(\"Apel eșuat/înregistrarea nu a fost găsită\\[rs]n\");\n"
1075 " exit(EXIT_FAILURE);\n"
1076 " }\n"
1077 "\\&\n"
1078 " printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
1079 " result_buf.p_name, result_buf.p_proto);\n"
1080 " for (char **p = result_buf.p_aliases; *p != NULL; p++)\n"
1081 " printf(\"%s \", *p);\n"
1082 " printf(\"\\[rs]n\");\n"
1083 "\\&\n"
1084 " exit(EXIT_SUCCESS);\n"
1085 "}\n"
1086
1087 #. type: TH
1088 #: mageia-cauldron
1089 #, no-wrap
1090 msgid "Linux man-pages 6.17"
1091 msgstr "Pagini de manual de Linux 6.17"
1092
1093 #. type: TH
1094 #: opensuse-leap-16-1 opensuse-tumbleweed
1095 #, no-wrap
1096 msgid "Linux man-pages (unreleased)"
1097 msgstr "Pagini de manual Linux (nepublicate)"