Debian Codegraph @

po/pt_BR/man3/mbstowcs.3.po

raw
1 # Brazilian Portuguese translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Felipe M Pereira <[email protected]>, 2001.
5 # André Luiz Fassone <[email protected]>, 2001.
6 # Rafael Fontenelle <[email protected]>, 2020-2021.
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: manpages-l10n\n"
10 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
11 "PO-Revision-Date: 2021-04-11 19:11-0300\n"
12 "Last-Translator: Rafael Fontenelle <[email protected]>\n"
13 "Language-Team: Brazilian Portuguese <debian-l10n-"
14 "[email protected]>\n"
15 "Language: pt_BR\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
20 "X-Generator: Gtranslator 40.0\n"
21
22 #. type: TH
23 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
24 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
25 #, fuzzy, no-wrap
26 #| msgid "B<mbstowcs>()"
27 msgid "mbstowcs"
28 msgstr "B<mbstowcs>()"
29
30 #. type: TH
31 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
32 #: opensuse-tumbleweed
33 #, no-wrap
34 msgid "2026-02-08"
35 msgstr "8 fevereiro 2026"
36
37 #. type: TH
38 #: archlinux debian-unstable
39 #, fuzzy, no-wrap
40 #| msgid "Linux man-pages 6.17"
41 msgid "Linux man-pages 6.18"
42 msgstr "Linux man-pages 6.17"
43
44 #. type: SH
45 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
46 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
47 #, no-wrap
48 msgid "NAME"
49 msgstr "NOME"
50
51 #. type: Plain text
52 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
53 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
54 msgid "mbstowcs - convert a multibyte string to a wide-character string"
55 msgstr ""
56 "mbstowcs - converte uma string multibyte para uma string de caracteres largos"
57
58 #. type: SH
59 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
60 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
61 #, no-wrap
62 msgid "LIBRARY"
63 msgstr "BIBLIOTECA"
64
65 #. type: Plain text
66 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
67 #: opensuse-leap-16-1 opensuse-tumbleweed
68 msgid "Standard C library (I<libc>,\\ I<-lc>)"
69 msgstr "Biblioteca C Padrão (I<libc>,\\ I<-lc>)"
70
71 #. type: SH
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid "SYNOPSIS"
76 msgstr "SINOPSE"
77
78 #. type: Plain text
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
83 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
84
85 #. type: Plain text
86 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
87 #: opensuse-tumbleweed
88 #, fuzzy, no-wrap
89 #| msgid ""
90 #| "B<size_t mbstowcs(wchar_t *restrict >I<dest>B<, const char *restrict >I<src>B<,>\n"
91 #| "B< size_t >I<n>B<);>\n"
92 msgid ""
93 "B<size_t mbstowcs(>size_t dsize;\n"
94 "B< wchar_t >I<dest>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n"
95 "B< size_t >I<dsize>B<);>\n"
96 msgstr ""
97 "B<size_t mbstowcs(wchar_t *restrict >I<dest>B<, const char *restrict >I<src>B<,>\n"
98 "B< size_t >I<n>B<);>\n"
99
100 #. type: SH
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 #, no-wrap
104 msgid "DESCRIPTION"
105 msgstr "DESCRIÇÃO"
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 #, fuzzy
111 #| msgid ""
112 #| "If I<dest> is not NULL, the B<mbstowcs>() function converts the "
113 #| "multibyte string I<src> to a wide-character string starting at I<dest>. "
114 #| "At most I<n> wide characters are written to I<dest>. The sequence of "
115 #| "characters in the string I<src> shall begin in the initial shift state. "
116 #| "The conversion can stop for three reasons:"
117 msgid ""
118 "If I<dest> is not NULL, convert the multibyte string I<src> to a wide-"
119 "character string starting at I<dest>. At most I<dsize> wide characters are "
120 "written to I<dest>. The sequence of characters in the string I<src> shall "
121 "begin in the initial shift state. The conversion can stop for three reasons:"
122 msgstr ""
123 "Se I<dest> não é um ponteiro NULO, a função B<mbstowcs>() converte a string "
124 "multibyte I<orig> para uma string de caracteres largos iniciando em I<dest>. "
125 "No máximo I<n> caracteres largos são gravados em I<dest>. A sequência de "
126 "caracteres na string I<orig> deve começar no estado de transição inicial. A "
127 "conversão começa no estado inicial. A conversão pode parar por três razões:"
128
129 #. type: IP
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 #, no-wrap
133 msgid "\\[bu]"
134 msgstr "\\[bu]"
135
136 #. type: Plain text
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 msgid ""
140 "An invalid multibyte sequence has been encountered. In this case, I<(size_t)"
141 "\\ -1> is returned."
142 msgstr ""
143 "Uma sequência multibyte inválida foi encontrada. Neste caso, I<(size_t)\\ "
144 "-1> é retornado."
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 #, fuzzy
150 #| msgid ""
151 #| "I<n> non-L\\(aq\\e0\\(aq wide characters have been stored at I<dest>. In "
152 #| "this case, the number of wide characters written to I<dest> is returned, "
153 #| "but the shift state at this point is lost."
154 msgid ""
155 "I<dsize> non-L\\[aq]\\[rs]0\\[aq] wide characters have been stored at "
156 "I<dest>. In this case, the number of wide characters written to I<dest> is "
157 "returned, but the shift state at this point is lost."
158 msgstr ""
159 "I<n> caracteres largos diferentes de L\\(aq\\e0\\(aq foram gravados em "
160 "I<dest>. Neste caso o número de caracteres largos gravados em I<dest> é "
161 "retornado, mas o estado de transição neste ponto é perdido."
162
163 #. type: Plain text
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, fuzzy
167 #| msgid ""
168 #| "The multibyte string has been completely converted, including the "
169 #| "terminating null character (\\(aq\\e0\\(aq). In this case, the number of "
170 #| "wide characters written to I<dest>, excluding the terminating null wide "
171 #| "character, is returned."
172 msgid ""
173 "The multibyte string has been completely converted, including the "
174 "terminating null character (\\[aq]\\[rs]0\\[aq]). In this case, the number "
175 "of wide characters written to I<dest>, excluding the terminating null wide "
176 "character, is returned."
177 msgstr ""
178 "A string multibyte foi completamente convertida, incluindo o caractere nulo "
179 "de terminação (\\(aq\\e0\\(aq). Neste caso o número de caracteres largos "
180 "gravados em I<dest>, excluindo o caractere nulo de terminação, é retornado."
181
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 #, fuzzy
186 #| msgid ""
187 #| "If I<dest> is NULL, I<n> is ignored, and the conversion proceeds as "
188 #| "above, except that the converted wide characters are not written out to "
189 #| "memory, and that no length limit exists."
190 msgid ""
191 "If I<dest> is NULL, I<dsize> is ignored, and the conversion proceeds as "
192 "above, except that the converted wide characters are not written out to "
193 "memory, and that no length limit exists."
194 msgstr ""
195 "Se I<dest> é NULO, I<n> é ignorado, e a conversão prossegue como acima, "
196 "exceto que os caracteres largos convertidos não são gravados na memória, e "
197 "que não há limite de tamanho."
198
199 #. type: Plain text
200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
202 #, fuzzy
203 #| msgid ""
204 #| "In order to avoid the case 2 above, the programmer should make sure I<n> "
205 #| "is greater than or equal to I<mbstowcs(NULL,src,0)+1>."
206 msgid ""
207 "In order to avoid the case 2 above, the programmer should make sure I<dsize> "
208 "is greater than or equal to I<mbstowcs(NULL,src,0)+1>."
209 msgstr ""
210 "A fim de evitar o caso 2 acima, o programador deve garantir que I<n> seja "
211 "maior ou igual a I<mbstowcs(NULL,src,0)+1>."
212
213 #. type: Plain text
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, fuzzy
217 #| msgid ""
218 #| "The programmer must ensure that there is room for at least I<n> wide "
219 #| "characters at I<dest>."
220 msgid ""
221 "The programmer must ensure that there is room for at least I<dsize> wide "
222 "characters at I<dest>."
223 msgstr ""
224 "O programador deve assegurar que há espaço para pelo menos I<n> caracteres "
225 "largos em I<dest>."
226
227 #. type: SH
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 #, no-wrap
231 msgid "RETURN VALUE"
232 msgstr "VALOR DE RETORNO"
233
234 #. type: Plain text
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, fuzzy
238 #| msgid ""
239 #| "The B<mbstowcs>() function returns the number of wide characters that "
240 #| "make up the converted part of the wide-character string, not including "
241 #| "the terminating null wide character. If an invalid multibyte sequence "
242 #| "was encountered, I<(size_t)\\ -1> is returned."
243 msgid ""
244 "The number of wide characters that make up the converted part of the wide-"
245 "character string, not including the terminating null wide character. If an "
246 "invalid multibyte sequence was encountered, I<(size_t)\\ -1> is returned."
247 msgstr ""
248 "A função B<mbstowcs>() retorna o número de caracteres largos que perfazem a "
249 "parte convertida da string de caracteres largos, não incluindo o caractere "
250 "largo nulo de terminação. Se uma sequência multibyte inválida foi "
251 "encontrada, I<(size_t)\\ -1> é retornado."
252
253 #. type: SH
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 #, no-wrap
257 msgid "ATTRIBUTES"
258 msgstr "ATRIBUTOS"
259
260 #. type: Plain text
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 msgid ""
264 "For an explanation of the terms used in this section, see B<attributes>(7)."
265 msgstr ""
266 "Para uma explicação dos termos usados nesta seção, consulte B<attributes>(7)."
267
268 #. type: tbl table
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 #, no-wrap
272 msgid "Interface"
273 msgstr "Interface"
274
275 #. type: tbl table
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid "Attribute"
280 msgstr "Atributo"
281
282 #. type: tbl table
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "Value"
287 msgstr "Valor"
288
289 #. type: tbl table
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid ".na\n"
294 msgstr ".na\n"
295
296 #. type: tbl table
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid ".nh\n"
301 msgstr ".nh\n"
302
303 #. type: tbl table
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "B<mbstowcs>()"
308 msgstr "B<mbstowcs>()"
309
310 #. type: tbl table
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid "Thread safety"
315 msgstr "Thread safety"
316
317 #. type: tbl table
318 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
319 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
320 #, no-wrap
321 msgid "MT-Safe"
322 msgstr "MT-Safe"
323
324 #. type: SH
325 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
326 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
327 #, no-wrap
328 msgid "VERSIONS"
329 msgstr "VERSÕES"
330
331 #. type: Plain text
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 msgid ""
335 "The function B<mbsrtowcs>(3) provides a better interface to the same "
336 "functionality."
337 msgstr ""
338 "A função B<mbsrtowcs>() fornece uma interface melhor para a mesma "
339 "funcionalidade."
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 "STANDARDS"
346 msgstr "PADRÕES"
347
348 #. type: Plain text
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 msgid "C11, POSIX.1-2008."
352 msgstr "C11, POSIX.1-2008."
353
354 #. type: SH
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 #, no-wrap
358 msgid "HISTORY"
359 msgstr "HISTÓRICO"
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid "POSIX.1-2001, C99."
365 msgstr "POSIX.1-2001, C99."
366
367 #. type: SH
368 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
369 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
370 #, no-wrap
371 msgid "NOTES"
372 msgstr "NOTAS"
373
374 #. type: Plain text
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 msgid ""
378 "The behavior of B<mbstowcs>() depends on the B<LC_CTYPE> category of the "
379 "current locale."
380 msgstr ""
381 "O comportamento de B<mbstowcs>() depende da categoria B<LC_CTYPE> da "
382 "localidade atual."
383
384 #. type: SH
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 #, no-wrap
388 msgid "EXAMPLES"
389 msgstr "EXEMPLOS"
390
391 #. type: Plain text
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 msgid ""
395 "The program below illustrates the use of B<mbstowcs>(), as well as some of "
396 "the wide character classification functions. An example run is the "
397 "following:"
398 msgstr ""
399 "O programa abaixo ilustra o uso de B<mbstowcs>(), bem como algumas das "
400 "funções de classificação de caracteres largos. Um exemplo de execução é o "
401 "seguinte:"
402
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 #, fuzzy, no-wrap
407 #| msgid ""
408 #| "Wide character string is: Grüße! (6 characters)\n"
409 #| " G alpha upper\n"
410 #| " r alpha lower\n"
411 #| " ü alpha lower\n"
412 #| " ß alpha lower\n"
413 #| " e alpha lower\n"
414 #| " ! !alpha\n"
415 msgid ""
416 "$ ./t_mbstowcs de_DE.UTF-8 Grüße!\n"
417 "Length of source string (excluding terminator):\n"
418 " 8 bytes\n"
419 " 6 multibyte characters\n"
420 "\\&\n"
421 "Wide character string is: Grüße! (6 characters)\n"
422 " G alpha upper\n"
423 " r alpha lower\n"
424 " ü alpha lower\n"
425 " ß alpha lower\n"
426 " e alpha lower\n"
427 " ! !alpha\n"
428 msgstr ""
429 "Wide character string is: Grüße! (6 characters)\n"
430 " G alpha upper\n"
431 " r alpha lower\n"
432 " ü alpha lower\n"
433 " ß alpha lower\n"
434 " e alpha lower\n"
435 " ! !alpha\n"
436
437 #. type: SS
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 #, no-wrap
441 msgid "Program source"
442 msgstr "Fonte do programa"
443
444 #. type: Plain text
445 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
446 #: opensuse-tumbleweed
447 #, no-wrap
448 msgid ""
449 "#include E<lt>locale.hE<gt>\n"
450 "#include E<lt>stdio.hE<gt>\n"
451 "#include E<lt>stdlib.hE<gt>\n"
452 "#include E<lt>string.hE<gt>\n"
453 "#include E<lt>wchar.hE<gt>\n"
454 "#include E<lt>wctype.hE<gt>\n"
455 "\\&\n"
456 "int\n"
457 "main(int argc, char *argv[])\n"
458 "{\n"
459 " size_t mbslen; /* Number of multibyte characters in source */\n"
460 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
461 "\\&\n"
462 " if (argc E<lt> 3) {\n"
463 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
464 " exit(EXIT_FAILURE);\n"
465 " }\n"
466 "\\&\n"
467 " /* Apply the specified locale. */\n"
468 "\\&\n"
469 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
470 " perror(\"setlocale\");\n"
471 " exit(EXIT_FAILURE);\n"
472 " }\n"
473 "\\&\n"
474 " /* Calculate the length required to hold argv[2] converted to\n"
475 " a wide character string. */\n"
476 "\\&\n"
477 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
478 " if (mbslen == (size_t) -1) {\n"
479 " perror(\"mbstowcs\");\n"
480 " exit(EXIT_FAILURE);\n"
481 " }\n"
482 "\\&\n"
483 " /* Describe the source string to the user. */\n"
484 "\\&\n"
485 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
486 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
487 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
488 "\\&\n"
489 " /* Allocate wide character string of the desired size. Add 1\n"
490 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
491 "\\&\n"
492 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
493 " if (wcs == NULL) {\n"
494 " perror(\"calloc\");\n"
495 " exit(EXIT_FAILURE);\n"
496 " }\n"
497 "\\&\n"
498 " /* Convert the multibyte character string in argv[2] to a\n"
499 " wide character string. */\n"
500 "\\&\n"
501 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
502 " perror(\"mbstowcs\");\n"
503 " exit(EXIT_FAILURE);\n"
504 " }\n"
505 "\\&\n"
506 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
507 " wcs, mbslen);\n"
508 "\\&\n"
509 " /* Now do some inspection of the classes of the characters in\n"
510 " the wide character string. */\n"
511 "\\&\n"
512 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
513 " printf(\" %lc \", (wint_t) *wp);\n"
514 "\\&\n"
515 " if (!iswalpha(*wp))\n"
516 " printf(\"!\");\n"
517 " printf(\"alpha \");\n"
518 "\\&\n"
519 " if (iswalpha(*wp)) {\n"
520 " if (iswupper(*wp))\n"
521 " printf(\"upper \");\n"
522 "\\&\n"
523 " if (iswlower(*wp))\n"
524 " printf(\"lower \");\n"
525 " }\n"
526 "\\&\n"
527 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
528 " }\n"
529 "\\&\n"
530 " exit(EXIT_SUCCESS);\n"
531 "}\n"
532 msgstr ""
533
534 #. SRC END
535 #. type: SH
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 #, no-wrap
539 msgid "SEE ALSO"
540 msgstr "VEJA TAMBÉM"
541
542 #. type: Plain text
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 msgid ""
546 "B<mblen>(3), B<mbsrtowcs>(3), B<mbtowc>(3), B<wcstombs>(3), B<wctomb>(3)"
547 msgstr ""
548 "B<mblen>(3), B<mbsrtowcs>(3), B<mbtowc>(3), B<wcstombs>(3), B<wctomb>(3)"
549
550 #. type: TH
551 #: debian-trixie
552 #, no-wrap
553 msgid "2024-06-15"
554 msgstr "15 junho 2024"
555
556 #. type: TH
557 #: debian-trixie
558 #, no-wrap
559 msgid "Linux man-pages 6.9.1"
560 msgstr "Linux man-pages 6.9.1"
561
562 #. type: Plain text
563 #: debian-trixie
564 msgid "Standard C library (I<libc>, I<-lc>)"
565 msgstr "Biblioteca C Padrão (I<libc>, I<-lc>)"
566
567 #. type: Plain text
568 #: debian-trixie fedora-44 fedora-rawhide
569 #, fuzzy, no-wrap
570 #| msgid ""
571 #| "B<size_t mbstowcs(wchar_t *restrict >I<dest>B<, const char *restrict >I<src>B<,>\n"
572 #| "B< size_t >I<n>B<);>\n"
573 msgid ""
574 "B<size_t mbstowcs(wchar_t >I<dest>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n"
575 "B< size_t >I<dsize>B<);>\n"
576 msgstr ""
577 "B<size_t mbstowcs(wchar_t *restrict >I<dest>B<, const char *restrict >I<src>B<,>\n"
578 "B< size_t >I<n>B<);>\n"
579
580 #. type: Plain text
581 #: debian-trixie fedora-44 fedora-rawhide
582 #, no-wrap
583 msgid ""
584 "#include E<lt>locale.hE<gt>\n"
585 "#include E<lt>stdio.hE<gt>\n"
586 "#include E<lt>stdlib.hE<gt>\n"
587 "#include E<lt>string.hE<gt>\n"
588 "#include E<lt>wchar.hE<gt>\n"
589 "#include E<lt>wctype.hE<gt>\n"
590 "\\&\n"
591 "int\n"
592 "main(int argc, char *argv[])\n"
593 "{\n"
594 " size_t mbslen; /* Number of multibyte characters in source */\n"
595 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
596 "\\&\n"
597 " if (argc E<lt> 3) {\n"
598 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
599 " exit(EXIT_FAILURE);\n"
600 " }\n"
601 "\\&\n"
602 " /* Apply the specified locale. */\n"
603 "\\&\n"
604 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
605 " perror(\"setlocale\");\n"
606 " exit(EXIT_FAILURE);\n"
607 " }\n"
608 "\\&\n"
609 " /* Calculate the length required to hold argv[2] converted to\n"
610 " a wide character string. */\n"
611 "\\&\n"
612 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
613 " if (mbslen == (size_t) -1) {\n"
614 " perror(\"mbstowcs\");\n"
615 " exit(EXIT_FAILURE);\n"
616 " }\n"
617 "\\&\n"
618 " /* Describe the source string to the user. */\n"
619 "\\&\n"
620 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
621 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
622 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
623 "\\&\n"
624 " /* Allocate wide character string of the desired size. Add 1\n"
625 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
626 "\\&\n"
627 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
628 " if (wcs == NULL) {\n"
629 " perror(\"calloc\");\n"
630 " exit(EXIT_FAILURE);\n"
631 " }\n"
632 "\\&\n"
633 " /* Convert the multibyte character string in argv[2] to a\n"
634 " wide character string. */\n"
635 "\\&\n"
636 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
637 " perror(\"mbstowcs\");\n"
638 " exit(EXIT_FAILURE);\n"
639 " }\n"
640 "\\&\n"
641 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
642 " wcs, mbslen);\n"
643 "\\&\n"
644 " /* Now do some inspection of the classes of the characters in\n"
645 " the wide character string. */\n"
646 "\\&\n"
647 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
648 " printf(\" %lc \", (wint_t) *wp);\n"
649 "\\&\n"
650 " if (!iswalpha(*wp))\n"
651 " printf(\"!\");\n"
652 " printf(\"alpha \");\n"
653 "\\&\n"
654 " if (iswalpha(*wp)) {\n"
655 " if (iswupper(*wp))\n"
656 " printf(\"upper \");\n"
657 "\\&\n"
658 " if (iswlower(*wp))\n"
659 " printf(\"lower \");\n"
660 " }\n"
661 "\\&\n"
662 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
663 " }\n"
664 "\\&\n"
665 " exit(EXIT_SUCCESS);\n"
666 "}\n"
667 msgstr ""
668
669 #. type: TH
670 #: fedora-44 fedora-rawhide
671 #, no-wrap
672 msgid "2024-07-23"
673 msgstr "23 julho 2024"
674
675 #. type: TH
676 #: fedora-44 fedora-rawhide
677 #, no-wrap
678 msgid "Linux man-pages 6.13"
679 msgstr "Linux man-pages 6.13"
680
681 #. type: TH
682 #: mageia-cauldron
683 #, no-wrap
684 msgid "Linux man-pages 6.17"
685 msgstr "Linux man-pages 6.17"
686
687 #. type: TH
688 #: opensuse-leap-16-1 opensuse-tumbleweed
689 #, no-wrap
690 msgid "Linux man-pages (unreleased)"
691 msgstr "Linux man-pages (não lançado)"