wchar.h

来自「此工具是arm-linux-GCC交叉编译工具(cross-3.4.4)」· C头文件 代码 · 共 825 行 · 第 1/2 页

H
825
字号
#if defined __GNUC__ && defined __USE_GNU/* Convert initial portion of wide string NPTR to `long int'   representation.  */__extension__extern long long int wcstoq (__const wchar_t *__restrict __nptr,			     wchar_t **__restrict __endptr, int __base)     __THROW;/* Convert initial portion of wide string NPTR to `unsigned long long int'   representation.  */__extension__extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,				       wchar_t **__restrict __endptr,				       int __base) __THROW;#endif /* GCC and use GNU.  */#ifdef __USE_GNU/* The concept of one static locale per category is not very well   thought out.  Many applications will need to process its data using   information from several different locales.  Another application is   the implementation of the internationalization handling in the   upcoming ISO C++ standard library.  To support this another set of   the functions using locale data exist which have an additional   argument.   Attention: all these functions are *not* standardized in any form.   This is a proof-of-concept implementation.  *//* Structure for reentrant locale using functions.  This is an   (almost) opaque type for the user level programs.  */# include <xlocale.h>/* Special versions of the functions above which take the locale to   use as an additional parameter.  */extern long int wcstol_l (__const wchar_t *__restrict __nptr,			  wchar_t **__restrict __endptr, int __base,			  __locale_t __loc) __THROW;extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr,				    wchar_t **__restrict __endptr,				    int __base, __locale_t __loc) __THROW;__extension__extern long long int wcstoll_l (__const wchar_t *__restrict __nptr,				wchar_t **__restrict __endptr,				int __base, __locale_t __loc) __THROW;__extension__extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr,					  wchar_t **__restrict __endptr,					  int __base, __locale_t __loc)     __THROW;extern double wcstod_l (__const wchar_t *__restrict __nptr,			wchar_t **__restrict __endptr, __locale_t __loc)     __THROW;extern float wcstof_l (__const wchar_t *__restrict __nptr,		       wchar_t **__restrict __endptr, __locale_t __loc)     __THROW;extern long double wcstold_l (__const wchar_t *__restrict __nptr,			      wchar_t **__restrict __endptr,			      __locale_t __loc) __THROW;#endif /* GNU *//* The internal entry points for `wcstoX' take an extra flag argument   saying whether or not to parse locale-dependent number grouping.  */extern double __wcstod_internal (__const wchar_t *__restrict __nptr,				 wchar_t **__restrict __endptr, int __group)     __THROW;extern float __wcstof_internal (__const wchar_t *__restrict __nptr,				wchar_t **__restrict __endptr, int __group)     __THROW;extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,				       wchar_t **__restrict __endptr,				       int __group) __THROW;#ifndef __wcstol_internal_definedextern long int __wcstol_internal (__const wchar_t *__restrict __nptr,				   wchar_t **__restrict __endptr,				   int __base, int __group) __THROW;# define __wcstol_internal_defined	1#endif#ifndef __wcstoul_internal_definedextern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,					     wchar_t **__restrict __endptr,					     int __base, int __group) __THROW;# define __wcstoul_internal_defined	1#endif#ifndef __wcstoll_internal_defined__extension__extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,					 wchar_t **__restrict __endptr,					 int __base, int __group) __THROW;# define __wcstoll_internal_defined	1#endif#ifndef __wcstoull_internal_defined__extension__extern unsigned long long int __wcstoull_internal (__const wchar_t *						   __restrict __nptr,						   wchar_t **						   __restrict __endptr,						   int __base,						   int __group) __THROW;# define __wcstoull_internal_defined	1#endif#if defined __OPTIMIZE__ && __GNUC__ >= 2/* Define inline functions which call the internal entry points.  */__BEGIN_NAMESPACE_C99extern __inline double__NTH (wcstod (__const wchar_t *__restrict __nptr,	       wchar_t **__restrict __endptr)){ return __wcstod_internal (__nptr, __endptr, 0); }extern __inline long int__NTH (wcstol (__const wchar_t *__restrict __nptr,	       wchar_t **__restrict __endptr, int __base)){ return __wcstol_internal (__nptr, __endptr, __base, 0); }extern __inline unsigned long int__NTH (wcstoul (__const wchar_t *__restrict __nptr,		wchar_t **__restrict __endptr, int __base)){ return __wcstoul_internal (__nptr, __endptr, __base, 0); }__END_NAMESPACE_C99# ifdef __USE_GNUextern __inline float__NTH (wcstof (__const wchar_t *__restrict __nptr,	       wchar_t **__restrict __endptr)){ return __wcstof_internal (__nptr, __endptr, 0); }extern __inline long double__NTH (wcstold (__const wchar_t *__restrict __nptr,		wchar_t **__restrict __endptr)){ return __wcstold_internal (__nptr, __endptr, 0); }__extension__extern __inline long long int__NTH (wcstoq (__const wchar_t *__restrict __nptr,	       wchar_t **__restrict __endptr, int __base)){ return __wcstoll_internal (__nptr, __endptr, __base, 0); }__extension__extern __inline unsigned long long int__NTH (wcstouq (__const wchar_t *__restrict __nptr,		wchar_t **__restrict __endptr, int __base)){ return __wcstoull_internal (__nptr, __endptr, __base, 0); }# endif /* Use GNU.  */#endif /* Optimizing GCC >=2.  */#ifdef	__USE_GNU/* Copy SRC to DEST, returning the address of the terminating L'\0' in   DEST.  */extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;/* Copy no more than N characters of SRC to DEST, returning the address of   the last character written into DEST.  */extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)     __THROW;#endif	/* use GNU *//* Wide character I/O functions.  */#if defined __USE_ISOC99 || defined __USE_UNIX98__BEGIN_NAMESPACE_C99/* Select orientation for stream.  */extern int fwide (__FILE *__fp, int __mode) __THROW;/* Write formatted output to STREAM.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int fwprintf (__FILE *__restrict __stream,		     __const wchar_t *__restrict __format, ...)     /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;/* Write formatted output to stdout.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int wprintf (__const wchar_t *__restrict __format, ...)     /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;/* Write formatted output of at most N characters to S.  */extern int swprintf (wchar_t *__restrict __s, size_t __n,		     __const wchar_t *__restrict __format, ...)     __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;/* Write formatted output to S from argument list ARG.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int vfwprintf (__FILE *__restrict __s,		      __const wchar_t *__restrict __format,		      __gnuc_va_list __arg)     /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;/* Write formatted output to stdout from argument list ARG.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int vwprintf (__const wchar_t *__restrict __format,		     __gnuc_va_list __arg)     /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;/* Write formatted output of at most N character to S from argument   list ARG.  */extern int vswprintf (wchar_t *__restrict __s, size_t __n,		      __const wchar_t *__restrict __format,		      __gnuc_va_list __arg)     __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;/* Read formatted input from STREAM.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int fwscanf (__FILE *__restrict __stream,		    __const wchar_t *__restrict __format, ...)     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;/* Read formatted input from stdin.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int wscanf (__const wchar_t *__restrict __format, ...)     /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;/* Read formatted input from S.  */extern int swscanf (__const wchar_t *__restrict __s,		    __const wchar_t *__restrict __format, ...)     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;__END_NAMESPACE_C99#endif /* Use ISO C99 and Unix98. */#ifdef __USE_ISOC99__BEGIN_NAMESPACE_C99/* Read formatted input from S into argument list ARG.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int vfwscanf (__FILE *__restrict __s,		     __const wchar_t *__restrict __format,		     __gnuc_va_list __arg)     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;/* Read formatted input from stdin into argument list ARG.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern int vwscanf (__const wchar_t *__restrict __format,		    __gnuc_va_list __arg)     /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;/* Read formatted input from S into argument list ARG.  */extern int vswscanf (__const wchar_t *__restrict __s,		     __const wchar_t *__restrict __format,		     __gnuc_va_list __arg)     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;__END_NAMESPACE_C99#endif /* Use ISO C99. */__BEGIN_NAMESPACE_C99/* Read a character from STREAM.   These functions are possible cancellation points and therefore not   marked with __THROW.  */extern wint_t fgetwc (__FILE *__stream);extern wint_t getwc (__FILE *__stream);/* Read a character from stdin.   This function is a possible cancellation point and therefore not   marked with __THROW.  */extern wint_t getwchar (void);/* Write a character to STREAM.   These functions are possible cancellation points and therefore not   marked with __THROW.  */extern wint_t fputwc (wchar_t __wc, __FILE *__stream);extern wint_t putwc (wchar_t __wc, __FILE *__stream);/* Write a character to stdout.   This function is a possible cancellation points and therefore not   marked with __THROW.  */extern wint_t putwchar (wchar_t __wc);/* Get a newline-terminated wide character string of finite length   from STREAM.   This function is a possible cancellation points and therefore not   marked with __THROW.  */extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,			__FILE *__restrict __stream);/* Write a string to STREAM.   This function is a possible cancellation points and therefore not   marked with __THROW.  */extern int fputws (__const wchar_t *__restrict __ws,		   __FILE *__restrict __stream);/* Push a character back onto the input buffer of STREAM.   This function is a possible cancellation points and therefore not   marked with __THROW.  */extern wint_t ungetwc (wint_t __wc, __FILE *__stream);__END_NAMESPACE_C99#ifdef __USE_GNU/* These are defined to be equivalent to the `char' functions defined   in POSIX.1:1996.   These functions are not part of POSIX and therefore no official   cancellation point.  But due to similarity with an POSIX interface   or due to the implementation they are cancellation points and   therefore not marked with __THROW.  */extern wint_t getwc_unlocked (__FILE *__stream);extern wint_t getwchar_unlocked (void);/* This is the wide character version of a GNU extension.   This function is not part of POSIX and therefore no official   cancellation point.  But due to similarity with an POSIX interface   or due to the implementation it is a cancellation point and   therefore not marked with __THROW.  */extern wint_t fgetwc_unlocked (__FILE *__stream);/* Faster version when locking is not necessary.   This function is not part of POSIX and therefore no official   cancellation point.  But due to similarity with an POSIX interface   or due to the implementation it is a cancellation point and   therefore not marked with __THROW.  */extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);/* These are defined to be equivalent to the `char' functions defined   in POSIX.1:1996.   These functions are not part of POSIX and therefore no official   cancellation point.  But due to similarity with an POSIX interface   or due to the implementation they are cancellation points and   therefore not marked with __THROW.  */extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);extern wint_t putwchar_unlocked (wchar_t __wc);/* This function does the same as `fgetws' but does not lock the stream.   This function is not part of POSIX and therefore no official   cancellation point.  But due to similarity with an POSIX interface   or due to the implementation it is a cancellation point and   therefore not marked with __THROW.  */extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,				 __FILE *__restrict __stream);/* This function does the same as `fputws' but does not lock the stream.   This function is not part of POSIX and therefore no official   cancellation point.  But due to similarity with an POSIX interface   or due to the implementation it is a cancellation point and   therefore not marked with __THROW.  */extern int fputws_unlocked (__const wchar_t *__restrict __ws,			    __FILE *__restrict __stream);#endif__BEGIN_NAMESPACE_C99/* Format TP into S according to FORMAT.   Write no more than MAXSIZE wide characters and return the number   of wide characters written, or 0 if it would exceed MAXSIZE.  */extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,			__const wchar_t *__restrict __format,			__const struct tm *__restrict __tp) __THROW;__END_NAMESPACE_C99# ifdef __USE_GNU# include <xlocale.h>/* Similar to `wcsftime' but takes the information from   the provided locale and not the global locale.  */extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,			  __const wchar_t *__restrict __format,			  __const struct tm *__restrict __tp,			  __locale_t __loc) __THROW;# endif/* The X/Open standard demands that most of the functions defined in   the <wctype.h> header must also appear here.  This is probably   because some X/Open members wrote their implementation before the   ISO C standard was published and introduced the better solution.   We have to provide these definitions for compliance reasons but we   do this nonsense only if really necessary.  */#if defined __USE_UNIX98 && !defined __USE_GNU# define __need_iswxxx# include <wctype.h>#endif__END_DECLS#endif	/* _WCHAR_H defined */#endif /* wchar.h  */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?