Debian Codegraph @

po/ar/man3/mbstowcs.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:30+0200\n"
9 "PO-Revision-Date: 2026-06-02 18:55+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 "mbstowcs"
25 msgstr "mbstowcs"
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 "mbstowcs - convert a multibyte string to a wide-character string"
51 msgstr "mbstowcs - تحويل سلسلة محارف متعددة البايت إلى سلسلة محارف عريضة"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr "المكتبة"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr "موجز"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
78 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
79
80 #. type: Plain text
81 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
82 #: opensuse-tumbleweed
83 #, no-wrap
84 msgid ""
85 "B<size_t mbstowcs(>size_t dsize;\n"
86 "B< wchar_t >I<dest>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n"
87 "B< size_t >I<dsize>B<);>\n"
88 msgstr ""
89 "B<size_t mbstowcs(>size_t dsize;\n"
90 "B< wchar_t >I<dest>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n"
91 "B< size_t >I<dsize>B<);>\n"
92
93 #. type: SH
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 #, no-wrap
97 msgid "DESCRIPTION"
98 msgstr "الوصف"
99
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 msgid ""
104 "If I<dest> is not NULL, convert the multibyte string I<src> to a wide-"
105 "character string starting at I<dest>. At most I<dsize> wide characters are "
106 "written to I<dest>. The sequence of characters in the string I<src> shall "
107 "begin in the initial shift state. The conversion can stop for three reasons:"
108 msgstr ""
109 "إذا لم يكن I<dest> NULL، فحوِّل سلسلة المحارف متعددة البايت I<src> إلى سلسلة "
110 "محارف عريضة تبدأ عند I<dest>. يُكتب على الأكثر I<dsize> حرفًا عريضًا إلى "
111 "I<dest>. يجب أن تبدأ سلسلة المحارف في I<src> في حالة الإزاحة الأولية. يمكن "
112 "أن يتوقف التحويل لثلاثة أسباب:"
113
114 #. type: IP
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 #, no-wrap
118 msgid "\\[bu]"
119 msgstr "\\[bu]"
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid ""
125 "An invalid multibyte sequence has been encountered. In this case, "
126 "I<(size_t)\\ -1> is returned."
127 msgstr ""
128 "تمت مصادفة تسلسل متعدد البايت غير صالح. في هذه الحالة، تُعاد I<(size_t)\\ "
129 "-1>."
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 "I<dsize> non-L\\[aq]\\[rs]0\\[aq] wide characters have been stored at "
136 "I<dest>. In this case, the number of wide characters written to I<dest> is "
137 "returned, but the shift state at this point is lost."
138 msgstr ""
139 "خُزنت I<dsize> من المحارف العريضة غير L\\[aq]\\[rs]0\\[aq] عند I<dest>. في "
140 "هذه الحالة، يُعاد عدد المحارف العريضة المكتوبة إلى I<dest>، لكن حالة الإزاحة "
141 "عند هذه النقطة تُفقد."
142
143 #. type: Plain text
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 msgid ""
147 "The multibyte string has been completely converted, including the "
148 "terminating null character (\\[aq]\\[rs]0\\[aq]). In this case, the number "
149 "of wide characters written to I<dest>, excluding the terminating null wide "
150 "character, is returned."
151 msgstr ""
152 "حُوّلت سلسلة المحارف متعددة البايت بالكامل، بما في ذلك حرف النهاية الصفري "
153 "(\\[aq]\\[rs]0\\[aq]). في هذه الحالة، يُعاد عدد المحارف العريضة المكتوبة إلى "
154 "I<dest>، باستثناء حرف النهاية الصفري العريض."
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 msgid ""
160 "If I<dest> is NULL, I<dsize> is ignored, and the conversion proceeds as "
161 "above, except that the converted wide characters are not written out to "
162 "memory, and that no length limit exists."
163 msgstr ""
164 "إذا كان I<dest> فارغا (NULL)، يُتجاهل I<dsize>، ويستمر التحويل كما هو موضح "
165 "أعلاه، باستثناء أن المحارف العريضة المحولة لا تُكتب في الذاكرة، ولا يوجد حد "
166 "للطول."
167
168 #. type: Plain text
169 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
170 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
171 msgid ""
172 "In order to avoid the case 2 above, the programmer should make sure I<dsize> "
173 "is greater than or equal to I<mbstowcs(NULL,src,0)+1>."
174 msgstr ""
175 "لتجنب الحالة 2 أعلاه، يجب على المبرمج التأكد من أن I<dsize> أكبر من أو يساوي "
176 "I<mbstowcs(NULL,src,0)+1>."
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 "The programmer must ensure that there is room for at least I<dsize> wide "
183 "characters at I<dest>."
184 msgstr ""
185 "يجب على المبرمج التأكد من وجود مساحة لـ I<dsize> من المحارف العريضة على "
186 "الأقل في I<dest>."
187
188 #. type: SH
189 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
190 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
191 #, no-wrap
192 msgid "RETURN VALUE"
193 msgstr "قيمة الإرجاع"
194
195 #. type: Plain text
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 msgid ""
199 "The number of wide characters that make up the converted part of the wide-"
200 "character string, not including the terminating null wide character. If an "
201 "invalid multibyte sequence was encountered, I<(size_t)\\ -1> is returned."
202 msgstr ""
203 "عدد المحارف العريضة التي تشكل الجزء المحول من سلسلة المحارف العريضة، دون "
204 "تضمين حرف النهاية الصفري العريض. إذا تمت مصادفة تسلسل متعدد البايت غير "
205 "صالح، تُعاد I<(size_t)\\ -1>."
206
207 #. type: SH
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 #, no-wrap
211 msgid "ATTRIBUTES"
212 msgstr "السمات"
213
214 #. type: Plain text
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 msgid ""
218 "For an explanation of the terms used in this section, see B<attributes>(7)."
219 msgstr ""
220 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
221
222 #. type: tbl table
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 #, no-wrap
226 msgid "Interface"
227 msgstr "الواجهة"
228
229 #. type: tbl table
230 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
231 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
232 #, no-wrap
233 msgid "Attribute"
234 msgstr "السمة"
235
236 #. type: tbl table
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "Value"
241 msgstr "القيمة"
242
243 #. type: tbl table
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid ".na\n"
248 msgstr ".na\n"
249
250 #. type: tbl table
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, no-wrap
254 msgid ".nh\n"
255 msgstr ".nh\n"
256
257 #. type: tbl table
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid "B<mbstowcs>()"
262 msgstr "B<mbstowcs>()"
263
264 #. type: tbl table
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 #, no-wrap
268 msgid "Thread safety"
269 msgstr "سلامة الخيوط"
270
271 #. type: tbl table
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 #, no-wrap
275 msgid "MT-Safe"
276 msgstr "MT-Safe"
277
278 #. type: SH
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 #, no-wrap
282 msgid "VERSIONS"
283 msgstr "الإصدارات"
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 "The function B<mbsrtowcs>(3) provides a better interface to the same "
290 "functionality."
291 msgstr "توفر الدالة B<mbsrtowcs>(3) واجهة أفضل لنفس الوظيفة."
292
293 #. type: SH
294 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
295 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
296 #, no-wrap
297 msgid "STANDARDS"
298 msgstr "المعايير"
299
300 #. type: Plain text
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 msgid "C11, POSIX.1-2008."
304 msgstr "C11, POSIX.1-2008."
305
306 #. type: SH
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 #, no-wrap
310 msgid "HISTORY"
311 msgstr "التاريخ"
312
313 #. type: Plain text
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 msgid "POSIX.1-2001, C99."
317 msgstr "POSIX.1-2001، C99."
318
319 #. type: SH
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "NOTES"
324 msgstr "ملاحظات"
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid ""
330 "The behavior of B<mbstowcs>() depends on the B<LC_CTYPE> category of the "
331 "current locale."
332 msgstr ""
333 "يعتمد سلوك B<mbstowcs>() على فئة B<LC_CTYPE> من الإعدادات المحلية الحالية."
334
335 #. type: SH
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 #, no-wrap
339 msgid "EXAMPLES"
340 msgstr "أمثلة"
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid ""
346 "The program below illustrates the use of B<mbstowcs>(), as well as some of "
347 "the wide character classification functions. An example run is the "
348 "following:"
349 msgstr ""
350 "يوضح البرنامج أدناه استخدام B<mbstowcs>()، بالإضافة إلى بعض دوال تصنيف "
351 "المحارف العريضة. مثال على التشغيل هو التالي:"
352
353 #. type: Plain text
354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
356 #, no-wrap
357 msgid ""
358 "$ ./t_mbstowcs de_DE.UTF-8 Grüße!\n"
359 "Length of source string (excluding terminator):\n"
360 " 8 bytes\n"
361 " 6 multibyte characters\n"
362 "\\&\n"
363 "Wide character string is: Grüße! (6 characters)\n"
364 " G alpha upper\n"
365 " r alpha lower\n"
366 " ü alpha lower\n"
367 " ß alpha lower\n"
368 " e alpha lower\n"
369 " ! !alpha\n"
370 msgstr ""
371 "$ ./t_mbstowcs de_DE.UTF-8 Grüße!\n"
372 "Length of source string (excluding terminator):\n"
373 " 8 bytes\n"
374 " 6 multibyte characters\n"
375 "\\&\n"
376 "Wide character string is: Grüße! (6 characters)\n"
377 " G alpha upper\n"
378 " r alpha lower\n"
379 " ü alpha lower\n"
380 " ß alpha lower\n"
381 " e alpha lower\n"
382 " ! !alpha\n"
383
384 #. type: SS
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 #, no-wrap
388 msgid "Program source"
389 msgstr "مصدر البرنامج"
390
391 #. type: Plain text
392 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
393 #: opensuse-tumbleweed
394 #, no-wrap
395 msgid ""
396 "#include E<lt>locale.hE<gt>\n"
397 "#include E<lt>stdio.hE<gt>\n"
398 "#include E<lt>stdlib.hE<gt>\n"
399 "#include E<lt>string.hE<gt>\n"
400 "#include E<lt>wchar.hE<gt>\n"
401 "#include E<lt>wctype.hE<gt>\n"
402 "\\&\n"
403 "int\n"
404 "main(int argc, char *argv[])\n"
405 "{\n"
406 " size_t mbslen; /* Number of multibyte characters in source */\n"
407 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
408 "\\&\n"
409 " if (argc E<lt> 3) {\n"
410 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
411 " exit(EXIT_FAILURE);\n"
412 " }\n"
413 "\\&\n"
414 " /* Apply the specified locale. */\n"
415 "\\&\n"
416 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
417 " perror(\"setlocale\");\n"
418 " exit(EXIT_FAILURE);\n"
419 " }\n"
420 "\\&\n"
421 " /* Calculate the length required to hold argv[2] converted to\n"
422 " a wide character string. */\n"
423 "\\&\n"
424 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
425 " if (mbslen == (size_t) -1) {\n"
426 " perror(\"mbstowcs\");\n"
427 " exit(EXIT_FAILURE);\n"
428 " }\n"
429 "\\&\n"
430 " /* Describe the source string to the user. */\n"
431 "\\&\n"
432 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
433 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
434 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
435 "\\&\n"
436 " /* Allocate wide character string of the desired size. Add 1\n"
437 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
438 "\\&\n"
439 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
440 " if (wcs == NULL) {\n"
441 " perror(\"calloc\");\n"
442 " exit(EXIT_FAILURE);\n"
443 " }\n"
444 "\\&\n"
445 " /* Convert the multibyte character string in argv[2] to a\n"
446 " wide character string. */\n"
447 "\\&\n"
448 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
449 " perror(\"mbstowcs\");\n"
450 " exit(EXIT_FAILURE);\n"
451 " }\n"
452 "\\&\n"
453 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
454 " wcs, mbslen);\n"
455 "\\&\n"
456 " /* Now do some inspection of the classes of the characters in\n"
457 " the wide character string. */\n"
458 "\\&\n"
459 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
460 " printf(\" %lc \", (wint_t) *wp);\n"
461 "\\&\n"
462 " if (!iswalpha(*wp))\n"
463 " printf(\"!\");\n"
464 " printf(\"alpha \");\n"
465 "\\&\n"
466 " if (iswalpha(*wp)) {\n"
467 " if (iswupper(*wp))\n"
468 " printf(\"upper \");\n"
469 "\\&\n"
470 " if (iswlower(*wp))\n"
471 " printf(\"lower \");\n"
472 " }\n"
473 "\\&\n"
474 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
475 " }\n"
476 "\\&\n"
477 " exit(EXIT_SUCCESS);\n"
478 "}\n"
479 msgstr ""
480 "#include E<lt>locale.hE<gt>\n"
481 "#include E<lt>stdio.hE<gt>\n"
482 "#include E<lt>stdlib.hE<gt>\n"
483 "#include E<lt>string.hE<gt>\n"
484 "#include E<lt>wchar.hE<gt>\n"
485 "#include E<lt>wctype.hE<gt>\n"
486 "\\&\n"
487 "int\n"
488 "main(int argc, char *argv[])\n"
489 "{\n"
490 " size_t mbslen; /* Number of multibyte characters in source */\n"
491 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
492 "\\&\n"
493 " if (argc E<lt> 3) {\n"
494 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
495 " exit(EXIT_FAILURE);\n"
496 " }\n"
497 "\\&\n"
498 " /* Apply the specified locale. */\n"
499 "\\&\n"
500 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
501 " perror(\"setlocale\");\n"
502 " exit(EXIT_FAILURE);\n"
503 " }\n"
504 "\\&\n"
505 " /* Calculate the length required to hold argv[2] converted to\n"
506 " a wide character string. */\n"
507 "\\&\n"
508 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
509 " if (mbslen == (size_t) -1) {\n"
510 " perror(\"mbstowcs\");\n"
511 " exit(EXIT_FAILURE);\n"
512 " }\n"
513 "\\&\n"
514 " /* Describe the source string to the user. */\n"
515 "\\&\n"
516 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
517 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
518 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
519 "\\&\n"
520 " /* Allocate wide character string of the desired size. Add 1\n"
521 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
522 "\\&\n"
523 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
524 " if (wcs == NULL) {\n"
525 " perror(\"calloc\");\n"
526 " exit(EXIT_FAILURE);\n"
527 " }\n"
528 "\\&\n"
529 " /* Convert the multibyte character string in argv[2] to a\n"
530 " wide character string. */\n"
531 "\\&\n"
532 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
533 " perror(\"mbstowcs\");\n"
534 " exit(EXIT_FAILURE);\n"
535 " }\n"
536 "\\&\n"
537 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
538 " wcs, mbslen);\n"
539 "\\&\n"
540 " /* Now do some inspection of the classes of the characters in\n"
541 " the wide character string. */\n"
542 "\\&\n"
543 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
544 " printf(\" %lc \", (wint_t) *wp);\n"
545 "\\&\n"
546 " if (!iswalpha(*wp))\n"
547 " printf(\"!\");\n"
548 " printf(\"alpha \");\n"
549 "\\&\n"
550 " if (iswalpha(*wp)) {\n"
551 " if (iswupper(*wp))\n"
552 " printf(\"upper \");\n"
553 "\\&\n"
554 " if (iswlower(*wp))\n"
555 " printf(\"lower \");\n"
556 " }\n"
557 "\\&\n"
558 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
559 " }\n"
560 "\\&\n"
561 " exit(EXIT_SUCCESS);\n"
562 "}\n"
563
564 #. SRC END
565 #. type: SH
566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
568 #, no-wrap
569 msgid "SEE ALSO"
570 msgstr "انظر أيضًا"
571
572 #. type: Plain text
573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
575 msgid ""
576 "B<mblen>(3), B<mbsrtowcs>(3), B<mbtowc>(3), B<wcstombs>(3), B<wctomb>(3)"
577 msgstr ""
578 "B<mblen>(3), B<mbsrtowcs>(3), B<mbtowc>(3), B<wcstombs>(3), B<wctomb>(3)"
579
580 #. type: TH
581 #: debian-trixie
582 #, no-wrap
583 msgid "2024-06-15"
584 msgstr "15 يونيو 2024"
585
586 #. type: TH
587 #: debian-trixie
588 #, no-wrap
589 msgid "Linux man-pages 6.9.1"
590 msgstr "صفحات دليل لينكس 6.9.1"
591
592 #. type: Plain text
593 #: debian-trixie
594 msgid "Standard C library (I<libc>, I<-lc>)"
595 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
596
597 #. type: Plain text
598 #: debian-trixie fedora-44 fedora-rawhide
599 #, no-wrap
600 msgid ""
601 "B<size_t mbstowcs(wchar_t >I<dest>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n"
602 "B< size_t >I<dsize>B<);>\n"
603 msgstr ""
604 "B<size_t mbstowcs(wchar_t >I<dest>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n"
605 "B< size_t >I<dsize>B<);>\n"
606
607 #. type: Plain text
608 #: debian-trixie fedora-44 fedora-rawhide
609 #, no-wrap
610 msgid ""
611 "#include E<lt>locale.hE<gt>\n"
612 "#include E<lt>stdio.hE<gt>\n"
613 "#include E<lt>stdlib.hE<gt>\n"
614 "#include E<lt>string.hE<gt>\n"
615 "#include E<lt>wchar.hE<gt>\n"
616 "#include E<lt>wctype.hE<gt>\n"
617 "\\&\n"
618 "int\n"
619 "main(int argc, char *argv[])\n"
620 "{\n"
621 " size_t mbslen; /* Number of multibyte characters in source */\n"
622 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
623 "\\&\n"
624 " if (argc E<lt> 3) {\n"
625 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
626 " exit(EXIT_FAILURE);\n"
627 " }\n"
628 "\\&\n"
629 " /* Apply the specified locale. */\n"
630 "\\&\n"
631 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
632 " perror(\"setlocale\");\n"
633 " exit(EXIT_FAILURE);\n"
634 " }\n"
635 "\\&\n"
636 " /* Calculate the length required to hold argv[2] converted to\n"
637 " a wide character string. */\n"
638 "\\&\n"
639 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
640 " if (mbslen == (size_t) -1) {\n"
641 " perror(\"mbstowcs\");\n"
642 " exit(EXIT_FAILURE);\n"
643 " }\n"
644 "\\&\n"
645 " /* Describe the source string to the user. */\n"
646 "\\&\n"
647 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
648 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
649 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
650 "\\&\n"
651 " /* Allocate wide character string of the desired size. Add 1\n"
652 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
653 "\\&\n"
654 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
655 " if (wcs == NULL) {\n"
656 " perror(\"calloc\");\n"
657 " exit(EXIT_FAILURE);\n"
658 " }\n"
659 "\\&\n"
660 " /* Convert the multibyte character string in argv[2] to a\n"
661 " wide character string. */\n"
662 "\\&\n"
663 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
664 " perror(\"mbstowcs\");\n"
665 " exit(EXIT_FAILURE);\n"
666 " }\n"
667 "\\&\n"
668 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
669 " wcs, mbslen);\n"
670 "\\&\n"
671 " /* Now do some inspection of the classes of the characters in\n"
672 " the wide character string. */\n"
673 "\\&\n"
674 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
675 " printf(\" %lc \", (wint_t) *wp);\n"
676 "\\&\n"
677 " if (!iswalpha(*wp))\n"
678 " printf(\"!\");\n"
679 " printf(\"alpha \");\n"
680 "\\&\n"
681 " if (iswalpha(*wp)) {\n"
682 " if (iswupper(*wp))\n"
683 " printf(\"upper \");\n"
684 "\\&\n"
685 " if (iswlower(*wp))\n"
686 " printf(\"lower \");\n"
687 " }\n"
688 "\\&\n"
689 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
690 " }\n"
691 "\\&\n"
692 " exit(EXIT_SUCCESS);\n"
693 "}\n"
694 msgstr ""
695 "#include E<lt>locale.hE<gt>\n"
696 "#include E<lt>stdio.hE<gt>\n"
697 "#include E<lt>stdlib.hE<gt>\n"
698 "#include E<lt>string.hE<gt>\n"
699 "#include E<lt>wchar.hE<gt>\n"
700 "#include E<lt>wctype.hE<gt>\n"
701 "\\&\n"
702 "int\n"
703 "main(int argc, char *argv[])\n"
704 "{\n"
705 " size_t mbslen; /* Number of multibyte characters in source */\n"
706 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
707 "\\&\n"
708 " if (argc E<lt> 3) {\n"
709 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
710 " exit(EXIT_FAILURE);\n"
711 " }\n"
712 "\\&\n"
713 " /* Apply the specified locale. */\n"
714 "\\&\n"
715 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
716 " perror(\"setlocale\");\n"
717 " exit(EXIT_FAILURE);\n"
718 " }\n"
719 "\\&\n"
720 " /* Calculate the length required to hold argv[2] converted to\n"
721 " a wide character string. */\n"
722 "\\&\n"
723 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
724 " if (mbslen == (size_t) -1) {\n"
725 " perror(\"mbstowcs\");\n"
726 " exit(EXIT_FAILURE);\n"
727 " }\n"
728 "\\&\n"
729 " /* Describe the source string to the user. */\n"
730 "\\&\n"
731 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
732 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
733 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
734 "\\&\n"
735 " /* Allocate wide character string of the desired size. Add 1\n"
736 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
737 "\\&\n"
738 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
739 " if (wcs == NULL) {\n"
740 " perror(\"calloc\");\n"
741 " exit(EXIT_FAILURE);\n"
742 " }\n"
743 "\\&\n"
744 " /* Convert the multibyte character string in argv[2] to a\n"
745 " wide character string. */\n"
746 "\\&\n"
747 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
748 " perror(\"mbstowcs\");\n"
749 " exit(EXIT_FAILURE);\n"
750 " }\n"
751 "\\&\n"
752 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
753 " wcs, mbslen);\n"
754 "\\&\n"
755 " /* Now do some inspection of the classes of the characters in\n"
756 " the wide character string. */\n"
757 "\\&\n"
758 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
759 " printf(\" %lc \", (wint_t) *wp);\n"
760 "\\&\n"
761 " if (!iswalpha(*wp))\n"
762 " printf(\"!\");\n"
763 " printf(\"alpha \");\n"
764 "\\&\n"
765 " if (iswalpha(*wp)) {\n"
766 " if (iswupper(*wp))\n"
767 " printf(\"upper \");\n"
768 "\\&\n"
769 " if (iswlower(*wp))\n"
770 " printf(\"lower \");\n"
771 " }\n"
772 "\\&\n"
773 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
774 " }\n"
775 "\\&\n"
776 " exit(EXIT_SUCCESS);\n"
777 "}\n"
778
779 #. type: TH
780 #: fedora-44 fedora-rawhide
781 #, no-wrap
782 msgid "2024-07-23"
783 msgstr "23 يوليو 2024"
784
785 #. type: TH
786 #: fedora-44 fedora-rawhide
787 #, no-wrap
788 msgid "Linux man-pages 6.13"
789 msgstr "صفحات دليل لينكس 6.13"
790
791 #. type: TH
792 #: mageia-cauldron
793 #, no-wrap
794 msgid "Linux man-pages 6.17"
795 msgstr "صفحات دليل لينكس 6.17"
796
797 #. type: TH
798 #: opensuse-leap-16-1 opensuse-tumbleweed
799 #, no-wrap
800 msgid "Linux man-pages (unreleased)"
801 msgstr "صفحات دليل لينكس (لم تصدر بعد)"