1 /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
20 * ISO C Standard, Amendment 1, 7.16.4
21 * General wide-string utilities <wchar.h>
26 #ifndef __need_mbstate_t
28 # include <features.h>
32 /* Get FILE definition. */
35 /* Get va_list definition. */
36 # define __need___va_list
39 /* Get size_t, wchar_t, wint_t and NULL from <stddef.h>. */
40 # define __need_size_t
41 # define __need_wchar_t
47 /* We try to get wint_t from <stddef.h>, but not all GCC versions define it
48 there. So define it ourselves if it remains undefined. */
50 /* Integral type unchanged by default argument promotions that can
51 hold any value corresponding to members of the extended character
52 set, as well as at least one value that does not correspond to any
53 member of the extended character set. */
55 typedef unsigned int wint_t;
59 #ifndef __mbstate_t_defined
60 # define __mbstate_t_defined 1
61 /* Conversion state information. */
64 int count
; /* Number of bytes needed for the current character. */
65 wint_t value
; /* Value so far. */
68 #undef __need_mbstate_t
71 /* The rest of the file is only used if used if __need_mbstate_t is not
76 typedef __mbstate_t
mbstate_t;
79 /* These constants might also be defined in <inttypes.h>. */
80 # define WCHAR_MIN (0)
81 # define WCHAR_MAX (0x7fffffff)
85 # define WEOF (0xffffffffu)
88 /* For XPG4 compliance we have to define the stuff from <wctype.h> here
90 #if defined __USE_XOPEN && !defined __USE_UNIX98
94 /* This incomplete type is defined in <time.h> but needed here because
101 /* Copy SRC to DEST. */
102 extern wchar_t *wcscpy
__P ((wchar_t *__restrict __dest
,
103 __const
wchar_t *__restrict __src
));
104 /* Copy no more than N wide-characters of SRC to DEST. */
105 extern wchar_t *wcsncpy
__P ((wchar_t *__restrict __dest
,
106 __const
wchar_t *__restrict __src
, size_t __n
));
108 /* Append SRC onto DEST. */
109 extern wchar_t *wcscat
__P ((wchar_t *__restrict __dest
,
110 __const
wchar_t *__restrict __src
));
111 /* Append no more than N wide-characters of SRC onto DEST. */
112 extern wchar_t *wcsncat
__P ((wchar_t *__restrict __dest
,
113 __const
wchar_t *__restrict __src
, size_t __n
));
115 /* Compare S1 and S2. */
116 extern int wcscmp
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
));
117 /* Compare N wide-characters of S1 and S2. */
118 extern int wcsncmp
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
,
122 /* Compare S1 and S2, ignoring case. */
123 extern int wcscasecmp
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
));
125 /* Compare no more than N chars of S1 and S2, ignoring case. */
126 extern int wcsncasecmp
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
,
129 /* Similar to the two functions above but take the information from
130 the provided locale and not the global locale. */
131 # include <xlocale.h>
133 extern int __wcscasecmp_l
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
,
136 extern int __wcsncasecmp_l
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
,
137 size_t __n
, __locale_t __loc
));
140 /* Compare S1 and S2, both interpreted as appropriate to the
141 LC_COLLATE category of the current locale. */
142 extern int wcscoll
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
));
143 /* Transform S2 into array pointed to by S1 such that if wcscmp is
144 applied to two transformed strings the result is the as applying
145 `wcscoll' to the original strings. */
146 extern size_t wcsxfrm
__P ((wchar_t *__restrict __s1
,
147 __const
wchar_t *__restrict __s2
, size_t __n
));
150 /* Similar to the two functions above but take the information from
151 the provided locale and not the global locale. */
153 /* Compare S1 and S2, both interpreted as appropriate to the
154 LC_COLLATE category of the given locale. */
155 extern int __wcscoll_l
__P ((__const
wchar_t *__s1
, __const
wchar_t *__s2
,
157 /* Transform S2 into array pointed to by S1 such that if wcscmp is
158 applied to two transformed strings the result is the as applying
159 `wcscoll' to the original strings. */
160 extern size_t __wcsxfrm_l
__P ((wchar_t *__s1
, __const
wchar_t *__s2
,
161 size_t __n
, __locale_t __loc
));
163 /* Duplicate S, returning an identical malloc'd string. */
164 extern wchar_t *wcsdup
__P ((__const
wchar_t *__s
));
167 /* Find the first occurrence of WC in WCS. */
168 extern wchar_t *wcschr
__P ((__const
wchar_t *__wcs
, wchar_t __wc
));
169 /* Find the last occurrence of WC in WCS. */
170 extern wchar_t *wcsrchr
__P ((__const
wchar_t *__wcs
, wchar_t __wc
));
173 /* This funciton is similar to `wcschr'. But it returns a pointer to
174 the closing NUL wide character in case C is not found in S. */
175 extern wchar_t *wcschrnul
__P ((__const
wchar_t *__s
, wchar_t __wc
));
178 /* Return the length of the initial segmet of WCS which
179 consists entirely of wide characters not in REJECT. */
180 extern size_t wcscspn
__P ((__const
wchar_t *__wcs
,
181 __const
wchar_t *__reject
));
182 /* Return the length of the initial segmet of WCS which
183 consists entirely of wide characters in ACCEPT. */
184 extern size_t wcsspn
__P ((__const
wchar_t *__wcs
, __const
wchar_t *__accept
));
185 /* Find the first occurrence in WCS of any character in ACCEPT. */
186 extern wchar_t *wcspbrk
__P ((__const
wchar_t *__wcs
,
187 __const
wchar_t *__accept
));
188 /* Find the first occurrence of NEEDLE in HAYSTACK. */
189 extern wchar_t *wcsstr
__P ((__const
wchar_t *__haystack
,
190 __const
wchar_t *__needle
));
192 #if defined __USE_XOPEN && !defined __USE_UNIX98
193 /* Another name for `wcsstr' from XPG4. */
194 extern wchar_t *wcswcs
__P ((__const
wchar_t *__haystack
,
195 __const
wchar_t *__needle
));
198 /* Divide WCS into tokens separated by characters in DELIM. */
199 extern wchar_t *wcstok
__P ((wchar_t *__restrict __s
,
200 __const
wchar_t *__restrict __delim
,
201 wchar_t **__restrict __ptr
));
203 /* Return the number of wide characters in S. */
204 extern size_t __wcslen
__P ((__const
wchar_t *__s
));
205 extern size_t wcslen
__P ((__const
wchar_t *__s
));
208 /* Return the number of wide characters in S, but at most MAXLEN. */
209 extern size_t wcsnlen
__P ((__const
wchar_t *__s
, size_t __maxlen
));
213 /* Search N wide characters of S for C. */
214 extern wchar_t *wmemchr
__P ((__const
wchar_t *__s
, wchar_t __c
, size_t __n
));
216 /* Compare N wide characters of S1 and S2. */
217 extern int wmemcmp
__P ((__const
wchar_t *__restrict __s1
,
218 __const
wchar_t *__restrict __s2
, size_t __n
));
220 /* Copy N wide characters of SRC to DEST. */
221 extern wchar_t *wmemcpy
__P ((wchar_t *__restrict __s1
,
222 __const
wchar_t *__restrict __s2
, size_t __n
));
224 /* Copy N wide characters of SRC to DEST, guaranteeing
225 correct behavior for overlapping strings. */
226 extern wchar_t *wmemmove
__P ((wchar_t *__s1
, __const
wchar_t *__s2
,
229 /* Set N wide characters of S to C. */
230 extern wchar_t *wmemset
__P ((wchar_t *__s
, wchar_t __c
, size_t __n
));
233 /* Copy N wide characters of SRC to DEST and return pointer to following
235 extern wchar_t *wmempcpy
__P ((wchar_t *__restrict __s1
,
236 __const
wchar_t *__restrict __s2
, size_t __n
));
240 /* Determine whether C constitutes a valid (one-byte) multibyte
242 extern wint_t btowc
__P ((int __c
));
244 /* Determine whether C corresponds to a member of the extended
245 character set whose multibyte representation is a single byte. */
246 extern int wctob
__P ((wint_t __c
));
248 /* Determine whether PS points to an object representing the initial
250 extern int mbsinit
__P ((__const
mbstate_t *__ps
));
252 /* Write wide character representation of multibyte character pointed
254 extern size_t mbrtowc
__P ((wchar_t *__restrict __pwc
,
255 __const
char *__restrict __s
, size_t __n
,
258 /* Write multibyte representation of wide character WC to S. */
259 extern size_t wcrtomb
__P ((char *__restrict __s
, wchar_t __wc
,
260 mbstate_t *__restrict __ps
));
262 /* Return number of bytes in multibyte character pointed to by S. */
263 extern size_t __mbrlen
__P ((__const
char *__restrict __s
, size_t __n
,
264 mbstate_t *__restrict __ps
));
265 extern size_t mbrlen
__P ((__const
char *__restrict __s
, size_t __n
,
266 mbstate_t *__restrict __ps
));
268 #if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
269 && defined __USE_EXTERN_INLINES
270 /* Define inline function as optimization. */
271 extern __inline
size_t mbrlen (__const
char *__restrict __s
, size_t __n
,
272 mbstate_t *__restrict __ps
) __THROW
273 { return (__ps
!= NULL
274 ? mbrtowc (NULL
, __s
, __n
, __ps
) : __mbrlen (__s
, __n
, NULL
)); }
277 /* Write wide character representation of multibyte character string
279 extern size_t mbsrtowcs
__P ((wchar_t *__restrict __dst
,
280 __const
char **__restrict __src
,
281 size_t __len
, mbstate_t *__restrict __ps
));
283 /* Write multibyte character representation of wide character string
285 extern size_t wcsrtombs
__P ((char *__restrict __dst
,
286 __const
wchar_t **__restrict __src
,
287 size_t __len
, mbstate_t *__restrict __ps
));
291 /* Write wide character representation of at most NMC bytes of the
292 multibyte character string SRC to DST. */
293 extern size_t mbsnrtowcs
__P ((wchar_t *__restrict __dst
,
294 __const
char **__restrict __src
, size_t __nmc
,
295 size_t __len
, mbstate_t *__restrict __ps
));
297 /* Write multibyte character representation of at most NWC characters
298 from the wide character string SRC to DST. */
299 extern size_t wcsnrtombs
__P ((char *__restrict __dst
,
300 __const
wchar_t **__restrict __src
,
301 size_t __nwc
, size_t __len
,
302 mbstate_t *__restrict __ps
));
306 /* The following functions are extensions found in X/Open CAE. */
308 /* Determine number of column positions required for C. */
309 extern int wcwidth
__P ((wint_t __c
));
311 /* Determine number of column positions required for first N wide
312 characters (or fewer if S ends before this) in S. */
313 extern int wcswidth
__P ((__const
wchar_t *__s
, size_t __n
));
314 #endif /* Use X/Open. */
317 /* Convert initial portion of the wide string NPTR to `double'
319 extern double wcstod
__P ((__const
wchar_t *__restrict __nptr
,
320 wchar_t **__restrict __endptr
));
323 /* Likewise for `float' and `long double' sizes of floating-point numbers. */
324 extern float wcstof
__P ((__const
wchar_t *__restrict __nptr
,
325 wchar_t **__restrict __endptr
));
326 extern __long_double_t wcstold
__P ((__const
wchar_t *__restrict __nptr
,
327 wchar_t **__restrict __endptr
));
331 /* Convert initial portion of wide string NPTR to `long int'
333 extern long int wcstol
__P ((__const
wchar_t *__restrict __nptr
,
334 wchar_t **__restrict __endptr
, int __base
));
336 /* Convert initial portion of wide string NPTR to `unsigned long int'
338 extern unsigned long int wcstoul
__P ((__const
wchar_t *__restrict __nptr
,
339 wchar_t **__restrict __endptr
,
342 #if defined __GNUC__ && defined __USE_GNU
343 /* Convert initial portion of wide string NPTR to `long int'
346 extern long long int wcstoq
__P ((__const
wchar_t *__restrict __nptr
,
347 wchar_t **__restrict __endptr
, int __base
));
349 /* Convert initial portion of wide string NPTR to `unsigned long long int'
352 extern unsigned long long int wcstouq
__P ((__const
wchar_t *__restrict __nptr
,
353 wchar_t **__restrict __endptr
,
355 #endif /* GCC and use GNU. */
357 #if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_GNU)
358 /* Convert initial portion of wide string NPTR to `long int'
361 extern long long int wcstoll
__P ((__const
wchar_t *__restrict __nptr
,
362 wchar_t **__restrict __endptr
, int __base
));
364 /* Convert initial portion of wide string NPTR to `unsigned long long int'
367 extern unsigned long long int wcstoull
__P ((__const
wchar_t *
369 wchar_t **__restrict __endptr
,
371 #endif /* ISO C 9X or GCC and GNU. */
374 /* The concept of one static locale per category is not very well
375 thought out. Many applications will need to process its data using
376 information from several different locales. Another application is
377 the implementation of the internationalization handling in the
378 upcoming ISO C++ standard library. To support this another set of
379 the functions using locale data exist which have an additional
382 Attention: all these functions are *not* standardized in any form.
383 This is a proof-of-concept implementation. */
385 /* Structure for reentrant locale using functions. This is an
386 (almost) opaque type for the user level programs. */
387 # include <xlocale.h>
389 /* Special versions of the functions above which take the locale to
390 use as an additional parameter. */
391 extern long int __wcstol_l
__P ((__const
wchar_t *__restrict __nptr
,
392 wchar_t **__restrict __endptr
, int __base
,
395 extern unsigned long int __wcstoul_l
__P ((__const
wchar_t *__restrict __nptr
,
396 wchar_t **__restrict __endptr
,
397 int __base
, __locale_t __loc
));
400 extern long long int __wcstoll_l
__P ((__const
wchar_t *__restrict __nptr
,
401 wchar_t **__restrict __endptr
,
402 int __base
, __locale_t __loc
));
405 extern unsigned long long int __wcstoull_l
__P ((__const
wchar_t *__restrict
407 wchar_t **__restrict __endptr
,
411 extern double __wcstod_l
__P ((__const
wchar_t *__restrict __nptr
,
412 wchar_t **__restrict __endptr
,
415 extern float __wcstof_l
__P ((__const
wchar_t *__restrict __nptr
,
416 wchar_t **__restrict __endptr
,
419 extern __long_double_t __wcstold_l
__P ((__const
wchar_t *__restrict __nptr
,
420 wchar_t **__restrict __endptr
,
425 /* The internal entry points for `wcstoX' take an extra flag argument
426 saying whether or not to parse locale-dependent number grouping. */
427 extern double __wcstod_internal
__P ((__const
wchar_t *__restrict __nptr
,
428 wchar_t **__restrict __endptr
,
430 extern float __wcstof_internal
__P ((__const
wchar_t *__restrict __nptr
,
431 wchar_t **__restrict __endptr
,
433 extern __long_double_t __wcstold_internal
__P ((__const
wchar_t *
435 wchar_t **__restrict __endptr
,
438 #ifndef __wcstol_internal_defined
439 extern long int __wcstol_internal
__P ((__const
wchar_t *__restrict __nptr
,
440 wchar_t **__restrict __endptr
,
441 int __base
, int __group
));
442 # define __wcstol_internal_defined 1
444 #ifndef __wcstoul_internal_defined
445 extern unsigned long int __wcstoul_internal
__P ((__const
wchar_t *
449 int __base
, int __group
));
450 # define __wcstoul_internal_defined 1
452 #ifndef __wcstoll_internal_defined
454 extern long long int __wcstoll_internal
__P ((__const
wchar_t *
456 wchar_t **__restrict __endptr
,
457 int __base
, int __group
));
458 # define __wcstoll_internal_defined 1
460 #ifndef __wcstoull_internal_defined
462 extern unsigned long long int __wcstoull_internal
__P ((__const
wchar_t *
468 # define __wcstoull_internal_defined 1
472 #if defined __OPTIMIZE__ && __GNUC__ >= 2
473 /* Define inline functions which call the internal entry points. */
475 extern __inline
double wcstod (__const
wchar_t *__restrict __nptr
,
476 wchar_t **__restrict __endptr
) __THROW
477 { return __wcstod_internal (__nptr
, __endptr
, 0); }
478 extern __inline
long int wcstol (__const
wchar_t *__restrict __nptr
,
479 wchar_t **__restrict __endptr
,
481 { return __wcstol_internal (__nptr
, __endptr
, __base
, 0); }
482 extern __inline
unsigned long int wcstoul (__const
wchar_t *__restrict __nptr
,
483 wchar_t **__restrict __endptr
,
485 { return __wcstoul_internal (__nptr
, __endptr
, __base
, 0); }
488 extern __inline
float wcstof (__const
wchar_t *__restrict __nptr
,
489 wchar_t **__restrict __endptr
) __THROW
490 { return __wcstof_internal (__nptr
, __endptr
, 0); }
491 extern __inline __long_double_t
wcstold (__const
wchar_t *__restrict __nptr
,
492 wchar_t **__restrict __endptr
) __THROW
493 { return __wcstold_internal (__nptr
, __endptr
, 0); }
497 extern __inline
long long int wcstoq (__const
wchar_t *__restrict __nptr
,
498 wchar_t **__restrict __endptr
,
500 { return __wcstoll_internal (__nptr
, __endptr
, __base
, 0); }
502 extern __inline
unsigned long long int wcstouq (__const
wchar_t *
504 wchar_t **__restrict __endptr
,
506 { return __wcstoull_internal (__nptr
, __endptr
, __base
, 0); }
507 # endif /* Use GNU. */
508 #endif /* Optimizing GCC >=2. */
512 /* Copy SRC to DEST, returning the address of the terminating L'\0' in
514 extern wchar_t *wcpcpy
__P ((wchar_t *__dest
, __const
wchar_t *__src
));
516 /* Copy no more than N characters of SRC to DEST, returning the address of
517 the last character written into DEST. */
518 extern wchar_t *wcpncpy
__P ((wchar_t *__dest
, __const
wchar_t *__src
,
523 /* Wide character I/O functions. */
526 /* Select orientation for stream. */
527 extern int fwide
__P ((FILE *__fp
, int __mode
));
530 /* Write formatted output to STREAM. */
531 extern int fwprintf
__P ((FILE *__restrict __stream
,
532 __const
wchar_t *__restrict __format
, ...))
533 /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
534 /* Write formatted output to stdout. */
535 extern int wprintf
__P ((__const
wchar_t *__restrict __format
, ...))
536 /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
537 /* Write formatted output of at most N characters to S. */
538 extern int swprintf
__P ((wchar_t *__restrict __s
, size_t __n
,
539 __const
wchar_t *__restrict __format
, ...))
540 /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
542 /* Write formatted output to S from argument list ARG. */
543 extern int vfwprintf
__P ((FILE *__restrict __s
,
544 __const
wchar_t *__restrict __format
,
545 __gnuc_va_list __arg
))
546 /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
547 /* Write formatted output to stdout from argument list ARG. */
548 extern int vwprintf
__P ((__const
wchar_t *__restrict __format
,
549 __gnuc_va_list __arg
))
550 /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
551 /* Write formatted output of at most N character to S from argument
553 extern int vswprintf
__P ((wchar_t *__restrict __s
, size_t __n
,
554 __const
wchar_t *__restrict __format
,
555 __gnuc_va_list __arg
))
556 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
559 /* Read formatted input from STREAM. */
560 extern int fwscanf
__P ((FILE *__restrict __stream
,
561 __const
wchar_t *__restrict __format
, ...))
562 /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
563 /* Read formatted input from stdin. */
564 extern int wscanf
__P ((__const
wchar_t *__restrict __format
, ...))
565 /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
566 /* Read formatted input from S. */
567 extern int swscanf
__P ((__const
wchar_t *__restrict __s
,
568 __const
wchar_t *__restrict __format
, ...))
569 /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
571 /* Read formatted input from S into argument list ARG. */
572 extern int vfwscanf
__P ((FILE *__restrict __s
,
573 __const
wchar_t *__restrict __format
,
574 __gnuc_va_list __arg
))
575 /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
576 /* Read formatted input from stdin into argument list ARG. */
577 extern int vwscanf
__P ((__const
wchar_t *__restrict __format
,
578 __gnuc_va_list __arg
))
579 /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
580 /* Read formatted input from S into argument list ARG. */
581 extern int vswscanf
__P ((__const
wchar_t *__restrict __s
,
582 __const
wchar_t *__restrict __format
,
583 __gnuc_va_list __arg
))
584 /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
587 /* Read a character from STREAM. */
588 extern wint_t fgetwc
__P ((FILE *__stream
));
589 extern wint_t getwc
__P ((FILE *__stream
));
591 /* Read a character from stdin. */
592 extern wint_t getwchar
__P ((void));
595 /* These are defined to be equivalent to the `char' functions defined
597 extern wint_t getwc_unlocked
__P ((FILE *__stream
));
598 extern wint_t getwchar_unlocked
__P ((void));
600 /* This is the wide character version of a GNU extension. */
601 extern wint_t fgetwc_unlocked
__P ((FILE *__stream
));
602 #endif /* Use POSIX or MISC. */
605 /* Write a character to STREAM. */
606 extern wint_t fputwc
__P ((wchar_t __wc
, FILE *__stream
));
607 extern wint_t putwc
__P ((wchar_t __wc
, FILE *__stream
));
609 /* Write a character to stdout. */
610 extern wint_t putwchar
__P ((wchar_t __wc
));
613 /* Faster version when locking is not necessary. */
614 extern wint_t fputwc_unlocked
__P ((wchar_t __wc
, FILE *__stream
));
616 /* These are defined to be equivalent to the `char' functions defined
618 extern wint_t putwc_unlocked
__P ((wchar_t __wc
, FILE *__stream
));
619 extern wint_t putwchar_unlocked
__P ((wchar_t __wc
));
623 /* Get a newline-terminated wide character string of finite length
625 extern wchar_t *fgetws
__P ((wchar_t *__restrict __ws
, int __n
,
626 FILE *__restrict __stream
));
629 /* This function does the same as `fgetws' but does not lock the stream. */
630 extern wchar_t *fgetws_unlocked
__P ((wchar_t *__restrict __ws
, int __n
,
631 FILE *__restrict __stream
));
635 /* Write a string to STREAM. */
636 extern int fputws
__P ((__const
wchar_t *__restrict __ws
,
637 FILE *__restrict __stream
));
640 /* This function does the same as `fputws' but does not lock the stream. */
641 extern int fputws_unlocked
__P ((__const
wchar_t *__restrict __ws
,
642 FILE *__restrict __stream
));
646 /* Push a character back onto the input buffer of STREAM. */
647 extern wint_t ungetwc
__P ((wint_t __wc
, FILE *__stream
));
650 /* Format TP into S according to FORMAT.
651 Write no more than MAXSIZE wide characters and return the number
652 of wide characters written, or 0 if it would exceed MAXSIZE. */
653 extern size_t wcsftime
__P ((wchar_t *__restrict __s
, size_t __maxsize
,
654 __const
wchar_t *__restrict __format
,
655 __const
struct tm
*__restrict __tp
));
656 #endif /* Use ISO C9x. */
658 /* The X/Open standard demands that most of the functions defined in
659 the <wctype.h> header must also appear here. This is probably
660 because some X/Open members wrote their implementation before the
661 ISO C standard was published and introduced the better solution.
662 We have to provide these definitions for compliance reasons but we
663 do this nonsense only if really necessary. */
664 #if defined __USE_UNIX98 && !defined __USE_GNU
665 # define __need_iswxxx
671 #endif /* _WCHAR_H defined */