OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [Utils/] [common/] [wcharunix.h] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
 
23
// ----------------------------------------------------------------------------
24
// This file defines the generic-text routine mappings found in TCHAR.H on windows
25
// ----------------------------------------------------------------------------
26
 
27
#define _TEOF       EOF
28
 
29
#define __T(x)      x
30
 
31
 
32
/* Program */
33
 
34
#define _tmain      main
35
#define _tWinMain   WinMain
36
#define _tenviron   environ
37
#define __targv     _argv
38
 
39
 
40
/* Formatted i/o */
41
 
42
#define _tprintf    printf
43
#define _ftprintf   fprintf
44
#define _stprintf   sprintf
45
#define _sntprintf  snprintf
46
#define _vtprintf   vprintf
47
#define _vftprintf  vfprintf
48
#define _vstprintf  vsprintf
49
#define _vsntprintf vsnprintf
50
#define _tscanf     scanf
51
#define _ftscanf    fscanf
52
#define _stscanf    sscanf
53
 
54
 
55
/* Unformatted i/o */
56
 
57
#define _fgettc     fgetc
58
#define _fgettchar  fgetchar
59
#define _fgetts     fgets
60
#define _fputtc     fputc
61
#define _fputtchar  fputchar
62
#define _fputts     fputs
63
#define _gettc      getc
64
#define _gettchar   getchar
65
#define _getts      gets
66
#define _puttc      putc
67
#define _puttchar   putchar
68
#define _putts      puts
69
#define _ungettc    ungetc
70
 
71
 
72
/* String conversion functions */
73
 
74
#define _tcstod     strtod
75
#define _tcstol     strtol
76
#define _tcstoul    strtoul
77
 
78
#define _itot       itoa
79
#define _ltot       ltoa
80
#define _ultot      ultoa
81
#define _ttoi       atoi
82
#define _ttol       atol
83
 
84
#define _ttoi64     atoi64
85
#define _i64tot     i64toa
86
#define _ui64tot    ui64toa
87
 
88
/* String functions */
89
 
90
/* Note that _mbscat, _mbscpy and _mbsdup are functionally equivalent to
91
   strcat, strcpy and strdup, respectively. */
92
 
93
#define _tcscat     strcat
94
#define _tcscpy     strcpy
95
#define _tcsdup     strdup
96
 
97
#define _tcslen     strlen
98
#define _tcsxfrm    strxfrm
99
 
100
 
101
/* Execute functions */
102
 
103
#define _texecl     execl
104
#define _texecle    execle
105
#define _texeclp    execlp
106
#define _texeclpe   execlpe
107
#define _texecv     execv
108
#define _texecve    execve
109
#define _texecvp    execvp
110
#define _texecvpe   execvpe
111
 
112
#define _tspawnl    spawnl
113
#define _tspawnle   spawnle
114
#define _tspawnlp   spawnlp
115
#define _tspawnlpe  spawnlpe
116
#define _tspawnv    spawnv
117
#define _tspawnve   spawnve
118
#define _tspawnvp   spawnvp
119
#define _tspawnvpe  spawnvpe
120
 
121
#define _tsystem    system
122
 
123
 
124
/* Time functions */
125
 
126
#define _tasctime   asctime
127
#define _tctime     ctime
128
#define _tstrdate   strdate
129
#define _tstrtime   strtime
130
#define _tutime     utime
131
#define _tcsftime   strftime
132
 
133
 
134
/* Directory functions */
135
 
136
#define _tchdir     chdir
137
#define _tgetcwd    getcwd
138
#define _tgetdcwd   getdcwd
139
#define _tmkdir(x)  mkdir(x,00700)
140
#define _trmdir     rmdir
141
 
142
 
143
/* Environment/Path functions */
144
 
145
#define _tfullpath  fullpath
146
#define _tgetenv    getenv
147
#define _tmakepath  makepath
148
// Yuck - /usr/include/stdlib.h defines it as char*, not const char*
149
#define _tputenv(s) putenv((char*)(s.c_str()))
150
#define _tsearchenv searchenv
151
#define _tsplitpath splitpath
152
 
153
 
154
/* Stdio functions */
155
 
