Debian Codegraph @

po/es/man3/mbstowcs.3.po

raw
1 # Spanish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Gerardo Aburruzaga García <[email protected]>, 1998.
5 # Juan Piernas <[email protected]>, 2000.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
10 "PO-Revision-Date: 2000-08-06 19:53+0200\n"
11 "Last-Translator: Juan Piernas <[email protected]>\n"
12 "Language-Team: Spanish <[email protected]>\n"
13 "Language: es\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=2; plural=(n != 1);\n"
18 "X-Generator: Lokalize 20.04.1\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 #, fuzzy, no-wrap
24 #| msgid "B<mbsrtowcs>(3)"
25 msgid "mbstowcs"
26 msgstr "B<mbsrtowcs>(3)"
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 Febrero 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, fuzzy, no-wrap
38 #| msgid "Linux man-pages 6.17"
39 msgid "Linux man-pages 6.18"
40 msgstr "Páginas de Manual de Linux 6.17"
41
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr "NOMBRE"
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 #, fuzzy
53 #| msgid "mbstowcs - convert a multibyte string to a wide character string"
54 msgid "mbstowcs - convert a multibyte string to a wide-character string"
55 msgstr ""
56 "mbstowcs - convierte una cadena multibyte en una cadena de caracteres anchos"
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 Estándar C (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 "SINOPSIS"
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 "B<size_t mbstowcs(wchar_t *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
90 msgid ""
91 "B<size_t mbstowcs(>size_t dsize;\n"
92 "B< wchar_t >I<dest>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n"
93 "B< size_t >I<dsize>B<);>\n"
94 msgstr "B<size_t mbstowcs(wchar_t *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
95
96 #. type: SH
97 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
98 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
99 #, no-wrap
100 msgid "DESCRIPTION"
101 msgstr "DESCRIPCIÓ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 #, fuzzy
107 #| msgid ""
108 #| "If I<dest> is not a NULL pointer, the B<mbstowcs> function converts the "
109 #| "multibyte string I<src> to a wide-character string starting at I<dest>. "
110 #| "At most I<n> wide characters are written to I<dest>. The conversion "
111 #| "starts in the initial state. The conversion can stop for three reasons:"
112 msgid ""
113 "If I<dest> is not NULL, convert the multibyte string I<src> to a wide-"
114 "character string starting at I<dest>. At most I<dsize> wide characters are "
115 "written to I<dest>. The sequence of characters in the string I<src> shall "
116 "begin in the initial shift state. The conversion can stop for three reasons:"
117 msgstr ""
118 "Si I<dest> no es un puntero NULL, la función B<mbstowcs> convierte la cadena "
119 "multibyte I<src> a una cadena de caracteres anchos que comienza en I<dest>. "
120 "Como mucho, se escriben I<n> caracteres anchos en I<dest>. La conversión "
121 "comienza en el estado inicial. La conversión se puede detener por tres "
122 "razones:"
123
124 #. type: IP
125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
127 #, no-wrap
128 msgid "\\[bu]"
129 msgstr "\\[bu]"
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 #, fuzzy
135 #| msgid ""
136 #| "1. An invalid multibyte sequence has been encountered. In this case "
137 #| "(size_t)(-1) is returned."
138 msgid ""
139 "An invalid multibyte sequence has been encountered. In this case, I<(size_t)"
140 "\\ -1> is returned."
141 msgstr ""
142 "1. Se ha encontrado una secuencia multibyte inválida. Es este caso, la "
143 "función devuelve (size_t)(-1)."
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 #, fuzzy
149 #| msgid ""
150 #| "2. I<n> non-L'\\e0' wide characters have been stored at I<dest>. In this "
151 #| "case the number of wide characters written to I<dest> is returned, but "
152 #| "the shift state at this point is lost."
153 msgid ""
154 "I<dsize> non-L\\[aq]\\[rs]0\\[aq] wide characters have been stored at "
155 "I<dest>. In this case, the number of wide characters written to I<dest> is "
156 "returned, but the shift state at this point is lost."
157 msgstr ""
158 "2. Se han almacenado I<n> caracteres anchos distintos de L'\\e0' en I<dest>. "
159 "En este caso, se devuelve el número de caracteres anchos escritos en "
160 "I<dest>, aunque el estado de cambios, en este punto, se pierde."
161
162 #. type: Plain text
163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
165 #, fuzzy
166 #| msgid ""
167 #| "3. The multibyte string has been completely converted, including the "
168 #| "terminating '\\e0'. In this case the number of wide characters written to "
169 #| "I<dest>, excluding the terminating L'\\e0' character, is returned."
170 msgid ""
171 "The multibyte string has been completely converted, including the "
172 "terminating null character (\\[aq]\\[rs]0\\[aq]). In this case, the number "
173 "of wide characters written to I<dest>, excluding the terminating null wide "
174 "character, is returned."
175 msgstr ""
176 "3. Se ha convertido toda la cadena multibyte, incluyendo el '\\e0' que la "
177 "termina. En esta caso, se devuelve el número de caracteres anchos escritos "
178 "en I<dest>, excluyendo el carácter L'\\e0' terminador."
179
180 #. type: Plain text
181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
183 #, fuzzy
184 #| msgid ""
185 #| "If I<dest> is NULL, I<n> is ignored, and the conversion proceeds as "
186 #| "above, except that the converted wide characters are not written out to "
187 #| "memory, and that no length limit exists."
188 msgid ""
189 "If I<dest> is NULL, I<dsize> is ignored, and the conversion proceeds as "
190 "above, except that the converted wide characters are not written out to "
191 "memory, and that no length limit exists."
192 msgstr ""
193 "Si I<dest> es NULL, I<n> se ignora, y la conversión procede como antes, "
194 "salvo que los caracteres anchos obtenidos no se escriben en memoria y que no "
195 "hay límite de longitud."
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 #, fuzzy
201 #| msgid ""
202 #| "In order to avoid the case 2 above, the programmer should make sure I<n> "
203 #| "is greater or equal to I<mbstowcs(NULL,src,0)+1>."
204 msgid ""
205 "In order to avoid the case 2 above, the programmer should make sure I<dsize> "
206 "is greater than or equal to I<mbstowcs(NULL,src,0)+1>."
207 msgstr ""
208 "Para evitar el caso 2 anterior, el programador debería asegurarse de que "
209 "I<n> es mayor o igual que I<mbstowcs(NULL,src,0)+1>."
210
211 #. type: Plain text
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 #, fuzzy
215 #| msgid ""
216 #| "The programmer must ensure that there is room for at least I<len> wide "
217 #| "characters at I<dest>."
218 msgid ""
219 "The programmer must ensure that there is room for at least I<dsize> wide "
220 "characters at I<dest>."
221 msgstr ""
222 "Los programadores deben garantizar que hay espacio suficiente en I<dest> "
223 "para, al menos, I<len> caracteres anchos."
224
225 #. type: SH
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid "RETURN VALUE"
230 msgstr "VALOR DEVUELTO"
231
232 #. type: Plain text
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 #, fuzzy
236 #| msgid ""
237 #| "The B<mbstowcs> function returns the number of wide characters that make "
238 #| "up the converted part of the wide character string, not including the "
239 #| "terminating null wide character. If an invalid multibyte sequence was "
240 #| "encountered, (size_t)(-1) is returned."
241 msgid ""
242 "The number of wide characters that make up the converted part of the wide-"
243 "character string, not including the terminating null wide character. If an "
244 "invalid multibyte sequence was encountered, I<(size_t)\\ -1> is returned."
245 msgstr ""
246 "La función B<mbstowcs> devuelve el número de caracteres anchos que componen "
247 "la parte convertida de la cadena de caracteres anchos, sin incluir el "
248 "carácter ancho nulo terminador. Si se encuentra una secuencia multibyte "
249 "inválida, devuelve (size_t)(-1)."
250
251 #. type: SH
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 #, no-wrap
255 msgid "ATTRIBUTES"
256 msgstr "ATRIBUTOS"
257
258 #. type: Plain text
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 msgid ""
262 "For an explanation of the terms used in this section, see B<attributes>(7)."
263 msgstr ""
264 "Para obtener una explicación de los términos usados en esta sección, véase "
265 "B<attributes>(7)."
266
267 #. type: tbl table
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 #, no-wrap
271 msgid "Interface"
272 msgstr "Interfaz"
273
274 #. type: tbl table
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 #, no-wrap
278 msgid "Attribute"
279 msgstr "Atributo"
280
281 #. type: tbl table
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 #, no-wrap
285 msgid "Value"
286 msgstr "Valor"
287
288 #. type: tbl table
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 #, no-wrap
292 msgid ".na\n"
293 msgstr ".na\n"
294
295 #. type: tbl table
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 #, no-wrap
299 msgid ".nh\n"
300 msgstr ".nh\n"
301
302 #. type: tbl table
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, fuzzy, no-wrap
306 #| msgid "B<mbsrtowcs>(3)"
307 msgid "B<mbstowcs>()"
308 msgstr "B<mbsrtowcs>(3)"
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 "Seguridad del hilo"
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 "Multi-hilo seguro"
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 "VERSIONES"
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 #, fuzzy
335 #| msgid ""
336 #| "The function B<mbsrtowcs> provides a better interface to the same "
337 #| "functionality."
338 msgid ""
339 "The function B<mbsrtowcs>(3) provides a better interface to the same "
340 "functionality."
341 msgstr ""
342 "La función B<mbsrtowcs> proporciona una interfaz mejor con la misma "
343 "funcionalidad."
344
345 #. type: SH
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "STANDARDS"
350 msgstr "ESTÁNDARES"
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid "C11, POSIX.1-2008."
356 msgstr "C11, POSIX.1-2008."
357
358 #. type: SH
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid "HISTORY"
363 msgstr "HISTORIAL"
364
365 #. type: Plain text
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 msgid "POSIX.1-2001, C99."
369 msgstr "POSIX.1-2001, C99."
370
371 #. type: SH
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "NOTES"
376 msgstr "NOTAS"
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 #, fuzzy
382 #| msgid ""
383 #| "The behaviour of B<mbstowcs> depends on the LC_CTYPE category of the "
384 #| "current locale."
385 msgid ""
386 "The behavior of B<mbstowcs>() depends on the B<LC_CTYPE> category of the "
387 "current locale."
388 msgstr ""
389 "El comportamiento de B<mbstowcs> depende de la categoría LC_CTYPE de la "
390 "localización actual."
391
392 #. type: SH
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 #, no-wrap
396 msgid "EXAMPLES"
397 msgstr "EJEMPLOS"
398
399 #. type: Plain text
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 msgid ""
403 "The program below illustrates the use of B<mbstowcs>(), as well as some of "
404 "the wide character classification functions. An example run is the "
405 "following:"
406 msgstr ""
407
408 #. type: Plain text
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, no-wrap
412 msgid ""
413 "$ ./t_mbstowcs de_DE.UTF-8 Grüße!\n"
414 "Length of source string (excluding terminator):\n"
415 " 8 bytes\n"
416 " 6 multibyte characters\n"
417 "\\&\n"
418 "Wide character string is: Grüße! (6 characters)\n"
419 " G alpha upper\n"
420 " r alpha lower\n"
421 " ü alpha lower\n"
422 " ß alpha lower\n"
423 " e alpha lower\n"
424 " ! !alpha\n"
425 msgstr ""
426
427 #. type: SS
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 #, no-wrap
431 msgid "Program source"
432 msgstr "Código fuente"
433
434 #. type: Plain text
435 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
436 #: opensuse-tumbleweed
437 #, no-wrap
438 msgid ""
439 "#include E<lt>locale.hE<gt>\n"
440 "#include E<lt>stdio.hE<gt>\n"
441 "#include E<lt>stdlib.hE<gt>\n"
442 "#include E<lt>string.hE<gt>\n"
443 "#include E<lt>wchar.hE<gt>\n"
444 "#include E<lt>wctype.hE<gt>\n"
445 "\\&\n"
446 "int\n"
447 "main(int argc, char *argv[])\n"
448 "{\n"
449 " size_t mbslen; /* Number of multibyte characters in source */\n"
450 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
451 "\\&\n"
452 " if (argc E<lt> 3) {\n"
453 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
454 " exit(EXIT_FAILURE);\n"
455 " }\n"
456 "\\&\n"
457 " /* Apply the specified locale. */\n"
458 "\\&\n"
459 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
460 " perror(\"setlocale\");\n"
461 " exit(EXIT_FAILURE);\n"
462 " }\n"
463 "\\&\n"
464 " /* Calculate the length required to hold argv[2] converted to\n"
465 " a wide character string. */\n"
466 "\\&\n"
467 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
468 " if (mbslen == (size_t) -1) {\n"
469 " perror(\"mbstowcs\");\n"
470 " exit(EXIT_FAILURE);\n"
471 " }\n"
472 "\\&\n"
473 " /* Describe the source string to the user. */\n"
474 "\\&\n"
475 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
476 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
477 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
478 "\\&\n"
479 " /* Allocate wide character string of the desired size. Add 1\n"
480 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
481 "\\&\n"
482 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
483 " if (wcs == NULL) {\n"
484 " perror(\"calloc\");\n"
485 " exit(EXIT_FAILURE);\n"
486 " }\n"
487 "\\&\n"
488 " /* Convert the multibyte character string in argv[2] to a\n"
489 " wide character string. */\n"
490 "\\&\n"
491 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
492 " perror(\"mbstowcs\");\n"
493 " exit(EXIT_FAILURE);\n"
494 " }\n"
495 "\\&\n"
496 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
497 " wcs, mbslen);\n"
498 "\\&\n"
499 " /* Now do some inspection of the classes of the characters in\n"
500 " the wide character string. */\n"
501 "\\&\n"
502 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
503 " printf(\" %lc \", (wint_t) *wp);\n"
504 "\\&\n"
505 " if (!iswalpha(*wp))\n"
506 " printf(\"!\");\n"
507 " printf(\"alpha \");\n"
508 "\\&\n"
509 " if (iswalpha(*wp)) {\n"
510 " if (iswupper(*wp))\n"
511 " printf(\"upper \");\n"
512 "\\&\n"
513 " if (iswlower(*wp))\n"
514 " printf(\"lower \");\n"
515 " }\n"
516 "\\&\n"
517 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
518 " }\n"
519 "\\&\n"
520 " exit(EXIT_SUCCESS);\n"
521 "}\n"
522 msgstr ""
523
524 #. SRC END
525 #. type: SH
526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
528 #, no-wrap
529 msgid "SEE ALSO"
530 msgstr "VÉASE TAMBIÉN"
531
532 #. type: Plain text
533 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
534 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
535 msgid ""
536 "B<mblen>(3), B<mbsrtowcs>(3), B<mbtowc>(3), B<wcstombs>(3), B<wctomb>(3)"
537 msgstr ""
538
539 #. type: TH
540 #: debian-trixie
541 #, no-wrap
542 msgid "2024-06-15"
543 msgstr "15 Junio 2024"
544
545 #. type: TH
546 #: debian-trixie
547 #, no-wrap
548 msgid "Linux man-pages 6.9.1"
549 msgstr "Páginas de Manual de Linux 6.9.1"
550
551 #. type: Plain text
552 #: debian-trixie
553 msgid "Standard C library (I<libc>, I<-lc>)"
554 msgstr "Biblioteca Estándar C (I<libc>, I<-lc>)"
555
556 #. type: Plain text
557 #: debian-trixie fedora-44 fedora-rawhide
558 #, fuzzy, no-wrap
559 #| msgid "B<size_t mbstowcs(wchar_t *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
560 msgid ""
561 "B<size_t mbstowcs(wchar_t >I<dest>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n"
562 "B< size_t >I<dsize>B<);>\n"
563 msgstr "B<size_t mbstowcs(wchar_t *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
564
565 #. type: Plain text
566 #: debian-trixie fedora-44 fedora-rawhide
567 #, no-wrap
568 msgid ""
569 "#include E<lt>locale.hE<gt>\n"
570 "#include E<lt>stdio.hE<gt>\n"
571 "#include E<lt>stdlib.hE<gt>\n"
572 "#include E<lt>string.hE<gt>\n"
573 "#include E<lt>wchar.hE<gt>\n"
574 "#include E<lt>wctype.hE<gt>\n"
575 "\\&\n"
576 "int\n"
577 "main(int argc, char *argv[])\n"
578 "{\n"
579 " size_t mbslen; /* Number of multibyte characters in source */\n"
580 " wchar_t *wcs; /* Pointer to converted wide character string */\n"
581 "\\&\n"
582 " if (argc E<lt> 3) {\n"
583 " fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
584 " exit(EXIT_FAILURE);\n"
585 " }\n"
586 "\\&\n"
587 " /* Apply the specified locale. */\n"
588 "\\&\n"
589 " if (setlocale(LC_ALL, argv[1]) == NULL) {\n"
590 " perror(\"setlocale\");\n"
591 " exit(EXIT_FAILURE);\n"
592 " }\n"
593 "\\&\n"
594 " /* Calculate the length required to hold argv[2] converted to\n"
595 " a wide character string. */\n"
596 "\\&\n"
597 " mbslen = mbstowcs(NULL, argv[2], 0);\n"
598 " if (mbslen == (size_t) -1) {\n"
599 " perror(\"mbstowcs\");\n"
600 " exit(EXIT_FAILURE);\n"
601 " }\n"
602 "\\&\n"
603 " /* Describe the source string to the user. */\n"
604 "\\&\n"
605 " printf(\"Length of source string (excluding terminator):\\[rs]n\");\n"
606 " printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n"
607 " printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n"
608 "\\&\n"
609 " /* Allocate wide character string of the desired size. Add 1\n"
610 " to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n"
611 "\\&\n"
612 " wcs = calloc(mbslen + 1, sizeof(*wcs));\n"
613 " if (wcs == NULL) {\n"
614 " perror(\"calloc\");\n"
615 " exit(EXIT_FAILURE);\n"
616 " }\n"
617 "\\&\n"
618 " /* Convert the multibyte character string in argv[2] to a\n"
619 " wide character string. */\n"
620 "\\&\n"
621 " if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n"
622 " perror(\"mbstowcs\");\n"
623 " exit(EXIT_FAILURE);\n"
624 " }\n"
625 "\\&\n"
626 " printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n"
627 " wcs, mbslen);\n"
628 "\\&\n"
629 " /* Now do some inspection of the classes of the characters in\n"
630 " the wide character string. */\n"
631 "\\&\n"
632 " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n"
633 " printf(\" %lc \", (wint_t) *wp);\n"
634 "\\&\n"
635 " if (!iswalpha(*wp))\n"
636 " printf(\"!\");\n"
637 " printf(\"alpha \");\n"
638 "\\&\n"
639 " if (iswalpha(*wp)) {\n"
640 " if (iswupper(*wp))\n"
641 " printf(\"upper \");\n"
642 "\\&\n"
643 " if (iswlower(*wp))\n"
644 " printf(\"lower \");\n"
645 " }\n"
646 "\\&\n"
647 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
648 " }\n"
649 "\\&\n"
650 " exit(EXIT_SUCCESS);\n"
651 "}\n"
652 msgstr ""
653
654 #. type: TH
655 #: fedora-44 fedora-rawhide
656 #, no-wrap
657 msgid "2024-07-23"
658 msgstr "23 ​​Julio 2024"
659
660 #. type: TH
661 #: fedora-44 fedora-rawhide
662 #, no-wrap
663 msgid "Linux man-pages 6.13"
664 msgstr "Páginas de Manual de Linux 6.13"
665
666 #. type: TH
667 #: mageia-cauldron
668 #, no-wrap
669 msgid "Linux man-pages 6.17"
670 msgstr "Páginas de Manual de Linux 6.17"
671
672 #. type: TH
673 #: opensuse-leap-16-1 opensuse-tumbleweed
674 #, no-wrap
675 msgid "Linux man-pages (unreleased)"
676 msgstr "Páginas de Manual de Linux (no publicadas)"