1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _MAPINLS_H_ 7 #define _MAPINLS_H_ 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 #ifndef WINAPI 14 #if defined(_ARM_) 15 #define WINAPI 16 #else 17 #define WINAPI __stdcall 18 #endif 19 #endif 20 21 #ifdef DOS 22 #include <string.h> 23 #endif 24 25 #ifndef FAR 26 #define FAR 27 #endif 28 29 typedef unsigned char BYTE; 30 typedef unsigned short WORD; 31 typedef unsigned __LONG32 DWORD; 32 typedef unsigned int UINT; 33 typedef int WINBOOL; 34 35 #ifndef __CHAR_DEFINED__ 36 typedef char CHAR; 37 #endif 38 39 #if defined(UNICODE) 40 typedef WCHAR TCHAR; 41 #else 42 typedef char TCHAR; 43 #endif 44 45 #ifndef __WCHAR_DEFINED 46 #define __WCHAR_DEFINED 47 typedef unsigned short WCHAR; 48 #endif 49 typedef WCHAR *LPWSTR; 50 typedef const WCHAR *LPCWSTR; 51 typedef CHAR *LPSTR; 52 typedef const CHAR *LPCSTR; 53 typedef TCHAR *LPTSTR; 54 typedef const TCHAR *LPCTSTR; 55 typedef DWORD LCID; 56 #ifndef _LPCVOID_DEFINED 57 #define _LPCVOID_DEFINED 58 typedef const void *LPCVOID; 59 #endif 60 61 #ifndef LPOLESTR 62 #define LPOLESTR LPWSTR 63 #define LPCOLESTR LPCWSTR 64 #define OLECHAR WCHAR 65 #define OLESTR(str) L##str 66 #endif 67 68 #define NORM_IGNORECASE 0x00000001 69 #define NORM_IGNORENONSPACE 0x00000002 70 #define NORM_IGNORESYMBOLS 0x00000004 71 #define NORM_IGNOREKANATYPE 0x00010000 72 #define NORM_IGNOREWIDTH 0x00020000 73 74 #define CP_ACP 0 75 #define CP_OEMCP 1 76 77 LCID WINAPI MNLS_GetUserDefaultLCID(void); 78 UINT WINAPI MNLS_GetACP(void); 79 int WINAPI MNLS_CompareStringA(LCID Locale,DWORD dwCmpFlags,LPCSTR lpString1,int cchCount1,LPCSTR lpString2,int cchCount2); 80 int WINAPI MNLS_CompareStringW(LCID Locale,DWORD dwCmpFlags,LPCWSTR lpString1,int cchCount1,LPCWSTR lpString2,int cchCount2); 81 int WINAPI MNLS_MultiByteToWideChar(UINT uCodePage,DWORD dwFlags,LPCSTR lpMultiByteStr,int cchMultiByte,LPWSTR lpWideCharStr,int cchWideChar); 82 int WINAPI MNLS_WideCharToMultiByte(UINT uCodePage,DWORD dwFlags,LPCWSTR lpWideCharStr,int cchWideChar,LPSTR lpMultiByteStr,int cchMultiByte,LPCSTR lpDefaultChar,WINBOOL *lpfUsedDefaultChar); 83 int WINAPI MNLS_lstrlenW(LPCWSTR lpString); 84 int WINAPI MNLS_lstrcmpW(LPCWSTR lpString1,LPCWSTR lpString2); 85 LPWSTR WINAPI MNLS_lstrcpyW(LPWSTR lpString1,LPCWSTR lpString2); 86 WINBOOL WINAPI MNLS_IsBadStringPtrW(LPCWSTR lpsz,UINT ucchMax); 87 88 #if !defined(_WINNT) && !defined(_WIN95) 89 #define _WINNT 90 #endif 91 92 #if !defined(_WINNT) && !defined(_WIN95) 93 #define GetUserDefaultLCID MNLS_GetUserDefaultLCID 94 #define GetACP MNLS_GetACP 95 #define MultiByteToWideChar MNLS_MultiByteToWideChar 96 #define WideCharToMultiByte MNLS_WideCharToMultiByte 97 #define CompareStringA MNLS_CompareStringA 98 #endif 99 100 #if !defined(MAPI_NOWIDECHAR) 101 102 #define lstrlenW MNLS_lstrlenW 103 #define lstrcmpW MNLS_lstrcmpW 104 #define lstrcpyW MNLS_lstrcpyW 105 #define CompareStringW MNLS_CompareStringW 106 107 #if defined(_WINNT) || defined(_WIN95) 108 #define IsBadStringPtrW MNLS_IsBadStringPtrW 109 #else 110 #define IsBadStringPtrW (FALSE) 111 #endif 112 #endif 113 114 #ifdef __cplusplus 115 } 116 #endif 117 #endif 118