Debian Codegraph @

po/ar/man3/tsearch.3.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:49+0200\n"
9 "PO-Revision-Date: 2026-06-03 18:40+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\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=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\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 "tsearch"
25 msgstr "tsearch"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 فبراير 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 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 "الاسم"
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 "tsearch, tfind, tdelete, twalk, twalk_r, tdestroy - manage a binary search "
52 "tree"
53 msgstr ""
54 "tsearch, tfind, tdelete, twalk, twalk_r, tdestroy - إدارة شجرة بحث ثنائية"
55
56 #. type: SH
57 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
58 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
59 #, no-wrap
60 msgid "LIBRARY"
61 msgstr "المكتبة"
62
63 #. type: Plain text
64 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
65 #: opensuse-leap-16-1 opensuse-tumbleweed
66 msgid "Standard C library (I<libc>,\\ I<-lc>)"
67 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
71 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
72 #, no-wrap
73 msgid "SYNOPSIS"
74 msgstr "موجز"
75
76 #. type: Plain text
77 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
78 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
79 #, no-wrap
80 msgid "B<#include E<lt>search.hE<gt>>\n"
81 msgstr "B<#include E<lt>search.hE<gt>>\n"
82
83 #. type: Plain text
84 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
85 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
86 #, no-wrap
87 msgid "B<typedef enum { preorder, postorder, endorder, leaf } VISIT;>\n"
88 msgstr "B<typedef enum { preorder, postorder, endorder, leaf } VISIT;>\n"
89
90 #. type: Plain text
91 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
92 #: opensuse-leap-16-1 opensuse-tumbleweed
93 #, no-wrap
94 msgid ""
95 "B<void *tfind(const void *>I<key>B<, void *const *>I<rootp>B<,>\n"
96 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
97 "B<void *tsearch(const void *>I<key>B<, void **>I<rootp>B<,>\n"
98 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
99 "B<void *tdelete(const void *restrict >I<key>B<, void **restrict >I<rootp>B<,>\n"
100 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
101 "B<void twalk(const void *>I<root>B<,>\n"
102 "B< typeof(void (const void *>I<nodep>B<, VISIT >I<which>B<, int >I<depth>B<))>\n"
103 "B< *>I<action>B<);>\n"
104 msgstr ""
105 "B<void *tfind(const void *>I<key>B<, void *const *>I<rootp>B<,>\n"
106 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
107 "B<void *tsearch(const void *>I<key>B<, void **>I<rootp>B<,>\n"
108 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
109 "B<void *tdelete(const void *restrict >I<key>B<, void **restrict >I<rootp>B<,>\n"
110 "B< typeof(int (const void *, const void *)) *>I<compar>B<);>\n"
111 "B<void twalk(const void *>I<root>B<,>\n"
112 "B< typeof(void (const void *>I<nodep>B<, VISIT >I<which>B<, int >I<depth>B<))>\n"
113 "B< *>I<action>B<);>\n"
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 #, no-wrap
130 msgid ""
131 "B<void twalk_r(const void *>I<root>B<,>\n"
132 "B< typeof(void (const void *>I<nodep>B<, VISIT >I<which>B<, void *>I<closure>B<))>\n"
133 "B< *>I<action>B<,>\n"
134 "B< void *>I<closure>B<);>\n"
135 "B<void tdestroy(void *>I<root>B<,>\n"
136 "B< typeof(void (void *>I<nodep>B<)) *>I<free_node>B<);>\n"
137 msgstr ""
138 "B<void twalk_r(const void *>I<root>B<,>\n"
139 "B< typeof(void (const void *>I<nodep>B<, VISIT >I<which>B<, void *>I<closure>B<))>\n"
140 "B< *>I<action>B<,>\n"
141 "B< void *>I<closure>B<);>\n"
142 "B<void tdestroy(void *>I<root>B<,>\n"
143 "B< typeof(void (void *>I<nodep>B<)) *>I<free_node>B<);>\n"
144
145 #. type: SH
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 #, no-wrap
149 msgid "DESCRIPTION"
150 msgstr "الوصف"
151
152 #. type: Plain text
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 msgid ""
156 "B<tsearch>(), B<tfind>(), B<twalk>(), and B<tdelete>() manage a binary "
157 "search tree. They are generalized from Knuth (6.2.2) Algorithm T. The "
158 "first field in each node of the tree is a pointer to the corresponding data "
159 "item. (The calling program must store the actual data.) I<compar> points "
160 "to a comparison routine, which takes pointers to two items. It should "
161 "return an integer which is negative, zero, or positive, depending on whether "
162 "the first item is less than, equal to, or greater than the second."
163 msgstr ""
164 "تدير الدوال B<tsearch>() و B<tfind>() و B<twalk>() و B<tdelete>() شجرة بحث "
165 "ثنائية. عُمِّمت هذه الدوال من خوارزمية T لـ Knuth (6.2.2). الحقل الأول في كل "
166 "عقدة من الشجرة هو مؤشر لعنصر البيانات المقابل. (يجب على البرنامج المستدعي "
167 "تخزين البيانات الفعلية.) يشير I<compar> إلى روتين مقارنة، يأخذ مؤشرين "
168 "لعنصرين. يجب أن يُرجع عددًا صحيحًا سالبًا أو صفرًا أو موجبًا، اعتمادًا على ما إذا "
169 "كان العنصر الأول أقل من الثاني أو مساويًا له أو أكبر منه."
170
171 #. type: Plain text
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 msgid ""
175 "B<tsearch>() searches the tree for an item. I<key> points to the item to "
176 "be searched for. I<rootp> points to a variable which points to the root of "
177 "the tree. If the tree is empty, then the variable that I<rootp> points to "
178 "should be set to NULL. If the item is found in the tree, then B<tsearch>() "
179 "returns a pointer to the corresponding tree node. (In other words, "
180 "B<tsearch>() returns a pointer to a pointer to the data item.) If the item "
181 "is not found, then B<tsearch>() adds it, and returns a pointer to the "
182 "corresponding tree node."
183 msgstr ""
184 "تبحث B<tsearch>() في الشجرة عن عنصر. يشير I<key> إلى العنصر المطلوب البحث "
185 "عنه. يشير I<rootp> إلى متغير يشير إلى جذر الشجرة. إذا كانت الشجرة فارغة، "
186 "فيجب ضبط المتغير الذي يشير إليه I<rootp> على NULL. إذا وُجد العنصر في الشجرة، "
187 "فتُرجع B<tsearch>() مؤشرًا إلى عقدة الشجرة المقابلة. (بمعنى آخر، تُرجع "
188 "B<tsearch>() مؤشرًا إلى مؤشر لعنصر البيانات.) إذا لم يُعثر على العنصر، فتضيفه "
189 "B<tsearch>() وتُعيد مؤشرًا إلى عقدة الشجرة المقابلة."
190
191 #. type: Plain text
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 msgid ""
195 "B<tfind>() is like B<tsearch>(), except that if the item is not found, then "
196 "B<tfind>() returns NULL."
197 msgstr ""
198 "B<tfind>() تشبه B<tsearch>()، باستثناء أنه إذا لم يُعثر على العنصر، فتُرجع "
199 "B<tfind>() NULL."
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 "B<tdelete>() deletes an item from the tree. Its arguments are the same as "
206 "for B<tsearch>()."
207 msgstr ""
208 "تحذف B<tdelete>() عنصرًا من الشجرة. وسيطاتها هي نفس وسيطات B<tsearch>()."
209
210 #. type: Plain text
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 msgid ""
214 "B<twalk>() performs depth-first, left-to-right traversal of a binary tree. "
215 "I<root> points to the starting node for the traversal. If that node is not "
216 "the root, then only part of the tree will be visited. B<twalk>() calls the "
217 "user function I<action> each time a node is visited (that is, three times "
218 "for an internal node, and once for a leaf). I<action>, in turn, takes three "
219 "arguments. The first argument is a pointer to the node being visited. The "
220 "structure of the node is unspecified, but it is possible to cast the pointer "
221 "to a pointer-to-pointer-to-element in order to access the element stored "
222 "within the node. The application must not modify the structure pointed to "
223 "by this argument. The second argument is an integer which takes one of the "
224 "values B<preorder>, B<postorder>, or B<endorder> depending on whether this "
225 "is the first, second, or third visit to the internal node, or the value "
226 "B<leaf> if this is the single visit to a leaf node. (These symbols are "
227 "defined in I<E<lt>search.hE<gt>>.) The third argument is the depth of the "
228 "node; the root node has depth zero."
229 msgstr ""
230 "تنفذ B<twalk>() اجتيازًا أوليًا بالعمق من اليسار إلى اليمين لشجرة ثنائية. يشير "
231 "I<root> إلى عقدة البداية للاجتياز. إذا لم تكن تلك العقدة هي الجذر، فستتم "
232 "زيارة جزء فقط من الشجرة. تستدعي B<twalk>() دالة المستخدم I<action> في كل مرة "
233 "تُزار فيها عقدة (أي ثلاث مرات للعقدة الداخلية، ومرة واحدة للورقة). تأخذ "
234 "I<action> بدورها ثلاث وسيطات. الوسيطة الأولى هي مؤشر للعقدة التي تُزار. بنية "
235 "العقدة غير محددة، لكن من الممكن تحويل المؤشر إلى مؤشر لمؤشر للعنصر للوصول "
236 "إلى العنصر المخزن داخل العقدة. يجب ألا يُعدِّل التطبيق البنية المشار إليها بهذه "
237 "الوسيطة. الوسيطة الثانية هي عدد صحيح يأخذ إحدى القيم B<preorder> أو "
238 "B<postorder> أو B<endorder> اعتمادًا على ما إذا كانت هذه هي الزيارة الأولى أو "
239 "الثانية أو الثالثة للعقدة الداخلية، أو القيمة B<leaf> إذا كانت هذه هي "
240 "الزيارة الوحيدة لعقدة ورقية. (هذه الرموز مُعرَّفة في I<E<lt>search.hE<gt>>.) "
241 "الوسيطة الثالثة هي عمق العقدة؛ عمق عقدة الجذر هو صفر."
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid ""
247 "(More commonly, B<preorder>, B<postorder>, and B<endorder> are known as "
248 "B<preorder>, B<inorder>, and B<postorder>: before visiting the children, "
249 "after the first and before the second, and after visiting the children. "
250 "Thus, the choice of name B<post\\%order> is rather confusing.)"
251 msgstr ""
252 "(بشكل أكثر شيوعًا، تُعرف B<preorder> و B<postorder> و B<endorder> باسم "
253 "B<preorder> و B<inorder> و B<postorder>: قبل زيارة الأطفال، بعد الأول وقبل "
254 "الثاني، وبعد زيارة الأطفال. وبالتالي، فإن اختيار الاسم B<post\\%order> مربك "
255 "إلى حد ما.)"
256
257 #. type: Plain text
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 msgid ""
261 "B<twalk_r>() is similar to B<twalk>(), but instead of the I<depth> "
262 "argument, the I<closure> argument pointer is passed to each invocation of "
263 "the action callback, unchanged. This pointer can be used to pass "
264 "information to and from the callback function in a thread-safe fashion, "
265 "without resorting to global variables."
266 msgstr ""
267 "B<twalk_r>() مشابهة لـ B<twalk>()، ولكن بدلاً من وسيطة I<depth>، يُمرَّر مؤشر "
268 "وسيطة I<closure> إلى كل استدعاء لاستدعاء الإجراء، دون تغيير. يمكن استخدام "
269 "هذا المؤشر لتمرير المعلومات من وإلى دالة الاستدعاء بطريقة آمنة للخيوط، دون "
270 "اللجوء إلى متغيرات عامة."
271
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid ""
276 "B<tdestroy>() removes the whole tree pointed to by I<root>, freeing all "
277 "resources allocated by the B<tsearch>() function. For the data in each "
278 "tree node the function I<free_node> is called. The pointer to the data is "
279 "passed as the argument to the function. If no such work is necessary, "
280 "I<free_node> must point to a function doing nothing."
281 msgstr ""
282 "تزيل B<tdestroy>() الشجرة بأكملها المشار إليها بواسطة I<root>، وتحرر جميع "
283 "الموارد المخصصة بواسطة دالة B<tsearch>(). بالنسبة للبيانات في كل عقدة شجرة، "
284 "تُستدعى الدالة I<free_node>. يُمرَّر مؤشر البيانات كوسيطة للدالة. إذا لم تكن "
285 "هناك حاجة لمثل هذا العمل، فيجب أن يشير I<free_node> إلى دالة لا تفعل شيئًا."
286
287 #. type: SH
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 #, no-wrap
291 msgid "RETURN VALUE"
292 msgstr "قيمة الإرجاع"
293
294 #. type: Plain text
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 msgid ""
298 "B<tsearch>() returns a pointer to a matching node in the tree, or to the "
299 "newly added node, or NULL if there was insufficient memory to add the item. "
300 "B<tfind>() returns a pointer to the node, or NULL if no match is found. If "
301 "there are multiple items that match the key, the item whose node is returned "
302 "is unspecified."
303 msgstr ""
304 "تُرجع B<tsearch>() مؤشرًا إلى عقدة مطابقة في الشجرة، أو إلى العقدة المضافة "
305 "حديثًا، أو NULL إذا لم تكن هناك ذاكرة كافية لإضافة العنصر. تُرجع B<tfind>() "
306 "مؤشرًا إلى العقدة، أو NULL إذا لم يُعثر على تطابق. إذا كانت هناك عناصر متعددة "
307 "تطابق المفتاح، فإن العنصر الذي تُعاد عقدته غير محدد."
308
309 #. type: Plain text
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 msgid ""
313 "B<tdelete>() returns a pointer to the parent of the node deleted, or NULL "
314 "if the item was not found. If the deleted node was the root node, "
315 "B<tdelete>() returns a dangling pointer that must not be accessed."
316 msgstr ""
317 "تُرجع B<tdelete>() مؤشرًا إلى أصل العقدة المحذوفة، أو NULL إذا لم يُعثر على "
318 "العنصر. إذا كانت العقدة المحذوفة هي عقدة الجذر، فتُرجع B<tdelete>() مؤشرًا "
319 "معلقًا يجب عدم الوصول إليه."
320
321 #. type: Plain text
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 msgid ""
325 "B<tsearch>(), B<tfind>(), and B<tdelete>() also return NULL if I<rootp> was "
326 "NULL on entry."
327 msgstr ""
328 "تُرجع B<tsearch>() و B<tfind>() و B<tdelete>() أيضًا NULL إذا كان I<rootp> هو "
329 "NULL عند الدخول."
330
331 #. type: SH
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 #, no-wrap
335 msgid "ATTRIBUTES"
336 msgstr "السمات"
337
338 #. type: Plain text
339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
341 msgid ""
342 "For an explanation of the terms used in this section, see B<attributes>(7)."
343 msgstr ""
344 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
345
346 #. type: tbl table
347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
349 #, no-wrap
350 msgid "Interface"
351 msgstr "الواجهة"
352
353 #. type: tbl table
354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
356 #, no-wrap
357 msgid "Attribute"
358 msgstr "السمة"
359
360 #. type: tbl table
361 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
362 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
363 #, no-wrap
364 msgid "Value"
365 msgstr "القيمة"
366
367 #. type: tbl table
368 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
369 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
370 #, no-wrap
371 msgid ".na\n"
372 msgstr ".na\n"
373
374 #. type: tbl table
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 #, no-wrap
378 msgid ".nh\n"
379 msgstr ".nh\n"
380
381 #. type: tbl table
382 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
383 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
384 #, no-wrap
385 msgid ""
386 "B<tsearch>(),\n"
387 "B<tfind>(),\n"
388 "B<tdelete>()"
389 msgstr ""
390 "B<tsearch>(),\n"
391 "B<tfind>(),\n"
392 "B<tdelete>()"
393
394 #. type: tbl table
395 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
396 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
397 #, no-wrap
398 msgid "Thread safety"
399 msgstr "سلامة الخيوط"
400
401 #. type: tbl table
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 #, no-wrap
405 msgid "MT-Safe race:rootp"
406 msgstr "MT-Safe race:rootp"
407
408 #. type: TQ
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, no-wrap
412 msgid "B<twalk>()"
413 msgstr "B<twalk>()"
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:root"
420 msgstr "MT-Safe race:root"
421
422 #. type: TP
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_r>()"
427 msgstr "B<twalk_r>()"
428
429 #. type: TP
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 #, no-wrap
433 msgid "B<tdestroy>()"
434 msgstr "B<tdestroy>()"
435
436 #. type: tbl table
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 #, no-wrap
440 msgid "MT-Safe"
441 msgstr "MT-Safe"
442
443 #. type: SH
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "STANDARDS"
448 msgstr "المعايير"
449
450 #. type: TP
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 #, no-wrap
454 msgid "B<tsearch>()"
455 msgstr "B<tsearch>()"
456
457 #. type: TQ
458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
460 #, no-wrap
461 msgid "B<tfind>()"
462 msgstr "B<tfind>()"
463
464 #. type: TQ
465 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
466 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
467 #, no-wrap
468 msgid "B<tdelete>()"
469 msgstr "B<tdelete>()"
470
471 #. type: Plain text
472 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
473 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
474 msgid "POSIX.1-2008."
475 msgstr "POSIX.1-2008."
476
477 #. type: Plain text
478 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
479 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
480 msgid "GNU."
481 msgstr "GNU."
482
483 #. type: SH
484 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
485 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
486 #, no-wrap
487 msgid "HISTORY"
488 msgstr "التاريخ"
489
490 #. type: Plain text
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 msgid "POSIX.1-2001, POSIX.1-2008, SVr4."
494 msgstr "POSIX.1-2001, POSIX.1-2008, SVr4."
495
496 #. type: Plain text
497 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
498 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
499 msgid "glibc 2.30."
500 msgstr "glibc 2.30."
501
502 #. type: SH
503 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
504 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
505 #, no-wrap
506 msgid "NOTES"
507 msgstr "ملاحظات"
508
509 #. type: Plain text
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 msgid ""
513 "B<twalk>() takes a pointer to the root, while the other functions take a "
514 "pointer to a variable which points to the root."
515 msgstr ""
516 "تأخذ B<twalk>() مؤشرًا إلى الجذر، بينما تأخذ الدوال الأخرى مؤشرًا إلى متغير "
517 "يشير إلى الجذر."
518
519 #. type: Plain text
520 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
521 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
522 msgid ""
523 "B<tdelete>() frees the memory required for the node in the tree. The user "
524 "is responsible for freeing the memory for the corresponding data."
525 msgstr ""
526 "تحرر B<tdelete>() الذاكرة المطلوبة للعقدة في الشجرة. المستخدم مسؤول عن تحرير "
527 "الذاكرة للبيانات المقابلة."
528
529 #. type: Plain text
530 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
531 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
532 msgid ""
533 "The example program depends on the fact that B<twalk>() makes no further "
534 "reference to a node after calling the user function with argument "
535 "\"endorder\" or \"leaf\". This works with the GNU library implementation, "
536 "but is not in the System V documentation."
537 msgstr ""
538 "يعتمد البرنامج المثال على حقيقة أن B<twalk>() لا تشير إلى عقدة بعد استدعاء "
539 "دالة المستخدم بالوسيطة \"endorder\" أو \"leaf\". يعمل هذا مع تنفيذ مكتبة "
540 "GNU، لكنه ليس في توثيق System V."
541
542 #. type: SH
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 #, no-wrap
546 msgid "EXAMPLES"
547 msgstr "أمثلة"
548
549 #. type: Plain text
550 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
551 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
552 msgid ""
553 "The following program inserts twelve random numbers into a binary tree, "
554 "where duplicate numbers are collapsed, then prints the numbers in order."
555 msgstr ""
556 "يدرج البرنامج التالي اثني عشر رقمًا عشوائيًا في شجرة ثنائية، حيث تُدمج الأرقام "
557 "المكررة، ثم يطبع الأرقام بالترتيب."
558
559 #. type: Plain text
560 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
561 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
562 #, no-wrap
563 msgid ""
564 "#define _GNU_SOURCE /* Expose declaration of tdestroy() */\n"
565 "#include E<lt>search.hE<gt>\n"
566 "#include E<lt>stddef.hE<gt>\n"
567 "#include E<lt>stdio.hE<gt>\n"
568 "#include E<lt>stdlib.hE<gt>\n"
569 "#include E<lt>time.hE<gt>\n"
570 "\\&\n"
571 "static void *root = NULL;\n"
572 "\\&\n"
573 "static void *\n"
574 "xmalloc(size_t n)\n"
575 "{\n"
576 " void *p;\n"
577 "\\&\n"
578 " p = malloc(n);\n"
579 " if (p)\n"
580 " return p;\n"
581 " fprintf(stderr, \"insufficient memory\\[rs]n\");\n"
582 " exit(EXIT_FAILURE);\n"
583 "}\n"
584 "\\&\n"
585 "static int\n"
586 "compare(const void *pa, const void *pb)\n"
587 "{\n"
588 " if (*(int *) pa E<lt> *(int *) pb)\n"
589 " return -1;\n"
590 " if (*(int *) pa E<gt> *(int *) pb)\n"
591 " return 1;\n"
592 " return 0;\n"
593 "}\n"
594 "\\&\n"
595 "static void\n"
596 "action(const void *nodep, VISIT which, int depth)\n"
597 "{\n"
598 " int *datap;\n"
599 "\\&\n"
600 " switch (which) {\n"
601 " case preorder:\n"
602 " break;\n"
603 " case postorder:\n"
604 " datap = *(int **) nodep;\n"
605 " printf(\"%6d\\[rs]n\", *datap);\n"
606 " break;\n"
607 " case endorder:\n"
608 " break;\n"
609 " case leaf:\n"
610 " datap = *(int **) nodep;\n"
611 " printf(\"%6d\\[rs]n\", *datap);\n"
612 " break;\n"
613 " }\n"
614 "}\n"
615 "\\&\n"
616 "int\n"
617 "main(void)\n"
618 "{\n"
619 " int *ptr;\n"
620 " int **val;\n"
621 "\\&\n"
622 " srand(time(NULL));\n"
623 " for (unsigned int i = 0; i E<lt> 12; i++) {\n"
624 " ptr = xmalloc(sizeof(*ptr));\n"
625 " *ptr = rand() & 0xff;\n"
626 " val = tsearch(ptr, &root, compare);\n"
627 " if (val == NULL)\n"
628 " exit(EXIT_FAILURE);\n"
629 " if (*val != ptr)\n"
630 " free(ptr);\n"
631 " }\n"
632 " twalk(root, action);\n"
633 " tdestroy(root, free);\n"
634 " exit(EXIT_SUCCESS);\n"
635 "}\n"
636 msgstr ""
637 "#define _GNU_SOURCE /* Expose declaration of tdestroy() */\n"
638 "#include E<lt>search.hE<gt>\n"
639 "#include E<lt>stddef.hE<gt>\n"
640 "#include E<lt>stdio.hE<gt>\n"
641 "#include E<lt>stdlib.hE<gt>\n"
642 "#include E<lt>time.hE<gt>\n"
643 "\\&\n"
644 "static void *root = NULL;\n"
645 "\\&\n"
646 "static void *\n"
647 "xmalloc(size_t n)\n"
648 "{\n"
649 " void *p;\n"
650 "\\&\n"
651 " p = malloc(n);\n"
652 " if (p)\n"
653 " return p;\n"
654 " fprintf(stderr, \"insufficient memory\\[rs]n\");\n"
655 " exit(EXIT_FAILURE);\n"
656 "}\n"
657 "\\&\n"
658 "static int\n"
659 "compare(const void *pa, const void *pb)\n"
660 "{\n"
661 " if (*(int *) pa E<lt> *(int *) pb)\n"
662 " return -1;\n"
663 " if (*(int *) pa E<gt> *(int *) pb)\n"
664 " return 1;\n"
665 " return 0;\n"
666 "}\n"
667 "\\&\n"
668 "static void\n"
669 "action(const void *nodep, VISIT which, int depth)\n"
670 "{\n"
671 " int *datap;\n"
672 "\\&\n"
673 " switch (which) {\n"
674 " case preorder:\n"
675 " break;\n"
676 " case postorder:\n"
677 " datap = *(int **) nodep;\n"
678 " printf(\"%6d\\[rs]n\", *datap);\n"
679 " break;\n"
680 " case endorder:\n"
681 " break;\n"
682 " case leaf:\n"
683 " datap = *(int **) nodep;\n"
684 " printf(\"%6d\\[rs]n\", *datap);\n"
685 " break;\n"
686 " }\n"
687 "}\n"
688 "\\&\n"
689 "int\n"
690 "main(void)\n"
691 "{\n"
692 " int *ptr;\n"
693 " int **val;\n"
694 "\\&\n"
695 " srand(time(NULL));\n"
696 " for (unsigned int i = 0; i E<lt> 12; i++) {\n"
697 " ptr = xmalloc(sizeof(*ptr));\n"
698 " *ptr = rand() & 0xff;\n"
699 " val = tsearch(ptr, &root, compare);\n"
700 " if (val == NULL)\n"
701 " exit(EXIT_FAILURE);\n"
702 " if (*val != ptr)\n"
703 " free(ptr);\n"
704 " }\n"
705 " twalk(root, action);\n"
706 " tdestroy(root, free);\n"
707 " exit(EXIT_SUCCESS);\n"
708 "}\n"
709
710 #. SRC END
711 #. type: SH
712 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
713 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
714 #, no-wrap
715 msgid "SEE ALSO"
716 msgstr "انظر أيضًا"
717
718 #. type: Plain text
719 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
720 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
721 msgid "B<bsearch>(3), B<hsearch>(3), B<lsearch>(3), B<qsort>(3)"
722 msgstr "B<bsearch>(3), B<hsearch>(3), B<lsearch>(3), B<qsort>(3)"
723
724 #. type: TH
725 #: debian-trixie
726 #, no-wrap
727 msgid "2024-06-15"
728 msgstr "15 يونيو 2024"
729
730 #. type: TH
731 #: debian-trixie
732 #, no-wrap
733 msgid "Linux man-pages 6.9.1"
734 msgstr "صفحات دليل لينكس 6.9.1"
735
736 #. type: Plain text
737 #: debian-trixie
738 msgid "Standard C library (I<libc>, I<-lc>)"
739 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
740
741 #. type: Plain text
742 #: debian-trixie
743 #, no-wrap
744 msgid ""
745 "B<void *tsearch(const void *>I<key>B<, void **>I<rootp>B<,>\n"
746 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
747 "B<void *tfind(const void *>I<key>B<, void *const *>I<rootp>B<,>\n"
748 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
749 "B<void *tdelete(const void *restrict >I<key>B<, void **restrict >I<rootp>B<,>\n"
750 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
751 "B<void twalk(const void *>I<root>B<,>\n"
752 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
753 "B< int >I<depth>B<));>\n"
754 msgstr ""
755 "B<void *tsearch(const void *>I<key>B<, void **>I<rootp>B<,>\n"
756 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
757 "B<void *tfind(const void *>I<key>B<, void *const *>I<rootp>B<,>\n"
758 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
759 "B<void *tdelete(const void *restrict >I<key>B<, void **restrict >I<rootp>B<,>\n"
760 "B< int (*>I<compar>B<)(const void *, const void *));>\n"
761 "B<void twalk(const void *>I<root>B<,>\n"
762 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
763 "B< int >I<depth>B<));>\n"
764
765 #. type: Plain text
766 #: debian-trixie
767 #, no-wrap
768 msgid ""
769 "B<void twalk_r(const void *>I<root>B<,>\n"
770 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
771 "B< void *>I<closure>B<),>\n"
772 "B< void *>I<closure>B<);>\n"
773 "B<void tdestroy(void *>I<root>B<, void (*>I<free_node>B<)(void *>I<nodep>B<));>\n"
774 msgstr ""
775 "B<void twalk_r(const void *>I<root>B<,>\n"
776 "B< void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
777 "B< void *>I<closure>B<),>\n"
778 "B< void *>I<closure>B<);>\n"
779 "B<void tdestroy(void *>I<root>B<, void (*>I<free_node>B<)(void *>I<nodep>B<));>\n"
780
781 #. type: TH
782 #: fedora-44 fedora-rawhide
783 #, no-wrap
784 msgid "2024-12-13"
785 msgstr "13 ديسمبر 2024"
786
787 #. type: TH
788 #: fedora-44 fedora-rawhide
789 #, no-wrap
790 msgid "Linux man-pages 6.13"
791 msgstr "صفحات دليل لينكس 6.13"
792
793 #. type: TH
794 #: mageia-cauldron
795 #, no-wrap
796 msgid "Linux man-pages 6.17"
797 msgstr "صفحات دليل لينكس 6.17"
798
799 #. type: TH
800 #: opensuse-leap-16-1 opensuse-tumbleweed
801 #, no-wrap
802 msgid "Linux man-pages (unreleased)"
803 msgstr "صفحات دليل لينكس (لم تصدر بعد)"