Print this page
5604 widec.h should expose ws* under __EXTENSIONS__


  59 /* wchar_t string operation functions */
  60 extern wchar_t  *strtows(wchar_t *, char *);
  61 extern wchar_t  *wscpy(wchar_t *, const wchar_t *);
  62 extern wchar_t  *wsncpy(wchar_t *, const wchar_t *, size_t);
  63 extern wchar_t  *wscat(wchar_t *, const wchar_t *);
  64 extern wchar_t  *wsncat(wchar_t *, const wchar_t *, size_t);
  65 extern wchar_t  *wschr(const wchar_t *, wchar_t);
  66 extern wchar_t  *wsrchr(const wchar_t *, wchar_t);
  67 extern wchar_t  *wspbrk(const wchar_t *, const wchar_t *);
  68 extern wchar_t  *wstok(wchar_t *, const wchar_t *);
  69 extern char     *wstostr(char *, wchar_t *);
  70 
  71 extern int      wscmp(const wchar_t *, const wchar_t *);
  72 extern int      wsncmp(const wchar_t *, const wchar_t *, size_t);
  73 extern size_t   wslen(const wchar_t *);
  74 extern size_t   wsspn(const wchar_t *, const wchar_t *);
  75 extern size_t   wscspn(const wchar_t *, const wchar_t *);
  76 extern int      wscoll(const wchar_t *, const wchar_t *);
  77 extern size_t   wsxfrm(wchar_t *, const wchar_t *, size_t);
  78 
  79 #if !defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)
  80 
  81 extern wchar_t  *wsdup(const wchar_t *);
  82 extern int      wscol(const wchar_t *);
  83 extern double   wstod(const wchar_t *, wchar_t **);
  84 extern long     wstol(const wchar_t *, wchar_t **, int);
  85 extern int      wscasecmp(const wchar_t *, const wchar_t *);
  86 extern int      wsncasecmp(const wchar_t *, const wchar_t *, size_t);
  87 extern int      wsprintf(wchar_t *, const char *, ...);
  88 #if defined(_LONGLONG_TYPE)
  89 extern long long        wstoll(const wchar_t *, wchar_t **, int);
  90 #endif  /* defined(_LONGLONG_TYPE) */
  91 
  92 #endif /* !defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX) */
  93 
  94 /* Returns the code set number for the process code c. */
  95 #define WCHAR_SHIFT     7
  96 #define WCHAR_S_MASK    0x7f
  97 #define wcsetno(c) \
  98         (((c)&0x20000000)?(((c)&0x10000000)?1:3):(((c)&0x10000000)?2:0))
  99 
 100 /* Aliases... */
 101 #define windex          wschr
 102 #define wrindex         wsrchr
 103 
 104 #define watol(s)        wstol((s), (wchar_t **)0, 10)
 105 #if defined(_LONGLONG_TYPE) && !defined(__lint)
 106 #define watoll(s)       wstoll((s), (wchar_t **)0, 10)
 107 #endif  /* defined(_LONGLONG_TYPE) && !defined(__lint) */
 108 #define watoi(s)        ((int)wstol((s), (wchar_t **)0, 10))
 109 #define watof(s)        wstod((s), (wchar_t **)0)
 110 
 111 /*
 112  * other macros.


  59 /* wchar_t string operation functions */
  60 extern wchar_t  *strtows(wchar_t *, char *);
  61 extern wchar_t  *wscpy(wchar_t *, const wchar_t *);
  62 extern wchar_t  *wsncpy(wchar_t *, const wchar_t *, size_t);
  63 extern wchar_t  *wscat(wchar_t *, const wchar_t *);
  64 extern wchar_t  *wsncat(wchar_t *, const wchar_t *, size_t);
  65 extern wchar_t  *wschr(const wchar_t *, wchar_t);
  66 extern wchar_t  *wsrchr(const wchar_t *, wchar_t);
  67 extern wchar_t  *wspbrk(const wchar_t *, const wchar_t *);
  68 extern wchar_t  *wstok(wchar_t *, const wchar_t *);
  69 extern char     *wstostr(char *, wchar_t *);
  70 
  71 extern int      wscmp(const wchar_t *, const wchar_t *);
  72 extern int      wsncmp(const wchar_t *, const wchar_t *, size_t);
  73 extern size_t   wslen(const wchar_t *);
  74 extern size_t   wsspn(const wchar_t *, const wchar_t *);
  75 extern size_t   wscspn(const wchar_t *, const wchar_t *);
  76 extern int      wscoll(const wchar_t *, const wchar_t *);
  77 extern size_t   wsxfrm(wchar_t *, const wchar_t *, size_t);
  78 
  79 #if !defined(_STRICT_SYMBOLS)
  80 
  81 extern wchar_t  *wsdup(const wchar_t *);
  82 extern int      wscol(const wchar_t *);
  83 extern double   wstod(const wchar_t *, wchar_t **);
  84 extern long     wstol(const wchar_t *, wchar_t **, int);
  85 extern int      wscasecmp(const wchar_t *, const wchar_t *);
  86 extern int      wsncasecmp(const wchar_t *, const wchar_t *, size_t);
  87 extern int      wsprintf(wchar_t *, const char *, ...);
  88 #if defined(_LONGLONG_TYPE)
  89 extern long long        wstoll(const wchar_t *, wchar_t **, int);
  90 #endif  /* defined(_LONGLONG_TYPE) */
  91 
  92 #endif /* !defined(_STRICT_SYMBOLS) */
  93 
  94 /* Returns the code set number for the process code c. */
  95 #define WCHAR_SHIFT     7
  96 #define WCHAR_S_MASK    0x7f
  97 #define wcsetno(c) \
  98         (((c)&0x20000000)?(((c)&0x10000000)?1:3):(((c)&0x10000000)?2:0))
  99 
 100 /* Aliases... */
 101 #define windex          wschr
 102 #define wrindex         wsrchr
 103 
 104 #define watol(s)        wstol((s), (wchar_t **)0, 10)
 105 #if defined(_LONGLONG_TYPE) && !defined(__lint)
 106 #define watoll(s)       wstoll((s), (wchar_t **)0, 10)
 107 #endif  /* defined(_LONGLONG_TYPE) && !defined(__lint) */
 108 #define watoi(s)        ((int)wstol((s), (wchar_t **)0, 10))
 109 #define watof(s)        wstod((s), (wchar_t **)0)
 110 
 111 /*
 112  * other macros.