156
#define _tfdopen    fdopen
157
#define _tfsopen    fsopen
158
#define _tfopen     fopen
159
#define _tfreopen   freopen
160
#define _tperror    perror
161
#define _tpopen     popen
162
#define _ttempnam   tempnam
163
#define _ttmpnam    tmpnam
164
 
165
 
166
/* Io functions */
167
 
168
#define _tchmod     chmod
169
#define _tcreat     creat
170
#define _tfindfirst findfirst
171
#define _tfindfirsti64  findfirsti64
172
#define _tfindnext  findnext
173
#define _tfindnexti64   findnexti64
174
#define _tmktemp    mktemp
175
 
176
#define _topen      open
177
#define _taccess    access
178
 
179
#define _tremove    remove
180
#define _trename    rename
181
#define _tsopen     sopen
182
#define _tunlink    unlink
183
 
184
#define _tfinddata_t    finddata_t
185
#define _tfinddatai64_t finddatai64_t
186
 
187
 
188
/* ctype functions */
189
 
190
#define _istascii   isascii
191
#define _istcntrl   iscntrl
192
#define _istxdigit  isxdigit
193
 
194
 
195
/* Stat functions */
196
 
197
#define _tstat      stat
198
#define _tstati64   stati64
199
 
200
 
201
 
202
/* ++++++++++++++++++++ SBCS ++++++++++++++++++++ */
203
 
204
 
205
typedef char            _TCHAR;
206
typedef signed char     _TSCHAR;
207
typedef unsigned char   _TUCHAR;
208
typedef char            _TXCHAR;
209
typedef int             _TINT;
210
 
211
/* String functions */
212
 
213
#define _tcschr     strchr
214
#define _tcscspn    strcspn
215
#define _tcsncat    strncat
216
#define _tcsncpy    strncpy
217
#define _tcspbrk    strpbrk
218
#define _tcsrchr    strrchr
219
#define _tcsspn     strspn
220
#define _tcsstr     strstr
221
#define _tcstok     strtok
222
 
223
#define _tcsnset    strnset
224
#define _tcsrev     strrev
225
#define _tcsset     strset
226
 
227
#define _tcscmp     strcmp
228
#define _tcsicmp    strcasecmp
229
#define _tcsnccmp   strncmp
230
#define _tcsncmp    strncmp
231
#define _tcsncicmp  strnicmp
232
#define _tcsnicmp   strncasecmp
233
 
234
#define _tcscoll    strcoll
235
#define _tcsicoll   stricoll
236
#define _tcsnccoll  strncoll
237
#define _tcsncoll   strncoll
238
#define _tcsncicoll strnicoll
239
#define _tcsnicoll  strnicoll
240
 
241
 
242
/* "logical-character" mappings */
243
 
244
#define _tcsclen    strlen
245
#define _tcsnccat   strncat
246
#define _tcsnccpy   strncpy
247
#define _tcsncset   strnset
248
 
249
 
250
/* MBCS-specific functions */
251
 
252
#define _tcsdec     strdec
253
#define _tcsinc     strinc
254
#define _tcsnbcnt   strncnt
255
#define _tcsnccnt   strncnt
256
#define _tcsnextc   strnextc
257
#define _tcsninc    strninc
258
#define _tcsspnp    strspnp
259
 
260
#define _tcslwr     strlwr
261
#define _tcsupr     strupr
262
#define _tcsxfrm    strxfrm
263
 
264
#define _istlead(_c)    (0)
265
#define _istleadbyte(_c)    (0)
266
 
267
/* ctype-functions */
268
 
269
#define _istalnum   isalnum
270
#define _istalpha   isalpha
271
#define _istdigit   isdigit
272
#define _istgraph   isgraph
273
#define _istlower   islower
274
#define _istprint   isprint
275
#define _istpunct   ispunct
276
#define _istspace   isspace
277
#define _istupper   isupper
278
 
279
#define _totupper   toupper
280
#define _totlower   tolower
281
 
282
#define _istlegal(_c)   (1)
283
 
284
typedef char *LPTSTR;
285
typedef const char *LPCTSTR;
286
typedef char TCHAR;
287
 
288
#define _TCHAR(x) x
289
#define _T(x) x
290
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.