Added missing RichEdit defines.
[wine] / include / tchar.h
1 #ifndef __WINE_TCHAR_H
2 #define __WINE_TCHAR_H
3
4 #ifdef __WINE__
5 #error Wine should not include tchar.h internally
6 #endif
7
8 #include "windef.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 /*****************************************************************************
15  * tchar routines
16  */
17 #define _strdec(start,current)  ((start)<(current) ? ((char*)(current))-1 : NULL)
18 #define _strinc(current)        (((char*)(current))+1)
19 #define _strncnt(str,max)       (strlen(str)>(max) ? (max) : strlen(str))
20 #define _strnextc(str)          ((unsigned int)*(str))
21 #define _strninc(str,n)         (((char*)(str))+(n))
22 #define _strspnp(s1,s2)         (*((s1)+=strspn((s1),(s2))) ? (s1) : NULL)
23
24
25 /*****************************************************************************
26  * tchar mappings
27  */
28 #ifndef _UNICODE
29 #include <string.h>
30 #ifndef _MBCS
31 #define WINE_tchar_routine(std,mbcs,unicode) std
32 #else /* _MBCS defined */
33 #define WINE_tchar_routine(std,mbcs,unicode) mbcs
34 #endif
35 #else /* _UNICODE defined */
36 #define WINE_tchar_routine(std,mbcs,unicode) unicode
37 #endif
38
39 #define WINE_tchar_true(a) (1)
40 #define WINE_tchar_false(a) (0)
41 #define WINE_tchar_tclen(a) (1)
42 #define WINE_tchar_tccpy(a,b) do { *(a)=*(b); } while (0)
43
44 #define __targv       WINE_tchar_routine(__argv,          __argv,      __wargv)
45 #define _fgettc       WINE_tchar_routine(fgetc,           fgetc,       fgetwc)
46 #define _fgettchar    WINE_tchar_routine(fgetchar,        fgetchar,    _fgetwchar)
47 #define _fgetts       WINE_tchar_routine(fgets,           fgets,       fgetws)
48 #define _fputtc       WINE_tchar_routine(fputc,           fputc,       fputwc)
49 #define _fputtchar    WINE_tchar_routine(fputchar,        fputchar,    _fputwchar)
50 #define _fputts       WINE_tchar_routine(fputs,           fputs,       fputws)
51 #define _ftprintf     WINE_tchar_routine(fprintf,         fprintf,     fwprintf)
52 #define _ftscanf      WINE_tchar_routine(fscanf,          fscanf,      fwscanf)
53 #define _gettc        WINE_tchar_routine(getc,            getc,        getwc)
54 #define _gettchar     WINE_tchar_routine(getchar,         getchar,     getwchar)
55 #define _getts        WINE_tchar_routine(gets,            gets,        getws)
56 #define _isalnum      WINE_tchar_routine(isalnum,         _ismbcalnum, iswalnum)
57 #define _istalpha     WINE_tchar_routine(isalpha,         _ismbcalpha, iswalpha)
58 #define _istascii     WINE_tchar_routine(__isascii,       __isascii,   iswascii)
59 #define _istcntrl     WINE_tchar_routine(iscntrl,         iscntrl,     iswcntrl)
60 #define _istdigit     WINE_tchar_routine(isdigit,         _ismbcdigit, iswdigit)
61 #define _istgraph     WINE_tchar_routine(isgraph,         _ismbcgraph, iswgraph)
62 #define _istlead      WINE_tchar_routine(WINE_tchar_false,_ismbblead,  WINE_tchar_false)
63 #define _istleadbyte  WINE_tchar_routine(WINE_tchar_false,isleadbyte,  WINE_tchar_false)
64 #define _istlegal     WINE_tchar_routine(WINE_tchar_true, _ismbclegal, WINE_tchar_true)
65 #define _istlower     WINE_tchar_routine(islower,         _ismbcslower,iswlower)
66 #define _istprint     WINE_tchar_routine(isprint,         _ismbcprint, iswprint)
67 #define _istpunct     WINE_tchar_routine(ispunct,         _ismbcpunct, iswpunct)
68 #define _istspace     WINE_tchar_routine(isspace,         _ismbcspace, iswspace)
69 #define _istupper     WINE_tchar_routine(isupper,         _ismbcupper, iswupper)
70 #define _istxdigit    WINE_tchar_routine(isxdigit,        isxdigit,    iswxdigit)
71 #define _itot         WINE_tchar_routine(_itoa,           _itoa,       _itow)
72 #define _ltot         WINE_tchar_routine(_ltoa,           _ltoa,       _ltow)
73 #define _puttc        WINE_tchar_routine(putc,            putc,        putwc)
74 #define _puttchar     WINE_tchar_routine(putchar,         putchar,     putwchar)
75 #define _putts        WINE_tchar_routine(puts,            puts,        putws)
76 #define _sntprintf    WINE_tchar_routine(sprintf,         sprintf,     swprintf)
77 #define _stprintf     WINE_tchar_routine(sprintf,         sprintf,     swprintf)
78 #define _stscanf      WINE_tchar_routine(sscanf,          sscanf,      swscanf)
79 #define _taccess      WINE_tchar_routine(_access,         _access,     _waccess)
80 #define _tasctime     WINE_tchar_routine(asctime,         asctime,     _wasctime)
81 #define _tccpy        WINE_tchar_routine(WINE_tchar_tccpy,_mbccpy,     WINE_tchar_tccpy)
82 #define _tchdir       WINE_tchar_routine(_chdir,          _chdir,      _wchdir)
83 #define _tclen        WINE_tchar_routine(WINE_tchar_tclen,_mbclen,     WINE_tchar_tclen)
84 #define _tchmod       WINE_tchar_routine(_chmod,          _chmod,      _wchmod)
85 #define _tcreat       WINE_tchar_routine(_creat,          _creat,      _wcreat)
86 #define _tcscat       WINE_tchar_routine(strcat,          _mbscat,     wcscat)
87 #define _tcschr       WINE_tchar_routine(strchr,          _mbschr,     wcschr)
88 #define _tcsclen      WINE_tchar_routine(strlen,          _mbslen,     wcslen)
89 #define _tcscmp       WINE_tchar_routine(strcmp,          _mbscmp,     wcscmp)
90 #define _tcscoll      WINE_tchar_routine(strcoll,         _mbscoll,    wcscoll)
91 #define _tcscpy       WINE_tchar_routine(strcpy,          _mbscpy,     wcscpy)
92 #define _tcscspn      WINE_tchar_routine(strcspn,         _mbscspn,    wcscspn)
93 #define _tcsdec       WINE_tchar_routine(_strdec,         _mbsdec,     _wcsdec)
94 #define _tcsdup       WINE_tchar_routine(_strdup,         _mbsdup,     _wcsdup)
95 #define _tcsftime     WINE_tchar_routine(strftime,        strftime,    wcsftime)
96 #define _tcsicmp      WINE_tchar_routine(_stricmp,        _mbsicmp,    _wcsicmp)
97 #define _tcsicoll     WINE_tchar_routine(_stricoll,       _stricoll,   _wcsicoll)
98 #define _tcsinc       WINE_tchar_routine(_strinc,         _mbsinc,     _wcsinc)
99 #define _tcslen       WINE_tchar_routine(strlen,          strlen,      wcslen)
100 #define _tcslwr       WINE_tchar_routine(_strlwr,         _mbslwr,     _wcslwr)
101 #define _tcsnbcnt     WINE_tchar_routine(_strncnt,        _mbsnbcnt,   _wcnscnt)
102 #define _tcsncat      WINE_tchar_routine(strncat,         _mbsnbcat,   wcsncat)
103 #define _tcsnccat     WINE_tchar_routine(strncat,         _mbsncat,    wcsncat)
104 #define _tcsncmp      WINE_tchar_routine(strncmp,         _mbsnbcmp,   wcsncmp)
105 #define _tcsnccmp     WINE_tchar_routine(strncmp,         _mbsncmp,    wcsncmp)
106 #define _tcsnccnt     WINE_tchar_routine(_strncnt,        _mbsnccnt,   _wcsncnt)
107 #define _tcsnccpy     WINE_tchar_routine(strncpy,         _mbsncpy,    wcsncpy)
108 #define _tcsncicmp    WINE_tchar_routine(_strnicmp,       _mbsnicmp,   _wcsnicmp)
109 #define _tcsncpy      WINE_tchar_routine(strncpy,         _mbsnbcpy,   wcsncpy)
110 #define _tcsncset     WINE_tchar_routine(_strnset,        _mbsnset,    _wcsnset)
111 #define _tcsnextc     WINE_tchar_routine(_strnextc,       _mbsnextc,   _wcsnextc)
112 #define _tcsnicmp     WINE_tchar_routine(_strnicmp,       _mbsnicmp,   _wcsnicmp)
113 #define _tcsnicoll    WINE_tchar_routine(_strnicoll,      _strnicoll   _wcsnicoll)
114 #define _tcsninc      WINE_tchar_routine(_strninc,        _mbsninc,    _wcsninc)
115 #define _tcsnccnt     WINE_tchar_routine(_strncnt,        _mbsnccnt,   _wcsncnt)
116 #define _tcsnset      WINE_tchar_routine(_strnset,        _mbsnbset,   _wcsnset)
117 #define _tcspbrk      WINE_tchar_routine(strpbrk,         _mbspbrk,    wcspbrk)
118 #define _tcsspnp      WINE_tchar_routine(_strspnp,        _mbsspnp,    _wcsspnp)
119 #define _tcsrchr      WINE_tchar_routine(strrchr,         _mbsrchr,    wcsrchr)
120 #define _tcsrev       WINE_tchar_routine(_strrev,         _mbsrev,     _wcsrev)
121 #define _tcsset       WINE_tchar_routine(_strset,         _mbsset,     _wcsset)
122 #define _tcsspn       WINE_tchar_routine(strspn,          _mbsspn,     wcsspn)
123 #define _tcsstr       WINE_tchar_routine(strstr,          _mbsstr,     wcsstr)
124 #define _tcstod       WINE_tchar_routine(strtod,          strtod,      wcstod)
125 #define _tcstok       WINE_tchar_routine(strtok,          _mbstok,     wcstok)
126 #define _tcstol       WINE_tchar_routine(strtol,          strtol,      wcstol)
127 #define _tcstoul      WINE_tchar_routine(strtoul,         strtoul,     wcstoul)
128 #define _tcsupr       WINE_tchar_routine(_strupr,         _mbsupr,     _wcsupr)
129 #define _tcsxfrm      WINE_tchar_routine(strxfrm,         strxfrm,     wcsxfrm)
130 #define _tctime       WINE_tchar_routine(ctime,           ctime,       _wctime)
131 #define _tenviron     WINE_tchar_routine(_environ,        _environ,    _wenviron)
132 #define _texecl       WINE_tchar_routine(_execl,          _execl,      _wexecl)
133 #define _texecle      WINE_tchar_routine(_execle,         _execle,     _wexecle)
134 #define _texeclp      WINE_tchar_routine(_execlp,         _execlp,     _wexeclp)
135 #define _texeclpe     WINE_tchar_routine(_execlpe,        _execlpe,    _wexeclpe)
136 #define _texecv       WINE_tchar_routine(_execv,          _execv,      _wexecv)
137 #define _texecve      WINE_tchar_routine(_execve,         _execve,     _wexecve)
138 #define _texecvp      WINE_tchar_routine(_execvp,         _execvp,     _wexecvp)
139 #define _texecvpe     WINE_tchar_routine(_execvpe,        _execvpe,    _wexecvpe)
140 #define _tfdopen      WINE_tchar_routine(_fdopen,         _fdopen,     _wfdopen)
141 #define _tfinddata_t  WINE_tchar_routine(_finddata_t,     _finddata_t, _wfinddata_t)
142 #define _tfinddatai64_t WINE_tchar_routine(_finddatai64_t,_finddatai64_t,_wfinddatai64_t)
143 #define _tfindfirst   WINE_tchar_routine(_findfirst,      _findfirst,  _wfindfirst)
144 #define _tfindnext    WINE_tchar_routine(_findnext,       _findnext,   _wfindnext)
145 #define _tfopen       WINE_tchar_routine(fopen,           fopen,       _wfopen)
146 #define _tfreopen     WINE_tchar_routine(freopen,         freopen,     _wfreopen)
147 #define _tfsopen      WINE_tchar_routine(_fsopen,         _fsopen,     _wfsopen)
148 #define _tfullpath    WINE_tchar_routine(_fullpath,       _fullpath,   _wfullpath)
149 #define _tgetcwd      WINE_tchar_routine(_getcwd,         _getcwd,     _wgetcwd)
150 #define _tgetenv      WINE_tchar_routine(getenv,          getenv,      _wgetenv)
151 #define _tmain        WINE_tchar_routine(main,            main,        wmain)
152 #define _tmakepath    WINE_tchar_routine(_makepath,       _makepath,   _wmakepath)
153 #define _tmkdir       WINE_tchar_routine(_mkdir,          _mkdir,      _wmkdir)
154 #define _tmktemp      WINE_tchar_routine(_mktemp,         _mktemp,     _wmktemp)
155 #define _tperror      WINE_tchar_routine(perror,          perror,      _wperror)
156 #define _topen        WINE_tchar_routine(_open,           _open,       _wopen)
157 #define _totlower     WINE_tchar_routine(tolower,         _mbctolower, towlower)
158 #define _totupper     WINE_tchar_routine(toupper,         _mbctoupper, towupper)
159 #define _tpopen       WINE_tchar_routine(_popen,          _popen,      _wpopen)
160 #define _tprintf      WINE_tchar_routine(printf,          printf,      wprintf)
161 #define _tremove      WINE_tchar_routine(remove,          remove,      _wremove)
162 #define _trename      WINE_tchar_routine(rename,          rename,      _wrename)
163 #define _trmdir       WINE_tchar_routine(_rmdir,          _rmdir,      _wrmdir)
164 #define _tsearchenv   WINE_tchar_routine(_searchenv,      _searchenv,  _wsearchenv)
165 #define _tscanf       WINE_tchar_routine(scanf,           scanf,       wscanf)
166 #define _tsetlocale   WINE_tchar_routine(setlocale,       setlocale,   _wsetlocale)
167 #define _tsopen       WINE_tchar_routine(_sopen,          _sopen,      _wsopen)
168 #define _tspawnl      WINE_tchar_routine(_spawnl,         _spawnl,     _wspawnl)
169 #define _tspawnle     WINE_tchar_routine(_spawnle,        _spawnle,    _wspawnle)
170 #define _tspawnlp     WINE_tchar_routine(_spawnlp,        _spawnlp,    _wspawnlp)
171 #define _tspawnlpe    WINE_tchar_routine(_spawnlpe,       _spawnlpe,   _wspawnlpe)
172 #define _tspawnv      WINE_tchar_routine(_spawnv,         _spawnv,     _wspawnv)
173 #define _tspawnve     WINE_tchar_routine(_spawnve,        _spawnve,    _wspawnve)
174 #define _tspawnvp     WINE_tchar_routine(_spawnvp,        _spawnvp,    _tspawnvp)
175 #define _tspawnvpe    WINE_tchar_routine(_spawnvpe,       _spawnvpe,   _tspawnvpe)
176 #define _tsplitpath   WINE_tchar_routine(_splitpath,      _splitpath,  _wsplitpath)
177 #define _tstat        WINE_tchar_routine(_stat,           _stat,       _wstat)
178 #define _tstrdate     WINE_tchar_routine(_strdate,        _strdate,    _wstrdate)
179 #define _tstrtime     WINE_tchar_routine(_strtime,        _strtime,    _wstrtime)
180 #define _tsystem      WINE_tchar_routine(system,          system,      _wsystem)
181 #define _ttempnam     WINE_tchar_routine(_tempnam,        _tempnam,    _wtempnam)
182 #define _ttmpnam      WINE_tchar_routine(tmpnam,          tmpnam,      _wtmpnam)
183 #define _ttoi         WINE_tchar_routine(atoi,            atoi,        _wtoi)
184 #define _ttol         WINE_tchar_routine(atol,            atol,        _wtol)
185 #define _tutime       WINE_tchar_routine(_utime,          _utime,      _wutime)
186 #define _tWinMain     WINE_tchar_routine(WinMain,         WinMain,     wWinMain)
187 #define _ultot        WINE_tchar_routine(_ultoa,          _ultoa,      _ultow)
188 #define _ungettc      WINE_tchar_routine(ungetc,          ungetc,      ungetwc)
189 #define _vftprintf    WINE_tchar_routine(vfprintf,        vfprintf,    vfwprintf)
190 #define _vsntprintf   WINE_tchar_routine(_vsnprintf,      _vsnprintf,  _vsnwprintf)
191 #define _vstprintf    WINE_tchar_routine(vsprintf,        vsprintf,    vswprintf)
192 #define _vtprintf     WINE_tchar_routine(vprintf,         vprintf,     vwprintf)
193 #define _TEOF         WINE_tchar_routine(EOF,             EOF,         WEOF)
194
195 #define __T(x) __TEXT(x)
196 #define _T(x) __T(x)
197 #define _TEXT(x) __T(x)
198
199 typedef CHAR  _TCHARA;
200 typedef WCHAR _TCHARW;
201 DECL_WINELIB_TYPE_AW(_TCHAR)
202 typedef UCHAR  _TUCHARA;
203 typedef WCHAR _TUCHARW;
204 DECL_WINELIB_TYPE_AW(_TUCHAR)
205          
206 #ifdef __cplusplus
207 } /* extern "C" */
208 #endif
209                                  
210 #endif /* __WINE_TCHAR_H */