Fixed some issues found by winapi_check.
[wine] / dlls / crtdll / crtdll.h
1 #ifndef __WINE_CRTDLL_H
2 #define __WINE_CRTDLL_H
3
4 #include "config.h"
5 #include "windef.h"
6 #include "wine/windef16.h"
7 #include "debugtools.h"
8 #include "winbase.h"
9 #include "winerror.h"
10 #include "winnls.h"
11 #include <time.h>
12 #include <stdarg.h>
13 #include <setjmp.h>
14
15
16 #define CRTDLL_LC_ALL           0
17 #define CRTDLL_LC_COLLATE       1
18 #define CRTDLL_LC_CTYPE         2
19 #define CRTDLL_LC_MONETARY      3
20 #define CRTDLL_LC_NUMERIC       4
21 #define CRTDLL_LC_TIME          5
22 #define CRTDLL_LC_MIN           CRTDLL_LC_ALL
23 #define CRTDLL_LC_MAX           CRTDLL_LC_TIME
24
25 /* ctype defines */
26 #define CRTDLL_UPPER            C1_UPPER
27 #define CRTDLL_LOWER            C1_LOWER
28 #define CRTDLL_DIGIT            C1_DIGIT
29 #define CRTDLL_SPACE            C1_SPACE
30 #define CRTDLL_PUNCT            C1_PUNCT
31 #define CRTDLL_CONTROL          C1_CNTRL
32 #define CRTDLL_BLANK            C1_BLANK
33 #define CRTDLL_HEX              C1_XDIGIT
34 #define CRTDLL_LEADBYTE         0x8000
35 #define CRTDLL_ALPHA            (C1_ALPHA|CRTDLL_UPPER|CRTDLL_LOWER)
36
37 /* stat() mode bits */
38 #define _S_IFMT                  0170000
39 #define _S_IFREG                 0100000
40 #define _S_IFDIR                 0040000
41 #define _S_IFCHR                 0020000
42 #define _S_IFIFO                 0010000
43 #define _S_IREAD                 0000400
44 #define _S_IWRITE                0000200
45 #define _S_IEXEC                 0000100
46
47 /* _open modes */
48 #define _O_RDONLY 0x0000
49 #define _O_WRONLY 0x0001
50 #define _O_RDWR   0x0002
51 #define _O_APPEND 0x0008
52 #define _O_CREAT  0x0100
53 #define _O_TRUNC  0x0200
54 #define _O_EXCL   0x0400
55 #define _O_TEXT   0x4000
56 #define _O_BINARY 0x8000
57
58 #define _O_TEMPORARY 0x0040 /* Will be closed and deleted on exit */
59
60 /* _access() bit flags FIXME: incomplete */
61 #define W_OK      2
62
63 /* windows.h RAND_MAX is smaller than normal RAND_MAX */
64 #define CRTDLL_RAND_MAX         0x7fff
65
66 /* heap function constants */
67 #define _HEAPEMPTY    -1
68 #define _HEAPOK       -2
69 #define _HEAPBADBEGIN -3
70 #define _HEAPBADNODE  -4
71 #define _HEAPEND      -5
72 #define _HEAPBADPTR   -6
73 #define _FREEENTRY    0
74 #define _USEDENTRY    1
75
76 /* fpclass constants */
77 #define _FPCLASS_SNAN 1
78 #define _FPCLASS_QNAN 2
79 #define _FPCLASS_NINF 4
80 #define _FPCLASS_NN   8
81 #define _FPCLASS_ND   16
82 #define _FPCLASS_NZ   32
83 #define _FPCLASS_PZ   64
84 #define _FPCLASS_PD   128
85 #define _FPCLASS_PN   256
86 #define _FPCLASS_PINF 512
87
88 /* _statusfp bit flags */
89 #define _SW_INEXACT    0x1
90 #define _SW_UNDERFLOW  0x2
91 #define _SW_OVERFLOW   0x4
92 #define _SW_ZERODIVIDE 0x8
93 #define _SW_INVALID    0x10
94 #define _SW_DENORMAL   0x80000
95
96 /* _controlfp masks and bitflags - x86 only so far*/
97 #ifdef __i386__
98 #define _MCW_EM        0x8001f
99 #define _EM_INEXACT    0x1
100 #define _EM_UNDERFLOW  0x2
101 #define _EM_OVERFLOW   0x4
102 #define _EM_ZERODIVIDE 0x8
103 #define _EM_INVALID    0x10
104
105 #define _MCW_RC        0x300
106 #define _RC_NEAR       0x0
107 #define _RC_DOWN       0x100
108 #define _RC_UP         0x200
109 #define _RC_CHOP       0x300
110
111 #define _MCW_PC        0x30000
112 #define _PC_64         0x0
113 #define _PC_53         0x10000
114 #define _PC_24         0x20000
115
116 #define _MCW_IC        0x40000
117 #define _IC_AFFINE     0x40000
118 #define _IC_PROJECTIVE 0x0
119
120 #define _EM_DENORMAL   0x80000
121
122 #endif
123
124 /* CRTDLL Globals */
125 extern INT  CRTDLL_doserrno;
126 extern INT  CRTDLL_errno;
127
128
129 /* Binary compatible structures, types and defines used
130  * by CRTDLL. These should move to external header files,
131  * and in some cases need to be renamed (CRTDLL_FILE!) to defs
132  * as used by lcc/bcc/watcom/vc++ etc, in order to get source
133  * compatibility for winelib.
134  */
135
136 typedef struct _crtfile
137 {
138   CHAR* _ptr;
139   INT   _cnt;
140   CHAR* _base;
141   INT   _flag;
142   INT   _file; /* fd */
143   int   _charbuf;
144   int   _bufsiz;
145   char *_tmpfname;
146 } CRTDLL_FILE;
147
148 /* file._flag flags */
149 #define _IOREAD   0x0001
150 #define _IOWRT    0x0002
151 #define _IOEOF    0x0010
152 #define _IOERR    0x0020
153 #define _IORW     0x0080
154 #define _IOAPPEND 0x0200
155
156 #define SEEK_SET    0
157 #define SEEK_CUR    1
158 #define SEEK_END    2
159
160 #define CRTDLL_EOF   -1
161 #define CRTDLL_WEOF (WCHAR)(0xFFFF)
162
163 extern CRTDLL_FILE __CRTDLL_iob[3];
164
165 #define CRTDLL_stdin  (&__CRTDLL_iob[0])
166 #define CRTDLL_stdout (&__CRTDLL_iob[1])
167 #define CRTDLL_stderr (&__CRTDLL_iob[2])
168
169 typedef struct _find_t
170 {
171   unsigned      attrib;
172   time_t        time_create; /* -1 when N/A */
173   time_t        time_access; /* -1 when N/A */
174   time_t        time_write;
175   unsigned long size;        /* FIXME: 64 bit ??*/
176   char          name[MAX_PATH];
177 } find_t;
178
179 typedef struct _diskfree_t {
180   unsigned num_clusters;
181   unsigned available;
182   unsigned cluster_sectors;
183   unsigned sector_bytes;
184 } diskfree_t;
185
186 struct _stat
187 {
188     UINT16 st_dev;
189     UINT16 st_ino;
190     UINT16 st_mode;
191     INT16  st_nlink;
192     INT16  st_uid;
193     INT16  st_gid;
194     UINT   st_rdev;
195     INT    st_size;
196     INT    st_atime;
197     INT    st_mtime;
198     INT    st_ctime;
199 };
200
201 struct _timeb
202 {
203   time_t  time;
204   UINT16  millitm;
205   INT16   timezone;
206   INT16   dstflag;
207 };
208
209 typedef long CRTDLL_fpos_t;
210
211 struct complex
212 {
213   double real;
214   double imaginary;
215 };
216
217 typedef struct _heapinfo
218 {
219   int * _pentry;
220   size_t _size;
221   int    _useflag;
222 } _HEAPINFO;
223
224 struct _utimbuf
225 {
226   time_t actime;
227   time_t modtime;
228 };
229
230 /* _matherr exception type */
231 struct _exception
232 {
233   int type;
234   char *name;
235   double arg1;
236   double arg2;
237   double retval;
238 };
239
240 typedef VOID (*sig_handler_type)(VOID);
241
242 typedef VOID (*new_handler_type)(VOID);
243
244 typedef VOID (*_INITTERMFUN)();
245
246 typedef VOID (*atexit_function)(VOID);
247
248 typedef INT (__cdecl *comp_func)(LPCVOID, LPCVOID );
249
250 /* CRTDLL functions */
251
252 /* dir.c */
253 INT    __cdecl CRTDLL__chdir( LPCSTR newdir );
254 BOOL   __cdecl CRTDLL__chdrive( INT newdrive );
255 INT    __cdecl CRTDLL__findclose( DWORD hand );
256 DWORD  __cdecl CRTDLL__findfirst( LPCSTR fspec, find_t* ft );
257 INT    __cdecl CRTDLL__findnext( DWORD hand, find_t * ft );
258 CHAR*  __cdecl CRTDLL__getcwd( LPSTR buf, INT size );
259 CHAR*  __cdecl CRTDLL__getdcwd( INT drive,LPSTR buf, INT size );
260 UINT   __cdecl CRTDLL__getdiskfree( UINT disk, diskfree_t* d );
261 INT    __cdecl CRTDLL__getdrive( VOID );
262 INT    __cdecl CRTDLL__mkdir( LPCSTR newdir );
263 INT    __cdecl CRTDLL__rmdir( LPSTR dir );
264
265 /* exit.c */
266 INT    __cdecl CRTDLL__abnormal_termination( VOID );
267 VOID   __cdecl CRTDLL__amsg_exit( INT err );
268 VOID   __cdecl CRTDLL__assert( LPVOID str, LPVOID file, UINT line );
269 VOID   __cdecl CRTDLL__c_exit( VOID );
270 VOID   __cdecl CRTDLL__cexit( VOID );
271 void   __cdecl CRTDLL_exit( DWORD ret );
272 VOID   __cdecl CRTDLL__exit( LONG ret );
273 VOID   __cdecl CRTDLL_abort( VOID );
274 INT    __cdecl CRTDLL_atexit( atexit_function x );
275 atexit_function __cdecl CRTDLL__onexit( atexit_function func);
276
277 /* file.c */
278 CRTDLL_FILE* __cdecl CRTDLL__iob( VOID );
279 CRTDLL_FILE* __cdecl CRTDLL__fsopen( LPCSTR path, LPCSTR mode, INT share );
280 CRTDLL_FILE* __cdecl CRTDLL__fdopen( INT fd, LPCSTR mode );
281 LPSTR        __cdecl CRTDLL__mktemp( LPSTR pattern );
282 CRTDLL_FILE* __cdecl CRTDLL_fopen( LPCSTR path, LPCSTR mode );
283 CRTDLL_FILE* __cdecl CRTDLL_freopen( LPCSTR path,LPCSTR mode,CRTDLL_FILE* f );
284 CRTDLL_FILE* __cdecl CRTDLL_tmpfile( void );
285 WCHAR  __cdecl CRTDLL__fgetwchar( VOID );
286 INT    __cdecl CRTDLL__fgetchar( VOID );
287 DWORD  __cdecl CRTDLL_fread( LPVOID ptr,INT size,INT nmemb,CRTDLL_FILE* file );
288 INT    __cdecl CRTDLL_fscanf( CRTDLL_FILE* stream, LPCSTR format, ... );
289 INT    __cdecl CRTDLL__filbuf( CRTDLL_FILE* file );
290 LONG   __cdecl CRTDLL__filelength( INT fd );
291 INT    __cdecl CRTDLL__fileno( CRTDLL_FILE* file );
292 INT    __cdecl CRTDLL__flsbuf( INT c, CRTDLL_FILE* file );
293 INT    __cdecl CRTDLL__fputchar( INT c );
294 WCHAR  __cdecl CRTDLL__fputwchar( WCHAR wc );
295 INT    __cdecl CRTDLL__flushall( VOID );
296 INT    __cdecl CRTDLL__fcloseall( VOID );
297 LONG   __cdecl CRTDLL__lseek( INT fd, LONG offset, INT whence );
298 LONG   __cdecl CRTDLL_fseek( CRTDLL_FILE* file, LONG offset, INT whence );
299 VOID   __cdecl CRTDLL_rewind( CRTDLL_FILE* file );
300 INT    __cdecl CRTDLL_fsetpos( CRTDLL_FILE* file, CRTDLL_fpos_t *pos );
301 LONG   __cdecl CRTDLL_ftell( CRTDLL_FILE* file );
302 UINT   __cdecl CRTDLL_fwrite( LPCVOID ptr,INT size,INT nmemb,CRTDLL_FILE*file);
303 INT    __cdecl CRTDLL_setbuf( CRTDLL_FILE* file, LPSTR buf );
304 INT    __cdecl CRTDLL__open_osfhandle( HANDLE osfhandle, INT flags );
305 INT    __cdecl CRTDLL_vfprintf( CRTDLL_FILE* file, LPCSTR format,va_list args);
306 INT    __cdecl CRTDLL_fprintf( CRTDLL_FILE* file, LPCSTR format, ... );
307 INT    __cdecl CRTDLL__putw( INT val, CRTDLL_FILE* file );
308 INT    __cdecl CRTDLL__read( INT fd, LPVOID buf, UINT count );
309 INT    __cdecl CRTDLL__rmtmp( void );
310 UINT   __cdecl CRTDLL__write( INT fd,LPCVOID buf,UINT count );
311 INT    __cdecl CRTDLL__access( LPCSTR filename, INT mode );
312 INT    __cdecl CRTDLL_fflush( CRTDLL_FILE* file );
313 INT    __cdecl CRTDLL_fputc( INT c, CRTDLL_FILE* file );
314 VOID   __cdecl CRTDLL_putchar( INT x );
315 INT    __cdecl CRTDLL_fputs( LPCSTR s, CRTDLL_FILE* file );
316 INT    __cdecl CRTDLL_puts( LPCSTR s );
317 INT    __cdecl CRTDLL_putc( INT c, CRTDLL_FILE* file );
318 INT    __cdecl CRTDLL_fgetc( CRTDLL_FILE* file );
319 INT    __cdecl CRTDLL_getchar( VOID );
320 INT    __cdecl CRTDLL_getc( CRTDLL_FILE* file );
321 WCHAR  __cdecl CRTDLL_fgetwc( CRTDLL_FILE* file );
322 WCHAR  __cdecl CRTDLL_fputwc( WCHAR wc, CRTDLL_FILE* file );
323 CHAR*  __cdecl CRTDLL_fgets( LPSTR s, INT size, CRTDLL_FILE* file );
324 LPSTR  __cdecl CRTDLL_gets( LPSTR buf );
325 INT    __cdecl CRTDLL_fclose( CRTDLL_FILE* file );
326 INT    __cdecl CTRDLL__creat( LPCSTR path, INT flags );
327 INT    __cdecl CRTDLL__eof( INT fd );
328 LONG   __cdecl CRTDLL__tell(INT fd);
329 INT    __cdecl CRTDLL__umask(INT umask);
330 INT    __cdecl CRTDLL__utime( LPCSTR path, struct _utimbuf *t );
331 INT    __cdecl CRTDLL__unlink( LPCSTR pathname );
332 INT    __cdecl CRTDLL_scanf( LPCSTR format, ... );
333 INT    __cdecl CRTDLL_rename( LPCSTR oldpath,LPCSTR newpath );
334 int    __cdecl CRTDLL__stat(  LPCSTR filename, struct _stat * buf );
335 INT    __cdecl CRTDLL__open( LPCSTR path,INT flags );
336 INT    __cdecl CRTDLL__chmod( LPCSTR path, INT flags );
337 INT    __cdecl CRTDLL__close( INT fd );
338 INT    __cdecl CRTDLL_feof( CRTDLL_FILE* file );
339 INT    __cdecl CRTDLL__setmode( INT fh,INT mode );
340 INT    __cdecl CRTDLL_remove( LPCSTR path );
341 INT    __cdecl CRTDLL__commit( INT fd );
342 INT    __cdecl CRTDLL__fstat( int file, struct _stat* buf );
343 INT    __cdecl CRTDLL__futime( INT fd, struct _utimbuf *t );
344 HANDLE __cdecl CRTDLL__get_osfhandle( INT fd );
345
346 /* CRTDLL_main.c */
347 DWORD  __cdecl CRTDLL__initterm( _INITTERMFUN *start,_INITTERMFUN *end );
348 VOID   __cdecl CRTDLL__global_unwind2( PEXCEPTION_FRAME frame );
349 VOID   __cdecl CRTDLL__local_unwind2( PEXCEPTION_FRAME endframe, DWORD nr );
350 INT    __cdecl CRTDLL__setjmp( LPDWORD *jmpbuf );
351 VOID   __cdecl CRTDLL_srand( DWORD seed );
352 INT    __cdecl CRTDLL__getw( CRTDLL_FILE* file );
353 INT    __cdecl CRTDLL__isatty(INT fd);
354 VOID   __cdecl CRTDLL__beep( UINT freq, UINT duration );
355 INT    __cdecl CRTDLL_rand( VOID );
356 UINT   __cdecl CRTDLL__rotl( UINT x,INT shift );
357 double __cdecl CRTDLL__logb( double x );
358 DWORD  __cdecl CRTDLL__lrotl( DWORD x,INT shift );
359 DWORD  __cdecl CRTDLL__lrotr( DWORD x,INT shift );
360 DWORD  __cdecl CRTDLL__rotr( UINT x,INT shift );
361 double __cdecl CRTDLL__scalb( double x, LONG y );
362 INT    __cdecl CRTDLL__mbsicmp( unsigned char *x,unsigned char *y );
363 INT    __cdecl CRTDLL_vswprintf( LPWSTR buffer, LPCWSTR spec, va_list args );
364 VOID   __cdecl CRTDLL_longjmp( jmp_buf env, int val );
365 LPSTR  __cdecl CRTDLL_setlocale( INT category,LPCSTR locale );
366 INT    __cdecl CRTDLL__isctype( INT c, UINT type );
367 LPSTR  __cdecl CRTDLL__fullpath( LPSTR buf, LPCSTR name, INT size );
368 VOID   __cdecl CRTDLL__splitpath(LPCSTR inpath, LPSTR drv, LPSTR dir,
369                                  LPSTR fname, LPSTR ext );
370 INT    __cdecl CRTDLL__matherr( struct _exception *e );
371 VOID   __cdecl CRTDLL__makepath( LPSTR path, LPCSTR drive,
372                                  LPCSTR directory, LPCSTR filename,
373                                  LPCSTR extension );
374 LPINT  __cdecl CRTDLL__errno( VOID );
375 LPINT  __cdecl CRTDLL___doserrno( VOID );
376 LPCSTR**__cdecl CRTDLL__sys_errlist( VOID );
377 VOID   __cdecl CRTDLL_perror( LPCSTR err );
378 UINT   __cdecl CRTDLL__statusfp( VOID );
379 LPSTR  __cdecl CRTDLL__strerror( LPCSTR err );
380 LPSTR  __cdecl CRTDLL_strerror( INT err );
381 LPSTR  __cdecl CRTDLL__tempnam( LPCSTR dir, LPCSTR prefix );
382 LPSTR  __cdecl CRTDLL_tmpnam( LPSTR s );
383 LPVOID __cdecl CRTDLL_signal( INT sig, sig_handler_type ptr );
384 VOID   __cdecl CRTDLL__sleep( ULONG timeout );
385 LPSTR  __cdecl CRTDLL_getenv( LPCSTR name );
386 INT    __cdecl CRTDLL_isalnum( INT c );
387 INT    __cdecl CRTDLL_isalpha( INT c );
388 INT    __cdecl CRTDLL_iscntrl( INT c );
389 INT    __cdecl CRTDLL_isdigit( INT c );
390 INT    __cdecl CRTDLL_isgraph( INT c );
391 INT    __cdecl CRTDLL_islower( INT c);
392 INT    __cdecl CRTDLL_isprint( INT c);
393 INT    __cdecl CRTDLL_ispunct( INT c);
394 INT    __cdecl CRTDLL_isspace( INT c);
395 INT    __cdecl CRTDLL_isupper( INT c);
396 INT    __cdecl CRTDLL_isxdigit( INT c );
397 INT    __cdecl CRTDLL_isleadbyte( UCHAR c );
398 double __cdecl CRTDLL_ldexp( double x, LONG y );
399 LPSTR  __cdecl CRTDLL__mbsrchr( LPSTR s,CHAR x );
400 VOID   __cdecl CRTDLL___dllonexit ( VOID );
401 VOID   __cdecl CRTDLL__mbccpy( LPSTR dest, LPSTR src );
402 INT    __cdecl CRTDLL___isascii( INT c );
403 INT    __cdecl CRTDLL___toascii( INT c );
404 INT    __cdecl CRTDLL_iswascii( LONG c );
405 INT    __cdecl CRTDLL___iscsym( UCHAR c );
406 INT    __cdecl CRTDLL___iscsymf( UCHAR c );
407 INT    __cdecl CRTDLL__loaddll( LPSTR dllname );
408 INT    __cdecl CRTDLL__unloaddll( HANDLE dll );
409 WCHAR* __cdecl CRTDLL__itow( INT value,WCHAR* out,INT base );
410 WCHAR* __cdecl CRTDLL__ltow( LONG value,WCHAR* out,INT base );
411 WCHAR* __cdecl CRTDLL__ultow( ULONG value,WCHAR* out,INT base );
412 CHAR   __cdecl CRTDLL__toupper( CHAR c );
413 CHAR   __cdecl CRTDLL__tolower( CHAR c );
414 double __cdecl CRTDLL__cabs( struct complex c );
415 double __cdecl CRTDLL__chgsign( double d );
416 UINT   __cdecl CRTDLL__control87( UINT newVal, UINT mask);
417 UINT   __cdecl CRTDLL__controlfp( UINT newVal, UINT mask);
418 double __cdecl CRTDLL__copysign( double x, double sign );
419 INT    __cdecl CRTDLL__finite( double d );
420 UINT   __cdecl CRTDLL__clearfp( VOID );
421 INT    __cdecl CRTDLL__fpclass( double d );
422 VOID   __cdecl CRTDLL__fpreset( void );
423 INT    __cdecl CRTDLL__isnan( double d );
424 LPVOID __cdecl CRTDLL__lsearch( LPVOID match, LPVOID start, LPUINT array_size,
425                                 UINT elem_size, comp_func cf );
426 VOID   __cdecl CRTDLL__purecall( VOID );
427 double __cdecl CRTDLL__y0( double x );
428 double __cdecl CRTDLL__y1( double x );
429 double __cdecl CRTDLL__yn( INT x, double y );
430 double __cdecl CRTDLL__nextafter( double x, double y );
431 VOID   __cdecl CRTDLL__searchenv(LPCSTR file, LPCSTR env, LPSTR buff);
432
433 /* memory.c */
434 LPVOID  __cdecl CRTDLL_new( DWORD size );
435 VOID   __cdecl CRTDLL_delete( LPVOID ptr );
436 new_handler_type __cdecl CRTDLL_set_new_handler( new_handler_type func );
437 INT    __cdecl CRTDLL__heapchk( VOID );
438 INT    __cdecl CRTDLL__heapmin( VOID );
439 INT    __cdecl CRTDLL__heapset( UINT value );
440 INT    __cdecl CRTDLL__heapwalk( struct _heapinfo *next );
441 LPVOID __cdecl CRTDLL__expand( LPVOID ptr, INT size );
442 LONG   __cdecl CRTDLL__msize( LPVOID mem );
443 LPVOID __cdecl CRTDLL_calloc( DWORD size, DWORD count );
444 VOID   __cdecl CRTDLL_free( LPVOID ptr );
445 LPVOID __cdecl CRTDLL_malloc( DWORD size );
446 LPVOID __cdecl CRTDLL_realloc( VOID *ptr, DWORD size );
447
448 /* spawn.c */
449 HANDLE __cdecl CRTDLL__spawnv( INT flags, LPCSTR name, LPCSTR *argv);
450 HANDLE __cdecl CRTDLL__spawnve( INT flags, LPCSTR name, LPCSTR *argv, LPCSTR *envv);
451 HANDLE __cdecl CRTDLL__spawnvp( INT flags, LPCSTR name, LPCSTR *argv);
452 HANDLE __cdecl CRTDLL__spawnvpe( INT flags, LPCSTR name, LPCSTR *argv, LPCSTR *envv);
453 INT    __cdecl CRTDLL_system( LPCSTR cmd );
454 INT    __cdecl CRTDLL__cwait( LPINT status, INT pid, INT action );
455
456 /* str.c */
457 LPSTR  __cdecl CRTDLL__strdec( LPSTR str1, LPSTR str2 );
458 LPSTR  __cdecl CRTDLL__strdup( LPCSTR ptr );
459 LPSTR  __cdecl CRTDLL__strinc( LPSTR str );
460 UINT   __cdecl CRTDLL__strnextc( LPCSTR str );
461 LPSTR  __cdecl CRTDLL__strninc( LPSTR str, INT n );
462 LPSTR  __cdecl CRTDLL__strnset( LPSTR str, INT c, INT len );
463 LPSTR  __cdecl CRTDLL__strrev ( LPSTR str );
464 LPSTR  __cdecl CRTDLL__strset ( LPSTR str, INT set );
465 LONG   __cdecl CRTDLL__strncnt( LPSTR str, LONG max );
466 LPSTR  __cdecl CRTDLL__strspnp( LPSTR str1, LPSTR str2 );
467 VOID   __cdecl CRTDLL__swab( LPSTR src, LPSTR dst, INT len );
468
469 /* time.c */
470 LPSTR   __cdecl CRTDLL__strdate ( LPSTR date );
471 LPSTR   __cdecl CRTDLL__strtime ( LPSTR date );
472 clock_t __cdecl CRTDLL_clock ( void );
473 double  __cdecl CRTDLL_difftime ( time_t time1, time_t time2 );
474 time_t  __cdecl CRTDLL_time ( time_t *timeptr );
475
476 /* mbstring.c */
477 LPSTR  __cdecl CRTDLL__mbsinc( LPCSTR str );
478 INT    __cdecl CRTDLL__mbslen( LPCSTR str );
479 INT    __cdecl CRTDLL_mbtowc( WCHAR *dst, LPCSTR str, INT n );
480 LPWSTR __cdecl CRTDLL__wcsdup( LPCWSTR str );
481 INT    __cdecl CRTDLL__wcsicoll( LPCWSTR str1, LPCWSTR str2 );
482 LPWSTR __cdecl CRTDLL__wcsnset( LPWSTR str, WCHAR c, INT n );
483 LPWSTR __cdecl CRTDLL__wcsrev( LPWSTR str );
484 LPWSTR __cdecl CRTDLL__wcsset( LPWSTR str, WCHAR c );
485 DWORD  __cdecl CRTDLL_wcscoll( LPCWSTR str1, LPCWSTR str2 );
486 LPWSTR __cdecl CRTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept );
487 INT    __cdecl CRTDLL_wctomb( LPSTR dst, WCHAR ch );
488
489 /* wcstring.c */
490 INT    __cdecl CRTDLL_iswalnum( WCHAR wc );
491 INT    __cdecl CRTDLL_iswalpha( WCHAR wc );
492 INT    __cdecl CRTDLL_iswcntrl( WCHAR wc );
493 INT    __cdecl CRTDLL_iswdigit( WCHAR wc );
494 INT    __cdecl CRTDLL_iswgraph( WCHAR wc );
495 INT    __cdecl CRTDLL_iswlower( WCHAR wc );
496 INT    __cdecl CRTDLL_iswprint( WCHAR wc );
497 INT    __cdecl CRTDLL_iswpunct( WCHAR wc );
498 INT    __cdecl CRTDLL_iswspace( WCHAR wc );
499 INT    __cdecl CRTDLL_iswupper( WCHAR wc );
500 INT    __cdecl CRTDLL_iswxdigit( WCHAR wc );
501
502 /* console.c */
503 LPSTR  __cdecl CRTDLL__cgets( LPSTR str );
504 INT    __cdecl CRTDLL__cfprintf( LPCSTR format, ... );
505 INT    __cdecl CRTDLL__cputs( LPCSTR str );
506 INT    __cdecl CRTDLL__cscanf( LPCSTR format, ... );
507 INT    __cdecl CRTDLL__getch( VOID );
508 INT    __cdecl CRTDLL__getche( VOID );
509 INT    __cdecl CRTDLL__kbhit( VOID );
510 INT    __cdecl CRTDLL__putch( INT c );
511 INT    __cdecl CRTDLL__ungetch( INT c );
512
513
514 /* INTERNAL: Shared internal functions */
515 void   __CRTDLL__set_errno(ULONG err);
516 LPSTR  __CRTDLL__strndup(LPSTR buf, INT size);
517 VOID   __CRTDLL__init_io(VOID);
518 VOID   __CRTDLL_init_console(VOID);
519 VOID   __CRTDLL_free_console(VOID);
520
521 extern WORD CRTDLL_ctype [257];
522 extern WORD __CRTDLL_current_ctype[257];
523 extern WORD* CRTDLL_pctype_dll;
524 extern INT CRTDLL__mb_cur_max_dll;
525 extern LCID __CRTDLL_current_lc_all_lcid;
526
527 #endif /* __WINE_CRTDLL_H */