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