home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / libc / wchar.h < prev    next >
C/C++ Source or Header  |  1999-03-15  |  6KB  |  171 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __wchar_h
  10.    #define __wchar_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <wchar.h> header file                                           */
  34.    /*                                                                  */
  35.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  36.    /*  - Licensed Material - Program-Property of IBM                   */
  37.    /*  - All rights reserved                                           */
  38.    /*                                                                  */
  39.    /********************************************************************/
  40.  
  41.    #include <stdio.h>
  42.    #include <stdarg.h>
  43.    #include <wctype.h>
  44.  
  45.    #ifndef NULL
  46.       #ifdef __cplusplus
  47.          #define NULL 0
  48.       #else
  49.          #define NULL ((void *)0)
  50.       #endif
  51.    #endif
  52.  
  53.    #ifndef __mbstate_t
  54.       #define __mbstate_t
  55.       typedef short      mbstate_t;
  56.    #endif
  57.  
  58.    #ifndef __size_t
  59.       typedef unsigned int size_t;
  60.       #define __size_t 1
  61.    #endif
  62.  
  63.    #ifndef __wchar_t
  64.       typedef unsigned short wchar_t;
  65.       #define __wchar_t 1
  66.    #endif
  67.  
  68.    #ifndef __wint_t
  69.       #define __wint_t
  70.       typedef int        wint_t;
  71.    #endif
  72.  
  73.    #ifndef WEOF
  74.       #define WEOF -1
  75.    #endif
  76.  
  77.    struct tm;
  78.  
  79.    /* Wide character I/O functions */
  80.  
  81.    wint_t    _IMPORT _LNK_CONV fgetwc(FILE *);
  82.    wchar_t * _IMPORT _LNK_CONV fgetws(wchar_t *, int, FILE *);
  83.    wint_t    _IMPORT _LNK_CONV fputwc(wchar_t, FILE *);
  84.    int       _IMPORT _LNK_CONV fputws(const wchar_t *, FILE *);
  85.    wint_t    _IMPORT _LNK_CONV getwc(FILE *);
  86.    wint_t    _IMPORT _LNK_CONV getwchar(void);
  87.    wint_t    _IMPORT _LNK_CONV putwc(wchar_t, FILE *);
  88.    wint_t    _IMPORT _LNK_CONV putwchar(wchar_t);
  89.    wint_t    _IMPORT _LNK_CONV ungetwc(wint_t, FILE *);
  90.  
  91.    double            _IMPORT _LNK_CONV wcstod(const wchar_t *, wchar_t **);
  92.    long int          _IMPORT _LNK_CONV wcstol(const wchar_t *, wchar_t **, int);
  93.    unsigned long int _IMPORT _LNK_CONV wcstoul(const wchar_t *, wchar_t **, int);
  94.  
  95.    /* Wide Character String handling */
  96.  
  97.    wchar_t *  _IMPORT _LNK_CONV wcscat (wchar_t *, const wchar_t *);
  98.    wchar_t *  _IMPORT _LNK_CONV wcschr (const wchar_t *, wchar_t);
  99.    int        _IMPORT _LNK_CONV wcscmp (const wchar_t *, const wchar_t *);
  100.    wchar_t *  _IMPORT _LNK_CONV wcscpy (wchar_t *, const wchar_t *);
  101.    size_t     _IMPORT _LNK_CONV wcslen (const wchar_t *);
  102.    wchar_t *  _IMPORT _LNK_CONV wcsncat (wchar_t *, const wchar_t *, size_t);
  103.    int        _IMPORT _LNK_CONV wcsncmp (const wchar_t *, const wchar_t *, size_t);
  104.    wchar_t *  _IMPORT _LNK_CONV wcsncpy (wchar_t *, const wchar_t *, size_t);
  105.    wchar_t *  _IMPORT _LNK_CONV wcsrchr (const wchar_t *, wchar_t);
  106.  
  107.    int       _IMPORT _LNK_CONV wcscoll(const wchar_t *, const wchar_t *);
  108.    size_t    _IMPORT _LNK_CONV wcsxfrm(wchar_t *, const wchar_t *, size_t);
  109.    size_t    _IMPORT _LNK_CONV wcscspn (const wchar_t *, const wchar_t *);
  110.    wchar_t * _IMPORT _LNK_CONV wcspbrk (const wchar_t *, const wchar_t *);
  111.    size_t    _IMPORT _LNK_CONV wcsspn (const wchar_t *, const wchar_t *);
  112.    wchar_t * _IMPORT _LNK_CONV wcsstr (const wchar_t *, const wchar_t *);
  113.    wchar_t * _IMPORT _LNK_CONV wcswcs (const wchar_t *, const wchar_t *);
  114.    #ifdef _XPG_LEGACY_
  115.       #define wcstok _wcstok_xpg
  116.       #define wcsftime _wcsftime_xpg
  117.       wchar_t * _IMPORT _LNK_CONV wcstok (wchar_t *, const wchar_t  *);
  118.       size_t    _IMPORT _LNK_CONV wcsftime(wchar_t *, size_t, 
  119.                                            const char *, const struct tm *);
  120.    #else
  121.       wchar_t * _IMPORT _LNK_CONV wcstok (wchar_t *, const wchar_t *, wchar_t **);
  122.       size_t    _IMPORT _LNK_CONV wcsftime(wchar_t *, size_t, 
  123.                                            const wchar_t *, const struct tm *);
  124.    #endif
  125.    int       _IMPORT _LNK_CONV wcswidth(const wchar_t *, size_t);
  126.    int       _IMPORT _LNK_CONV wcwidth(const wchar_t);
  127.  
  128.    int       _IMPORT _LNK_CONV mbsinit(const mbstate_t *);
  129.    size_t    _IMPORT _LNK_CONV mbrlen (const char *, size_t, mbstate_t *);
  130.    size_t    _IMPORT _LNK_CONV mbrtowc (wchar_t *, const char *, size_t, mbstate_t *);
  131.    size_t    _IMPORT _LNK_CONV wcrtomb (char *, wchar_t, mbstate_t *);
  132.    size_t    _IMPORT _LNK_CONV mbsrtowcs (wchar_t *, const char **, size_t, mbstate_t *);
  133.    size_t    _IMPORT _LNK_CONV wcsrtombs (char *, const wchar_t **, size_t, mbstate_t *);
  134.    int       _IMPORT _LNK_CONV wctob (wint_t);
  135.  
  136.    #if (defined(__EXTENDED__)  || defined( __cplusplus ))
  137.       #if __IBMC__ || __IBMCPP__
  138.          #if __WINDOWS__ && __THW_INTEL__
  139.             #pragma map( vswprintf,"?_vswprintfieee" )
  140.             #pragma map( swprintf, "?_swprintfieee" )
  141.             #pragma map( swscanf,  "?_swscanfieee" )
  142.          #else
  143.             #pragma map( vswprintf,"_vswprintfieee" )
  144.             #pragma map( swprintf, "_swprintfieee" )
  145.             #pragma map( swscanf,  "_swscanfieee" )
  146.          #endif
  147.       #else
  148.          #define vswprintf _vswprintfieee
  149.          #define swprintf _swprintfieee
  150.          #define swscanf _swscanfieee
  151.       #endif
  152.    #endif
  153.    int       _IMPORT _LNK_CONV vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
  154.    int       _IMPORT _LNK_CONV swprintf(wchar_t *, size_t, const wchar_t *, ...);
  155.    int       _IMPORT _LNK_CONV swscanf(const wchar_t *, const wchar_t *, ...);
  156.  
  157.    #ifdef __cplusplus
  158.       }
  159.    #endif
  160.  
  161. #endif
  162.  
  163. #if __IBMC__ || __IBMCPP__
  164. #pragma info( none )
  165. #ifndef __CHKHDR__
  166.    #pragma info( restore )
  167. #endif
  168. #pragma info( restore )
  169. #endif
  170.  
  171.