?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. /*-------------------------------------------------------------------------
  2.    wchar.h - Extended and multibyte wide character utilitites (ISO C 11 7.29)
  3.  
  4.    Copyright (c) 2015-2016, Philipp Klaus Krause / pkk@spth.de
  5.  
  6.    This library is free software; you can redistribute it and/or modify it
  7.    under the terms of the GNU General Public License as published by the
  8.    Free Software Foundation; either version 2, or (at your option) any
  9.    later version.
  10.  
  11.    This library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this library; see the file COPYING. If not, write to the
  18.    Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  19.    MA 02110-1301, USA.
  20.  
  21.    As a special exception, if you link this library with other files,
  22.    some of which are compiled with SDCC, to produce an executable,
  23.    this library does not by itself cause the resulting executable to
  24.    be covered by the GNU General Public License. This exception does
  25.    not however invalidate any other reasons why the executable file
  26.    might be covered by the GNU General Public License.
  27. -------------------------------------------------------------------------*/
  28.  
  29. #ifndef __WCHAR_T_DEFINED
  30. #define __WCHAR_T_DEFINED
  31.   typedef unsigned long int wchar_t;
  32. #endif
  33.  
  34. #ifndef __SIZE_T_DEFINED
  35. #define __SIZE_T_DEFINED
  36.   typedef unsigned int size_t;
  37. #endif
  38.  
  39. #ifndef __MBSTATE_T_DEFINED
  40. #define __MBSTATE_T_DEFINED
  41.   typedef struct {unsigned char c[3];} mbstate_t;
  42. #endif
  43.  
  44. #ifndef __WINT_T_DEFINED
  45. #define __WINT_T_DEFINED
  46.   typedef unsigned long int wint_t;
  47. #endif
  48.  
  49. struct tm;
  50.  
  51. #ifndef WEOF
  52.   #define WEOF 0xfffffffful
  53. #endif
  54.  
  55. /* C99 Wide string comparison functions (ISO C11 7.29.4.4) */
  56. int wcscmp(const wchar_t *s1, const wchar_t *s2);
  57.  
  58. /* C99 Miscellaneous functions (ISO C11 7.29.4.6) */
  59. size_t wcslen(const wchar_t *s);
  60.  
  61. /* C99 Single-byte/wide character conversion functions (ISO C 11 7.29.6.1) */
  62. wint_t btowc(int c);
  63. int wctob(wint_t c);
  64.  
  65. /* C99 Conversion state functions (ISO C 11 7.29.6.2) */
  66. int mbsinit(const mbstate_t *ps);
  67.  
  68. /* C99 Restartable multibyte/wide character conversion functions (ISO C 11 7.29.6.3) */
  69. size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict ps);
  70. size_t mbrtowc(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps);
  71. size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict ps);
  72.  
  73.