Debian Codegraph @

po/ru/man3/tsearch.3.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Azamat Hackimov <[email protected]>, 2014, 2016-2017.
5 # Dmitry Bolkhovskikh <[email protected]>, 2017.
6 # Yuri Kozlov <[email protected]>, 2011-2019.
7 # Иван Павлов <[email protected]>, 2017, 2019.
8 msgid ""
9 msgstr ""
10 "Project-Id-Version: manpages-l10n\n"
11 "POT-Creation-Date: 2026-06-05 06:49+0200\n"
12 "PO-Revision-Date: 2024-12-21 19:50+0300\n"
13 "Last-Translator: Yuri Kozlov <[email protected]>\n"
14 "Language-Team: Russian <[email protected]>\n"
15 "Language: ru\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
20 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
21 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
22 "X-Generator: Lokalize 2.0\n"
23
24 #. type: TH
25 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
26 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
27 #, fuzzy, no-wrap
28 #| msgid "I<search>"
29 msgid "tsearch"
30 msgstr "I<поиск>"
31
32 #. type: TH
33 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
34 #: opensuse-tumbleweed
35 #, no-wrap
36 msgid "2026-02-08"
37 msgstr "8 февраля 2026 г."
38
39 #. type: TH
40 #: archlinux debian-unstable
41 #, fuzzy, no-wrap
42 #| msgid "Linux man-pages 6.17"
43 msgid "Linux man-pages 6.18"
44 msgstr "Справочные страницы Linux 6.17"
45
46 #. type: SH
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 #, no-wrap
50 msgid "NAME"
51 msgstr "НАИМЕНОВАНИЕ"
52
53 #. type: Plain text
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, fuzzy
57 #| msgid ""
58 #| "tsearch, tfind, tdelete, twalk, tdestroy - manage a binary search tree"
59 msgid ""
60 "tsearch, tfind, tdelete, twalk, twalk_r, tdestroy - manage a binary search "
61 "tree"
62 msgstr ""
63 "tsearch, tfind, tdelete, twalk, tdestroy - работа с двоичным деревом поиска"
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "LIBRARY"
70 msgstr "БИБЛИОТЕКА"
71
72 #. type: Plain text
73 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
74 #: opensuse-leap-16-1 opensuse-tumbleweed
75 msgid "Standard C library (I<libc>,\\ I<-lc>)"
76 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
77
78 #. type: SH
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid "SYNOPSIS"
83 msgstr "СИНТАКСИС"
84
85 #. type: Plain text
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, no-wrap
89 msgid "B<#include E<lt>search.hE<gt>>\n"
90 msgstr "B<#include E<lt>search.hE<gt>>\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<typedef enum { preorder, postorder, endorder, leaf } VISIT;>\n"
97 msgstr "B<typedef enum { preorder, postorder, endorder, leaf } VISIT;>\n"
98
99 #. type: Plain text
100 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
101 #: opensuse-leap-16-1 opensuse-tumbleweed
102 #, no-wrap
103 msgid ""
104 "B<void *tfind(const void *>I<key>B<, void *const *>I<rootp>B<,>\n"
105 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
106 "B<void *tsearch(const void *>I<key>B<, void **>I<rootp>B<,>\n"
107 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
108 "B<void *tdelete(const void *restrict >I<key>B<, void **restrict >I<rootp>B<,>\n"
109 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
110 "B<void twalk(const void *>I<root>B<,>\n"
111 "B< typeof(void (const void *>I<nodep>B<, VISIT >I<which>B<, int >I<depth>B<))>\n"
112 "B< *>I<action>B<);>\n"
113 msgstr ""
114
115 #. type: Plain text
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 #, no-wrap
119 msgid ""
120 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
121 "B<#include E<lt>search.hE<gt>>\n"
122 msgstr ""
123 "B<#define _GNU_SOURCE> /* смотрите feature_test_macros(7) */\n"
124 "B<#include E<lt>search.hE<gt>>\n"
125
126 #. type: Plain text
127 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
128 #: opensuse-leap-16-1 opensuse-tumbleweed
129 #, fuzzy, no-wrap
130 #| msgid ""
131 #| "B<void twalk_r(const void *>I<root>B<,>\n"
132 #| "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
133 #| "B< void *>I<closure>B<),>\n"
134 #| "B< void *>I<closure>B<);>\n"
135 msgid ""
136 "B<void twalk_r(const void *>I<root>B<,>\n"
137 "B< typeof(void (const void *>I<nodep>B<, VISIT >I<which>B<, void *>I<closure>B<))>\n"
138 "B< *>I<action>B<,>\n"
139 "B< void *>I<closure>B<);>\n"
140 "B<void tdestroy(void *>I<root>B<,>\n"
141 "B< typeof(void (void *>I<nodep>B<)) *>I<free_node>B<);>\n"
142 msgstr ""
143 "B<void twalk_r(const void *>I<root>B<,>\n"
144 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
145 "B< void *>I<closure>B<),>\n"
146 "B< void *>I<closure>B<);>\n"
147
148 #. type: SH
149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
151 #, no-wrap
152 msgid "DESCRIPTION"
153 msgstr "ОПИСАНИЕ"
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid ""
159 "B<tsearch>(), B<tfind>(), B<twalk>(), and B<tdelete>() manage a binary "
160 "search tree. They are generalized from Knuth (6.2.2) Algorithm T. The "
161 "first field in each node of the tree is a pointer to the corresponding data "
162 "item. (The calling program must store the actual data.) I<compar> points "
163 "to a comparison routine, which takes pointers to two items. It should "
164 "return an integer which is negative, zero, or positive, depending on whether "
165 "the first item is less than, equal to, or greater than the second."
166 msgstr ""
167 "Функции B<tsearch>(), B<tfind>(), B<twalk>() и B<tdelete>() позволяют "
168 "работать с двоичным деревом поиска. Они реализуют «Algorithm T» Д. Кнута "
169 "(6.2.2). Первое поле в каждом узле дерева является указателем на "
170 "соответствующий элемент данных (вызывающая программа должна хранить реальные "
171 "данные). Аргумент I<compar> указывает на процедуру сравнения, которой "
172 "передаются указатели на два элемента данных. Эта процедура должна возвращать "
173 "отрицательное, нулевое или положительное значение, если первый элемент "
174 "меньше, равен или больше чем второй."
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 "B<tsearch>() searches the tree for an item. I<key> points to the item to "
181 "be searched for. I<rootp> points to a variable which points to the root of "
182 "the tree. If the tree is empty, then the variable that I<rootp> points to "
183 "should be set to NULL. If the item is found in the tree, then B<tsearch>() "
184 "returns a pointer to the corresponding tree node. (In other words, "
185 "B<tsearch>() returns a pointer to a pointer to the data item.) If the item "
186 "is not found, then B<tsearch>() adds it, and returns a pointer to the "
187 "corresponding tree node."
188 msgstr ""
189 "Функция B<tsearch>() ищет элемент в дереве. В I<key> задаётся разыскиваемый "
190 "элемент. В I<rootp> указывает на переменную, указывающую на корень дерева. "
191 "Если дерево пустое, то переменная, на которую ссылается I<rootp>, должна "
192 "быть равна NULL. Если элемент найден, то B<tsearch>() возвращает указатель "
193 "на соответствующий узел дерева (иначе говоря, B<tsearch>() возвращает "
194 "указатель на элемент данных). Если элемент не найден, то B<tsearch>() "
195 "добавляет его и возвращает указатель на соответствующий узел дерева."
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "B<tfind>() is like B<tsearch>(), except that if the item is not found, then "
202 "B<tfind>() returns NULL."
203 msgstr ""
204 "Функция B<tfind>() похожа на B<tsearch>(), за исключением того, что "
205 "B<tfind>() в случае нулевого результата поиска возвращает NULL."
206
207 #. type: Plain text
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 msgid ""
211 "B<tdelete>() deletes an item from the tree. Its arguments are the same as "
212 "for B<tsearch>()."
213 msgstr ""
214 "Функция B<tdelete>() удаляет элемент из дерева. Аргументы те же, что и для "
215 "B<tsearch>()."
216
217 #. type: Plain text
218 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
219 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
220 msgid ""
221 "B<twalk>() performs depth-first, left-to-right traversal of a binary tree. "
222 "I<root> points to the starting node for the traversal. If that node is not "
223 "the root, then only part of the tree will be visited. B<twalk>() calls the "
224 "user function I<action> each time a node is visited (that is, three times "
225 "for an internal node, and once for a leaf). I<action>, in turn, takes three "
226 "arguments. The first argument is a pointer to the node being visited. The "
227 "structure of the node is unspecified, but it is possible to cast the pointer "
228 "to a pointer-to-pointer-to-element in order to access the element stored "
229 "within the node. The application must not modify the structure pointed to "
230 "by this argument. The second argument is an integer which takes one of the "
231 "values B<preorder>, B<postorder>, or B<endorder> depending on whether this "
232 "is the first, second, or third visit to the internal node, or the value "
233 "B<leaf> if this is the single visit to a leaf node. (These symbols are "
234 "defined in I<E<lt>search.hE<gt>>.) The third argument is the depth of the "
235 "node; the root node has depth zero."
236 msgstr ""
237 "Функция B<twalk>() выполняет обход дерева, сначала в глубину, затем слева "
238 "направо. Аргумент I<root> указывает на начальный элемент обхода. Если этот "
239 "узел не является корневым, то будет пройдена только часть дерева. Функция "
240 "B<twalk> вызывает пользовательскую функцию I<action> для каждого посещаемого "
241 "узла (то есть три раза для внутреннего узла и один раз для конечного узла-"
242 "листа). Функция I<action> получает три аргумента. Первый — указатель на "
243 "посещаемый узел. Структура узла не определена, но возможно привести "
244 "указатель к указателю на указатель на элемент, чтобы получить доступ к "
245 "элементу, хранящемуся внутри узла. Приложение не должно изменять структуру, "
246 "на которую указывает этот аргумент. Второй — целое число, принимающее "
247 "значение B<preorder>, B<postorder> или B<endorder> в зависимости от того, в "
248 "первый, второй или третий раз посещается внутренний узел, или значение "
249 "I<leaf>, если это единственный просмотр узла-листа. Эти символы определены в "
250 "I<E<lt>search.hE<gt>>. Третий аргумент — это глубина текущего погружения в "
251 "дерево; для корня она равна нулю."
252
253 #. type: Plain text
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 msgid ""
257 "(More commonly, B<preorder>, B<postorder>, and B<endorder> are known as "
258 "B<preorder>, B<inorder>, and B<postorder>: before visiting the children, "
259 "after the first and before the second, and after visiting the children. "
260 "Thus, the choice of name B<post\\%order> is rather confusing.)"
261 msgstr ""
262 "(В общем случае, функции B<preorder>, B<postorder> и B<endorder> известны "
263 "как B<preorder>, B<inorder> и B<postorder>: перед посещением потомков, после "
264 "первого посещения и перед вторым и после посещения. Таким образом, выбор "
265 "имени B<post\\%order> приводит к путанице.)"
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "B<twalk_r>() is similar to B<twalk>(), but instead of the I<depth> "
272 "argument, the I<closure> argument pointer is passed to each invocation of "
273 "the action callback, unchanged. This pointer can be used to pass "
274 "information to and from the callback function in a thread-safe fashion, "
275 "without resorting to global variables."
276 msgstr ""
277 "Функция B<twalk_r>() подобна B<twalk>(), но вместо аргумента I<depth> "
278 "передаётся неизменяемый аргумент-указатель I<closure> в каждый вызов функции "
279 "обратного вызова. Этот указатель можно использовать для передачи информации "
280 "в и из функции обратного вызова безопасным для нитей образом, не задействуя "
281 "глобальные переменные."
282
283 #. type: Plain text
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 msgid ""
287 "B<tdestroy>() removes the whole tree pointed to by I<root>, freeing all "
288 "resources allocated by the B<tsearch>() function. For the data in each "
289 "tree node the function I<free_node> is called. The pointer to the data is "
290 "passed as the argument to the function. If no such work is necessary, "
291 "I<free_node> must point to a function doing nothing."
292 msgstr ""
293 "Функция B<tdestroy>() удаляет всё дерево, на которое указывает I<rootp>, "
294 "высвобождая все ресурсы, выделенные функцией B<tsearch>(). Для данных "
295 "каждого узла дерева вызывается функция I<free_node>. Указатель на данные "
296 "передаётся в аргумент функции. Если делать ничего не нужно, то в "
297 "I<free_node> нужно указать функцию, которая ничего не делает."
298
299 #. type: SH
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 #, no-wrap
303 msgid "RETURN VALUE"
304 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
305
306 #. type: Plain text
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 msgid ""
310 "B<tsearch>() returns a pointer to a matching node in the tree, or to the "
311 "newly added node, or NULL if there was insufficient memory to add the item. "
312 "B<tfind>() returns a pointer to the node, or NULL if no match is found. If "
313 "there are multiple items that match the key, the item whose node is returned "
314 "is unspecified."
315 msgstr ""
316 "Функция B<tsearch>() возвращает указатель на найденный узел дерева или "
317 "добавляет новый узел, а также возвращает NULL, если для добавления "
318 "недостаточно памяти. Функция B<tfind>() возвращает указатель на узел или "
319 "NULL, если совпадений не найдено. Если есть несколько элементов с одинаковым "
320 "ключом, то какой из них будет возвращён — не определено."
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 "B<tdelete>() returns a pointer to the parent of the node deleted, or NULL "
327 "if the item was not found. If the deleted node was the root node, "
328 "B<tdelete>() returns a dangling pointer that must not be accessed."
329 msgstr ""
330 "Функция B<tdelete>() возвращает указатель на родителя удалённого узла или "
331 "NULL, если элемент не найден. Если удалённый узел был корневым узлом, то "
332 "B<tdelete>() возвращает повисшую ссылку, по которой нельзя обращаться."
333
334 #. type: Plain text
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 msgid ""
338 "B<tsearch>(), B<tfind>(), and B<tdelete>() also return NULL if I<rootp> was "
339 "NULL on entry."
340 msgstr ""
341 "Функции B<tsearch>(), B<tfind>() и B<tdelete>() также возвращают NULL, если "
342 "I<rootp> для записи был равен NULL."
343
344 #. type: SH
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 #, no-wrap
348 msgid "ATTRIBUTES"
349 msgstr "АТРИБУТЫ"
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 "For an explanation of the terms used in this section, see B<attributes>(7)."
356 msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)."
357
358 #. type: tbl table
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid "Interface"
363 msgstr "Интерфейс"
364
365 #. type: tbl table
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 #, no-wrap
369 msgid "Attribute"
370 msgstr "Атрибут"
371
372 #. type: tbl table
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 #, no-wrap
376 msgid "Value"
377 msgstr "Значение"
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 ".na\n"
384 msgstr ".na\n"
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 ".nh\n"
391 msgstr ".nh\n"
392
393 #. type: tbl table
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, fuzzy, no-wrap
397 #| msgid ""
398 #| "B<tsearch>(),\n"
399 #| "B<tfind>(),\n"
400 msgid ""
401 "B<tsearch>(),\n"
402 "B<tfind>(),\n"
403 "B<tdelete>()"
404 msgstr ""
405 "B<tsearch>(),\n"
406 "B<tfind>(),\n"
407
408 #. type: tbl table
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, no-wrap
412 msgid "Thread safety"
413 msgstr "Безвредность в нитях"
414
415 #. type: tbl table
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid "MT-Safe race:rootp"
420 msgstr "MT-Safe race:rootp"
421
422 #. type: TQ
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 #, no-wrap
426 msgid "B<twalk>()"
427 msgstr "B<twalk>()"
428
429 #. type: tbl table
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 #, no-wrap
433 msgid "MT-Safe race:root"
434 msgstr "MT-Safe race:root"
435
436 #. type: TP
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 #, no-wrap
440 msgid "B<twalk_r>()"
441 msgstr "B<twalk_r>()"
442
443 #. type: TP
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "B<tdestroy>()"
448 msgstr "B<tdestroy>()"
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 "MT-Safe"
455 msgstr "MT-Safe"
456
457 #. type: SH
458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
460 #, no-wrap
461 msgid "STANDARDS"
462 msgstr "СТАНДАРТЫ"
463
464 #. type: TP
465 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
466 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
467 #, fuzzy, no-wrap
468 #| msgid "I<search>"
469 msgid "B<tsearch>()"
470 msgstr "I<поиск>"
471
472 #. type: TQ
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 #, fuzzy, no-wrap
476 #| msgid "B<bind>(2)"
477 msgid "B<tfind>()"
478 msgstr "B<bind>(2)"
479
480 #. type: TQ
481 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
482 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
483 #, no-wrap
484 msgid "B<tdelete>()"
485 msgstr "B<tdelete>()"
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 msgid "POSIX.1-2008."
491 msgstr "POSIX.1-2008."
492
493 #. type: Plain text
494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
496 msgid "GNU."
497 msgstr "GNU."
498
499 #. type: SH
500 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
501 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
502 #, no-wrap
503 msgid "HISTORY"
504 msgstr "ИСТОРИЯ"
505
506 #. type: Plain text
507 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
508 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
509 msgid "POSIX.1-2001, POSIX.1-2008, SVr4."
510 msgstr "POSIX.1-2001, POSIX.1-2008, SVr4."
511
512 #. type: Plain text
513 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
514 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
515 msgid "glibc 2.30."
516 msgstr "glibc 2.30."
517
518 #. type: SH
519 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
520 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
521 #, no-wrap
522 msgid "NOTES"
523 msgstr "ПРИМЕЧАНИЯ"
524
525 #. type: Plain text
526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
528 msgid ""
529 "B<twalk>() takes a pointer to the root, while the other functions take a "
530 "pointer to a variable which points to the root."
531 msgstr ""
532 "Функции B<twalk>() передаётся указатель на корень, а остальные функции "
533 "ожидают указатель на переменную, которая указывает на корень."
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 "B<tdelete>() frees the memory required for the node in the tree. The user "
540 "is responsible for freeing the memory for the corresponding data."
541 msgstr ""
542 "Функция B<tdelete>() освобождает память, которая необходима для хранения "
543 "элемента в дереве. Пользователь отвечает за освобождение памяти, "
544 "использованной для хранения соответствующих данных."
545
546 #. type: Plain text
547 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
548 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
549 msgid ""
550 "The example program depends on the fact that B<twalk>() makes no further "
551 "reference to a node after calling the user function with argument "
552 "\"endorder\" or \"leaf\". This works with the GNU library implementation, "
553 "but is not in the System V documentation."
554 msgstr ""
555 "Программа в примере зависит от того, что B<twalk>() больше не ссылается на "
556 "узел после вызова пользовательской функции с аргументом «endorder» или "
557 "«leaf». Это работает с реализацией библиотеки GNU, но этого нет в "
558 "документации System V."
559
560 #. type: SH
561 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
562 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
563 #, no-wrap
564 msgid "EXAMPLES"
565 msgstr "ПРИМЕРЫ"
566
567 #. type: Plain text
568 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
569 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
570 msgid ""
571 "The following program inserts twelve random numbers into a binary tree, "
572 "where duplicate numbers are collapsed, then prints the numbers in order."
573 msgstr ""
574 "Приведённая ниже программа вставляет двенадцать случайных чисел в двоичное "
575 "дерево, в котором повторяющиеся числа удаляются, а затем печатает их по "
576 "порядку."
577
578 #. type: Plain text
579 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
580 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
581 #, no-wrap
582 msgid ""
583 "#define _GNU_SOURCE /* Expose declaration of tdestroy() */\n"
584 "#include E<lt>search.hE<gt>\n"
585 "#include E<lt>stddef.hE<gt>\n"
586 "#include E<lt>stdio.hE<gt>\n"
587 "#include E<lt>stdlib.hE<gt>\n"
588 "#include E<lt>time.hE<gt>\n"
589 "\\&\n"
590 "static void *root = NULL;\n"
591 "\\&\n"
592 "static void *\n"
593 "xmalloc(size_t n)\n"
594 "{\n"
595 " void *p;\n"
596 "\\&\n"
597 " p = malloc(n);\n"
598 " if (p)\n"
599 " return p;\n"
600 " fprintf(stderr, \"insufficient memory\\[rs]n\");\n"
601 " exit(EXIT_FAILURE);\n"
602 "}\n"
603 "\\&\n"
604 "static int\n"
605 "compare(const void *pa, const void *pb)\n"
606 "{\n"
607 " if (*(int *) pa E<lt> *(int *) pb)\n"
608 " return -1;\n"
609 " if (*(int *) pa E<gt> *(int *) pb)\n"
610 " return 1;\n"
611 " return 0;\n"
612 "}\n"
613 "\\&\n"
614 "static void\n"
615 "action(const void *nodep, VISIT which, int depth)\n"
616 "{\n"
617 " int *datap;\n"
618 "\\&\n"
619 " switch (which) {\n"
620 " case preorder:\n"
621 " break;\n"
622 " case postorder:\n"
623 " datap = *(int **) nodep;\n"
624 " printf(\"%6d\\[rs]n\", *datap);\n"
625 " break;\n"
626 " case endorder:\n"
627 " break;\n"
628 " case leaf:\n"
629 " datap = *(int **) nodep;\n"
630 " printf(\"%6d\\[rs]n\", *datap);\n"
631 " break;\n"
632 " }\n"
633 "}\n"
634 "\\&\n"
635 "int\n"
636 "main(void)\n"
637 "{\n"
638 " int *ptr;\n"
639 " int **val;\n"
640 "\\&\n"
641 " srand(time(NULL));\n"
642 " for (unsigned int i = 0; i E<lt> 12; i++) {\n"
643 " ptr = xmalloc(sizeof(*ptr));\n"
644 " *ptr = rand() & 0xff;\n"
645 " val = tsearch(ptr, &root, compare);\n"
646 " if (val == NULL)\n"
647 " exit(EXIT_FAILURE);\n"
648 " if (*val != ptr)\n"
649 " free(ptr);\n"
650 " }\n"
651 " twalk(root, action);\n"
652 " tdestroy(root, free);\n"
653 " exit(EXIT_SUCCESS);\n"
654 "}\n"
655 msgstr ""
656
657 #. SRC END
658 #. type: SH
659 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
660 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
661 #, no-wrap
662 msgid "SEE ALSO"
663 msgstr "СМОТРИТЕ ТАКЖЕ"
664
665 #. type: Plain text
666 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
667 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
668 msgid "B<bsearch>(3), B<hsearch>(3), B<lsearch>(3), B<qsort>(3)"
669 msgstr "B<bsearch>(3), B<hsearch>(3), B<lsearch>(3), B<qsort>(3)"
670
671 #. type: TH
672 #: debian-trixie
673 #, no-wrap
674 msgid "2024-06-15"
675 msgstr "15 июня 2024 г."
676
677 #. type: TH
678 #: debian-trixie
679 #, no-wrap
680 msgid "Linux man-pages 6.9.1"
681 msgstr "Страницы руководства Linux 6.9.1"
682
683 #. type: Plain text
684 #: debian-trixie
685 msgid "Standard C library (I<libc>, I<-lc>)"
686 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
687
688 #. type: Plain text
689 #: debian-trixie
690 #, no-wrap
691 msgid ""
692 "B<void *tsearch(const void *>I<key>B<, void **>I<rootp>B<,>\n"
693 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
694 "B<void *tfind(const void *>I<key>B<, void *const *>I<rootp>B<,>\n"
695 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
696 "B<void *tdelete(const void *restrict >I<key>B<, void **restrict >I<rootp>B<,>\n"
697 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
698 "B<void twalk(const void *>I<root>B<,>\n"
699 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
700 "B< int >I<depth>B<));>\n"
701 msgstr ""
702
703 #. type: Plain text
704 #: debian-trixie
705 #, fuzzy, no-wrap
706 #| msgid ""
707 #| "B<void twalk_r(const void *>I<root>B<,>\n"
708 #| "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
709 #| "B< void *>I<closure>B<),>\n"
710 #| "B< void *>I<closure>B<);>\n"
711 msgid ""
712 "B<void twalk_r(const void *>I<root>B<,>\n"
713 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
714 "B< void *>I<closure>B<),>\n"
715 "B< void *>I<closure>B<);>\n"
716 "B<void tdestroy(void *>I<root>B<, void (*>I<free_node>B<)(void *>I<nodep>B<));>\n"
717 msgstr ""
718 "B<void twalk_r(const void *>I<root>B<,>\n"
719 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
720 "B< void *>I<closure>B<),>\n"
721 "B< void *>I<closure>B<);>\n"
722
723 #. type: TH
724 #: fedora-44 fedora-rawhide
725 #, no-wrap
726 msgid "2024-12-13"
727 msgstr "13 декабря 2024 г."
728
729 #. type: TH
730 #: fedora-44 fedora-rawhide
731 #, no-wrap
732 msgid "Linux man-pages 6.13"
733 msgstr "Страницы руководства Linux 6.13"
734
735 #. type: TH
736 #: mageia-cauldron
737 #, no-wrap
738 msgid "Linux man-pages 6.17"
739 msgstr "Страницы руководства Linux 6.17"
740
741 #. type: TH
742 #: opensuse-leap-16-1 opensuse-tumbleweed
743 #, no-wrap
744 msgid "Linux man-pages (unreleased)"
745 msgstr "Страницы руководства Linux (не выпущены)"