Split the MSVCRT implementation headers from the public headers. Fix some naming conventions aberrations. Add tests to ensure consistency between the two sets of symbols.
diff --git a/include/msvcrt/conio.h b/include/msvcrt/conio.h index 086659f..f3e72e6 100644 --- a/include/msvcrt/conio.h +++ b/include/msvcrt/conio.h
@@ -39,7 +39,6 @@ #endif -#ifndef USE_MSVCRT_PREFIX static inline char* cgets(char* str) { return _cgets(str); } static inline int cputs(const char* str) { return _cputs(str); } static inline int getch(void) { return _getch(); } @@ -62,6 +61,4 @@ #define cscanf _cscanf #endif /* __GNUC__ */ -#endif /* USE_MSVCRT_PREFIX */ - #endif /* __WINE_CONIO_H */
diff --git a/include/msvcrt/ctype.h b/include/msvcrt/ctype.h index 31febe0..538dca7 100644 --- a/include/msvcrt/ctype.h +++ b/include/msvcrt/ctype.h
@@ -11,38 +11,24 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - #ifdef __cplusplus extern "C" { #endif -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifndef USE_MSVCRT_PREFIX -# ifndef WEOF -# define WEOF (wint_t)(0xFFFF) -# endif -#else -# ifndef MSVCRT_WEOF -# define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF) -# endif -#endif /* USE_MSVCRT_PREFIX */ +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif #ifndef _WCTYPE_T_DEFINED -typedef unsigned short MSVCRT(wint_t); -typedef unsigned short MSVCRT(wctype_t); +typedef unsigned short wint_t; +typedef unsigned short wctype_t; #define _WCTYPE_T_DEFINED #endif @@ -58,58 +44,56 @@ #define _LEADBYTE 0x8000 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */ -int MSVCRT(__isascii)(int); -int MSVCRT(__iscsym)(int); -int MSVCRT(__iscsymf)(int); -int MSVCRT(__toascii)(int); -int MSVCRT(_isctype)(int,int); -int MSVCRT(_tolower)(int); -int MSVCRT(_toupper)(int); -int MSVCRT(isalnum)(int); -int MSVCRT(isalpha)(int); -int MSVCRT(iscntrl)(int); -int MSVCRT(isdigit)(int); -int MSVCRT(isgraph)(int); -int MSVCRT(islower)(int); -int MSVCRT(isprint)(int); -int MSVCRT(ispunct)(int); -int MSVCRT(isspace)(int); -int MSVCRT(isupper)(int); -int MSVCRT(isxdigit)(int); -int MSVCRT(tolower)(int); -int MSVCRT(toupper)(int); +int __isascii(int); +int __iscsym(int); +int __iscsymf(int); +int __toascii(int); +int _isctype(int,int); +int _tolower(int); +int _toupper(int); +int isalnum(int); +int isalpha(int); +int iscntrl(int); +int isdigit(int); +int isgraph(int); +int islower(int); +int isprint(int); +int ispunct(int); +int isspace(int); +int isupper(int); +int isxdigit(int); +int tolower(int); +int toupper(int); -#ifndef MSVCRT_WCTYPE_DEFINED -#define MSVCRT_WCTYPE_DEFINED -int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); -int MSVCRT(isleadbyte)(int); -int MSVCRT(iswalnum)(MSVCRT(wint_t)); -int MSVCRT(iswalpha)(MSVCRT(wint_t)); -int MSVCRT(iswascii)(MSVCRT(wint_t)); -int MSVCRT(iswcntrl)(MSVCRT(wint_t)); -int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); -int MSVCRT(iswdigit)(MSVCRT(wint_t)); -int MSVCRT(iswgraph)(MSVCRT(wint_t)); -int MSVCRT(iswlower)(MSVCRT(wint_t)); -int MSVCRT(iswprint)(MSVCRT(wint_t)); -int MSVCRT(iswpunct)(MSVCRT(wint_t)); -int MSVCRT(iswspace)(MSVCRT(wint_t)); -int MSVCRT(iswupper)(MSVCRT(wint_t)); -int MSVCRT(iswxdigit)(MSVCRT(wint_t)); -MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t)); -MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t)); -#endif /* MSVCRT_WCTYPE_DEFINED */ +#ifndef _WCTYPE_DEFINED +#define _WCTYPE_DEFINED +int is_wctype(wint_t,wctype_t); +int isleadbyte(int); +int iswalnum(wint_t); +int iswalpha(wint_t); +int iswascii(wint_t); +int iswcntrl(wint_t); +int iswctype(wint_t,wctype_t); +int iswdigit(wint_t); +int iswgraph(wint_t); +int iswlower(wint_t); +int iswprint(wint_t); +int iswpunct(wint_t); +int iswspace(wint_t); +int iswupper(wint_t); +int iswxdigit(wint_t); +wchar_t towlower(wchar_t); +wchar_t towupper(wchar_t); +#endif /* _WCTYPE_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX static inline int isascii(int c) { return __isascii(c); } static inline int iscsym(int c) { return __iscsym(c); } static inline int iscsymf(int c) { return __iscsymf(c); } static inline int toascii(int c) { return __toascii(c); } -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_CTYPE_H */
diff --git a/include/msvcrt/direct.h b/include/msvcrt/direct.h index e4fef57..76ad31b 100644 --- a/include/msvcrt/direct.h +++ b/include/msvcrt/direct.h
@@ -11,39 +11,31 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - #ifdef __cplusplus extern "C" { #endif -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif -#ifndef MSVCRT_DISKFREE_T_DEFINED -#define MSVCRT_DISKFREE_T_DEFINED -struct MSVCRT(_diskfree_t) { +#ifndef _DISKFREE_T_DEFINED +#define _DISKFREE_T_DEFINED +struct _diskfree_t { unsigned int total_clusters; unsigned int avail_clusters; unsigned int sectors_per_cluster; unsigned int bytes_per_sector; }; -#endif /* MSVCRT_DISKFREE_T_DEFINED */ +#endif /* _DISKFREE_T_DEFINED */ int _chdir(const char*); int _chdrive(int); @@ -54,25 +46,23 @@ int _mkdir(const char*); int _rmdir(const char*); -#ifndef MSVCRT_WDIRECT_DEFINED -#define MSVCRT_WDIRECT_DEFINED -int _wchdir(const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)* _wgetcwd(MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)* _wgetdcwd(int,MSVCRT(wchar_t)*,int); -int _wmkdir(const MSVCRT(wchar_t)*); -int _wrmdir(const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WDIRECT_DEFINED */ +#ifndef _WDIRECT_DEFINED +#define _WDIRECT_DEFINED +int _wchdir(const wchar_t*); +wchar_t* _wgetcwd(wchar_t*,int); +wchar_t* _wgetdcwd(int,wchar_t*,int); +int _wmkdir(const wchar_t*); +int _wrmdir(const wchar_t*); +#endif /* _WDIRECT_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX static inline int chdir(const char* newdir) { return _chdir(newdir); } static inline char* getcwd(char * buf, int size) { return _getcwd(buf, size); } static inline int mkdir(const char* newdir) { return _mkdir(newdir); } static inline int rmdir(const char* dir) { return _rmdir(dir); } -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_DIRECT_H */
diff --git a/include/msvcrt/dos.h b/include/msvcrt/dos.h index 4e8b993..a35e642 100644 --- a/include/msvcrt/dos.h +++ b/include/msvcrt/dos.h
@@ -20,30 +20,28 @@ #define _A_SUBDIR 0x00000010 #define _A_ARCH 0x00000020 -#ifndef MSVCRT_DISKFREE_T_DEFINED -#define MSVCRT_DISKFREE_T_DEFINED -struct MSVCRT(_diskfree_t) { +#ifndef _DISKFREE_T_DEFINED +#define _DISKFREE_T_DEFINED +struct _diskfree_t { unsigned int total_clusters; unsigned int avail_clusters; unsigned int sectors_per_cluster; unsigned int bytes_per_sector; }; -#endif /* MSVCRT_DISKFREE_T_DEFINED */ +#endif /* _DISKFREE_T_DEFINED */ #ifdef __cplusplus extern "C" { #endif -unsigned int MSVCRT(_getdiskfree)(unsigned int, struct MSVCRT(_diskfree_t) *); +unsigned int _getdiskfree(unsigned int, struct _diskfree_t *); #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX -#define MSVCRT(diskfree_t) MSVCRT(_diskfree_t) -#endif /* USE_MSVCRT_PREFIX */ +#define diskfree_t _diskfree_t #endif /* __WINE_DOS_H */
diff --git a/include/msvcrt/eh.h b/include/msvcrt/eh.h index 14201fb..162d229 100644 --- a/include/msvcrt/eh.h +++ b/include/msvcrt/eh.h
@@ -23,18 +23,10 @@ #define __WINE_USE_MSVCRT #endif -#if !defined(__cplusplus) && !defined(USE_MSVCRT_PREFIX) +#if !defined(__cplusplus) && !defined(__WINE_MSVCRT_TEST) #error "eh.h is meant only for C++ applications" #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - struct _EXCEPTION_POINTERS; typedef void (*terminate_handler)(); @@ -43,11 +35,11 @@ typedef void (*unexpected_function)(); typedef void (*_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); -terminate_function MSVCRT(set_terminate)(terminate_function func); -unexpected_function MSVCRT(set_unexpected)(unexpected_function func); -_se_translator_function MSVCRT(_set_se_translator)(_se_translator_function func); +terminate_function set_terminate(terminate_function func); +unexpected_function set_unexpected(unexpected_function func); +_se_translator_function _set_se_translator(_se_translator_function func); -void MSVCRT(terminate)(); -void MSVCRT(unexpected)(); +void terminate(); +void unexpected(); #endif /* __WINE_EH_H */
diff --git a/include/msvcrt/errno.h b/include/msvcrt/errno.h index 4c117e0..9d88eeb 100644 --- a/include/msvcrt/errno.h +++ b/include/msvcrt/errno.h
@@ -22,57 +22,6 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifdef USE_MSVCRT_PREFIX - -# define MSVCRT_EPERM 1 -# define MSVCRT_ENOENT 2 -# define MSVCRT_ESRCH 3 -# define MSVCRT_EINTR 4 -# define MSVCRT_EIO 5 -# define MSVCRT_ENXIO 6 -# define MSVCRT_E2BIG 7 -# define MSVCRT_ENOEXEC 8 -# define MSVCRT_EBADF 9 -# define MSVCRT_ECHILD 10 -# define MSVCRT_EAGAIN 11 -# define MSVCRT_ENOMEM 12 -# define MSVCRT_EACCES 13 -# define MSVCRT_EFAULT 14 -# define MSVCRT_EBUSY 16 -# define MSVCRT_EEXIST 17 -# define MSVCRT_EXDEV 18 -# define MSVCRT_ENODEV 19 -# define MSVCRT_ENOTDIR 20 -# define MSVCRT_EISDIR 21 -# define MSVCRT_EINVAL 22 -# define MSVCRT_ENFILE 23 -# define MSVCRT_EMFILE 24 -# define MSVCRT_ENOTTY 25 -# define MSVCRT_EFBIG 27 -# define MSVCRT_ENOSPC 28 -# define MSVCRT_ESPIPE 29 -# define MSVCRT_EROFS 30 -# define MSVCRT_EMLINK 31 -# define MSVCRT_EPIPE 32 -# define MSVCRT_EDOM 33 -# define MSVCRT_ERANGE 34 -# define MSVCRT_EDEADLK 36 -# define MSVCRT_EDEADLOCK MSVCRT_EDEADLK -# define MSVCRT_ENAMETOOLONG 38 -# define MSVCRT_ENOLCK 39 -# define MSVCRT_ENOSYS 40 -# define MSVCRT_ENOTEMPTY 41 - -#else /* USE_MSVCRT_PREFIX */ - # define EPERM 1 # define ENOENT 2 # define ESRCH 3 @@ -112,22 +61,16 @@ # define ENOSYS 40 # define ENOTEMPTY 41 -#endif /* USE_MSVCRT_PREFIX */ - #ifdef __cplusplus extern "C" { #endif -extern int* MSVCRT(_errno)(void); +extern int* _errno(void); #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX -# define errno (*_errno()) -#else -# define MSVCRT_errno (*MSVCRT__errno()) -#endif +#define errno (*_errno()) #endif /* __WINE_ERRNO_H */
diff --git a/include/msvcrt/fcntl.h b/include/msvcrt/fcntl.h index 38c436c..7a6c6ec 100644 --- a/include/msvcrt/fcntl.h +++ b/include/msvcrt/fcntl.h
@@ -29,7 +29,6 @@ #define _O_RAW _O_BINARY -#ifndef USE_MSVCRT_PREFIX #define O_RDONLY _O_RDONLY #define O_WRONLY _O_WRONLY #define O_RDWR _O_RDWR @@ -45,6 +44,5 @@ #define O_TEXT _O_TEXT #define O_BINARY _O_BINARY #define O_RAW _O_BINARY -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_FCNTL_H */
diff --git a/include/msvcrt/float.h b/include/msvcrt/float.h index 5f7cddd..0fa9322 100644 --- a/include/msvcrt/float.h +++ b/include/msvcrt/float.h
@@ -12,14 +12,6 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - #ifdef __cplusplus extern "C" { #endif
diff --git a/include/msvcrt/io.h b/include/msvcrt/io.h index cb58ff0..c3581dd 100644 --- a/include/msvcrt/io.h +++ b/include/msvcrt/io.h
@@ -11,18 +11,10 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif @@ -41,59 +33,59 @@ #define _A_SUBDIR 0x00000010 #define _A_ARCH 0x00000020 -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef MSVCRT_FSIZE_T_DEFINED -typedef unsigned long MSVCRT(_fsize_t); -#define MSVCRT_FSIZE_T_DEFINED +#ifndef _FSIZE_T_DEFINED +typedef unsigned long _fsize_t; +#define _FSIZE_T_DEFINED #endif -#ifndef MSVCRT_FINDDATA_T_DEFINED -#define MSVCRT_FINDDATA_T_DEFINED -struct MSVCRT(_finddata_t) +#ifndef _FINDDATA_T_DEFINED +#define _FINDDATA_T_DEFINED +struct _finddata_t { unsigned attrib; - MSVCRT(time_t) time_create; - MSVCRT(time_t) time_access; - MSVCRT(time_t) time_write; - MSVCRT(_fsize_t) size; + time_t time_create; + time_t time_access; + time_t time_write; + _fsize_t size; char name[260]; }; -struct MSVCRT(_finddatai64_t) +struct _finddatai64_t { unsigned attrib; - MSVCRT(time_t) time_create; - MSVCRT(time_t) time_access; - MSVCRT(time_t) time_write; + time_t time_create; + time_t time_access; + time_t time_write; __int64 size; char name[260]; }; -#endif /* MSVCRT_FINDDATA_T_DEFINED */ +#endif /* _FINDDATA_T_DEFINED */ -#ifndef MSVCRT_WFINDDATA_T_DEFINED -#define MSVCRT_WFINDDATA_T_DEFINED -struct MSVCRT(_wfinddata_t) { +#ifndef _WFINDDATA_T_DEFINED +#define _WFINDDATA_T_DEFINED +struct _wfinddata_t { unsigned attrib; - MSVCRT(time_t) time_create; - MSVCRT(time_t) time_access; - MSVCRT(time_t) time_write; - MSVCRT(_fsize_t) size; - MSVCRT(wchar_t) name[260]; + time_t time_create; + time_t time_access; + time_t time_write; + _fsize_t size; + wchar_t name[260]; }; -struct MSVCRT(_wfinddatai64_t) { +struct _wfinddatai64_t { unsigned attrib; - MSVCRT(time_t) time_create; - MSVCRT(time_t) time_access; - MSVCRT(time_t) time_write; + time_t time_create; + time_t time_access; + time_t time_write; __int64 size; - MSVCRT(wchar_t) name[260]; + wchar_t name[260]; }; -#endif /* MSVCRT_WFINDDATA_T_DEFINED */ +#endif /* _WFINDDATA_T_DEFINED */ #ifdef __cplusplus extern "C" { @@ -111,10 +103,10 @@ __int64 _filelengthi64(int); long _filelength(int); int _findclose(long); -long MSVCRT(_findfirst)(const char*,struct MSVCRT(_finddata_t)*); -long MSVCRT(_findfirsti64)(const char*, struct MSVCRT(_finddatai64_t)*); -int MSVCRT(_findnext)(long,struct MSVCRT(_finddata_t)*); -int MSVCRT(_findnexti64)(long, struct MSVCRT(_finddatai64_t)*); +long _findfirst(const char*,struct _finddata_t*); +long _findfirsti64(const char*, struct _finddatai64_t*); +int _findnext(long,struct _finddata_t*); +int _findnexti64(long, struct _finddatai64_t*); long _get_osfhandle(int); int _isatty(int); int _locking(int,int,long); @@ -133,31 +125,30 @@ int _unlink(const char*); int _write(int,const void*,unsigned int); -int MSVCRT(remove)(const char*); -int MSVCRT(rename)(const char*,const char*); +int remove(const char*); +int rename(const char*,const char*); -#ifndef MSVCRT_WIO_DEFINED -#define MSVCRT_WIO_DEFINED -int _waccess(const MSVCRT(wchar_t)*,int); -int _wchmod(const MSVCRT(wchar_t)*,int); -int _wcreat(const MSVCRT(wchar_t)*,int); -long MSVCRT(_wfindfirst)(const MSVCRT(wchar_t)*,struct MSVCRT(_wfinddata_t)*); -long MSVCRT(_wfindfirsti64)(const MSVCRT(wchar_t)*, struct MSVCRT(_wfinddatai64_t)*); -int MSVCRT(_wfindnext)(long,struct MSVCRT(_wfinddata_t)*); -int MSVCRT(_wfindnexti64)(long, struct MSVCRT(_wfinddatai64_t)*); -MSVCRT(wchar_t)*_wmktemp(MSVCRT(wchar_t)*); -int _wopen(const MSVCRT(wchar_t)*,int,...); -int _wrename(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int _wsopen(const MSVCRT(wchar_t)*,int,int,...); -int _wunlink(const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WIO_DEFINED */ +#ifndef _WIO_DEFINED +#define _WIO_DEFINED +int _waccess(const wchar_t*,int); +int _wchmod(const wchar_t*,int); +int _wcreat(const wchar_t*,int); +long _wfindfirst(const wchar_t*,struct _wfinddata_t*); +long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); +int _wfindnext(long,struct _wfinddata_t*); +int _wfindnexti64(long, struct _wfinddatai64_t*); +wchar_t*_wmktemp(wchar_t*); +int _wopen(const wchar_t*,int,...); +int _wrename(const wchar_t*,const wchar_t*); +int _wsopen(const wchar_t*,int,int,...); +int _wunlink(const wchar_t*); +#endif /* _WIO_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX static inline int access(const char* path, int mode) { return _access(path, mode); } static inline int chmod(const char* path, int mode) { return _chmod(path, mode); } static inline int chsize(int fd, long size) { return _chsize(fd, size); } @@ -174,13 +165,13 @@ static inline int read(int fd, void* buf, unsigned int size) { return _read(fd, buf, size); } static inline int setmode(int fd, int mode) { return _setmode(fd, mode); } static inline long tell(int fd) { return _tell(fd); } -#ifndef MSVCRT_UMASK_DEFINED +#ifndef _UMASK_DEFINED static inline int umask(int fd) { return _umask(fd); } -#define MSVCRT_UMASK_DEFINED +#define _UMASK_DEFINED #endif -#ifndef MSVCRT_UNLINK_DEFINED +#ifndef _UNLINK_DEFINED static inline int unlink(const char* path) { return _unlink(path); } -#define MSVCRT_UNLINK_DEFINED +#define _UNLINK_DEFINED #endif static inline int write(int fd, const void* buf, unsigned int size) { return _write(fd, buf, size); } @@ -192,6 +183,4 @@ #define sopen _sopen #endif /* __GNUC__ */ -#endif /* USE _MSVCRT_PREFIX */ - #endif /* __WINE_IO_H */
diff --git a/include/msvcrt/locale.h b/include/msvcrt/locale.h index 89ef220..03a33cc 100644 --- a/include/msvcrt/locale.h +++ b/include/msvcrt/locale.h
@@ -23,31 +23,13 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifdef USE_MSVCRT_PREFIX -#define MSVCRT_LC_ALL 0 -#define MSVCRT_LC_COLLATE 1 -#define MSVCRT_LC_CTYPE 2 -#define MSVCRT_LC_MONETARY 3 -#define MSVCRT_LC_NUMERIC 4 -#define MSVCRT_LC_TIME 5 -#define MSVCRT_LC_MIN MSVCRT_LC_ALL -#define MSVCRT_LC_MAX MSVCRT_LC_TIME -#else #define LC_ALL 0 #define LC_COLLATE 1 #define LC_CTYPE 2 @@ -56,11 +38,10 @@ #define LC_TIME 5 #define LC_MIN LC_ALL #define LC_MAX LC_TIME -#endif /* USE_MSVCRT_PREFIX */ -#ifndef MSVCRT_LCONV_DEFINED -#define MSVCRT_LCONV_DEFINED -struct MSVCRT(lconv) +#ifndef _LCONV_DEFINED +#define _LCONV_DEFINED +struct lconv { char* decimal_point; char* thousands_sep; @@ -81,20 +62,20 @@ char p_sign_posn; char n_sign_posn; }; -#endif /* MSVCRT_LCONV_DEFINED */ +#endif /* _LCONV_DEFINED */ #ifdef __cplusplus extern "C" { #endif -char* MSVCRT(setlocale)(int,const char*); -struct MSVCRT(lconv)* MSVCRT(localeconv)(void); +char* setlocale(int,const char*); +struct lconv* localeconv(void); -#ifndef MSVCRT_WLOCALE_DEFINED -#define MSVCRT_WLOCALE_DEFINED -MSVCRT(wchar_t)* _wsetlocale(int,const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WLOCALE_DEFINED */ +#ifndef _WLOCALE_DEFINED +#define _WLOCALE_DEFINED +wchar_t* _wsetlocale(int,const wchar_t*); +#endif /* _WLOCALE_DEFINED */ #ifdef __cplusplus }
diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h index 83e62b8..3c1d09e 100644 --- a/include/msvcrt/malloc.h +++ b/include/msvcrt/malloc.h
@@ -23,14 +23,6 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - /* heap function constants */ #define _HEAPEMPTY -1 #define _HEAPOK -2 @@ -43,48 +35,46 @@ #define _USEDENTRY 1 -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif -#ifndef MSVCRT_HEAPINFO_DEFINED -#define MSVCRT_HEAPINFO_DEFINED +#ifndef _HEAPINFO_DEFINED +#define _HEAPINFO_DEFINED typedef struct _heapinfo { int* _pentry; - MSVCRT(size_t) _size; + size_t _size; int _useflag; } _HEAPINFO; -#endif /* MSVCRT_HEAPINFO_DEFINED */ +#endif /* _HEAPINFO_DEFINED */ #ifdef __cplusplus extern "C" { #endif -void* _expand(void*,MSVCRT(size_t)); -int _heapadd(void*,MSVCRT(size_t)); +void* _expand(void*,size_t); +int _heapadd(void*,size_t); int _heapchk(void); int _heapmin(void); int _heapset(unsigned int); -MSVCRT(size_t) _heapused(MSVCRT(size_t)*,MSVCRT(size_t)*); +size_t _heapused(size_t*,size_t*); int _heapwalk(_HEAPINFO*); -MSVCRT(size_t) _msize(void*); +size_t _msize(void*); -void* MSVCRT(calloc)(MSVCRT(size_t),MSVCRT(size_t)); -void MSVCRT(free)(void*); -void* MSVCRT(malloc)(MSVCRT(size_t)); -void* MSVCRT(realloc)(void*,MSVCRT(size_t)); +void* calloc(size_t,size_t); +void free(void*); +void* malloc(size_t); +void* realloc(void*,size_t); #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX # ifdef __GNUC__ # define _alloca(x) __builtin_alloca((x)) # define alloca(x) __builtin_alloca((x)) # endif -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_MALLOC_H */
diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index 058c0b6..81a51a6 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h
@@ -12,14 +12,6 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - #ifdef __cplusplus extern "C" { #endif @@ -31,9 +23,9 @@ #define _TLOSS 5 /* total loss of precision */ #define _PLOSS 6 /* partial loss of precision */ -#ifndef MSVCRT_EXCEPTION_DEFINED -#define MSVCRT_EXCEPTION_DEFINED -struct MSVCRT(_exception) +#ifndef _EXCEPTION_DEFINED +#define _EXCEPTION_DEFINED +struct _exception { int type; char *name; @@ -41,16 +33,16 @@ double arg2; double retval; }; -#endif /* MSVCRT_EXCEPTION_DEFINED */ +#endif /* _EXCEPTION_DEFINED */ -#ifndef MSVCRT_COMPLEX_DEFINED -#define MSVCRT_COMPLEX_DEFINED -struct MSVCRT(_complex) +#ifndef _COMPLEX_DEFINED +#define _COMPLEX_DEFINED +struct _complex { double x; /* Real part */ double y; /* Imaginary part */ }; -#endif /* MSVCRT_COMPLEX_DEFINED */ +#endif /* _COMPLEX_DEFINED */ double sin(double); double cos(double); @@ -83,8 +75,8 @@ double y1(double); double yn(int, double); -int MSVCRT(_matherr)(struct MSVCRT(_exception)*); -double MSVCRT(_cabs)(struct MSVCRT(_complex)); +int _matherr(struct _exception*); +double _cabs(struct _complex); #ifndef HUGE_VAL # if defined(__GNUC__) && (__GNUC__ >= 3)
diff --git a/include/msvcrt/mbctype.h b/include/msvcrt/mbctype.h index 5b569de..6a0af5e 100644 --- a/include/msvcrt/mbctype.h +++ b/include/msvcrt/mbctype.h
@@ -42,13 +42,13 @@ int _ismbbpunct(unsigned int); int _setmbcp(int); -#ifndef MSVCRT_MBLEADTRAIL_DEFINED -#define MSVCRT_MBLEADTRAIL_DEFINED +#ifndef _MBLEADTRAIL_DEFINED +#define _MBLEADTRAIL_DEFINED int _ismbblead(unsigned int); int _ismbbtrail(unsigned int); int _ismbslead(const unsigned char*,const unsigned char*); int _ismbstrail(const unsigned char*,const unsigned char*); -#endif /* MSVCRT_MBLEADTRAIL_DEFINED */ +#endif /* _MBLEADTRAIL_DEFINED */ #ifdef __cplusplus }
diff --git a/include/msvcrt/mbstring.h b/include/msvcrt/mbstring.h index 17f60cd..27dc63f 100644 --- a/include/msvcrt/mbstring.h +++ b/include/msvcrt/mbstring.h
@@ -23,22 +23,14 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED -#endif - -#ifndef MSVCRT_NLSCMP_DEFINED +#ifndef _NLSCMP_DEFINED #define _NLSCMPERROR ((unsigned int)0x7fffffff) -#define MSVCRT_NLSCMP_DEFINED +#define _NLSCMP_DEFINED #endif #ifdef __cplusplus @@ -67,64 +59,64 @@ void _mbccpy(unsigned char*,const unsigned char*); unsigned int _mbcjistojms(unsigned int); unsigned int _mbcjmstojis(unsigned int); -MSVCRT(size_t) _mbclen(const unsigned char*); +size_t _mbclen(const unsigned char*); unsigned int _mbctohira(unsigned int); unsigned int _mbctokata(unsigned int); unsigned int _mbctolower(unsigned int); unsigned int _mbctombb(unsigned int); unsigned int _mbctoupper(unsigned int); -int _mbsbtype(const unsigned char*,MSVCRT(size_t)); +int _mbsbtype(const unsigned char*,size_t); unsigned char* _mbscat(unsigned char*,const unsigned char*); unsigned char* _mbschr(const unsigned char*,unsigned int); int _mbscmp(const unsigned char*,const unsigned char*); int _mbscoll(const unsigned char*,const unsigned char*); unsigned char* _mbscpy(unsigned char*,const unsigned char*); -MSVCRT(size_t) _mbscspn(const unsigned char*,const unsigned char*); +size_t _mbscspn(const unsigned char*,const unsigned char*); unsigned char* _mbsdec(const unsigned char*,const unsigned char*); unsigned char* _mbsdup(const unsigned char*); int _mbsicmp(const unsigned char*,const unsigned char*); int _mbsicoll(const unsigned char*,const unsigned char*); unsigned char* _mbsinc(const unsigned char*); -MSVCRT(size_t) _mbslen(const unsigned char*); +size_t _mbslen(const unsigned char*); unsigned char* _mbslwr(unsigned char*); -unsigned char* _mbsnbcat(unsigned char*,const unsigned char*,MSVCRT(size_t)); -int _mbsnbcmp(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -int _mbsnbcoll(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -MSVCRT(size_t) _mbsnbcnt(const unsigned char*,MSVCRT(size_t)); +unsigned char* _mbsnbcat(unsigned char*,const unsigned char*,size_t); +int _mbsnbcmp(const unsigned char*,const unsigned char*,size_t); +int _mbsnbcoll(const unsigned char*,const unsigned char*,size_t); +size_t _mbsnbcnt(const unsigned char*,size_t); unsigned char* _mbsnbcpy(unsigned char*,const unsigned char* -,MSVCRT(size_t)); -int _mbsnbicmp(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -int _mbsnbicoll(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -unsigned char* _mbsnbset(unsigned char*,unsigned int,MSVCRT(size_t)) +,size_t); +int _mbsnbicmp(const unsigned char*,const unsigned char*,size_t); +int _mbsnbicoll(const unsigned char*,const unsigned char*,size_t); +unsigned char* _mbsnbset(unsigned char*,unsigned int,size_t) ; unsigned char* _mbsncat(unsigned char*,const unsigned char*, - MSVCRT(size_t)); -MSVCRT(size_t) _mbsnccnt(const unsigned char*,MSVCRT(size_t)); -int _mbsncmp(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -int _mbsncoll(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -unsigned char* _mbsncpy(unsigned char*,const unsigned char*,MSVCRT(size_t)); + size_t); +size_t _mbsnccnt(const unsigned char*,size_t); +int _mbsncmp(const unsigned char*,const unsigned char*,size_t); +int _mbsncoll(const unsigned char*,const unsigned char*,size_t); +unsigned char* _mbsncpy(unsigned char*,const unsigned char*,size_t); unsigned int _mbsnextc (const unsigned char*); -int _mbsnicmp(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -int _mbsnicoll(const unsigned char*,const unsigned char*,MSVCRT(size_t)); -unsigned char* _mbsninc(const unsigned char*,MSVCRT(size_t)); -unsigned char* _mbsnset(unsigned char*,unsigned int,MSVCRT(size_t)); +int _mbsnicmp(const unsigned char*,const unsigned char*,size_t); +int _mbsnicoll(const unsigned char*,const unsigned char*,size_t); +unsigned char* _mbsninc(const unsigned char*,size_t); +unsigned char* _mbsnset(unsigned char*,unsigned int,size_t); unsigned char* _mbspbrk(const unsigned char*,const unsigned char*); unsigned char* _mbsrchr(const unsigned char*,unsigned int); unsigned char* _mbsrev(unsigned char*); unsigned char* _mbsset(unsigned char*,unsigned int); -MSVCRT(size_t) _mbsspn(const unsigned char*,const unsigned char*); +size_t _mbsspn(const unsigned char*,const unsigned char*); unsigned char* _mbsspnp(const unsigned char*,const unsigned char*); unsigned char* _mbsstr(const unsigned char*,const unsigned char*); unsigned char* _mbstok(unsigned char*,const unsigned char*); unsigned char* _mbsupr(unsigned char*); -#ifndef MSVCRT_MBLEADTRAIL_DEFINED -#define MSVCRT_MBLEADTRAIL_DEFINED +#ifndef _MBLEADTRAIL_DEFINED +#define _MBLEADTRAIL_DEFINED int _ismbblead(unsigned int); int _ismbbtrail(unsigned int); int _ismbslead(const unsigned char*,const unsigned char*); int _ismbstrail(const unsigned char*,const unsigned char*); -#endif /* MSVCRT_MBLEADTRAIL_DEFINED */ +#endif /* _MBLEADTRAIL_DEFINED */ #ifdef __cplusplus }
diff --git a/include/msvcrt/process.h b/include/msvcrt/process.h index 1593dce..1c7aff5 100644 --- a/include/msvcrt/process.h +++ b/include/msvcrt/process.h
@@ -11,18 +11,10 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif @@ -80,40 +72,39 @@ int _spawnvp(int,const char*,const char* const *); int _spawnvpe(int,const char*,const char* const *,const char* const *); -void MSVCRT(_c_exit)(void); -void MSVCRT(_cexit)(void); -void MSVCRT(_exit)(int); -void MSVCRT(abort)(void); -void MSVCRT(exit)(int); -int MSVCRT(system)(const char*); +void _c_exit(void); +void _cexit(void); +void _exit(int); +void abort(void); +void exit(int); +int system(const char*); -#ifndef MSVCRT_WPROCESS_DEFINED -#define MSVCRT_WPROCESS_DEFINED -int _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wsystem(const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WPROCESS_DEFINED */ +#ifndef _WPROCESS_DEFINED +#define _WPROCESS_DEFINED +int _wexecl(const wchar_t*,const wchar_t*,...); +int _wexecle(const wchar_t*,const wchar_t*,...); +int _wexeclp(const wchar_t*,const wchar_t*,...); +int _wexeclpe(const wchar_t*,const wchar_t*,...); +int _wexecv(const wchar_t*,const wchar_t* const *); +int _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wexecvp(const wchar_t*,const wchar_t* const *); +int _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wspawnl(int,const wchar_t*,const wchar_t*,...); +int _wspawnle(int,const wchar_t*,const wchar_t*,...); +int _wspawnlp(int,const wchar_t*,const wchar_t*,...); +int _wspawnlpe(int,const wchar_t*,const wchar_t*,...); +int _wspawnv(int,const wchar_t*,const wchar_t* const *); +int _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wspawnvp(int,const wchar_t*,const wchar_t* const *); +int _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wsystem(const wchar_t*); +#endif /* _WPROCESS_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX #define P_WAIT _P_WAIT #define P_NOWAIT _P_NOWAIT #define P_OVERLAY _P_OVERLAY @@ -154,6 +145,4 @@ #define spawnlpe _spawnlpe #endif /* __GNUC__ */ -#endif /* USE_MSVCRT_PREFIX */ - #endif /* __WINE_PROCESS_H */
diff --git a/include/msvcrt/search.h b/include/msvcrt/search.h index 2c617fa..e6f8410 100644 --- a/include/msvcrt/search.h +++ b/include/msvcrt/search.h
@@ -23,17 +23,9 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif @@ -45,9 +37,9 @@ int (*)(const void*,const void*)); void* _lsearch(const void*,void*,unsigned int*,unsigned int, int (*)(const void*,const void*)); -void* MSVCRT(bsearch)(const void*,const void*,MSVCRT(size_t),MSVCRT(size_t), +void* bsearch(const void*,const void*,size_t,size_t, int (*)(const void*,const void*)); -void MSVCRT(qsort)(void*,MSVCRT(size_t),MSVCRT(size_t), +void qsort(void*,size_t,size_t, int (*)(const void*,const void*)); #ifdef __cplusplus @@ -55,9 +47,7 @@ #endif -#ifndef USE_MSVCRT_PREFIX static inline void* lfind(const void* match, const void* start, unsigned int* array_size, unsigned int elem_size, int (*cf)(const void*,const void*)) { return _lfind(match, start, array_size, elem_size, cf); } static inline void* lsearch(const void* match, void* start, unsigned int* array_size, unsigned int elem_size, int (*cf)(const void*,const void*) ) { return _lsearch(match, start, array_size, elem_size, cf); } -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_SEARCH_H */
diff --git a/include/msvcrt/setjmp.h b/include/msvcrt/setjmp.h index a03b05d..e2fa913 100644 --- a/include/msvcrt/setjmp.h +++ b/include/msvcrt/setjmp.h
@@ -23,15 +23,6 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - - #ifdef __i386__ typedef struct __JUMP_BUFFER @@ -52,30 +43,22 @@ #endif /* __i386__ */ -#ifndef USE_MSVCRT_PREFIX #define _JBLEN 16 #define _JBTYPE int typedef _JBTYPE jmp_buf[_JBLEN]; -#else -#define MSVCRT__JBLEN 16 -#define MSVCRT__JBTYPE int -typedef MSVCRT__JBTYPE MSVCRT_jmp_buf[MSVCRT__JBLEN]; -#endif #ifdef __cplusplus extern "C" { #endif -int MSVCRT(_setjmp)(MSVCRT(jmp_buf)); -int MSVCRT(longjmp)(MSVCRT(jmp_buf),int); +int _setjmp(jmp_buf); +int longjmp(jmp_buf,int); #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX #define setjmp _setjmp -#endif #endif /* __WINE_SETJMP_H */
diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h index 94af46e..1eb1a69 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/stddef.h
@@ -23,29 +23,21 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifndef MSVCRT_PTRDIFF_T_DEFINED +#ifndef _PTRDIFF_T_DEFINED typedef int ptrdiff_t; -#define MSVCRT_PTRDIFF_T_DEFINED +#define _PTRDIFF_T_DEFINED #endif -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif #ifndef NULL
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 12af723..fb881e2 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h
@@ -15,16 +15,7 @@ #include <stdarg.h> #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - /* file._flag flags */ -#ifndef USE_MSVCRT_PREFIX #define _IOREAD 0x0001 #define _IOWRT 0x0002 #define _IOMYBUF 0x0008 @@ -32,15 +23,6 @@ #define _IOERR 0x0020 #define _IOSTRG 0x0040 #define _IORW 0x0080 -#else -#define MSVCRT__IOREAD 0x0001 -#define MSVCRT__IOWRT 0x0002 -#define MSVCRT__IOMYBUF 0x0008 -#define MSVCRT__IOEOF 0x0010 -#define MSVCRT__IOERR 0x0020 -#define MSVCRT__IOSTRG 0x0040 -#define MSVCRT__IORW 0x0080 -#endif /* USE_MSVCRT_PREFIX */ #ifndef NULL #ifdef __cplusplus @@ -50,8 +32,6 @@ #endif #endif -#ifndef USE_MSVCRT_PREFIX - #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 @@ -75,29 +55,9 @@ #define SEEK_END 2 #endif -#else - -#define MSVCRT_STDIN_FILENO 0 -#define MSVCRT_STDOUT_FILENO 1 -#define MSVCRT_STDERR_FILENO 2 - -/* more file._flag flags, but these conflict with Unix */ -#define MSVCRT__IOFBF 0x0000 -#define MSVCRT__IONBF 0x0004 -#define MSVCRT__IOLBF 0x0040 - -#define MSVCRT_FILENAME_MAX 260 -#define MSVCRT_TMP_MAX 0x7fff - -#define MSVCRT_EOF (-1) - -#define MSVCRT_BUFSIZ 512 - -#endif /* USE_MSVCRT_PREFIX */ - -#ifndef MSVCRT_FILE_DEFINED -#define MSVCRT_FILE_DEFINED -typedef struct MSVCRT(_iobuf) +#ifndef _FILE_DEFINED +#define _FILE_DEFINED +typedef struct _iobuf { char* _ptr; int _cnt; @@ -107,29 +67,29 @@ int _charbuf; int _bufsiz; char* _tmpfname; -} MSVCRT(FILE); -#endif /* MSVCRT_FILE_DEFINED */ +} FILE; +#endif /* _FILE_DEFINED */ -#ifndef MSVCRT_FPOS_T_DEFINED -typedef long MSVCRT(fpos_t); -#define MSVCRT_FPOS_T_DEFINED +#ifndef _FPOS_T_DEFINED +typedef long fpos_t; +#define _FPOS_T_DEFINED #endif -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif #ifndef _WCTYPE_T_DEFINED -typedef unsigned short MSVCRT(wint_t); -typedef unsigned short MSVCRT(wctype_t); +typedef unsigned short wint_t; +typedef unsigned short wctype_t; #define _WCTYPE_T_DEFINED #endif @@ -137,153 +97,145 @@ extern "C" { #endif -#ifndef MSVCRT_STDIO_DEFINED -MSVCRT(FILE)* MSVCRT(__p__iob)(void); +#ifndef _STDIO_DEFINED +FILE* __p__iob(void); #define _iob (__p__iob()) -#endif /* MSVCRT_STDIO_DEFINED */ +#endif /* _STDIO_DEFINED */ -#ifndef USE_MSVCRT_PREFIX #define stdin (_iob+STDIN_FILENO) #define stdout (_iob+STDOUT_FILENO) #define stderr (_iob+STDERR_FILENO) -#else -#define MSVCRT_stdin (MSVCRT__iob+MSVCRT_STDIN_FILENO) -#define MSVCRT_stdout (MSVCRT__iob+MSVCRT_STDOUT_FILENO) -#define MSVCRT_stderr (MSVCRT__iob+MSVCRT_STDERR_FILENO) -#endif /* USE_MSVCRT_PREFIX */ -#ifndef MSVCRT_STDIO_DEFINED -#define MSVCRT_STDIO_DEFINED -int MSVCRT(_fcloseall)(void); -MSVCRT(FILE)* MSVCRT(_fdopen)(int,const char*); +#ifndef _STDIO_DEFINED +#define _STDIO_DEFINED +int _fcloseall(void); +FILE* _fdopen(int,const char*); int _fgetchar(void); -int MSVCRT(_filbuf)(MSVCRT(FILE*)); -int MSVCRT(_fileno)(MSVCRT(FILE)*); -int MSVCRT(_flsbuf)(int,MSVCRT(FILE)*); +int _filbuf(FILE*); +int _fileno(FILE*); +int _flsbuf(int,FILE*); int _flushall(void); int _fputchar(int); -MSVCRT(FILE)* _fsopen(const char*,const char*,int); +FILE* _fsopen(const char*,const char*,int); int _getmaxstdio(void); -int MSVCRT(_getw)(MSVCRT(FILE)*); -int MSVCRT(_pclose)(MSVCRT(FILE)*); -MSVCRT(FILE)* MSVCRT(_popen)(const char*,const char*); -int MSVCRT(_putw)(int,MSVCRT(FILE)*); +int _getw(FILE*); +int _pclose(FILE*); +FILE* _popen(const char*,const char*); +int _putw(int,FILE*); int _rmtmp(void); int _setmaxstdio(int); -int _snprintf(char*,MSVCRT(size_t),const char*,...); +int _snprintf(char*,size_t,const char*,...); char* _tempnam(const char*,const char*); int _unlink(const char*); -int _vsnprintf(char*,MSVCRT(size_t),const char*,va_list); +int _vsnprintf(char*,size_t,const char*,va_list); -void MSVCRT(clearerr)(MSVCRT(FILE)*); -int MSVCRT(fclose)(MSVCRT(FILE)*); -int MSVCRT(feof)(MSVCRT(FILE)*); -int MSVCRT(ferror)(MSVCRT(FILE)*); -int MSVCRT(fflush)(MSVCRT(FILE)*); -int MSVCRT(fgetc)(MSVCRT(FILE)*); -int MSVCRT(fgetpos)(MSVCRT(FILE)*,MSVCRT(fpos_t)*); -char* MSVCRT(fgets)(char*,int,MSVCRT(FILE)*); -MSVCRT(FILE)* MSVCRT(fopen)(const char*,const char*); -int MSVCRT(fprintf)(MSVCRT(FILE)*,const char*,...); -int MSVCRT(fputc)(int,MSVCRT(FILE)*); -int MSVCRT(fputs)(const char*,MSVCRT(FILE)*); -MSVCRT(size_t) MSVCRT(fread)(void*,MSVCRT(size_t),MSVCRT(size_t),MSVCRT(FILE)*); -MSVCRT(FILE)* MSVCRT(freopen)(const char*,const char*,MSVCRT(FILE)*); -int MSVCRT(fscanf)(MSVCRT(FILE)*,const char*,...); -int MSVCRT(fseek)(MSVCRT(FILE)*,long,int); -int MSVCRT(fsetpos)(MSVCRT(FILE)*,MSVCRT(fpos_t)*); -long MSVCRT(ftell)(MSVCRT(FILE)*); -MSVCRT(size_t) MSVCRT(fwrite)(const void*,MSVCRT(size_t),MSVCRT(size_t),MSVCRT(FILE)*); -int MSVCRT(getc)(MSVCRT(FILE)*); -int MSVCRT(getchar)(void); -char* MSVCRT(gets)(char*); -void MSVCRT(perror)(const char*); -int MSVCRT(printf)(const char*,...); -int MSVCRT(putc)(int,MSVCRT(FILE)*); -int MSVCRT(putchar)(int); -int MSVCRT(puts)(const char*); -int MSVCRT(remove)(const char*); -int MSVCRT(rename)(const char*,const char*); -void MSVCRT(rewind)(MSVCRT(FILE)*); -int MSVCRT(scanf)(const char*,...); -void MSVCRT(setbuf)(MSVCRT(FILE)*,char*); -int MSVCRT(setvbuf)(MSVCRT(FILE)*,char*,int,MSVCRT(size_t)); -int MSVCRT(sprintf)(char*,const char*,...); -int MSVCRT(sscanf)(const char*,const char*,...); -MSVCRT(FILE)* MSVCRT(tmpfile)(void); -char* MSVCRT(tmpnam)(char*); -int MSVCRT(ungetc)(int,MSVCRT(FILE)*); -int MSVCRT(vfprintf)(MSVCRT(FILE)*,const char*,va_list); -int MSVCRT(vprintf)(const char*,va_list); -int MSVCRT(vsprintf)(char*,const char*,va_list); +void clearerr(FILE*); +int fclose(FILE*); +int feof(FILE*); +int ferror(FILE*); +int fflush(FILE*); +int fgetc(FILE*); +int fgetpos(FILE*,fpos_t*); +char* fgets(char*,int,FILE*); +FILE* fopen(const char*,const char*); +int fprintf(FILE*,const char*,...); +int fputc(int,FILE*); +int fputs(const char*,FILE*); +size_t fread(void*,size_t,size_t,FILE*); +FILE* freopen(const char*,const char*,FILE*); +int fscanf(FILE*,const char*,...); +int fseek(FILE*,long,int); +int fsetpos(FILE*,fpos_t*); +long ftell(FILE*); +size_t fwrite(const void*,size_t,size_t,FILE*); +int getc(FILE*); +int getchar(void); +char* gets(char*); +void perror(const char*); +int printf(const char*,...); +int putc(int,FILE*); +int putchar(int); +int puts(const char*); +int remove(const char*); +int rename(const char*,const char*); +void rewind(FILE*); +int scanf(const char*,...); +void setbuf(FILE*,char*); +int setvbuf(FILE*,char*,int,size_t); +int sprintf(char*,const char*,...); +int sscanf(const char*,const char*,...); +FILE* tmpfile(void); +char* tmpnam(char*); +int ungetc(int,FILE*); +int vfprintf(FILE*,const char*,va_list); +int vprintf(const char*,va_list); +int vsprintf(char*,const char*,va_list); -#ifndef MSVCRT_WSTDIO_DEFINED -#define MSVCRT_WSTDIO_DEFINED -MSVCRT(wint_t) _fgetwchar(void); -MSVCRT(wint_t) _fputwchar(MSVCRT(wint_t)); -MSVCRT(wchar_t)*_getws(MSVCRT(wchar_t)*); -int _putws(const MSVCRT(wchar_t)*); -int _snwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,...); -int _vsnwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,va_list); -MSVCRT(FILE)* MSVCRT(_wfdopen)(int,const MSVCRT(wchar_t)*); -MSVCRT(FILE)* MSVCRT(_wfopen)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(FILE)* MSVCRT(_wfreopen)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(FILE)*); -MSVCRT(FILE)* MSVCRT(_wfsopen)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,int); -void _wperror(const MSVCRT(wchar_t)*); -MSVCRT(FILE)* MSVCRT(_wpopen)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int _wremove(const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wtempnam(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wtmpnam(MSVCRT(wchar_t)*); +#ifndef _WSTDIO_DEFINED +#define _WSTDIO_DEFINED +wint_t _fgetwchar(void); +wint_t _fputwchar(wint_t); +wchar_t*_getws(wchar_t*); +int _putws(const wchar_t*); +int _snwprintf(wchar_t*,size_t,const wchar_t*,...); +int _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list); +FILE* _wfdopen(int,const wchar_t*); +FILE* _wfopen(const wchar_t*,const wchar_t*); +FILE* _wfreopen(const wchar_t*,const wchar_t*,FILE*); +FILE* _wfsopen(const wchar_t*,const wchar_t*,int); +void _wperror(const wchar_t*); +FILE* _wpopen(const wchar_t*,const wchar_t*); +int _wremove(const wchar_t*); +wchar_t*_wtempnam(const wchar_t*,const wchar_t*); +wchar_t*_wtmpnam(wchar_t*); -MSVCRT(wint_t) MSVCRT(fgetwc)(MSVCRT(FILE)*); -MSVCRT(wchar_t)*MSVCRT(fgetws)(MSVCRT(wchar_t)*,int,MSVCRT(FILE)*); -MSVCRT(wint_t) MSVCRT(fputwc)(MSVCRT(wint_t),MSVCRT(FILE)*); -int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*); -int MSVCRT(fwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...); -int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*); -int MSVCRT(fwscanf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...); -MSVCRT(wint_t) MSVCRT(getwc)(MSVCRT(FILE)*); -MSVCRT(wint_t) MSVCRT(getwchar)(void); -MSVCRT(wchar_t)*MSVCRT(getws)(MSVCRT(wchar_t)*); -MSVCRT(wint_t) MSVCRT(putwc)(MSVCRT(wint_t),MSVCRT(FILE)*); -MSVCRT(wint_t) MSVCRT(putwchar)(MSVCRT(wint_t)); -int MSVCRT(putws)(const MSVCRT(wchar_t)*); -int MSVCRT(swprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int MSVCRT(swscanf)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -MSVCRT(wint_t) MSVCRT(ungetwc)(MSVCRT(wint_t),MSVCRT(FILE)*); -int MSVCRT(vfwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,va_list); -int MSVCRT(vswprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,va_list); -int MSVCRT(vwprintf)(const MSVCRT(wchar_t)*,va_list); -int MSVCRT(wprintf)(const MSVCRT(wchar_t)*,...); -int MSVCRT(wscanf)(const MSVCRT(wchar_t)*,...); -#endif /* MSVCRT_WSTDIO_DEFINED */ +wint_t fgetwc(FILE*); +wchar_t*fgetws(wchar_t*,int,FILE*); +wint_t fputwc(wint_t,FILE*); +int fputws(const wchar_t*,FILE*); +int fwprintf(FILE*,const wchar_t*,...); +int fputws(const wchar_t*,FILE*); +int fwscanf(FILE*,const wchar_t*,...); +wint_t getwc(FILE*); +wint_t getwchar(void); +wchar_t*getws(wchar_t*); +wint_t putwc(wint_t,FILE*); +wint_t putwchar(wint_t); +int putws(const wchar_t*); +int swprintf(wchar_t*,const wchar_t*,...); +int swscanf(const wchar_t*,const wchar_t*,...); +wint_t ungetwc(wint_t,FILE*); +int vfwprintf(FILE*,const wchar_t*,va_list); +int vswprintf(wchar_t*,const wchar_t*,va_list); +int vwprintf(const wchar_t*,va_list); +int wprintf(const wchar_t*,...); +int wscanf(const wchar_t*,...); +#endif /* _WSTDIO_DEFINED */ -#endif /* MSVCRT_STDIO_DEFINED */ +#endif /* _STDIO_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX -static inline MSVCRT(FILE)* fdopen(int fd, const char *mode) { return _fdopen(fd, mode); } +static inline FILE* fdopen(int fd, const char *mode) { return _fdopen(fd, mode); } static inline int fgetchar(void) { return _fgetchar(); } -static inline int fileno(MSVCRT(FILE)* file) { return _fileno(file); } +static inline int fileno(FILE* file) { return _fileno(file); } static inline int fputchar(int c) { return _fputchar(c); } -static inline int pclose(MSVCRT(FILE)* file) { return _pclose(file); } -static inline MSVCRT(FILE)* popen(const char* command, const char* mode) { return _popen(command, mode); } +static inline int pclose(FILE* file) { return _pclose(file); } +static inline FILE* popen(const char* command, const char* mode) { return _popen(command, mode); } static inline char* tempnam(const char *dir, const char *prefix) { return _tempnam(dir, prefix); } -#ifndef MSVCRT_UNLINK_DEFINED +#ifndef _UNLINK_DEFINED static inline int unlink(const char* path) { return _unlink(path); } -#define MSVCRT_UNLINK_DEFINED +#define _UNLINK_DEFINED #endif static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) { return _vsnprintf(buffer,size,format,args); } -static inline MSVCRT(wint_t) fgetwchar(void) { return _fgetwchar(); } -static inline MSVCRT(wint_t) fputwchar(MSVCRT(wint_t) wc) { return _fputwchar(wc); } -static inline int getw(MSVCRT(FILE)* file) { return _getw(file); } -static inline int putw(int val, MSVCRT(FILE)* file) { return _putw(val, file); } -static inline MSVCRT(FILE)* wpopen(const MSVCRT(wchar_t)* command,const MSVCRT(wchar_t)* mode) { return _wpopen(command, mode); } -#endif /* USE_MSVCRT_PREFIX */ +static inline wint_t fgetwchar(void) { return _fgetwchar(); } +static inline wint_t fputwchar(wint_t wc) { return _fputwchar(wc); } +static inline int getw(FILE* file) { return _getw(file); } +static inline int putw(int val, FILE* file) { return _putw(val, file); } +static inline FILE* wpopen(const wchar_t* command,const wchar_t* mode) { return _wpopen(command, mode); } #endif /* __WINE_STDIO_H */
diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index a34cfec..35488d5 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h
@@ -11,14 +11,6 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - #ifndef NULL #ifdef __cplusplus #define NULL 0 @@ -27,10 +19,10 @@ #endif #endif -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif @@ -40,13 +32,9 @@ # endif #endif -#ifndef USE_MSVCRT_PREFIX #define EXIT_SUCCESS 0 #define EXIT_FAILURE -1 #define RAND_MAX 0x7FFF -#else -#define MSVCRT_RAND_MAX 0x7FFF -#endif /* USE_MSVCRT_PREFIX */ #ifndef _MAX_PATH #define _MAX_DRIVE 3 @@ -57,19 +45,19 @@ #endif -typedef struct MSVCRT(_div_t) { +typedef struct _div_t { int quot; int rem; -} MSVCRT(div_t); +} div_t; -typedef struct MSVCRT(_ldiv_t) { +typedef struct _ldiv_t { long quot; long rem; -} MSVCRT(ldiv_t); +} ldiv_t; -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif #define __max(a,b) (((a) > (b)) ? (a) : (b)) @@ -101,17 +89,16 @@ extern int* __p___argc(void); extern char*** __p___argv(void); -extern MSVCRT(wchar_t)*** __p___wargv(void); +extern wchar_t*** __p___wargv(void); extern char*** __p__environ(void); -extern MSVCRT(wchar_t)*** __p__wenviron(void); +extern wchar_t*** __p__wenviron(void); extern int* __p___mb_cur_max(void); -extern unsigned long* MSVCRT(__doserrno)(void); +extern unsigned long* __doserrno(void); extern unsigned int* __p__fmode(void); /* FIXME: We need functions to access these: * int _sys_nerr; * char** _sys_errlist; */ -#ifndef USE_MSVCRT_PREFIX #define __argc (*__p___argc()) #define __argv (*__p___argv()) #define __wargv (*__p___wargv()) @@ -120,18 +107,13 @@ #define __mb_cur_max (*__p___mb_cur_max()) #define _doserrno (*__doserrno()) #define _fmode (*_fmode) -#endif /* USE_MSVCRT_PREFIX */ -extern int* MSVCRT(_errno)(void); -#ifndef USE_MSVCRT_PREFIX -# define errno (*_errno()) -#else -# define MSVCRT_errno (*MSVCRT__errno()) -#endif +extern int* _errno(void); +#define errno (*_errno()) -typedef int (*MSVCRT(_onexit_t))(void); +typedef int (*_onexit_t)(void); __int64 _atoi64(const char*); @@ -139,7 +121,7 @@ void _beep(unsigned int,unsigned int); char* _ecvt(double,int,int*,int*); char* _fcvt(double,int,int*,int*); -char* _fullpath(char*,const char*,MSVCRT(size_t)); +char* _fullpath(char*,const char*,size_t); char* _gcvt(double,int,char*); char* _i64toa(__int64,char*,int); char* _itoa(int,char*,int); @@ -147,8 +129,8 @@ unsigned long _lrotl(unsigned long,int); unsigned long _lrotr(unsigned long,int); void _makepath(char*,const char*,const char*,const char*,const char*); -MSVCRT(size_t) _mbstrlen(const char*); -MSVCRT(_onexit_t) MSVCRT(_onexit)(MSVCRT(_onexit_t)); +size_t _mbstrlen(const char*); +_onexit_t _onexit(_onexit_t); int _putenv(const char*); unsigned int _rotl(unsigned int,int); unsigned int _rotr(unsigned int,int); @@ -158,75 +140,74 @@ void _sleep(unsigned long); void _splitpath(const char*,char*,char*,char*,char*); long double _strtold(const char*,char**); -void MSVCRT(_swab)(char*,char*,int); +void _swab(char*,char*,int); char* _ui64toa(unsigned __int64,char*,int); char* _ultoa(unsigned long,char*,int); -void MSVCRT(_exit)(int); -void MSVCRT(abort)(); -int MSVCRT(abs)(int); -int MSVCRT(atexit)(void (*)(void)); -double MSVCRT(atof)(const char*); -int MSVCRT(atoi)(const char*); -long MSVCRT(atol)(const char*); -void* MSVCRT(calloc)(MSVCRT(size_t),MSVCRT(size_t)); +void _exit(int); +void abort(); +int abs(int); +int atexit(void (*)(void)); +double atof(const char*); +int atoi(const char*); +long atol(const char*); +void* calloc(size_t,size_t); #ifndef __i386__ -MSVCRT(div_t) MSVCRT(div)(int,int); -MSVCRT(ldiv_t) MSVCRT(ldiv)(long,long); +div_t div(int,int); +ldiv_t ldiv(long,long); #endif -void MSVCRT(exit)(int); -void MSVCRT(free)(void*); -char* MSVCRT(getenv)(const char*); -long MSVCRT(labs)(long); -void* MSVCRT(malloc)(MSVCRT(size_t)); -int MSVCRT(mblen)(const char*,MSVCRT(size_t)); -void MSVCRT(perror)(const char*); -int MSVCRT(rand)(void); -void* MSVCRT(realloc)(void*,MSVCRT(size_t)); -void MSVCRT(srand)(unsigned int); -double MSVCRT(strtod)(const char*,char**); -long MSVCRT(strtol)(const char*,char**,int); -unsigned long MSVCRT(strtoul)(const char*,char**,int); -int MSVCRT(system)(const char*); -void* MSVCRT(bsearch)(const void*,const void*,MSVCRT(size_t),MSVCRT(size_t), +void exit(int); +void free(void*); +char* getenv(const char*); +long labs(long); +void* malloc(size_t); +int mblen(const char*,size_t); +void perror(const char*); +int rand(void); +void* realloc(void*,size_t); +void srand(unsigned int); +double strtod(const char*,char**); +long strtol(const char*,char**,int); +unsigned long strtoul(const char*,char**,int); +int system(const char*); +void* bsearch(const void*,const void*,size_t,size_t, int (*)(const void*,const void*)); -void MSVCRT(qsort)(void*,MSVCRT(size_t),MSVCRT(size_t), +void qsort(void*,size_t,size_t, int (*)(const void*,const void*)); -#ifndef MSVCRT_WSTDLIB_DEFINED -#define MSVCRT_WSTDLIB_DEFINED -MSVCRT(wchar_t)*_itow(int,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_i64tow(__int64,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_ltow(long,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_ui64tow(unsigned __int64,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_ultow(unsigned long,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_wfullpath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*_wgetenv(const MSVCRT(wchar_t)*); -void _wmakepath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -void _wperror(const MSVCRT(wchar_t)*); -int _wputenv(const MSVCRT(wchar_t)*); -void _wsearchenv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*); -void _wsplitpath(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*); -int _wsystem(const MSVCRT(wchar_t)*); -int _wtoi(const MSVCRT(wchar_t)*); -__int64 _wtoi64(const MSVCRT(wchar_t)*); -long _wtol(const MSVCRT(wchar_t)*); +#ifndef _WSTDLIB_DEFINED +#define _WSTDLIB_DEFINED +wchar_t*_itow(int,wchar_t*,int); +wchar_t*_i64tow(__int64,wchar_t*,int); +wchar_t*_ltow(long,wchar_t*,int); +wchar_t*_ui64tow(unsigned __int64,wchar_t*,int); +wchar_t*_ultow(unsigned long,wchar_t*,int); +wchar_t*_wfullpath(wchar_t*,const wchar_t*,size_t); +wchar_t*_wgetenv(const wchar_t*); +void _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); +void _wperror(const wchar_t*); +int _wputenv(const wchar_t*); +void _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*); +void _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*); +int _wsystem(const wchar_t*); +int _wtoi(const wchar_t*); +__int64 _wtoi64(const wchar_t*); +long _wtol(const wchar_t*); -MSVCRT(size_t) MSVCRT(mbstowcs)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t)); -int MSVCRT(mbtowc)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t)); -double MSVCRT(wcstod)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**); -long MSVCRT(wcstol)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int); -MSVCRT(size_t) MSVCRT(wcstombs)(char*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -unsigned long MSVCRT(wcstoul)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int); -int MSVCRT(wctomb)(char*,MSVCRT(wchar_t)); -#endif /* MSVCRT_WSTDLIB_DEFINED */ +size_t mbstowcs(wchar_t*,const char*,size_t); +int mbtowc(wchar_t*,const char*,size_t); +double wcstod(const wchar_t*,wchar_t**); +long wcstol(const wchar_t*,wchar_t**,int); +size_t wcstombs(char*,const wchar_t*,size_t); +unsigned long wcstoul(const wchar_t*,wchar_t**,int); +int wctomb(char*,wchar_t); +#endif /* _WSTDLIB_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX #define environ _environ #define onexit_t _onexit_t @@ -263,6 +244,4 @@ #define ldiv(num,denom) __wine_msvcrt_ldiv(num,denom) #endif -#endif /* USE_MSVCRT_PREFIX */ - #endif /* __WINE_STDLIB_H */
diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index 83394ae..a821aa2 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h
@@ -11,29 +11,21 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif -#ifndef MSVCRT_NLSCMP_DEFINED +#ifndef _NLSCMP_DEFINED #define _NLSCMPERROR ((unsigned int)0x7fffffff) -#define MSVCRT_NLSCMP_DEFINED +#define _NLSCMP_DEFINED #endif #ifndef NULL @@ -56,73 +48,72 @@ int _stricmp(const char*,const char*); int _stricoll(const char*,const char*); char* _strlwr(char*); -int _strnicmp(const char*,const char*,MSVCRT(size_t)); -char* _strnset(char*,int,MSVCRT(size_t)); +int _strnicmp(const char*,const char*,size_t); +char* _strnset(char*,int,size_t); char* _strrev(char*); char* _strset(char*,int); char* _strupr(char*); -void* MSVCRT(memchr)(const void*,int,MSVCRT(size_t)); -int MSVCRT(memcmp)(const void*,const void*,MSVCRT(size_t)); -void* MSVCRT(memcpy)(void*,const void*,MSVCRT(size_t)); -void* MSVCRT(memmove)(void*,const void*,MSVCRT(size_t)); -void* MSVCRT(memset)(void*,int,MSVCRT(size_t)); -char* MSVCRT(strcat)(char*,const char*); -char* MSVCRT(strchr)(const char*,int); -int MSVCRT(strcmp)(const char*,const char*); -int MSVCRT(strcoll)(const char*,const char*); -char* MSVCRT(strcpy)(char*,const char*); -MSVCRT(size_t) MSVCRT(strcspn)(const char*,const char*); -char* MSVCRT(strerror)(int); -MSVCRT(size_t) MSVCRT(strlen)(const char*); -char* MSVCRT(strncat)(char*,const char*,MSVCRT(size_t)); -int MSVCRT(strncmp)(const char*,const char*,MSVCRT(size_t)); -char* MSVCRT(strncpy)(char*,const char*,MSVCRT(size_t)); -char* MSVCRT(strpbrk)(const char*,const char*); -char* MSVCRT(strrchr)(const char*,int); -MSVCRT(size_t) MSVCRT(strspn)(const char*,const char*); -char* MSVCRT(strstr)(const char*,const char*); -char* MSVCRT(strtok)(char*,const char*); -MSVCRT(size_t) MSVCRT(strxfrm)(char*,const char*,MSVCRT(size_t)); +void* memchr(const void*,int,size_t); +int memcmp(const void*,const void*,size_t); +void* memcpy(void*,const void*,size_t); +void* memmove(void*,const void*,size_t); +void* memset(void*,int,size_t); +char* strcat(char*,const char*); +char* strchr(const char*,int); +int strcmp(const char*,const char*); +int strcoll(const char*,const char*); +char* strcpy(char*,const char*); +size_t strcspn(const char*,const char*); +char* strerror(int); +size_t strlen(const char*); +char* strncat(char*,const char*,size_t); +int strncmp(const char*,const char*,size_t); +char* strncpy(char*,const char*,size_t); +char* strpbrk(const char*,const char*); +char* strrchr(const char*,int); +size_t strspn(const char*,const char*); +char* strstr(const char*,const char*); +char* strtok(char*,const char*); +size_t strxfrm(char*,const char*,size_t); -#ifndef MSVCRT_WSTRING_DEFINED -#define MSVCRT_WSTRING_DEFINED -MSVCRT(wchar_t)*_wcsdup(const MSVCRT(wchar_t)*); -int _wcsicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int _wcsicoll(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wcslwr(MSVCRT(wchar_t)*); -int _wcsnicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*_wcsnset(MSVCRT(wchar_t)*,MSVCRT(wchar_t),MSVCRT(size_t)); -MSVCRT(wchar_t)*_wcsrev(MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wcsset(MSVCRT(wchar_t)*,MSVCRT(wchar_t)); -MSVCRT(wchar_t)*_wcsupr(MSVCRT(wchar_t)*); +#ifndef _WSTRING_DEFINED +#define _WSTRING_DEFINED +wchar_t*_wcsdup(const wchar_t*); +int _wcsicmp(const wchar_t*,const wchar_t*); +int _wcsicoll(const wchar_t*,const wchar_t*); +wchar_t*_wcslwr(wchar_t*); +int _wcsnicmp(const wchar_t*,const wchar_t*,size_t); +wchar_t*_wcsnset(wchar_t*,wchar_t,size_t); +wchar_t*_wcsrev(wchar_t*); +wchar_t*_wcsset(wchar_t*,wchar_t); +wchar_t*_wcsupr(wchar_t*); -MSVCRT(wchar_t)*MSVCRT(wcscat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcschr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)); -int MSVCRT(wcscmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int MSVCRT(wcscoll)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcscpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(size_t) MSVCRT(wcscspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(size_t) MSVCRT(wcslen)(const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcsncat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -int MSVCRT(wcsncmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*MSVCRT(wcsncpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*MSVCRT(wcspbrk)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcsrchr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t) wcFor); -MSVCRT(size_t) MSVCRT(wcsspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcsstr)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcstok)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(size_t) MSVCRT(wcsxfrm)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -#endif /* MSVCRT_WSTRING_DEFINED */ +wchar_t*wcscat(wchar_t*,const wchar_t*); +wchar_t*wcschr(const wchar_t*,wchar_t); +int wcscmp(const wchar_t*,const wchar_t*); +int wcscoll(const wchar_t*,const wchar_t*); +wchar_t*wcscpy(wchar_t*,const wchar_t*); +size_t wcscspn(const wchar_t*,const wchar_t*); +size_t wcslen(const wchar_t*); +wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t); +int wcsncmp(const wchar_t*,const wchar_t*,size_t); +wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t); +wchar_t*wcspbrk(const wchar_t*,const wchar_t*); +wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor); +size_t wcsspn(const wchar_t*,const wchar_t*); +wchar_t*wcsstr(const wchar_t*,const wchar_t*); +wchar_t*wcstok(wchar_t*,const wchar_t*); +size_t wcsxfrm(wchar_t*,const wchar_t*,size_t); +#endif /* _WSTRING_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX -static inline void* memccpy(void *s1, const void *s2, int c, MSVCRT(size_t) n) { return _memccpy(s1, s2, c, n); } -static inline int memicmp(const void* s1, const void* s2, MSVCRT(size_t) len) { return _memicmp(s1, s2, len); } +static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _memccpy(s1, s2, c, n); } +static inline int memicmp(const void* s1, const void* s2, size_t len) { return _memicmp(s1, s2, len); } static inline int strcasecmp(const char* s1, const char* s2) { return _stricmp(s1, s2); } static inline int strcmpi(const char* s1, const char* s2) { return _strcmpi(s1, s2); } static inline char* strdup(const char* buf) { return _strdup(buf); } @@ -130,20 +121,19 @@ static inline int stricoll(const char* s1, const char* s2) { return _stricoll(s1, s2); } static inline char* strlwr(char* str) { return _strlwr(str); } static inline int strncasecmp(const char *str1, const char *str2, size_t n) { return _strnicmp(str1, str2, n); } -static inline int strnicmp(const char* s1, const char* s2, MSVCRT(size_t) n) { return _strnicmp(s1, s2, n); } +static inline int strnicmp(const char* s1, const char* s2, size_t n) { return _strnicmp(s1, s2, n); } static inline char* strnset(char* str, int value, unsigned int len) { return _strnset(str, value, len); } static inline char* strrev(char* str) { return _strrev(str); } static inline char* strset(char* str, int value) { return _strset(str, value); } static inline char* strupr(char* str) { return _strupr(str); } -static inline MSVCRT(wchar_t)* wcsdup(const MSVCRT(wchar_t)* str) { return _wcsdup(str); } -static inline int wcsicoll(const MSVCRT(wchar_t)* str1, const MSVCRT(wchar_t)* str2) { return _wcsicoll(str1, str2); } -static inline MSVCRT(wchar_t)* wcslwr(MSVCRT(wchar_t)* str) { return _wcslwr(str); } -static inline int wcsnicmp(const MSVCRT(wchar_t)* str1, const MSVCRT(wchar_t)* str2, MSVCRT(size_t) n) { return _wcsnicmp(str1, str2, n); } -static inline MSVCRT(wchar_t)* wcsnset(MSVCRT(wchar_t)* str, MSVCRT(wchar_t) c, MSVCRT(size_t) n) { return _wcsnset(str, c, n); } -static inline MSVCRT(wchar_t)* wcsrev(MSVCRT(wchar_t)* str) { return _wcsrev(str); } -static inline MSVCRT(wchar_t)* wcsset(MSVCRT(wchar_t)* str, MSVCRT(wchar_t) c) { return _wcsset(str, c); } -static inline MSVCRT(wchar_t)* wcsupr(MSVCRT(wchar_t)* str) { return _wcsupr(str); } -#endif /* USE_MSVCRT_PREFIX */ +static inline wchar_t* wcsdup(const wchar_t* str) { return _wcsdup(str); } +static inline int wcsicoll(const wchar_t* str1, const wchar_t* str2) { return _wcsicoll(str1, str2); } +static inline wchar_t* wcslwr(wchar_t* str) { return _wcslwr(str); } +static inline int wcsnicmp(const wchar_t* str1, const wchar_t* str2, size_t n) { return _wcsnicmp(str1, str2, n); } +static inline wchar_t* wcsnset(wchar_t* str, wchar_t c, size_t n) { return _wcsnset(str, c, n); } +static inline wchar_t* wcsrev(wchar_t* str) { return _wcsrev(str); } +static inline wchar_t* wcsset(wchar_t* str, wchar_t c) { return _wcsset(str, c); } +static inline wchar_t* wcsupr(wchar_t* str) { return _wcsupr(str); } #endif /* __WINE_STRING_H */
diff --git a/include/msvcrt/sys/stat.h b/include/msvcrt/sys/stat.h index c86e956..83026f2 100644 --- a/include/msvcrt/sys/stat.h +++ b/include/msvcrt/sys/stat.h
@@ -13,18 +13,10 @@ #include <sys/types.h> -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif @@ -34,24 +26,24 @@ # endif #endif -#ifndef MSVCRT_DEV_T_DEFINED -typedef unsigned int MSVCRT(_dev_t); -#define MSVCRT_DEV_T_DEFINED +#ifndef _DEV_T_DEFINED +typedef unsigned int _dev_t; +#define _DEV_T_DEFINED #endif -#ifndef MSVCRT_INO_T_DEFINED -typedef unsigned short MSVCRT(_ino_t); -#define MSVCRT_INO_T_DEFINED +#ifndef _INO_T_DEFINED +typedef unsigned short _ino_t; +#define _INO_T_DEFINED #endif -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef MSVCRT_OFF_T_DEFINED -typedef int MSVCRT(_off_t); -#define MSVCRT_OFF_T_DEFINED +#ifndef _OFF_T_DEFINED +typedef int _off_t; +#define _OFF_T_DEFINED #endif #define _S_IEXEC 0x0040 @@ -68,74 +60,73 @@ #undef st_ctime #undef st_mtime -#ifndef MSVCRT_STAT_DEFINED -#define MSVCRT_STAT_DEFINED +#ifndef _STAT_DEFINED +#define _STAT_DEFINED -struct MSVCRT(_stat) { - MSVCRT(_dev_t) st_dev; - MSVCRT(_ino_t) st_ino; +struct _stat { + _dev_t st_dev; + _ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; - MSVCRT(_dev_t) st_rdev; - MSVCRT(_off_t) st_size; - MSVCRT(time_t) st_atime; - MSVCRT(time_t) st_mtime; - MSVCRT(time_t) st_ctime; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; }; -struct MSVCRT(stat) { - MSVCRT(_dev_t) st_dev; - MSVCRT(_ino_t) st_ino; +struct stat { + _dev_t st_dev; + _ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; - MSVCRT(_dev_t) st_rdev; - MSVCRT(_off_t) st_size; - MSVCRT(time_t) st_atime; - MSVCRT(time_t) st_mtime; - MSVCRT(time_t) st_ctime; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; }; -struct MSVCRT(_stati64) { - MSVCRT(_dev_t) st_dev; - MSVCRT(_ino_t) st_ino; +struct _stati64 { + _dev_t st_dev; + _ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; - MSVCRT(_dev_t) st_rdev; + _dev_t st_rdev; __int64 st_size; - MSVCRT(time_t) st_atime; - MSVCRT(time_t) st_mtime; - MSVCRT(time_t) st_ctime; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; }; -#endif /* MSVCRT_STAT_DEFINED */ +#endif /* _STAT_DEFINED */ #ifdef __cplusplus extern "C" { #endif -int MSVCRT(_fstat)(int,struct MSVCRT(_stat)*); -int MSVCRT(_stat)(const char*,struct MSVCRT(_stat)*); -int MSVCRT(_fstati64)(int,struct MSVCRT(_stati64)*); -int MSVCRT(_stati64)(const char*,struct MSVCRT(_stati64)*); +int _fstat(int,struct _stat*); +int _stat(const char*,struct _stat*); +int _fstati64(int,struct _stati64*); +int _stati64(const char*,struct _stati64*); int _umask(int); -#ifndef MSVCRT_WSTAT_DEFINED -#define MSVCRT_WSTAT_DEFINED -int MSVCRT(_wstat)(const MSVCRT(wchar_t)*,struct MSVCRT(_stat)*); -int MSVCRT(_wstati64)(const MSVCRT(wchar_t)*,struct MSVCRT(_stati64)*); -#endif /* MSVCRT_WSTAT_DEFINED */ +#ifndef _WSTAT_DEFINED +#define _WSTAT_DEFINED +int _wstat(const wchar_t*,struct _stat*); +int _wstati64(const wchar_t*,struct _stati64*); +#endif /* _WSTAT_DEFINED */ #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX #define S_IFMT _S_IFMT #define S_IFDIR _S_IFDIR #define S_IFCHR _S_IFCHR @@ -151,10 +142,9 @@ static inline int fstat(int fd, struct stat* ptr) { return _fstat(fd, (struct _stat*)ptr); } static inline int stat(const char* path, struct stat* ptr) { return _stat(path, (struct _stat*)ptr); } -#ifndef MSVCRT_UMASK_DEFINED +#ifndef _UMASK_DEFINED static inline int umask(int fd) { return _umask(fd); } -#define MSVCRT_UMASK_DEFINED +#define _UMASK_DEFINED #endif -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_SYS_STAT_H */
diff --git a/include/msvcrt/sys/timeb.h b/include/msvcrt/sys/timeb.h index 5bae787..1e083bb 100644 --- a/include/msvcrt/sys/timeb.h +++ b/include/msvcrt/sys/timeb.h
@@ -23,29 +23,21 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED -#endif - -#ifndef MSVCRT_TIMEB_DEFINED -#define MSVCRT_TIMEB_DEFINED +#ifndef _TIMEB_DEFINED +#define _TIMEB_DEFINED struct _timeb { - MSVCRT(time_t) time; + time_t time; unsigned short millitm; short timezone; short dstflag; }; -#endif /* MSVCRT_TIMEB_DEFINED */ +#endif /* _TIMEB_DEFINED */ #ifdef __cplusplus @@ -59,10 +51,8 @@ #endif -#ifndef USE_MSVCRT_PREFIX #define timeb _timeb static inline void ftime(struct _timeb* ptr) { return _ftime(ptr); } -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_SYS_TIMEB_H */
diff --git a/include/msvcrt/sys/types.h b/include/msvcrt/sys/types.h index 0e8eee9..e653054 100644 --- a/include/msvcrt/sys/types.h +++ b/include/msvcrt/sys/types.h
@@ -23,52 +23,42 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_DEV_T_DEFINED +#ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; -#define MSVCRT_DEV_T_DEFINED +#define _DEV_T_DEFINED #endif -#ifndef MSVCRT_INO_T_DEFINED +#ifndef _INO_T_DEFINED typedef unsigned short _ino_t; -#define MSVCRT_INO_T_DEFINED +#define _INO_T_DEFINED #endif -#ifndef MSVCRT_MODE_T_DEFINED +#ifndef _MODE_T_DEFINED typedef unsigned short _mode_t; -#define MSVCRT_MODE_T_DEFINED +#define _MODE_T_DEFINED #endif -#ifndef MSVCRT_OFF_T_DEFINED -typedef int MSVCRT(_off_t); -#define MSVCRT_OFF_T_DEFINED +#ifndef _OFF_T_DEFINED +typedef int _off_t; +#define _OFF_T_DEFINED #endif -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef USE_MSVCRT_PREFIX -#ifndef MSVCRT_BSD_TYPES_DEFINED +#ifndef _BSD_TYPES_DEFINED typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; -#define MSVCRT_BSD_TYPES_DEFINED +#define _BSD_TYPES_DEFINED #endif #define dev_t _dev_t #define ino_t _ino_t #define mode_t _mode_t #define off_t _off_t -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_SYS_TYPES_H */
diff --git a/include/msvcrt/sys/utime.h b/include/msvcrt/sys/utime.h index ae72df9..9518fe8 100644 --- a/include/msvcrt/sys/utime.h +++ b/include/msvcrt/sys/utime.h
@@ -23,34 +23,26 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef MSVCRT_UTIMBUF_DEFINED -#define MSVCRT_UTIMBUF_DEFINED +#ifndef _UTIMBUF_DEFINED +#define _UTIMBUF_DEFINED struct _utimbuf { - MSVCRT(time_t) actime; - MSVCRT(time_t) modtime; + time_t actime; + time_t modtime; }; -#endif /* MSVCRT_UTIMBUF_DEFINED */ +#endif /* _UTIMBUF_DEFINED */ #ifdef __cplusplus extern "C" { @@ -59,17 +51,15 @@ int _futime(int,struct _utimbuf*); int _utime(const char*,struct _utimbuf*); -int _wutime(const MSVCRT(wchar_t)*,struct _utimbuf*); +int _wutime(const wchar_t*,struct _utimbuf*); #ifdef __cplusplus } #endif -#ifndef USE_MSVCRT_PREFIX #define utimbuf _utimbuf static inline int utime(const char* path, struct _utimbuf* buf) { return _utime(path, buf); } -#endif /* USE_MSVCRT_PREFIX */ #endif /* __WINE_SYS_UTIME_H */
diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index e1f0c19..3c4a80d 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h
@@ -23,34 +23,26 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef MSVCRT_CLOCK_T_DEFINED -typedef long MSVCRT(clock_t); -#define MSVCRT_CLOCK_T_DEFINED +#ifndef _CLOCK_T_DEFINED +typedef long clock_t; +#define _CLOCK_T_DEFINED #endif #ifndef NULL @@ -65,9 +57,9 @@ #define CLOCKS_PER_SEC 1000 #endif -#ifndef MSVCRT_TM_DEFINED -#define MSVCRT_TM_DEFINED -struct MSVCRT(tm) { +#ifndef _TM_DEFINED +#define _TM_DEFINED +struct tm { int tm_sec; int tm_min; int tm_hour; @@ -78,7 +70,7 @@ int tm_yday; int tm_isdst; }; -#endif /* MSVCRT_TM_DEFINED */ +#endif /* _TM_DEFINED */ #ifdef __cplusplus extern "C" { @@ -87,30 +79,30 @@ /* FIXME: Must do something for _daylight, _dstbias, _timezone, _tzname */ -unsigned _getsystime(struct MSVCRT(tm)*); -unsigned _setsystime(struct MSVCRT(tm)*,unsigned); +unsigned _getsystime(struct tm*); +unsigned _setsystime(struct tm*,unsigned); char* _strdate(char*); char* _strtime(char*); void _tzset(void); -char* MSVCRT(asctime)(const struct MSVCRT(tm)*); -MSVCRT(clock_t) MSVCRT(clock)(void); -char* MSVCRT(ctime)(const MSVCRT(time_t)*); -double MSVCRT(difftime)(MSVCRT(time_t),MSVCRT(time_t)); -struct MSVCRT(tm)* MSVCRT(gmtime)(const MSVCRT(time_t)*); -struct MSVCRT(tm)* MSVCRT(localtime)(const MSVCRT(time_t)*); -MSVCRT(time_t) MSVCRT(mktime)(struct MSVCRT(tm)*); -size_t MSVCRT(strftime)(char*,size_t,const char*,const struct MSVCRT(tm)*); -MSVCRT(time_t) MSVCRT(time)(MSVCRT(time_t)*); +char* asctime(const struct tm*); +clock_t clock(void); +char* ctime(const time_t*); +double difftime(time_t,time_t); +struct tm* gmtime(const time_t*); +struct tm* localtime(const time_t*); +time_t mktime(struct tm*); +size_t strftime(char*,size_t,const char*,const struct tm*); +time_t time(time_t*); -#ifndef MSVCRT_WTIME_DEFINED -#define MSVCRT_WTIME_DEFINED -MSVCRT(wchar_t)* MSVCRT(_wasctime)(const struct MSVCRT(tm)*); -MSVCRT(size_t) MSVCRT(wcsftime)(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,const struct MSVCRT(tm)*); -MSVCRT(wchar_t)*_wctime(const MSVCRT(time_t)*); -MSVCRT(wchar_t)*_wstrdate(MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wstrtime(MSVCRT(wchar_t)*); -#endif /* MSVCRT_WTIME_DEFINED */ +#ifndef _WTIME_DEFINED +#define _WTIME_DEFINED +wchar_t* _wasctime(const struct tm*); +size_t wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*); +wchar_t*_wctime(const time_t*); +wchar_t*_wstrdate(wchar_t*); +wchar_t*_wstrtime(wchar_t*); +#endif /* _WTIME_DEFINED */ #ifdef __cplusplus }
diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 61d6161..73db7f8 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h
@@ -13,22 +13,14 @@ #include <stdarg.h> -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - #ifdef __cplusplus extern "C" { #endif -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif @@ -41,18 +33,18 @@ #endif #define WCHAR_MIN 0 -#define WCHAR_MAX ((MSVCRT(wchar_t))-1) +#define WCHAR_MAX ((wchar_t)-1) -typedef int MSVCRT(mbstate_t); +typedef int mbstate_t; -#ifndef MSVCRT_SIZE_T_DEFINED -typedef unsigned int MSVCRT(size_t); -#define MSVCRT_SIZE_T_DEFINED +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED #endif #ifndef _WCTYPE_T_DEFINED -typedef unsigned short MSVCRT(wint_t); -typedef unsigned short MSVCRT(wctype_t); +typedef unsigned short wint_t; +typedef unsigned short wctype_t; #define _WCTYPE_T_DEFINED #endif @@ -62,44 +54,38 @@ # endif #endif -#ifndef USE_MSVCRT_PREFIX -# ifndef WEOF -# define WEOF (wint_t)(0xFFFF) -# endif -#else -# ifndef MSVCRT_WEOF -# define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF) -# endif -#endif /* USE_MSVCRT_PREFIX */ +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif -#ifndef MSVCRT_FSIZE_T_DEFINED +#ifndef _FSIZE_T_DEFINED typedef unsigned long _fsize_t; -#define MSVCRT_FSIZE_T_DEFINED +#define _FSIZE_T_DEFINED #endif -#ifndef MSVCRT_DEV_T_DEFINED +#ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; -#define MSVCRT_DEV_T_DEFINED +#define _DEV_T_DEFINED #endif -#ifndef MSVCRT_INO_T_DEFINED +#ifndef _INO_T_DEFINED typedef unsigned short _ino_t; -#define MSVCRT_INO_T_DEFINED +#define _INO_T_DEFINED #endif -#ifndef MSVCRT_OFF_T_DEFINED -typedef int MSVCRT(_off_t); -#define MSVCRT_OFF_T_DEFINED +#ifndef _OFF_T_DEFINED +typedef int _off_t; +#define _OFF_T_DEFINED #endif -#ifndef MSVCRT_TIME_T_DEFINED -typedef long MSVCRT(time_t); -#define MSVCRT_TIME_T_DEFINED +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifndef MSVCRT_TM_DEFINED -#define MSVCRT_TM_DEFINED -struct MSVCRT(tm) { +#ifndef _TM_DEFINED +#define _TM_DEFINED +struct tm { int tm_sec; int tm_min; int tm_hour; @@ -110,11 +96,11 @@ int tm_yday; int tm_isdst; }; -#endif /* MSVCRT_TM_DEFINED */ +#endif /* _TM_DEFINED */ -#ifndef MSVCRT_FILE_DEFINED -#define MSVCRT_FILE_DEFINED -typedef struct MSVCRT(_iobuf) +#ifndef _FILE_DEFINED +#define _FILE_DEFINED +typedef struct _iobuf { char* _ptr; int _cnt; @@ -124,77 +110,77 @@ int _charbuf; int _bufsiz; char* _tmpfname; -} MSVCRT(FILE); -#endif /* MSVCRT_FILE_DEFINED */ +} FILE; +#endif /* _FILE_DEFINED */ -#ifndef MSVCRT_WFINDDATA_T_DEFINED -#define MSVCRT_WFINDDATA_T_DEFINED +#ifndef _WFINDDATA_T_DEFINED +#define _WFINDDATA_T_DEFINED -struct MSVCRT(_wfinddata_t) { +struct _wfinddata_t { unsigned attrib; - MSVCRT(time_t) time_create; - MSVCRT(time_t) time_access; - MSVCRT(time_t) time_write; - MSVCRT(_fsize_t) size; - MSVCRT(wchar_t) name[260]; + time_t time_create; + time_t time_access; + time_t time_write; + _fsize_t size; + wchar_t name[260]; }; -struct MSVCRT(_wfinddatai64_t) { +struct _wfinddatai64_t { unsigned attrib; - MSVCRT(time_t) time_create; - MSVCRT(time_t) time_access; - MSVCRT(time_t) time_write; + time_t time_create; + time_t time_access; + time_t time_write; __int64 size; - MSVCRT(wchar_t) name[260]; + wchar_t name[260]; }; -#endif /* MSVCRT_WFINDDATA_T_DEFINED */ +#endif /* _WFINDDATA_T_DEFINED */ -#ifndef MSVCRT_STAT_DEFINED -#define MSVCRT_STAT_DEFINED +#ifndef _STAT_DEFINED +#define _STAT_DEFINED -struct MSVCRT(_stat) { - MSVCRT(_dev_t) st_dev; - MSVCRT(_ino_t) st_ino; +struct _stat { + _dev_t st_dev; + _ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; - MSVCRT(_dev_t) st_rdev; - MSVCRT(_off_t) st_size; - MSVCRT(time_t) st_atime; - MSVCRT(time_t) st_mtime; - MSVCRT(time_t) st_ctime; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; }; -struct MSVCRT(stat) { - MSVCRT(_dev_t) st_dev; - MSVCRT(_ino_t) st_ino; +struct stat { + _dev_t st_dev; + _ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; - MSVCRT(_dev_t) st_rdev; - MSVCRT(_off_t) st_size; - MSVCRT(time_t) st_atime; - MSVCRT(time_t) st_mtime; - MSVCRT(time_t) st_ctime; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; }; -struct MSVCRT(_stati64) { - MSVCRT(_dev_t) st_dev; - MSVCRT(_ino_t) st_ino; +struct _stati64 { + _dev_t st_dev; + _ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; - MSVCRT(_dev_t) st_rdev; + _dev_t st_rdev; __int64 st_size; - MSVCRT(time_t) st_atime; - MSVCRT(time_t) st_mtime; - MSVCRT(time_t) st_ctime; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; }; -#endif /* MSVCRT_STAT_DEFINED */ +#endif /* _STAT_DEFINED */ /* ASCII char classification table - binary compatible */ #define _UPPER 0x0001 /* C1_UPPER */ @@ -208,199 +194,199 @@ #define _LEADBYTE 0x8000 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */ -#ifndef MSVCRT_WCTYPE_DEFINED -#define MSVCRT_WCTYPE_DEFINED -int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); -int MSVCRT(isleadbyte)(int); -int MSVCRT(iswalnum)(MSVCRT(wint_t)); -int MSVCRT(iswalpha)(MSVCRT(wint_t)); -int MSVCRT(iswascii)(MSVCRT(wint_t)); -int MSVCRT(iswcntrl)(MSVCRT(wint_t)); -int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); -int MSVCRT(iswdigit)(MSVCRT(wint_t)); -int MSVCRT(iswgraph)(MSVCRT(wint_t)); -int MSVCRT(iswlower)(MSVCRT(wint_t)); -int MSVCRT(iswprint)(MSVCRT(wint_t)); -int MSVCRT(iswpunct)(MSVCRT(wint_t)); -int MSVCRT(iswspace)(MSVCRT(wint_t)); -int MSVCRT(iswupper)(MSVCRT(wint_t)); -int MSVCRT(iswxdigit)(MSVCRT(wint_t)); -MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t)); -MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t)); -#endif /* MSVCRT_WCTYPE_DEFINED */ +#ifndef _WCTYPE_DEFINED +#define _WCTYPE_DEFINED +int is_wctype(wint_t,wctype_t); +int isleadbyte(int); +int iswalnum(wint_t); +int iswalpha(wint_t); +int iswascii(wint_t); +int iswcntrl(wint_t); +int iswctype(wint_t,wctype_t); +int iswdigit(wint_t); +int iswgraph(wint_t); +int iswlower(wint_t); +int iswprint(wint_t); +int iswpunct(wint_t); +int iswspace(wint_t); +int iswupper(wint_t); +int iswxdigit(wint_t); +wchar_t towlower(wchar_t); +wchar_t towupper(wchar_t); +#endif /* _WCTYPE_DEFINED */ -#ifndef MSVCRT_WDIRECT_DEFINED -#define MSVCRT_WDIRECT_DEFINED -int _wchdir(const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)* _wgetcwd(MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)* _wgetdcwd(int,MSVCRT(wchar_t)*,int); -int _wmkdir(const MSVCRT(wchar_t)*); -int _wrmdir(const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WDIRECT_DEFINED */ +#ifndef _WDIRECT_DEFINED +#define _WDIRECT_DEFINED +int _wchdir(const wchar_t*); +wchar_t* _wgetcwd(wchar_t*,int); +wchar_t* _wgetdcwd(int,wchar_t*,int); +int _wmkdir(const wchar_t*); +int _wrmdir(const wchar_t*); +#endif /* _WDIRECT_DEFINED */ -#ifndef MSVCRT_WIO_DEFINED -#define MSVCRT_WIO_DEFINED -int _waccess(const MSVCRT(wchar_t)*,int); -int _wchmod(const MSVCRT(wchar_t)*,int); -int _wcreat(const MSVCRT(wchar_t)*,int); -long _wfindfirst(const MSVCRT(wchar_t)*,struct _wfinddata_t*); -long _wfindfirsti64(const MSVCRT(wchar_t)*, struct _wfinddatai64_t*); +#ifndef _WIO_DEFINED +#define _WIO_DEFINED +int _waccess(const wchar_t*,int); +int _wchmod(const wchar_t*,int); +int _wcreat(const wchar_t*,int); +long _wfindfirst(const wchar_t*,struct _wfinddata_t*); +long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); int _wfindnext(long,struct _wfinddata_t*); int _wfindnexti64(long, struct _wfinddatai64_t*); -MSVCRT(wchar_t)*_wmktemp(MSVCRT(wchar_t)*); -int _wopen(const MSVCRT(wchar_t)*,int,...); -int _wrename(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int _wsopen(const MSVCRT(wchar_t)*,int,int,...); -int _wunlink(const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WIO_DEFINED */ +wchar_t*_wmktemp(wchar_t*); +int _wopen(const wchar_t*,int,...); +int _wrename(const wchar_t*,const wchar_t*); +int _wsopen(const wchar_t*,int,int,...); +int _wunlink(const wchar_t*); +#endif /* _WIO_DEFINED */ -#ifndef MSVCRT_WLOCALE_DEFINED -#define MSVCRT_WLOCALE_DEFINED -MSVCRT(wchar_t)* _wsetlocale(int,const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WLOCALE_DEFINED */ +#ifndef _WLOCALE_DEFINED +#define _WLOCALE_DEFINED +wchar_t* _wsetlocale(int,const wchar_t*); +#endif /* _WLOCALE_DEFINED */ -#ifndef MSVCRT_WPROCESS_DEFINED -#define MSVCRT_WPROCESS_DEFINED -int _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *); -int _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *); -int _wsystem(const MSVCRT(wchar_t)*); -#endif /* MSVCRT_WPROCESS_DEFINED */ +#ifndef _WPROCESS_DEFINED +#define _WPROCESS_DEFINED +int _wexecl(const wchar_t*,const wchar_t*,...); +int _wexecle(const wchar_t*,const wchar_t*,...); +int _wexeclp(const wchar_t*,const wchar_t*,...); +int _wexeclpe(const wchar_t*,const wchar_t*,...); +int _wexecv(const wchar_t*,const wchar_t* const *); +int _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wexecvp(const wchar_t*,const wchar_t* const *); +int _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wspawnl(int,const wchar_t*,const wchar_t*,...); +int _wspawnle(int,const wchar_t*,const wchar_t*,...); +int _wspawnlp(int,const wchar_t*,const wchar_t*,...); +int _wspawnlpe(int,const wchar_t*,const wchar_t*,...); +int _wspawnv(int,const wchar_t*,const wchar_t* const *); +int _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wspawnvp(int,const wchar_t*,const wchar_t* const *); +int _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *); +int _wsystem(const wchar_t*); +#endif /* _WPROCESS_DEFINED */ -#ifndef MSVCRT_WSTAT_DEFINED -#define MSVCRT_WSTAT_DEFINED -int _wstat(const MSVCRT(wchar_t)*,struct MSVCRT(_stat)*); -int _wstati64(const MSVCRT(wchar_t)*,struct MSVCRT(_stati64)*); -#endif /* MSVCRT_WSTAT_DEFINED */ +#ifndef _WSTAT_DEFINED +#define _WSTAT_DEFINED +int _wstat(const wchar_t*,struct _stat*); +int _wstati64(const wchar_t*,struct _stati64*); +#endif /* _WSTAT_DEFINED */ -#ifndef MSVCRT_WSTDIO_DEFINED -#define MSVCRT_WSTDIO_DEFINED -MSVCRT(wint_t) _fgetwchar(void); -MSVCRT(wint_t) _fputwchar(MSVCRT(wint_t)); -MSVCRT(wchar_t)*_getws(MSVCRT(wchar_t)*); -int _putws(const MSVCRT(wchar_t)*); -int _snwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,...); -int _vsnwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,va_list); -MSVCRT(FILE)* _wfdopen(int,const MSVCRT(wchar_t)*); -MSVCRT(FILE)* _wfopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(FILE)* _wfreopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(FILE)*); -MSVCRT(FILE)* _wfsopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,int); -void _wperror(const MSVCRT(wchar_t)*); -MSVCRT(FILE)* _wpopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int _wremove(const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wtempnam(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wtmpnam(MSVCRT(wchar_t)*); +#ifndef _WSTDIO_DEFINED +#define _WSTDIO_DEFINED +wint_t _fgetwchar(void); +wint_t _fputwchar(wint_t); +wchar_t*_getws(wchar_t*); +int _putws(const wchar_t*); +int _snwprintf(wchar_t*,size_t,const wchar_t*,...); +int _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list); +FILE* _wfdopen(int,const wchar_t*); +FILE* _wfopen(const wchar_t*,const wchar_t*); +FILE* _wfreopen(const wchar_t*,const wchar_t*,FILE*); +FILE* _wfsopen(const wchar_t*,const wchar_t*,int); +void _wperror(const wchar_t*); +FILE* _wpopen(const wchar_t*,const wchar_t*); +int _wremove(const wchar_t*); +wchar_t*_wtempnam(const wchar_t*,const wchar_t*); +wchar_t*_wtmpnam(wchar_t*); -MSVCRT(wint_t) MSVCRT(fgetwc)(MSVCRT(FILE)*); -MSVCRT(wchar_t)*MSVCRT(fgetws)(MSVCRT(wchar_t)*,int,MSVCRT(FILE)*); -MSVCRT(wint_t) MSVCRT(fputwc)(MSVCRT(wint_t),MSVCRT(FILE)*); -int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*); -int MSVCRT(fwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...); -int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*); -int MSVCRT(fwscanf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...); -MSVCRT(wint_t) MSVCRT(getwc)(MSVCRT(FILE)*); -MSVCRT(wint_t) MSVCRT(getwchar)(void); -MSVCRT(wchar_t)*MSVCRT(getws)(MSVCRT(wchar_t)*); -MSVCRT(wint_t) MSVCRT(putwc)(MSVCRT(wint_t),MSVCRT(FILE)*); -MSVCRT(wint_t) MSVCRT(putwchar)(MSVCRT(wint_t)); -int MSVCRT(putws)(const MSVCRT(wchar_t)*); -int MSVCRT(swprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -int MSVCRT(swscanf)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...); -MSVCRT(wint_t) MSVCRT(ungetwc)(MSVCRT(wint_t),MSVCRT(FILE)*); -int MSVCRT(vfwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,va_list); -int MSVCRT(vswprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,va_list); -int MSVCRT(vwprintf)(const MSVCRT(wchar_t)*,va_list); -int MSVCRT(wprintf)(const MSVCRT(wchar_t)*,...); -int MSVCRT(wscanf)(const MSVCRT(wchar_t)*,...); -#endif /* MSVCRT_WSTDIO_DEFINED */ +wint_t fgetwc(FILE*); +wchar_t*fgetws(wchar_t*,int,FILE*); +wint_t fputwc(wint_t,FILE*); +int fputws(const wchar_t*,FILE*); +int fwprintf(FILE*,const wchar_t*,...); +int fputws(const wchar_t*,FILE*); +int fwscanf(FILE*,const wchar_t*,...); +wint_t getwc(FILE*); +wint_t getwchar(void); +wchar_t*getws(wchar_t*); +wint_t putwc(wint_t,FILE*); +wint_t putwchar(wint_t); +int putws(const wchar_t*); +int swprintf(wchar_t*,const wchar_t*,...); +int swscanf(const wchar_t*,const wchar_t*,...); +wint_t ungetwc(wint_t,FILE*); +int vfwprintf(FILE*,const wchar_t*,va_list); +int vswprintf(wchar_t*,const wchar_t*,va_list); +int vwprintf(const wchar_t*,va_list); +int wprintf(const wchar_t*,...); +int wscanf(const wchar_t*,...); +#endif /* _WSTDIO_DEFINED */ -#ifndef MSVCRT_WSTDLIB_DEFINED -#define MSVCRT_WSTDLIB_DEFINED -MSVCRT(wchar_t)*_itow(int,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_i64tow(__int64,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_ltow(long,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_ui64tow(unsigned __int64,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_ultow(unsigned long,MSVCRT(wchar_t)*,int); -MSVCRT(wchar_t)*_wfullpath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,size_t); -MSVCRT(wchar_t)*_wgetenv(const MSVCRT(wchar_t)*); -void _wmakepath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -void _wperror(const MSVCRT(wchar_t)*); -int _wputenv(const MSVCRT(wchar_t)*); -void _wsearchenv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*); -void _wsplitpath(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*); -int _wsystem(const MSVCRT(wchar_t)*); -int _wtoi(const MSVCRT(wchar_t)*); -__int64 _wtoi64(const MSVCRT(wchar_t)*); -long _wtol(const MSVCRT(wchar_t)*); +#ifndef _WSTDLIB_DEFINED +#define _WSTDLIB_DEFINED +wchar_t*_itow(int,wchar_t*,int); +wchar_t*_i64tow(__int64,wchar_t*,int); +wchar_t*_ltow(long,wchar_t*,int); +wchar_t*_ui64tow(unsigned __int64,wchar_t*,int); +wchar_t*_ultow(unsigned long,wchar_t*,int); +wchar_t*_wfullpath(wchar_t*,const wchar_t*,size_t); +wchar_t*_wgetenv(const wchar_t*); +void _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); +void _wperror(const wchar_t*); +int _wputenv(const wchar_t*); +void _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*); +void _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*); +int _wsystem(const wchar_t*); +int _wtoi(const wchar_t*); +__int64 _wtoi64(const wchar_t*); +long _wtol(const wchar_t*); -MSVCRT(size_t) MSVCRT(mbstowcs)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t)); -int MSVCRT(mbtowc)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t)); -double MSVCRT(wcstod)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**); -long MSVCRT(wcstol)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int); -MSVCRT(size_t) MSVCRT(wcstombs)(char*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -unsigned long MSVCRT(wcstoul)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int); -int MSVCRT(wctomb)(char*,MSVCRT(wchar_t)); -#endif /* MSVCRT_WSTDLIB_DEFINED */ +size_t mbstowcs(wchar_t*,const char*,size_t); +int mbtowc(wchar_t*,const char*,size_t); +double wcstod(const wchar_t*,wchar_t**); +long wcstol(const wchar_t*,wchar_t**,int); +size_t wcstombs(char*,const wchar_t*,size_t); +unsigned long wcstoul(const wchar_t*,wchar_t**,int); +int wctomb(char*,wchar_t); +#endif /* _WSTDLIB_DEFINED */ -#ifndef MSVCRT_WSTRING_DEFINED -#define MSVCRT_WSTRING_DEFINED -MSVCRT(wchar_t)*_wcsdup(const MSVCRT(wchar_t)*); -int _wcsicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int _wcsicoll(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wcslwr(MSVCRT(wchar_t)*); -int _wcsnicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*_wcsnset(MSVCRT(wchar_t)*,MSVCRT(wchar_t),MSVCRT(size_t)); -MSVCRT(wchar_t)*_wcsrev(MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wcsset(MSVCRT(wchar_t)*,MSVCRT(wchar_t)); -MSVCRT(wchar_t)*_wcsupr(MSVCRT(wchar_t)*); +#ifndef _WSTRING_DEFINED +#define _WSTRING_DEFINED +wchar_t*_wcsdup(const wchar_t*); +int _wcsicmp(const wchar_t*,const wchar_t*); +int _wcsicoll(const wchar_t*,const wchar_t*); +wchar_t*_wcslwr(wchar_t*); +int _wcsnicmp(const wchar_t*,const wchar_t*,size_t); +wchar_t*_wcsnset(wchar_t*,wchar_t,size_t); +wchar_t*_wcsrev(wchar_t*); +wchar_t*_wcsset(wchar_t*,wchar_t); +wchar_t*_wcsupr(wchar_t*); -MSVCRT(wchar_t)*MSVCRT(wcscat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcschr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)); -int MSVCRT(wcscmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -int MSVCRT(wcscoll)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcscpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(size_t) MSVCRT(wcscspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(size_t) MSVCRT(wcslen)(const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcsncat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -int MSVCRT(wcsncmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*MSVCRT(wcsncpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -MSVCRT(wchar_t)*MSVCRT(wcspbrk)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcsrchr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t) wcFor); -MSVCRT(size_t) MSVCRT(wcsspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcsstr)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*MSVCRT(wcstok)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*); -MSVCRT(size_t) MSVCRT(wcsxfrm)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t)); -#endif /* MSVCRT_WSTRING_DEFINED */ +wchar_t*wcscat(wchar_t*,const wchar_t*); +wchar_t*wcschr(const wchar_t*,wchar_t); +int wcscmp(const wchar_t*,const wchar_t*); +int wcscoll(const wchar_t*,const wchar_t*); +wchar_t*wcscpy(wchar_t*,const wchar_t*); +size_t wcscspn(const wchar_t*,const wchar_t*); +size_t wcslen(const wchar_t*); +wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t); +int wcsncmp(const wchar_t*,const wchar_t*,size_t); +wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t); +wchar_t*wcspbrk(const wchar_t*,const wchar_t*); +wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor); +size_t wcsspn(const wchar_t*,const wchar_t*); +wchar_t*wcsstr(const wchar_t*,const wchar_t*); +wchar_t*wcstok(wchar_t*,const wchar_t*); +size_t wcsxfrm(wchar_t*,const wchar_t*,size_t); +#endif /* _WSTRING_DEFINED */ -#ifndef MSVCRT_WTIME_DEFINED -#define MSVCRT_WTIME_DEFINED -MSVCRT(wchar_t)*_wasctime(const struct MSVCRT(tm)*); -MSVCRT(size_t) wcsftime(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,const struct MSVCRT(tm)*); -MSVCRT(wchar_t)*_wctime(const MSVCRT(time_t)*); -MSVCRT(wchar_t)*_wstrdate(MSVCRT(wchar_t)*); -MSVCRT(wchar_t)*_wstrtime(MSVCRT(wchar_t)*); -#endif /* MSVCRT_WTIME_DEFINED */ +#ifndef _WTIME_DEFINED +#define _WTIME_DEFINED +wchar_t*_wasctime(const struct tm*); +size_t wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*); +wchar_t*_wctime(const time_t*); +wchar_t*_wstrdate(wchar_t*); +wchar_t*_wstrtime(wchar_t*); +#endif /* _WTIME_DEFINED */ -MSVCRT(wchar_t) btowc(int); -MSVCRT(size_t) mbrlen(const char *,MSVCRT(size_t),MSVCRT(mbstate_t)*); -MSVCRT(size_t) mbrtowc(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t),MSVCRT(mbstate_t)*); -MSVCRT(size_t) mbsrtowcs(MSVCRT(wchar_t)*,const char**,MSVCRT(size_t),MSVCRT(mbstate_t)*); -MSVCRT(size_t) wcrtomb(char*,MSVCRT(wchar_t),MSVCRT(mbstate_t)*); -MSVCRT(size_t) wcsrtombs(char*,const MSVCRT(wchar_t)**,MSVCRT(size_t),MSVCRT(mbstate_t)*); -int wctob(MSVCRT(wint_t)); +wchar_t btowc(int); +size_t mbrlen(const char *,size_t,mbstate_t*); +size_t mbrtowc(wchar_t*,const char*,size_t,mbstate_t*); +size_t mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*); +size_t wcrtomb(char*,wchar_t,mbstate_t*); +size_t wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*); +int wctob(wint_t); #ifdef __cplusplus }
diff --git a/include/msvcrt/wctype.h b/include/msvcrt/wctype.h index de4fe23..cae969e 100644 --- a/include/msvcrt/wctype.h +++ b/include/msvcrt/wctype.h
@@ -23,18 +23,10 @@ #define __WINE_USE_MSVCRT #endif -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -#ifndef MSVCRT_WCHAR_T_DEFINED -#define MSVCRT_WCHAR_T_DEFINED +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED #ifndef __cplusplus -typedef unsigned short MSVCRT(wchar_t); +typedef unsigned short wchar_t; #endif #endif @@ -50,19 +42,13 @@ #define _LEADBYTE 0x8000 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */ -#ifndef USE_MSVCRT_PREFIX -# ifndef WEOF -# define WEOF (wint_t)(0xFFFF) -# endif -#else -# ifndef MSVCRT_WEOF -# define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF) -# endif -#endif /* USE_MSVCRT_PREFIX */ +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif #ifndef _WCTYPE_T_DEFINED -typedef unsigned short MSVCRT(wint_t); -typedef unsigned short MSVCRT(wctype_t); +typedef unsigned short wint_t; +typedef unsigned short wctype_t; #define _WCTYPE_T_DEFINED #endif @@ -73,26 +59,26 @@ extern "C" { #endif -#ifndef MSVCRT_WCTYPE_DEFINED -#define MSVCRT_WCTYPE_DEFINED -int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); -int MSVCRT(isleadbyte)(int); -int MSVCRT(iswalnum)(MSVCRT(wint_t)); -int MSVCRT(iswalpha)(MSVCRT(wint_t)); -int MSVCRT(iswascii)(MSVCRT(wint_t)); -int MSVCRT(iswcntrl)(MSVCRT(wint_t)); -int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); -int MSVCRT(iswdigit)(MSVCRT(wint_t)); -int MSVCRT(iswgraph)(MSVCRT(wint_t)); -int MSVCRT(iswlower)(MSVCRT(wint_t)); -int MSVCRT(iswprint)(MSVCRT(wint_t)); -int MSVCRT(iswpunct)(MSVCRT(wint_t)); -int MSVCRT(iswspace)(MSVCRT(wint_t)); -int MSVCRT(iswupper)(MSVCRT(wint_t)); -int MSVCRT(iswxdigit)(MSVCRT(wint_t)); -MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t)); -MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t)); -#endif /* MSVCRT_WCTYPE_DEFINED */ +#ifndef _WCTYPE_DEFINED +#define _WCTYPE_DEFINED +int is_wctype(wint_t,wctype_t); +int isleadbyte(int); +int iswalnum(wint_t); +int iswalpha(wint_t); +int iswascii(wint_t); +int iswcntrl(wint_t); +int iswctype(wint_t,wctype_t); +int iswdigit(wint_t); +int iswgraph(wint_t); +int iswlower(wint_t); +int iswprint(wint_t); +int iswpunct(wint_t); +int iswspace(wint_t); +int iswupper(wint_t); +int iswxdigit(wint_t); +wchar_t towlower(wchar_t); +wchar_t towupper(wchar_t); +#endif /* _WCTYPE_DEFINED */ #ifdef __cplusplus }