other-licenses/nsis/Contrib/ExDLL/tchar.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/other-licenses/nsis/Contrib/ExDLL/tchar.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,210 @@
     1.4 +/*
     1.5 + * tchar.h
     1.6 + * 
     1.7 + * This file is a part of NSIS.
     1.8 + * 
     1.9 + * Copyright (C) 1999-2007 Nullsoft and Contributors
    1.10 + * 
    1.11 + * This software is provided 'as-is', without any express or implied
    1.12 + * warranty.
    1.13 + *
    1.14 + * For Unicode support by Jim Park -- 08/30/2007
    1.15 + */
    1.16 +
    1.17 +// Jim Park: Only those we use are listed here.
    1.18 +
    1.19 +#pragma once
    1.20 +
    1.21 +#ifdef _UNICODE
    1.22 +
    1.23 +#ifndef _T
    1.24 +#define __T(x)   L ## x
    1.25 +#define _T(x)    __T(x)
    1.26 +#define _TEXT(x) __T(x)
    1.27 +#endif
    1.28 +typedef wchar_t TCHAR;
    1.29 +typedef wchar_t _TUCHAR;
    1.30 +
    1.31 +// program
    1.32 +#define _tmain      wmain
    1.33 +#define _tWinMain   wWinMain
    1.34 +#define _tenviron   _wenviron
    1.35 +#define __targv     __wargv
    1.36 +
    1.37 +// printfs
    1.38 +#define _ftprintf   fwprintf
    1.39 +#define _sntprintf  _snwprintf
    1.40 +#define _stprintf   _swprintf
    1.41 +#define _tprintf    wprintf
    1.42 +#define _vftprintf  vfwprintf
    1.43 +#define _vsntprintf _vsnwprintf
    1.44 +#define _vstprintf  _vswprintf
    1.45 +
    1.46 +// scanfs
    1.47 +#define _tscanf     wscanf
    1.48 +#define _stscanf    swscanf
    1.49 +
    1.50 +// string manipulations
    1.51 +#define _tcscat     wcscat
    1.52 +#define _tcschr     wcschr
    1.53 +#define _tcsclen    wcslen
    1.54 +#define _tcscpy     wcscpy
    1.55 +#define _tcsdup     _wcsdup
    1.56 +#define _tcslen     wcslen
    1.57 +#define _tcsnccpy   wcsncpy
    1.58 +#define _tcsncpy    wcsncpy
    1.59 +#define _tcsrchr    wcsrchr
    1.60 +#define _tcsstr     wcsstr
    1.61 +#define _tcstok     wcstok
    1.62 +
    1.63 +// string comparisons
    1.64 +#define _tcscmp     wcscmp
    1.65 +#define _tcsicmp    _wcsicmp
    1.66 +#define _tcsncicmp  _wcsnicmp
    1.67 +#define _tcsncmp    wcsncmp
    1.68 +#define _tcsnicmp   _wcsnicmp
    1.69 +
    1.70 +// upper / lower
    1.71 +#define _tcslwr     _wcslwr
    1.72 +#define _tcsupr     _wcsupr
    1.73 +#define _totlower   towlower
    1.74 +#define _totupper   towupper
    1.75 +
    1.76 +// conversions to numbers
    1.77 +#define _tcstoi64   _wcstoi64
    1.78 +#define _tcstol     wcstol
    1.79 +#define _tcstoul    wcstoul
    1.80 +#define _tstof      _wtof
    1.81 +#define _tstoi      _wtoi
    1.82 +#define _tstoi64    _wtoi64
    1.83 +#define _ttoi       _wtoi
    1.84 +#define _ttoi64     _wtoi64
    1.85 +#define _ttol       _wtol
    1.86 +
    1.87 +// conversion from numbers to strings
    1.88 +#define _itot       _itow
    1.89 +#define _ltot       _ltow
    1.90 +#define _i64tot     _i64tow
    1.91 +#define _ui64tot    _ui64tow
    1.92 +
    1.93 +// file manipulations
    1.94 +#define _tfopen     _wfopen
    1.95 +#define _topen      _wopen
    1.96 +#define _tremove    _wremove
    1.97 +#define _tunlink    _wunlink
    1.98 +
    1.99 +// reading and writing to i/o
   1.100 +#define _fgettc     fgetwc
   1.101 +#define _fgetts     fgetws
   1.102 +#define _fputts     fputws
   1.103 +#define _gettchar   getwchar
   1.104 +
   1.105 +// directory
   1.106 +#define _tchdir     _wchdir
   1.107 +
   1.108 +// environment
   1.109 +#define _tgetenv    _wgetenv
   1.110 +#define _tsystem    _wsystem
   1.111 +
   1.112 +// time
   1.113 +#define _tcsftime   wcsftime
   1.114 +
   1.115 +#else // ANSI
   1.116 +
   1.117 +#ifndef _T
   1.118 +#define _T(x)    x
   1.119 +#define _TEXT(x) x
   1.120 +#endif
   1.121 +typedef char            TCHAR;
   1.122 +typedef unsigned char   _TUCHAR;
   1.123 +
   1.124 +// program
   1.125 +#define _tmain      main
   1.126 +#define _tWinMain   WinMain
   1.127 +#define _tenviron   environ
   1.128 +#define __targv     __argv
   1.129 +
   1.130 +// printfs
   1.131 +#define _ftprintf   fprintf
   1.132 +#define _sntprintf  _snprintf
   1.133 +#define _stprintf   sprintf
   1.134 +#define _tprintf    printf
   1.135 +#define _vftprintf  vfprintf
   1.136 +#define _vsntprintf _vsnprintf
   1.137 +#define _vstprintf  vsprintf
   1.138 +
   1.139 +// scanfs
   1.140 +#define _tscanf     scanf
   1.141 +#define _stscanf    sscanf
   1.142 +
   1.143 +// string manipulations
   1.144 +#define _tcscat     strcat
   1.145 +#define _tcschr     strchr
   1.146 +#define _tcsclen    strlen
   1.147 +#define _tcscnlen   strnlen
   1.148 +#define _tcscpy     strcpy
   1.149 +#define _tcsdup     _strdup
   1.150 +#define _tcslen     strlen
   1.151 +#define _tcsnccpy   strncpy
   1.152 +#define _tcsrchr    strrchr
   1.153 +#define _tcsstr     strstr
   1.154 +#define _tcstok     strtok
   1.155 +
   1.156 +// string comparisons
   1.157 +#define _tcscmp     strcmp
   1.158 +#define _tcsicmp    _stricmp
   1.159 +#define _tcsncmp    strncmp
   1.160 +#define _tcsncicmp  _strnicmp
   1.161 +#define _tcsnicmp   _strnicmp
   1.162 +
   1.163 +// upper / lower
   1.164 +#define _tcslwr     _strlwr
   1.165 +#define _tcsupr     _strupr
   1.166 +
   1.167 +#define _totupper   toupper
   1.168 +#define _totlower   tolower
   1.169 +
   1.170 +// conversions to numbers
   1.171 +#define _tcstol     strtol
   1.172 +#define _tcstoul    strtoul
   1.173 +#define _tstof      atof
   1.174 +#define _tstoi      atoi
   1.175 +#define _tstoi64    _atoi64
   1.176 +#define _tstoi64    _atoi64
   1.177 +#define _ttoi       atoi
   1.178 +#define _ttoi64     _atoi64
   1.179 +#define _ttol       atol
   1.180 +
   1.181 +// conversion from numbers to strings
   1.182 +#define _i64tot     _i64toa
   1.183 +#define _itot       _itoa
   1.184 +#define _ltot       _ltoa
   1.185 +#define _ui64tot    _ui64toa
   1.186 +
   1.187 +// file manipulations
   1.188 +#define _tfopen     fopen
   1.189 +#define _topen      _open
   1.190 +#define _tremove    remove
   1.191 +#define _tunlink    _unlink
   1.192 +
   1.193 +// reading and writing to i/o
   1.194 +#define _fgettc     fgetc
   1.195 +#define _fgetts     fgets
   1.196 +#define _fputts     fputs
   1.197 +#define _gettchar   getchar
   1.198 +
   1.199 +// directory
   1.200 +#define _tchdir     _chdir
   1.201 +
   1.202 +// environment
   1.203 +#define _tgetenv    getenv
   1.204 +#define _tsystem    system
   1.205 +
   1.206 +// time
   1.207 +#define _tcsftime   strftime
   1.208 +
   1.209 +#endif
   1.210 +
   1.211 +// is functions (the same in Unicode / ANSI)
   1.212 +#define _istgraph   isgraph
   1.213 +#define _istascii   __isascii

mercurial