home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / tchar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  5.8 KB  |  214 lines

  1.    /********************************************************************/
  2.    /*  <tchar.h> header file                                           */
  3.    /*                                                                  */
  4.    /*  VisualAge for C++ for Windows, Version 3.5                      */
  5.    /*    Licensed Material - Property of IBM                           */
  6.    /*                                                                  */
  7.    /*  5801-ARR and Other Materials                                    */
  8.    /*                                                                  */
  9.    /*  (c) Copyright IBM Corp 1991, 1996. All rights reserved.         */
  10.    /*                                                                  */
  11.    /********************************************************************/
  12.  
  13. #ifndef __tchar_h
  14.    #define __tchar_h
  15.  
  16.    #ifdef __cplusplus
  17.       extern "C" {
  18.    #endif
  19.  
  20.    #ifdef _UNICODE
  21.  
  22.       #include <wchar.h>
  23.  
  24.       #ifndef __tchar
  25.          typedef wchar_t _TCHAR;
  26.          #define __tchar
  27.       #endif
  28.  
  29.       #ifndef __tint
  30.          typedef wint_t _TINT;
  31.          #define __tint
  32.       #endif
  33.  
  34.       #define _TEOF     WEOF
  35.  
  36.       #define __T(x)    L ## x
  37.  
  38.  
  39.       #define _tprintf     wprintf
  40.       #define _ftprintf    fwprintf
  41.       #define _stprintf    swprintf
  42.       #define _vtprintf    vwprintf
  43.       #define _vftprintf   vfwprintf
  44.       #define _vstprintf   vswprintf
  45.       #define _tscanf      wscanf
  46.       #define _stscanf     swscanf
  47.  
  48.  
  49.       #define _fgettc      fgetwc
  50.       #define _fgetts      fgetws
  51.       #define _fputtc      fputwc
  52.       #define _fputts      fputws
  53.       #define _gettc       getwc
  54.       #define _gettchar    getwchar
  55.       #define _puttc       putwc
  56.       #define _puttchar    putwchar
  57.       #define _ungettc     ungetwc
  58.  
  59.  
  60.       #define _tcstod      wcstod
  61.       #define _tcstol      wcstol
  62.       #define _tcstoul     wcstoul
  63.  
  64.  
  65.       #define _tcscat      wcscat
  66.       #define _tcschr      wcschr
  67.       #define _tcscmp      wcscmp
  68.       #define _tcscpy      wcscpy
  69.       #define _tcscspn     wcscspn
  70.       #define _tcslen      wcslen
  71.       #define _tcsncat     wcsncat
  72.       #define _tcsncmp     wcsncmp
  73.       #define _tcsncpy     wcsncpy
  74.       #define _tcspbrk     wcspbrk
  75.       #define _tcsrchr     wcsrchr
  76.       #define _tcsspn      wcsspn
  77.       #define _tcsstr      wcsstr
  78.       #define _tcstok      wcstok
  79.  
  80.  
  81.       #define _tcsclen     wcslen
  82.       #define _tcsnccat    wcsncat
  83.       #define _tcsnccpy    wcsncpy
  84.       #define _tcsnccmp    wcsncmp
  85.  
  86.       #define _tcsxfrm     wcsxfrm
  87.       #define _tcscoll     wcscoll
  88.  
  89.  
  90.       #define _istalpha    iswalpha
  91.       #define _istupper    iswupper
  92.       #define _istlower    iswlower
  93.       #define _istdigit    iswdigit
  94.       #define _istxdigit   iswxdigit
  95.       #define _istspace    iswspace
  96.       #define _istpunct    iswpunct
  97.       #define _istalnum    iswalnum
  98.       #define _istprint    iswprint
  99.       #define _istgraph    iswgraph
  100.       #define _istcntrl    iswcntrl
  101.  
  102.       #define _totupper    towupper
  103.       #define _totlower    towlower
  104.  
  105.    #else
  106.  
  107.       #include <string.h>
  108.       #include <stdio.h>
  109.  
  110.       #ifndef __tchar
  111.          typedef char _TCHAR;
  112.          #define __tchar
  113.       #endif
  114.  
  115.       #ifndef __tint
  116.          typedef int _TINT;
  117.          #define __tint
  118.       #endif
  119.  
  120.       #define _TEOF     EOF
  121.  
  122.       #define __T(x)            x
  123.  
  124.  
  125.       #define _tprintf     printf
  126.       #define _ftprintf    fprintf
  127.       #define _stprintf    sprintf
  128.       #define _vtprintf    vprintf
  129.       #define _vftprintf   vfprintf
  130.       #define _vstprintf   vsprintf
  131.       #define _tscanf      scanf
  132.       #define _ftscanf  fscanf
  133.       #define _stscanf  sscanf
  134.  
  135.  
  136.       #define _fgettc      fgetc
  137.       #define _fgetts      fgets
  138.       #define _fputtc      fputc
  139.       #define _fputts      fputs
  140.       #define _gettc       getc
  141.       #define _gettchar    getchar
  142.       #define _puttc       putc
  143.       #define _puttchar    putchar
  144.       #define _ungettc     ungetc
  145.  
  146.  
  147.       #define _tcstod      strtod
  148.       #define _tcstol      strtol
  149.       #define _tcstoul     strtoul
  150.  
  151.  
  152.       #define _tcscat      strcat
  153.       #define _tcschr      strchr
  154.       #define _tcscmp      strcmp
  155.       #define _tcscpy      strcpy
  156.       #define _tcscspn     strcspn
  157.       #define _tcslen      strlen
  158.       #define _tcsncat     strncat
  159.       #define _tcsncmp     strncmp
  160.       #define _tcsncpy     strncpy
  161.       #define _tcspbrk     strpbrk
  162.       #define _tcsrchr     strrchr
  163.       #define _tcsspn      strspn
  164.       #define _tcsstr      strstr
  165.       #define _tcstok      strtok
  166.  
  167.       #define _tcsdup      strdup
  168.       #define _tcsicmp     stricmp
  169.       #define _tcsnicmp    strnicmp
  170.       #define _tcsnset     strnset
  171.       #define _tcsrev      strrev
  172.       #define _tcsset      _strset
  173.  
  174.  
  175.       #define _tcsclen     strlen
  176.       #define _tcsnccat    strncat
  177.       #define _tcsnccpy    strncpy
  178.       #define _tcsnccmp    strncmp
  179.       #define _tcsncicmp   strnicmp
  180.       #define _tcsncset    strnset
  181.  
  182.       #define _tcsxfrm     strxfrm
  183.       #define _tcscoll     strcoll
  184.  
  185.  
  186.       #define _istalpha    isalpha
  187.       #define _istupper    isupper
  188.       #define _istlower    islower
  189.       #define _istdigit    isdigit
  190.       #define _istxdigit   isxdigit
  191.       #define _istspace    isspace
  192.       #define _istpunct    ispunct
  193.       #define _istalnum    isalnum
  194.       #define _istprint    isprint
  195.       #define _istgraph    isgraph
  196.       #define _istcntrl    iscntrl
  197.       #define _istascii    isascii
  198.  
  199.       #define _totupper toupper
  200.       #define _totlower tolower
  201.  
  202.  
  203.    #endif
  204.  
  205.    #define _T(x)                __T(x)
  206.    #define _TEXT(x)     __T(x)
  207.  
  208.    #ifdef __cplusplus
  209.       }
  210.    #endif
  211.  
  212. #endif
  213.  
  214.