Debian Codegraph @

po/ar/man3/getopt.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
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n 4.30.2\n"
9 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
10 "PO-Revision-Date: 2026-06-06 08:57+0400\n"
11 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
12 "Language-Team: Arabic <[email protected]>\n"
13 "Language: ar\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 &&"
18 " n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
19 "X-Generator: Lokalize 23.08.5\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "getopt"
26 msgstr "getopt"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 فبراير 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, no-wrap
38 msgid "Linux man-pages 6.18"
39 msgstr "صفحات دليل لينكس 6.18"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "الاسم"
47
48 #. type: Plain text
49 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
50 #: opensuse-tumbleweed
51 msgid "getopt, optarg, optind, opterr, optopt - Parse command-line options"
52 msgstr "getopt, optarg, optind, opterr, optopt - تحليل خيارات سطر الأوامر"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr "المكتبة"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "موجز"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>unistd.hE<gt>>\n"
79 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid ""
86 "B<int getopt(int >I<argc>B<, char *>I<argv>B<[],>\n"
87 "B< const char *>I<optstring>B<);>\n"
88 msgstr ""
89 "B<int getopt(int >I<argc>B<, char *>I<argv>B<[],>\n"
90 "B< const char *>I<optstring>B<);>\n"
91
92 #. type: Plain text
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid ""
97 "B<extern char *>I<optarg>B<;>\n"
98 "B<extern int >I<optind>B<, >I<opterr>B<, >I<optopt>B<;>\n"
99 msgstr ""
100 "B<extern char *>I<optarg>B<;>\n"
101 "B<extern int >I<optind>B<, >I<opterr>B<, >I<optopt>B<;>\n"
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid ""
107 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
108 msgstr ""
109 "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B<feature_test_macros>(7)):"
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 msgid "B<getopt>():"
115 msgstr "B<getopt>():"
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 #, no-wrap
121 msgid " _POSIX_C_SOURCE E<gt>= 2 || _XOPEN_SOURCE\n"
122 msgstr " _POSIX_C_SOURCE E<gt>= 2 || _XOPEN_SOURCE\n"
123
124 #. type: SH
125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
127 #, no-wrap
128 msgid "DESCRIPTION"
129 msgstr "الوصف"
130
131 #. type: Plain text
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 msgid ""
135 "The B<getopt>() function parses the command-line arguments. Its arguments "
136 "I<argc> and I<argv> are the argument count and array as passed to the "
137 "I<main>() function on program invocation. An element of I<argv> that "
138 "starts with \\[aq]-\\[aq] (and is not exactly \"-\" or \"--\") is an option "
139 "element. The characters of this element (aside from the initial \\[aq]-"
140 "\\[aq]) are option characters. If B<getopt>() is called repeatedly, it "
141 "returns successively each of the option characters from each of the option "
142 "elements."
143 msgstr ""
144 "الدالة B<getopt>() تحلل وسائط سطر الأوامر. وسيطاها I<argc> و I<argv> هما "
145 "عدد الوسائط والمصفوفة كما تم تمريرهما إلى الدالة I<main>() عند استدعاء "
146 "البرنامج. عنصر من I<argv> يبدأ بـ \\[aq]-\\[aq] (وليس بالضبط \"-\" أو \"--"
147 "\") هو عنصر خيار. محارف هذا العنصر (باستثناء \\[aq]-\\[aq] الأولي) هي محارف "
148 "خيار. إذا استُدعيت B<getopt>() بشكل متكرر، فإنها تُرجع تباعًا كل محرف خيار"
149 " من "
150 "كل عنصر خيار."
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 "The variable I<optind> is the index of the next element to be processed in "
157 "I<argv>. The system initializes this value to 1. The caller can reset it "
158 "to 1 to restart scanning of the same I<argv>, or when scanning a new "
159 "argument vector."
160 msgstr ""
161 "المتغير I<optind> هو فهرس العنصر التالي الذي سيُعالج في I<argv>. يُهيئ النظام "
162 "هذه القيمة إلى 1. يمكن للمستدعي إعادة تعيينها إلى 1 لإعادة مسح نفس I<argv>، "
163 "أو عند مسح متجه وسائط جديد."
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 msgid ""
169 "If B<getopt>() finds another option character, it returns that character, "
170 "updating the external variable I<optind> and a static variable I<nextchar> "
171 "so that the next call to B<getopt>() can resume the scan with the following "
172 "option character or I<argv>-element."
173 msgstr ""
174 "إذا وجدت B<getopt>() محرف خيار آخر، فإنها تُرجع ذلك المحرف، مُحدّثة المتغير "
175 "الخارجي I<optind> والمتغير الثابت I<nextchar> بحيث يمكن للاستدعاء التالي لـ "
176 "B<getopt>() استئناف المسح بمحرف الخيار التالي أو عنصر I<argv>."
177
178 #. type: Plain text
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 msgid ""
182 "If there are no more option characters, B<getopt>() returns -1. Then "
183 "I<optind> is the index in I<argv> of the first I<argv>-element that is not "
184 "an option."
185 msgstr ""
186 "إذا لم يكن هناك المزيد من محارف الخيار، تُرجع B<getopt>() -1. عندها يكون "
187 "I<optind> هو الفهرس في I<argv> لأول عنصر I<argv> ليس خيارًا."
188
189 #. type: Plain text
190 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
191 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
192 msgid ""
193 "I<optstring> is a string containing the legitimate option characters. A "
194 "legitimate option character is any visible one byte B<ascii>(7) character "
195 "(for which B<isgraph>(3) would return nonzero) that is not \\[aq]-\\[aq], "
196 "\\[aq]:\\[aq], or \\[aq];\\[aq]. If such a character is followed by a "
197 "colon, the option requires an argument, so B<getopt>() places a pointer to "
198 "the following text in the same I<argv>-element, or the text of the following "
199 "I<argv>-element, in I<optarg>. Two colons mean an option takes an optional "
200 "arg; if there is text in the current I<argv>-element (i.e., in the same word "
201 "as the option name itself, for example, \"-oarg\"), then it is returned in "
202 "I<optarg>, otherwise I<optarg> is set to zero. This is a GNU extension. If "
203 "I<optstring> contains B<W> followed by a semicolon, then B<-W foo> is "
204 "treated as the long option B<--foo>. (The B<-W> option is reserved by "
205 "POSIX.2 for implementation extensions.) This behavior is a GNU extension, "
206 "not available with libraries before glibc 2."
207 msgstr ""
208 "I<optstring> هو سلسلة محارف تحتوي على محارف الخيار المشروعة. محرف الخيار "
209 "المشروع هو أي محرف B<ascii>(7) مرئي ذو بايت واحد (الذي ستعيد له "
210 "B<isgraph>(3) قيمة غير صفرية) وليس \\[aq]-\\[aq] أو \\[aq]:\\[aq] أو \\[aq];"
211 "\\[aq]. إذا تبع هذا المحرف نقطتان رأسيتان، فإن الخيار يتطلب وسيطًا، لذا تضع "
212 "B<getopt>() مؤشرًا إلى النص التالي في نفس عنصر I<argv>، أو نص عنصر I<argv> "
213 "التالي، في I<optarg>. نقطتان رأسيتان تعنيان أن الخيار يأخذ وسيطًا اختياريًا؛ "
214 "إذا كان هناك نص في عنصر I<argv> الحالي (أي في نفس الكلمة مثل اسم الخيار "
215 "نفسه، على سبيل المثال، \"-oarg\")، فإنه يُعاد في I<optarg>، وإلا يُضبط "
216 "I<optarg> إلى صفر. هذا امتداد لـ GNU. إذا احتوى I<optstring> على B<W> متبوعًا "
217 "بفاصلة منقوطة، فإن B<-W foo> يُعالج كخيار طويل B<--foo>. (خيار B<-W> محجوز "
218 "بواسطة POSIX.2 لامتدادات التنفيذ.) هذا السلوك هو امتداد لـ GNU، غير متوفر مع "
219 "المكتبات قبل glibc 2."
220
221 #. type: Plain text
222 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
223 #: opensuse-tumbleweed
224 msgid ""
225 "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
226 "that eventually all the nonoptions are at the end. Two other scanning modes "
227 "are also implemented. If the first character of I<optstring> is \\[aq]+"
228 "\\[aq] or the environment variable B<\\%POSIXLY_CORRECT> is set, then option "
229 "processing stops as soon as a nonoption argument is encountered. If \\[aq]+"
230 "\\[aq] is not the first character of I<optstring>, it is treated as a normal "
231 "option. If B<\\%POSIXLY_CORRECT> behavior is required in this case "
232 "I<optstring> will contain two \\[aq]+\\[aq] symbols. If the first character "
233 "of I<optstring> is \\[aq]-\\[aq], then each nonoption I<argv>-element is "
234 "handled as if it were the argument of an option with character code 1. "
235 "(This is used by programs that were written to expect options and other "
236 "I<argv>-elements in any order and that care about the ordering of the two.) "
237 "The special argument \"--\" forces an end of option-scanning regardless of "
238 "the scanning mode."
239 msgstr ""
240 "بشكل مبدئي، تُبدّل B<getopt>() محتويات I<argv> أثناء مسحها، بحيث تكون جميع "
241 "غير الخيارات في النهاية في النهاية. يُنفذ أيضًا وضعا مسح آخران. إذا كان"
242 " المحرف "
243 "الأول من I<optstring> هو \\[aq]+\\[aq] أو كان متغير البيئة B<\\"
244 "%POSIXLY_CORRECT> مضبوطًا، فإن معالجة الخيار تتوقف فور مواجهة وسيط غير خيار. "
245 "إذا لم يكن \\[aq]+\\[aq] هو المحرف الأول من I<optstring>، فإنه يُعالج كخيار "
246 "عادي. إذا كان سلوك B<\\%POSIXLY_CORRECT> مطلوبًا في هذه الحالة، سيحتوي "
247 "I<optstring> على رمزين \\[aq]+\\[aq]. إذا كان المحرف الأول من I<optstring> "
248 "هو \\[aq]-\\[aq]، فإن كل عنصر I<argv> غير خيار يُعالج كما لو كان وسيط خيار "
249 "برمز محرف 1. (يُستخدم هذا بواسطة البرامج التي كُتبت لتتوقع خيارات وعناصر "
250 "I<argv> أخرى بأي ترتيب وتهتم بترتيبهما.) الوسيط الخاص \"--\" يُجبر على إنهاء "
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 "While processing the option list, B<getopt>() can detect two kinds of "
258 "errors: (1) an option character that was not specified in I<optstring> and "
259 "(2) a missing option argument (i.e., an option at the end of the command "
260 "line without an expected argument). Such errors are handled and reported as "
261 "follows:"
262 msgstr ""
263 "أثناء معالجة قائمة الخيارات، يمكن لـ B<getopt>() اكتشاف نوعين من الأخطاء: "
264 "(1) محرف خيار لم يُحدد في I<optstring> و(2) وسيط خيار مفقود (أي خيار في نهاية "
265 "سطر الأوامر بدون وسيط متوقع). تُعالج هذه الأخطاء وتُبلغ عنها كما يلي:"
266
267 #. type: IP
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 #, no-wrap
271 msgid "\\[bu]"
272 msgstr "\\[bu]"
273
274 #. type: Plain text
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 msgid ""
278 "By default, B<getopt>() prints an error message on standard error, places "
279 "the erroneous option character in I<optopt>, and returns \\[aq]?\\[aq] as "
280 "the function result."
281 msgstr ""
282 "بشكل مبدئي، تطبع B<getopt>() رسالة خطأ على الخطأ المعياري، وتضع محرف الخيار "
283 "الخاطئ في I<optopt>، وتُعيد \\[aq]?\\[aq] كنتيجة للدالة."
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 msgid ""
289 "If the caller has set the global variable I<opterr> to zero, then "
290 "B<getopt>() does not print an error message. The caller can determine that "
291 "there was an error by testing whether the function return value is \\[aq]?"
292 "\\[aq]. (By default, I<opterr> has a nonzero value.)"
293 msgstr ""
294 "إذا ضبط المستدعي المتغير العام I<opterr> إلى صفر، فإن B<getopt>() لا تطبع "
295 "رسالة خطأ. يمكن للمستدعي تحديد وجود خطأ باختبار ما إذا كانت قيمة إرجاع "
296 "الدالة هي \\[aq]?\\[aq]. (بشكل مبدئي، I<opterr> له قيمة غير صفرية.)"
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid ""
302 "If the first character (following any optional \\[aq]+\\[aq] or \\[aq]-"
303 "\\[aq] described above) of I<optstring> is a colon (\\[aq]:\\[aq]), then "
304 "B<getopt>() likewise does not print an error message. In addition, it "
305 "returns \\[aq]:\\[aq] instead of \\[aq]?\\[aq] to indicate a missing option "
306 "argument. This allows the caller to distinguish the two different types of "
307 "errors."
308 msgstr ""
309 "إذا كان المحرف الأول (بعد أي \\[aq]+\\[aq] أو \\[aq]-\\[aq] اختياري موصوف "
310 "أعلاه) من I<optstring> هو نقطتان رأسيتان (\\[aq]:\\[aq])، فإن B<getopt>() "
311 "بالمثل لا تطبع رسالة خطأ. بالإضافة إلى ذلك، تُعيد \\[aq]:\\[aq] بدلاً من "
312 "\\[aq]?\\[aq] للإشارة إلى وسيط خيار مفقود. هذا يسمح للمستدعي بالتمييز بين "
313 "نوعي الخطأ المختلفين."
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 "RETURN VALUE"
320 msgstr "قيمة الإرجاع"
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 "If an option was successfully found, then B<getopt>() returns the option "
327 "character. If all command-line options have been parsed, then B<getopt>() "
328 "returns -1. If B<getopt>() encounters an option character that was not in "
329 "I<optstring>, then \\[aq]?\\[aq] is returned. If B<getopt>() encounters an "
330 "option with a missing argument, then the return value depends on the first "
331 "character in I<optstring>: if it is \\[aq]:\\[aq], then \\[aq]:\\[aq] is "
332 "returned; otherwise \\[aq]?\\[aq] is returned."
333 msgstr ""
334 "إذا وُجد خيار بنجاح، فإن B<getopt>() تُعيد محرف الخيار. إذا حُللت جميع"
335 " خيارات "
336 "سطر الأوامر، فإن B<getopt>() تُعيد -1. إذا واجهت B<getopt>() محرف خيار لم "
337 "يكن في I<optstring>، فإن \\[aq]?\\[aq] يُعاد. إذا واجهت B<getopt>() خيارًا "
338 "بوسيط مفقود، فإن قيمة الإرجاع تعتمد على المحرف الأول في I<optstring>: إذا "
339 "كان \\[aq]:\\[aq]، فإن \\[aq]:\\[aq] يُعاد؛ وإلا يُعاد \\[aq]?\\[aq]."
340
341 #. type: SH
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 #, no-wrap
345 msgid "ENVIRONMENT"
346 msgstr "البيئة"
347
348 #. type: TP
349 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
350 #: opensuse-tumbleweed
351 #, no-wrap
352 msgid "B<\\%POSIXLY_CORRECT>"
353 msgstr "B<\\%POSIXLY_CORRECT>"
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid ""
359 "If this is set, then option processing stops as soon as a nonoption argument "
360 "is encountered."
361 msgstr "إذا كان هذا مضبوطًا، فإن معالجة الخيار تتوقف فور مواجهة وسيط غير خيار."
362
363 #. type: SH
364 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
365 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
366 #, no-wrap
367 msgid "ATTRIBUTES"
368 msgstr "السمات"
369
370 #. type: Plain text
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 msgid ""
374 "For an explanation of the terms used in this section, see B<attributes>(7)."
375 msgstr ""
376 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
377
378 #. type: tbl table
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 #, no-wrap
382 msgid "Interface"
383 msgstr "الواجهة"
384
385 #. type: tbl table
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 #, no-wrap
389 msgid "Attribute"
390 msgstr "السمة"
391
392 #. type: tbl table
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 #, no-wrap
396 msgid "Value"
397 msgstr "القيمة"
398
399 #. type: tbl table
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid ".na\n"
404 msgstr ".na\n"
405
406 #. type: tbl table
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 #, no-wrap
410 msgid ".nh\n"
411 msgstr ".nh\n"
412
413 #. type: TP
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 #, no-wrap
417 msgid "B<getopt>()"
418 msgstr "B<getopt>()"
419
420 #. type: tbl table
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, no-wrap
424 msgid "Thread safety"
425 msgstr "سلامة الخيوط"
426
427 #. type: tbl table
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 #, no-wrap
431 msgid "MT-Unsafe race:getopt env"
432 msgstr "غير آمن للمسارات المتعددة (MT-Unsafe) سباق:getopt env"
433
434 #. type: SH
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 #, no-wrap
438 msgid "VERSIONS"
439 msgstr "الإصدارات"
440
441 #. type: Plain text
442 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
443 #: opensuse-tumbleweed
444 msgid ""
445 "POSIX specifies that the I<argv> array argument should be I<const>, but "
446 "these functions permute its elements unless the environment variable B<\\"
447 "%POSIXLY_CORRECT> is set. I<const> is used in the actual prototype to be "
448 "compatible with other systems; however, this page doesn't show the "
449 "qualifier, to avoid confusing readers."
450 msgstr ""
451 "يحدد POSIX أن وسيط المصفوفة I<argv> يجب أن يكون I<const>، لكن هذه الدوال "
452 "تُبدّل عناصرها ما لم يُضبط متغير البيئة B<\\%POSIXLY_CORRECT>. يُستخدم I<"
453 "const> "
454 "في النموذج الأولي الفعلي ليكون متوافقًا مع الأنظمة الأخرى؛ ومع ذلك، لا تُظهر "
455 "هذه الصفحة المؤهل، لتجنب إرباك القراء."
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: Plain text
465 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
466 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
467 msgid "POSIX.1-2008."
468 msgstr "POSIX.1-2008."
469
470 #. type: Plain text
471 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
472 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
473 msgid ""
474 "The use of \\[aq]+\\[aq] and \\[aq]-\\[aq] in I<optstring> is a GNU "
475 "extension."
476 msgstr ""
477 "استخدام \\[aq]+\\[aq] و \\[aq]-\\[aq] في I<optstring> هو امتداد لـ GNU."
478
479 #. type: SH
480 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
481 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
482 #, no-wrap
483 msgid "HISTORY"
484 msgstr "التاريخ"
485
486 #. type: Plain text
487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
489 msgid "POSIX.1-2001, and POSIX.2."
490 msgstr "POSIX.1-2001، وPOSIX.2."
491
492 #. type: Plain text
493 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
494 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
495 msgid ""
496 "On some older implementations, B<getopt>() was declared in I<E<lt>stdio."
497 "hE<gt>>. SUSv1 permitted the declaration to appear in either I<E<lt>unistd."
498 "hE<gt>> or I<E<lt>stdio.hE<gt>>. POSIX.1-1996 marked the use of "
499 "I<E<lt>stdio.hE<gt>> for this purpose as LEGACY. POSIX.1-2001 does not "
500 "require the declaration to appear in I<E<lt>stdio.hE<gt>>."
501 msgstr ""
502 "في بعض التطبيقات القديمة، أُعلنت B<getopt>() في I<E<lt>stdio.hE<gt>>. سمح "
503 "SUSv1 بظهور الإعلان إما في I<E<lt>unistd.hE<gt>> أو I<E<lt>stdio.hE<gt>>. "
504 "وسم POSIX.1-1996 استخدام I<E<lt>stdio.hE<gt>> لهذا الغرض بأنه قديم "
505 "(LEGACY). لا يتطلب POSIX.1-2001 ظهور الإعلان في I<E<lt>stdio.hE<gt>>."
506
507 #. type: Plain text
508 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
509 #: opensuse-tumbleweed
510 msgid ""
511 "Very old versions of glibc were affected by a E<.UR https:\\://\\:sourceware."
512 "org/\\:git/\\:?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> B<\\"
513 "%_>I<PID>B<_GNU_nonoption_argv_flags_> environment variable E<.UE .>"
514 msgstr ""
515 "تأثرت الإصدارات القديمة جدًا من glibc بمتغير البيئة E<.UR https:\\://\\:"
516 "sourceware.org/\\:git/\\:?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> "
517 "B<\\%_>I<PID>B<_GNU_nonoption_argv_flags_> E<.UE .>"
518
519 #. type: SH
520 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
521 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
522 #, no-wrap
523 msgid "NOTES"
524 msgstr "ملاحظات"
525
526 #. type: Plain text
527 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
528 #: opensuse-tumbleweed
529 msgid ""
530 "A program that scans multiple argument vectors, or rescans the same vector "
531 "more than once, and wants to make use of GNU extensions such as \\[aq]+"
532 "\\[aq] and \\[aq]-\\[aq] at the start of I<optstring>, or changes the value "
533 "of B<\\%POSIXLY_CORRECT> between scans, must reinitialize B<getopt>() by "
534 "resetting I<optind> to 0, rather than the traditional value of 1. "
535 "(Resetting to 0 forces the invocation of an internal initialization routine "
536 "that rechecks B<\\%POSIXLY_CORRECT> and checks for GNU extensions in "
537 "I<optstring>.)"
538 msgstr ""
539 "البرنامج الذي يمسح متجهات وسائط متعددة، أو يعيد مسح نفس المتجه أكثر من مرة، "
540 "ويريد استخدام امتدادات GNU مثل \\[aq]+\\[aq] و\\[aq]-\\[aq] في بداية "
541 "I<optstring>، أو يغير قيمة B<\\%POSIXLY_CORRECT> بين عمليات المسح، يجب عليه "
542 "إعادة تهيئة B<getopt>() بإعادة تعيين I<optind> إلى 0، بدلاً من القيمة "
543 "التقليدية 1. (إعادة التعيين إلى 0 تُجبر استدعاء روتين تهيئة داخلي يعيد فحص "
544 "B<\\%POSIXLY_CORRECT> ويتحقق من امتدادات GNU في I<optstring>.)"
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 "Command-line arguments are parsed in strict order meaning that an option "
551 "requiring an argument will consume the next argument, regardless of whether "
552 "that argument is the correctly specified option argument or simply the next "
553 "option (in the scenario the user mis-specifies the command line). For "
554 "example, if I<optstring> is specified as \"1n:\" and the user specifies the "
555 "command line arguments incorrectly as I<prog\\ -n\\ -1>, the I<-n> option "
556 "will be given the B<optarg> value \"-1\", and the I<-1> option will be "
557 "considered to have not been specified."
558 msgstr ""
559 "تُحلل وسائط سطر الأوامر بترتيب صارم، مما يعني أن الخيار الذي يتطلب وسيطة "
560 "سيستهلك الوسيطة التالية، بغض النظر عما إذا كانت تلك الوسيطة هي وسيطة الخيار "
561 "المحددة بشكل صحيح أو مجرد الخيار التالي (في السيناريو الذي يحدد فيه المستخدم "
562 "سطر الأوامر بشكل خاطئ). على سبيل المثال، إذا تم تحديد I<optstring> كـ \"1n:"
563 "\" وحدد المستخدم وسائط سطر الأوامر بشكل غير صحيح كـ I<prog\\ -n\\ -1>، فسيتم "
564 "إعطاء الخيار I<-n> قيمة B<optarg> \"-1\"، وسيُعتبر الخيار I<-1> غير محدد."
565
566 #. type: SH
567 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
568 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
569 #, no-wrap
570 msgid "EXAMPLES"
571 msgstr "أمثلة"
572
573 #. type: SS
574 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
575 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
576 #, no-wrap
577 msgid "getopt()"
578 msgstr "getopt()"
579
580 #. type: Plain text
581 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
582 #: opensuse-tumbleweed
583 #| msgid ""
584 #| "The following trivial example program uses B<getopt>() to handle two "
585 #| "program options: I<-n>, with no associated value; and I<-t val>, which "
586 #| "expects an associated value."
587 msgid ""
588 "The following trivial example program uses B<getopt>() to handle two "
589 "program options: I<-n>, with no associated value; and I<-t\\ val>, which "
590 "expects an associated value."
591 msgstr ""
592 "برنامج المثال التالي البسيط يستخدم B<getopt>() لمعالجة خيارين للبرنامج: I<-"
593 "n>، بدون قيمة مرتبطة؛ و I<-t\\ val>، الذي يتوقع قيمة مرتبطة."
594
595 #. type: Plain text
596 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
597 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
598 #, no-wrap
599 msgid ""
600 "#include E<lt>stdio.hE<gt>\n"
601 "#include E<lt>stdlib.hE<gt>\n"
602 "#include E<lt>unistd.hE<gt>\n"
603 "\\&\n"
604 "int\n"
605 "main(int argc, char *argv[])\n"
606 "{\n"
607 " int flags, opt;\n"
608 " int nsecs, tfnd;\n"
609 "\\&\n"
610 " nsecs = 0;\n"
611 " tfnd = 0;\n"
612 " flags = 0;\n"
613 " while ((opt = getopt(argc, argv, \"nt:\")) != -1) {\n"
614 " switch (opt) {\n"
615 " case \\[aq]n\\[aq]:\n"
616 " flags = 1;\n"
617 " break;\n"
618 " case \\[aq]t\\[aq]:\n"
619 " nsecs = atoi(optarg);\n"
620 " tfnd = 1;\n"
621 " break;\n"
622 " default: /* \\[aq]?\\[aq] */\n"
623 " fprintf(stderr, \"Usage: %s [-t nsecs] [-n] name\\[rs]n\",\n"
624 " argv[0]);\n"
625 " exit(EXIT_FAILURE);\n"
626 " }\n"
627 " }\n"
628 "\\&\n"
629 " printf(\"flags=%d; tfnd=%d; nsecs=%d; optind=%d\\[rs]n\",\n"
630 " flags, tfnd, nsecs, optind);\n"
631 "\\&\n"
632 " if (optind E<gt>= argc) {\n"
633 " fprintf(stderr, \"Expected argument after options\\[rs]n\");\n"
634 " exit(EXIT_FAILURE);\n"
635 " }\n"
636 "\\&\n"
637 " printf(\"name argument = %s\\[rs]n\", argv[optind]);\n"
638 "\\&\n"
639 " /* Other code omitted */\n"
640 "\\&\n"
641 " exit(EXIT_SUCCESS);\n"
642 "}\n"
643 msgstr ""
644 "#include E<lt>stdio.hE<gt>\n"
645 "#include E<lt>stdlib.hE<gt>\n"
646 "#include E<lt>unistd.hE<gt>\n"
647 "\\&\n"
648 "int\n"
649 "main(int argc, char *argv[])\n"
650 "{\n"
651 " int flags, opt;\n"
652 " int nsecs, tfnd;\n"
653 "\\&\n"
654 " nsecs = 0;\n"
655 " tfnd = 0;\n"
656 " flags = 0;\n"
657 " while ((opt = getopt(argc, argv, \"nt:\")) != -1) {\n"
658 " switch (opt) {\n"
659 " case \\[aq]n\\[aq]:\n"
660 " flags = 1;\n"
661 " break;\n"
662 " case \\[aq]t\\[aq]:\n"
663 " nsecs = atoi(optarg);\n"
664 " tfnd = 1;\n"
665 " break;\n"
666 " default: /* \\[aq]?\\[aq] */\n"
667 " fprintf(stderr, \"Usage: %s [-t nsecs] [-n] name\\[rs]n\",\n"
668 " argv[0]);\n"
669 " exit(EXIT_FAILURE);\n"
670 " }\n"
671 " }\n"
672 "\\&\n"
673 " printf(\"flags=%d; tfnd=%d; nsecs=%d; optind=%d\\[rs]n\",\n"
674 " flags, tfnd, nsecs, optind);\n"
675 "\\&\n"
676 " if (optind E<gt>= argc) {\n"
677 " fprintf(stderr, \"Expected argument after options\\[rs]n\");\n"
678 " exit(EXIT_FAILURE);\n"
679 " }\n"
680 "\\&\n"
681 " printf(\"name argument = %s\\[rs]n\", argv[optind]);\n"
682 "\\&\n"
683 " /* Other code omitted */\n"
684 "\\&\n"
685 " exit(EXIT_SUCCESS);\n"
686 "}\n"
687
688 #. SRC END
689 #. type: SH
690 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
691 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
692 #, no-wrap
693 msgid "SEE ALSO"
694 msgstr "انظر أيضًا"
695
696 #. type: Plain text
697 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
698 #: opensuse-tumbleweed
699 msgid ""
700 "B<getopt>(1), B<getopt_long>(3), B<getopt_long_only>(3), B<getsubopt>(3)"
701 msgstr ""
702 "B<getopt>(1)، B<getopt_long>(3)، B<getopt_long_only>(3)، B<getsubopt>(3)"
703
704 #. type: TH
705 #: debian-trixie
706 #, no-wrap
707 msgid "2024-06-15"
708 msgstr "15 يونيو 2024"
709
710 #. type: TH
711 #: debian-trixie
712 #, no-wrap
713 msgid "Linux man-pages 6.9.1"
714 msgstr "صفحات دليل لينكس 6.9.1"
715
716 #. type: Plain text
717 #: debian-trixie fedora-44 fedora-rawhide
718 msgid ""
719 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt - "
720 "Parse command-line options"
721 msgstr ""
722 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt - "
723 "تحليل خيارات سطر الأوامر"
724
725 #. type: Plain text
726 #: debian-trixie
727 msgid "Standard C library (I<libc>, I<-lc>)"
728 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
729
730 #. type: Plain text
731 #: debian-trixie fedora-44 fedora-rawhide
732 #, no-wrap
733 msgid "B<#include E<lt>getopt.hE<gt>>\n"
734 msgstr "B<#include E<lt>getopt.hE<gt>>\n"
735
736 #. type: Plain text
737 #: debian-trixie fedora-44 fedora-rawhide
738 #, no-wrap
739 msgid ""
740 "B<int getopt_long(int >I<argc>B<, char *>I<argv>B<[],>\n"
741 "B< const char *>I<optstring>B<,>\n"
742 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
743 "B<int getopt_long_only(int >I<argc>B<, char *>I<argv>B<[],>\n"
744 "B< const char *>I<optstring>B<,>\n"
745 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
746 msgstr ""
747 "B<int getopt_long(int >I<argc>B<, char *>I<argv>B<[],>\n"
748 "B< const char *>I<optstring>B<,>\n"
749 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
750 "B<int getopt_long_only(int >I<argc>B<, char *>I<argv>B<[],>\n"
751 "B< const char *>I<optstring>B<,>\n"
752 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
753
754 #. type: Plain text
755 #: debian-trixie fedora-44 fedora-rawhide
756 msgid "B<getopt_long>(), B<getopt_long_only>():"
757 msgstr "B<getopt_long>()، B<getopt_long_only>() :"
758
759 #. type: Plain text
760 #: debian-trixie fedora-44 fedora-rawhide
761 #, no-wrap
762 msgid " _GNU_SOURCE\n"
763 msgstr " _GNU_SOURCE\n"
764
765 #. type: Plain text
766 #: debian-trixie fedora-44 fedora-rawhide
767 msgid ""
768 "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
769 "that eventually all the nonoptions are at the end. Two other scanning modes "
770 "are also implemented. If the first character of I<optstring> is \\[aq]+"
771 "\\[aq] or the environment variable B<POSIXLY_CORRECT> is set, then option "
772 "processing stops as soon as a nonoption argument is encountered. If \\[aq]+"
773 "\\[aq] is not the first character of I<optstring>, it is treated as a normal "
774 "option. If B<POSIXLY_CORRECT> behaviour is required in this case "
775 "I<optstring> will contain two \\[aq]+\\[aq] symbols. If the first character "
776 "of I<optstring> is \\[aq]-\\[aq], then each nonoption I<argv>-element is "
777 "handled as if it were the argument of an option with character code 1. "
778 "(This is used by programs that were written to expect options and other "
779 "I<argv>-elements in any order and that care about the ordering of the two.) "
780 "The special argument \"--\" forces an end of option-scanning regardless of "
781 "the scanning mode."
782 msgstr ""
783 "افتراضيًا، يُبدل B<getopt>() محتويات I<argv> أثناء مسحها، بحيث تكون جميع "
784 "العناصر غير الخيارية في النهاية. يُنفذ أيضًا وضعان آخران للمسح. إذا كان "
785 "الحرف الأول من I<optstring> هو \\[aq]+\\[aq] أو تم تعيين متغير البيئة "
786 "B<POSIXLY_CORRECT>، فإن معالجة الخيار تتوقف فور مواجهة وسيطة غير خيارية. "
787 "إذا لم يكن \\[aq]+\\[aq] هو الحرف الأول من I<optstring>، فيُعامل كخيار عادي. "
788 "إذا كان سلوك B<POSIXLY_CORRECT> مطلوبًا في هذه الحالة، فسيحتوي I<optstring> "
789 "على رمزين \\[aq]+\\[aq]. إذا كان الحرف الأول من I<optstring> هو \\[aq]-"
790 "\\[aq]، فسيتم التعامل مع كل عنصر I<argv> غير خياري كما لو كان وسيطة خيار "
791 "برمز حرف 1. (يُستخدم هذا بواسطة البرامج التي كُتبت لتتوقع خيارات وعناصر "
792 "I<argv> أخرى بأي ترتيب وتهتم بترتيبهما.) الوسيطة الخاصة \"--\" تُجبر إنهاء "
793 "مسح الخيار بغض النظر عن وضع المسح."
794
795 #. type: SS
796 #: debian-trixie fedora-44 fedora-rawhide
797 #, no-wrap
798 msgid "getopt_long() and getopt_long_only()"
799 msgstr "getopt_long() وgetopt_long_only()"
800
801 #. type: Plain text
802 #: debian-trixie fedora-44 fedora-rawhide
803 msgid ""
804 "The B<getopt_long>() function works like B<getopt>() except that it also "
805 "accepts long options, started with two dashes. (If the program accepts only "
806 "long options, then I<optstring> should be specified as an empty string "
807 "(\"\"), not NULL.) Long option names may be abbreviated if the abbreviation "
808 "is unique or is an exact match for some defined option. A long option may "
809 "take a parameter, of the form B<--arg=param> or B<--arg param>."
810 msgstr ""
811 "تعمل الدالة B<getopt_long>() مثل B<getopt>() باستثناء أنها تقبل أيضًا "
812 "الخيارات الطويلة، التي تبدأ بشرطتين. (إذا كان البرنامج يقبل الخيارات "
813 "الطويلة فقط، فيجب تحديد I<optstring> كسلسلة فارغة (\"\")، وليس NULL.) يمكن "
814 "اختصار أسماء الخيارات الطويلة إذا كان الاختصار فريدًا أو مطابقًا تمامًا لبعض "
815 "الخيارات المحددة. قد يأخذ الخيار الطويل معاملًا، بالشكل B<--arg=param> أو "
816 "B<--arg param>."
817
818 #. type: Plain text
819 #: debian-trixie fedora-44 fedora-rawhide
820 msgid ""
821 "I<longopts> is a pointer to the first element of an array of I<struct "
822 "option> declared in I<E<lt>getopt.hE<gt>> as"
823 msgstr ""
824 "I<longopts> هو مؤشر للعنصر الأول من مصفوفة من I<struct option> مُصرح عنها في "
825 "I<E<lt>getopt.hE<gt>> كـ"
826
827 #. type: Plain text
828 #: debian-trixie fedora-44 fedora-rawhide
829 #, no-wrap
830 msgid ""
831 "struct option {\n"
832 " const char *name;\n"
833 " int has_arg;\n"
834 " int *flag;\n"
835 " int val;\n"
836 "};\n"
837 msgstr ""
838 "struct option {\n"
839 " const char *name;\n"
840 " int has_arg;\n"
841 " int *flag;\n"
842 " int val;\n"
843 "};\n"
844
845 #. type: Plain text
846 #: debian-trixie fedora-44 fedora-rawhide
847 msgid "The meanings of the different fields are:"
848 msgstr "معاني الحقول المختلفة هي:"
849
850 #. type: TP
851 #: debian-trixie fedora-44 fedora-rawhide
852 #, no-wrap
853 msgid "I<name>"
854 msgstr "I<الاسم>"
855
856 #. type: Plain text
857 #: debian-trixie fedora-44 fedora-rawhide
858 msgid "is the name of the long option."
859 msgstr "هو اسم الخيار الطويل."
860
861 #. type: TP
862 #: debian-trixie fedora-44 fedora-rawhide
863 #, no-wrap
864 msgid "I<has_arg>"
865 msgstr "I<has_arg>"
866
867 #. type: Plain text
868 #: debian-trixie fedora-44 fedora-rawhide
869 msgid ""
870 "is: B<no_argument> (or 0) if the option does not take an argument; "
871 "B<required_argument> (or 1) if the option requires an argument; or "
872 "B<optional_argument> (or 2) if the option takes an optional argument."
873 msgstr ""
874 "هو: B<no_argument> (أو 0) إذا كان الخيار لا يأخذ معاملًا؛ أو "
875 "B<required_argument> (أو 1) إذا كان الخيار يتطلب معاملًا؛ أو "
876 "B<optional_argument> (أو 2) إذا كان الخيار يأخذ معاملًا اختياريًا."
877
878 #. type: TP
879 #: debian-trixie fedora-44 fedora-rawhide
880 #, no-wrap
881 msgid "I<flag>"
882 msgstr "I<flag>"
883
884 #. type: Plain text
885 #: debian-trixie fedora-44 fedora-rawhide
886 msgid ""
887 "specifies how results are returned for a long option. If I<flag> is NULL, "
888 "then B<getopt_long>() returns I<val>. (For example, the calling program "
889 "may set I<val> to the equivalent short option character.) Otherwise, "
890 "B<getopt_long>() returns 0, and I<flag> points to a variable which is set "
891 "to I<val> if the option is found, but left unchanged if the option is not "
892 "found."
893 msgstr ""
894 "يحدد كيفية إرجاع النتائج للخيار الطويل. إذا كان I<flag> هو NULL، فإن "
895 "B<getopt_long>() تُرجع I<val>. (على سبيل المثال، قد يضبط البرنامج المستدعِي "
896 "I<val> على محرف الخيار القصير المكافئ.) خلاف ذلك، تُرجع B<getopt_long>() "
897 "القيمة 0، ويشير I<flag> إلى متغير يُضبط على I<val> إذا عُثر على الخيار، ولكنه "
898 "يُترك دون تغيير إذا لم يُعثر على الخيار."
899
900 #. type: TP
901 #: debian-trixie fedora-44 fedora-rawhide
902 #, no-wrap
903 msgid "I<val>"
904 msgstr "I<val>"
905
906 #. type: Plain text
907 #: debian-trixie fedora-44 fedora-rawhide
908 msgid ""
909 "is the value to return, or to load into the variable pointed to by I<flag>."
910 msgstr ""
911 "هي القيمة المراد إرجاعها، أو تحميلها في المتغير الذي يشير إليه I<flag>."
912
913 #. type: Plain text
914 #: debian-trixie fedora-44 fedora-rawhide
915 msgid "The last element of the array has to be filled with zeros."
916 msgstr "يجب ملء العنصر الأخير من المصفوفة بالأصفار."
917
918 #. type: Plain text
919 #: debian-trixie fedora-44 fedora-rawhide
920 msgid ""
921 "If I<longindex> is not NULL, it points to a variable which is set to the "
922 "index of the long option relative to I<longopts>."
923 msgstr ""
924 "إذا لم يكن I<longindex> هو NULL، فإنه يشير إلى متغير يُضبط على فهرس الخيار "
925 "الطويل بالنسبة إلى I<longopts>."
926
927 #. type: Plain text
928 #: debian-trixie fedora-44 fedora-rawhide
929 msgid ""
930 "B<getopt_long_only>() is like B<getopt_long>(), but \\[aq]-\\[aq] as well "
931 "as \"--\" can indicate a long option. If an option that starts with \\[aq]-"
932 "\\[aq] (not \"--\") doesn't match a long option, but does match a short "
933 "option, it is parsed as a short option instead."
934 msgstr ""
935 "B<getopt_long_only>() تشبه B<getopt_long>()، ولكن \\[aq]-\\[aq] بالإضافة إلى "
936 "\"--\" يمكن أن يشير إلى خيار طويل. إذا كان الخيار الذي يبدأ بـ \\[aq]-"
937 "\\[aq] (وليس \"--\") لا يطابق خيارًا طويلًا، ولكنه يطابق خيارًا قصيرًا، فسيتم "
938 "تحليله كخيار قصير بدلاً من ذلك."
939
940 #. type: Plain text
941 #: debian-trixie fedora-44 fedora-rawhide
942 msgid ""
943 "B<getopt_long>() and B<getopt_long_only>() also return the option "
944 "character when a short option is recognized. For a long option, they return "
945 "I<val> if I<flag> is NULL, and 0 otherwise. Error and -1 returns are the "
946 "same as for B<getopt>(), plus \\[aq]?\\[aq] for an ambiguous match or an "
947 "extraneous parameter."
948 msgstr ""
949 "B<getopt_long>() وB<getopt_long_only>() تُرجعان أيضًا حرف الخيار عند التعرف "
950 "على خيار قصير. بالنسبة لخيار طويل، تُرجعان I<val> إذا كان I<flag> هو NULL، "
951 "و0 بخلاف ذلك. إرجاعات الخطأ و-1 هي نفسها لـ B<getopt>()، بالإضافة إلى "
952 "\\[aq]?\\[aq] للمطابقة الغامضة أو معامل زائد."
953
954 #. type: TP
955 #: debian-trixie fedora-44 fedora-rawhide
956 #, no-wrap
957 msgid "B<POSIXLY_CORRECT>"
958 msgstr "B<POSIXLY_CORRECT>"
959
960 #. type: TP
961 #: debian-trixie
962 #, no-wrap
963 msgid "B<_E<lt>PIDE<gt>_GNU_nonoption_argv_flags_>"
964 msgstr "B<_E<lt>PIDE<gt>_GNU_nonoption_argv_flags_>"
965
966 #. type: Plain text
967 #: debian-trixie
968 msgid ""
969 "This variable was used by B<bash>(1) 2.0 to communicate to glibc which "
970 "arguments are the results of wildcard expansion and so should not be "
971 "considered as options. This behavior was removed in B<bash>(1) 2.01, but "
972 "the support remains in glibc."
973 msgstr ""
974 "استُخدم هذا المتغير بواسطة B<bash>(1) 2.0 للتواصل مع glibc حول الوسائط التي "
975 "هي نتائج توسيع أحرف البدل وبالتالي لا ينبغي اعتبارها خيارات. أُزيل هذا "
976 "السلوك في B<bash>(1) 2.01، لكن الدعم لا يزال موجودًا في glibc."
977
978 #. type: tbl table
979 #: debian-trixie fedora-44 fedora-rawhide
980 #, no-wrap
981 msgid ""
982 "B<getopt>(),\n"
983 "B<getopt_long>(),\n"
984 "B<getopt_long_only>()"
985 msgstr ""
986 "B<getopt>(),\n"
987 "B<getopt_long>(),\n"
988 "B<getopt_long_only>()"
989
990 #. type: Plain text
991 #: debian-trixie fedora-44 fedora-rawhide
992 msgid ""
993 "POSIX specifies that the I<argv> array argument should be I<const>, but "
994 "these functions permute its elements unless the environment variable "
995 "B<POSIXLY_CORRECT> is set. I<const> is used in the actual prototype to be "
996 "compatible with other systems; however, this page doesn't show the "
997 "qualifier, to avoid confusing readers."
998 msgstr ""
999 "يحدد POSIX أن وسيط المصفوفة I<argv> يجب أن يكون I<const>، لكن هذه الدوال "
1000 "تبدل عناصرها ما لم يُضبط متغير البيئة B<POSIXLY_CORRECT>. يُستخدم I<const> في "
1001 "النموذج الأولي الفعلي للتوافق مع الأنظمة الأخرى؛ لكن هذه الصفحة لا تُظهر "
1002 "المؤهل، لتجنب إرباك القراء."
1003
1004 #. type: TP
1005 #: debian-trixie fedora-44 fedora-rawhide
1006 #, no-wrap
1007 msgid "B<getopt_long>()"
1008 msgstr "B<getopt_long>()"
1009
1010 #. type: TQ
1011 #: debian-trixie fedora-44 fedora-rawhide
1012 #, no-wrap
1013 msgid "B<getopt_long_only>()"
1014 msgstr "B<getopt_long_only>()"
1015
1016 #. type: Plain text
1017 #: debian-trixie fedora-44 fedora-rawhide
1018 msgid "GNU."
1019 msgstr "GNU."
1020
1021 #. type: Plain text
1022 #: debian-trixie fedora-44 fedora-rawhide
1023 msgid ""
1024 "A program that scans multiple argument vectors, or rescans the same vector "
1025 "more than once, and wants to make use of GNU extensions such as \\[aq]+"
1026 "\\[aq] and \\[aq]-\\[aq] at the start of I<optstring>, or changes the value "
1027 "of B<POSIXLY_CORRECT> between scans, must reinitialize B<getopt>() by "
1028 "resetting I<optind> to 0, rather than the traditional value of 1. "
1029 "(Resetting to 0 forces the invocation of an internal initialization routine "
1030 "that rechecks B<POSIXLY_CORRECT> and checks for GNU extensions in "
1031 "I<optstring>.)"
1032 msgstr ""
1033 "برنامج يمسح متجهات وسائط متعددة، أو يعيد مسح نفس المتجه أكثر من مرة، ويريد "
1034 "استخدام إضافات GNU مثل \\[aq]+\\[aq] و \\[aq]-\\[aq] في بداية I<optstring>، "
1035 "أو يغير قيمة B<POSIXLY_CORRECT> بين عمليات المسح، يجب أن يعيد تهيئة "
1036 "B<getopt>() بإعادة ضبط I<optind> إلى 0، بدلاً من القيمة التقليدية 1. (إعادة "
1037 "الضبط إلى 0 تُجبر استدعاء روتين تهيئة داخلي يعيد فحص B<POSIXLY_CORRECT> "
1038 "ويتحقق من إضافات GNU في I<optstring>.)"
1039
1040 #. type: Plain text
1041 #: debian-trixie fedora-44 fedora-rawhide
1042 msgid ""
1043 "The following trivial example program uses B<getopt>() to handle two "
1044 "program options: I<-n>, with no associated value; and I<-t val>, which "
1045 "expects an associated value."
1046 msgstr ""
1047 "برنامج المثال التالي البسيط يستخدم B<getopt>() لمعالجة خيارين للبرنامج: I<-"
1048 "n>، بدون قيمة مرتبطة؛ و I<-t val>، الذي يتوقع قيمة مرتبطة."
1049
1050 #. SRC END
1051 #. type: SS
1052 #: debian-trixie fedora-44 fedora-rawhide
1053 #, no-wrap
1054 msgid "getopt_long()"
1055 msgstr "getopt_long()"
1056
1057 #. type: Plain text
1058 #: debian-trixie fedora-44 fedora-rawhide
1059 msgid ""
1060 "The following example program illustrates the use of B<getopt_long>() with "
1061 "most of its features."
1062 msgstr "يوضح البرنامج المثال التالي استخدام B<getopt_long>() مع معظم ميزاتها."
1063
1064 #. type: Plain text
1065 #: debian-trixie fedora-44 fedora-rawhide
1066 #, no-wrap
1067 msgid ""
1068 "#include E<lt>getopt.hE<gt>\n"
1069 "#include E<lt>stdio.hE<gt> /* for printf */\n"
1070 "#include E<lt>stdlib.hE<gt> /* for exit */\n"
1071 "\\&\n"
1072 "int\n"
1073 "main(int argc, char *argv[])\n"
1074 "{\n"
1075 " int c;\n"
1076 " int digit_optind = 0;\n"
1077 "\\&\n"
1078 " while (1) {\n"
1079 " int this_option_optind = optind ? optind : 1;\n"
1080 " int option_index = 0;\n"
1081 " static struct option long_options[] = {\n"
1082 " {\"add\", required_argument, 0, 0 },\n"
1083 " {\"append\", no_argument, 0, 0 },\n"
1084 " {\"delete\", required_argument, 0, 0 },\n"
1085 " {\"verbose\", no_argument, 0, 0 },\n"
1086 " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n"
1087 " {\"file\", required_argument, 0, 0 },\n"
1088 " {0, 0, 0, 0 }\n"
1089 " };\n"
1090 "\\&\n"
1091 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
1092 " long_options, &option_index);\n"
1093 " if (c == -1)\n"
1094 " break;\n"
1095 "\\&\n"
1096 " switch (c) {\n"
1097 " case 0:\n"
1098 " printf(\"option %s\", long_options[option_index].name);\n"
1099 " if (optarg)\n"
1100 " printf(\" with arg %s\", optarg);\n"
1101 " printf(\"\\[rs]n\");\n"
1102 " break;\n"
1103 "\\&\n"
1104 " case \\[aq]0\\[aq]:\n"
1105 " case \\[aq]1\\[aq]:\n"
1106 " case \\[aq]2\\[aq]:\n"
1107 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
1108 " printf(\"digits occur in two different"
1109 " argv-elements.\\[rs]n\");\n"
1110 " digit_optind = this_option_optind;\n"
1111 " printf(\"option %c\\[rs]n\", c);\n"
1112 " break;\n"
1113 "\\&\n"
1114 " case \\[aq]a\\[aq]:\n"
1115 " printf(\"option a\\[rs]n\");\n"
1116 " break;\n"
1117 "\\&\n"
1118 " case \\[aq]b\\[aq]:\n"
1119 " printf(\"option b\\[rs]n\");\n"
1120 " break;\n"
1121 "\\&\n"
1122 " case \\[aq]c\\[aq]:\n"
1123 " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1124 " break;\n"
1125 "\\&\n"
1126 " case \\[aq]d\\[aq]:\n"
1127 " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1128 " break;\n"
1129 "\\&\n"
1130 " case \\[aq]?\\[aq]:\n"
1131 " break;\n"
1132 "\\&\n"
1133 " default:\n"
1134 " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n"
1135 " }\n"
1136 " }\n"
1137 "\\&\n"
1138 " if (optind E<lt> argc) {\n"
1139 " printf(\"non-option ARGV-elements: \");\n"
1140 " while (optind E<lt> argc)\n"
1141 " printf(\"%s \", argv[optind++]);\n"
1142 " printf(\"\\[rs]n\");\n"
1143 " }\n"
1144 "\\&\n"
1145 " exit(EXIT_SUCCESS);\n"
1146 "}\n"
1147 msgstr ""
1148 "#include E<lt>getopt.hE<gt>\n"
1149 "#include E<lt>stdio.hE<gt> /* for printf */\n"
1150 "#include E<lt>stdlib.hE<gt> /* for exit */\n"
1151 "\\&\n"
1152 "int\n"
1153 "main(int argc, char *argv[])\n"
1154 "{\n"
1155 " int c;\n"
1156 " int digit_optind = 0;\n"
1157 "\\&\n"
1158 " while (1) {\n"
1159 " int this_option_optind = optind ? optind : 1;\n"
1160 " int option_index = 0;\n"
1161 " static struct option long_options[] = {\n"
1162 " {\"add\", required_argument, 0, 0 },\n"
1163 " {\"append\", no_argument, 0, 0 },\n"
1164 " {\"delete\", required_argument, 0, 0 },\n"
1165 " {\"verbose\", no_argument, 0, 0 },\n"
1166 " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n"
1167 " {\"file\", required_argument, 0, 0 },\n"
1168 " {0, 0, 0, 0 }\n"
1169 " };\n"
1170 "\\&\n"
1171 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
1172 " long_options, &option_index);\n"
1173 " if (c == -1)\n"
1174 " break;\n"
1175 "\\&\n"
1176 " switch (c) {\n"
1177 " case 0:\n"
1178 " printf(\"option %s\", long_options[option_index].name);\n"
1179 " if (optarg)\n"
1180 " printf(\" with arg %s\", optarg);\n"
1181 " printf(\"\\[rs]n\");\n"
1182 " break;\n"
1183 "\\&\n"
1184 " case \\[aq]0\\[aq]:\n"
1185 " case \\[aq]1\\[aq]:\n"
1186 " case \\[aq]2\\[aq]:\n"
1187 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
1188 " printf(\"digits occur in two different"
1189 " argv-elements.\\[rs]n\");\n"
1190 " digit_optind = this_option_optind;\n"
1191 " printf(\"option %c\\[rs]n\", c);\n"
1192 " break;\n"
1193 "\\&\n"
1194 " case \\[aq]a\\[aq]:\n"
1195 " printf(\"option a\\[rs]n\");\n"
1196 " break;\n"
1197 "\\&\n"
1198 " case \\[aq]b\\[aq]:\n"
1199 " printf(\"option b\\[rs]n\");\n"
1200 " break;\n"
1201 "\\&\n"
1202 " case \\[aq]c\\[aq]:\n"
1203 " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1204 " break;\n"
1205 "\\&\n"
1206 " case \\[aq]d\\[aq]:\n"
1207 " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
1208 " break;\n"
1209 "\\&\n"
1210 " case \\[aq]?\\[aq]:\n"
1211 " break;\n"
1212 "\\&\n"
1213 " default:\n"
1214 " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n"
1215 " }\n"
1216 " }\n"
1217 "\\&\n"
1218 " if (optind E<lt> argc) {\n"
1219 " printf(\"non-option ARGV-elements: \");\n"
1220 " while (optind E<lt> argc)\n"
1221 " printf(\"%s \", argv[optind++]);\n"
1222 " printf(\"\\[rs]n\");\n"
1223 " }\n"
1224 "\\&\n"
1225 " exit(EXIT_SUCCESS);\n"
1226 "}\n"
1227
1228 #. type: Plain text
1229 #: debian-trixie fedora-44 fedora-rawhide
1230 msgid "B<getopt>(1), B<getsubopt>(3)"
1231 msgstr "B<getopt>(1)، B<getsubopt>(3)"
1232
1233 #. type: TH
1234 #: fedora-44 fedora-rawhide
1235 #, no-wrap
1236 msgid "2024-12-19"
1237 msgstr "19 ديسمبر 2024"
1238
1239 #. type: TH
1240 #: fedora-44 fedora-rawhide
1241 #, no-wrap
1242 msgid "Linux man-pages 6.13"
1243 msgstr "صفحات دليل لينكس 6.13"
1244
1245 #. type: Plain text
1246 #: fedora-44 fedora-rawhide
1247 msgid ""
1248 "Very old versions of glibc were affected by a E<.UR https://\\:sourceware."
1249 "org/\\:git/\\:?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> "
1250 "B<_>I<PID>B<_GNU_nonoption_argv_flags_> environment variable E<.UE .>"
1251 msgstr ""
1252 "الإصدارات القديمة جدًا من glibc تأثرت بمتغير البيئة E<.UR https://\\:"
1253 "sourceware.org/\\:git/\\:?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05> "
1254 "B<_>I<PID>B<_GNU_nonoption_argv_flags_> E<.UE .>"
1255
1256 #. type: TH
1257 #: mageia-cauldron
1258 #, no-wrap
1259 msgid "Linux man-pages 6.17"
1260 msgstr "صفحات دليل لينكس 6.17"
1261
1262 #. type: TH
1263 #: opensuse-leap-16-1 opensuse-tumbleweed
1264 #, no-wrap
1265 msgid "Linux man-pages (unreleased)"
1266 msgstr "صفحات دليل لينكس (لم تصدر بعد)"
1267