X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=mbswrapper.h;h=e6d3e15021f4fc618697a4758127d05092685d57;hb=25e4bc92bcd934ea3f23a7c79a4211dfb7a09c0a;hp=d638227cf3d3b331c0c8946a03cab3abeb360963;hpb=1aa71d5b9e3101c864d9cb2ef9116360ec63c656;p=ffftp%2Fffftp.git diff --git a/mbswrapper.h b/mbswrapper.h index d638227..e6d3e15 100644 --- a/mbswrapper.h +++ b/mbswrapper.h @@ -29,6 +29,9 @@ HANDLE FindFirstFileM(LPCSTR lpFileName, LPWIN32_FIND_DATAA lpFindFileData); #undef FindNextFile #define FindNextFile FindNextFileM BOOL FindNextFileM(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData); +#undef FindFirstChangeNotification +#define FindFirstChangeNotification FindFirstChangeNotificationM +HANDLE FindFirstChangeNotificationM(LPCSTR lpPathName, BOOL bWatchSubtree, DWORD dwNotifyFilter); #undef GetLogicalDriveStrings #define GetLogicalDriveStrings GetLogicalDriveStringsM DWORD GetLogicalDriveStringsM(DWORD nBufferLength, LPSTR lpBuffer); @@ -44,6 +47,12 @@ LONG GetWindowLongM(HWND hWnd, int nIndex); #undef SetWindowLong #define SetWindowLong SetWindowLongM LONG SetWindowLongM(HWND hWnd, int nIndex, LONG dwNewLong); +#undef GetWindowLongPtr +#define GetWindowLongPtr GetWindowLongPtrM +LONG_PTR GetWindowLongPtrM(HWND hWnd, int nIndex); +#undef SetWindowLongPtr +#define SetWindowLongPtr SetWindowLongPtrM +LONG_PTR SetWindowLongPtrM(HWND hWnd, int nIndex, LONG_PTR dwNewLong); #undef DefWindowProc #define DefWindowProc DefWindowProcM LRESULT DefWindowProcM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); @@ -137,6 +146,9 @@ BOOL SHGetPathFromIDListM(PCIDLIST_ABSOLUTE pidl, LPSTR pszPath); #undef SHFileOperation #define SHFileOperation SHFileOperationM int SHFileOperationM(LPSHFILEOPSTRUCTA lpFileOp); +#undef SHGetFileInfo +#define SHGetFileInfo SHGetFileInfoM +DWORD_PTR SHGetFileInfoM(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags); #undef AppendMenu #define AppendMenu AppendMenuM BOOL AppendMenuM(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCSTR lpNewItem); @@ -164,6 +176,12 @@ HANDLE SetClipboardDataM(UINT uFormat, HANDLE hMem); #undef CopyFile #define CopyFile CopyFileM BOOL CopyFileM(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, BOOL bFailIfExists); +#undef MoveFile +#define MoveFile MoveFileM +BOOL MoveFileM(LPCSTR lpExistingFileName, LPCSTR lpNewFileName); +#undef DeleteFile +#define DeleteFile DeleteFileM +BOOL DeleteFileM(LPCSTR lpFileName); #undef mkdir #define mkdir _mkdirM int mkdirM(const char * _Path); @@ -176,6 +194,15 @@ int rmdirM(const char * _Path); #undef _rmdir #define _rmdir _rmdirM int _rmdirM(const char * _Path); +#undef remove +#define remove removeM +int removeM(const char * _Filename); +#undef _remove +#define _remove _removeM +int _removeM(const char * _Filename); +#undef _unlink +#define _unlink _unlinkM +int _unlinkM(const char * _Filename); #undef _mbslen #define _mbslen _mbslenM size_t _mbslenM(const unsigned char * _Str); @@ -217,6 +244,16 @@ FILE * fopenM(const char * _Filename, const char * _Mode); #endif +#ifdef FORCE_SJIS_ON_ACTIVE_CODE_PAGE +#undef CP_ACP +#define CP_ACP 932 +#endif + +#ifdef EMULATE_UTF8_WCHAR_CONVERSION +#define MultiByteToWideChar MultiByteToWideCharAlternative +#define WideCharToMultiByte WideCharToMultiByteAlternative +#endif + int MtoW(LPWSTR pDst, int size, LPCSTR pSrc, int count); int WtoM(LPSTR pDst, int size, LPCWSTR pSrc, int count); int AtoW(LPWSTR pDst, int size, LPCSTR pSrc, int count); @@ -241,12 +278,19 @@ wchar_t* DuplicateMtoWMultiStringBuffer(LPCSTR lpString, int size); char* DuplicateWtoM(LPCWSTR lpString, int c); wchar_t* DuplicateAtoW(LPCSTR lpString, int c); char* DuplicateWtoA(LPCWSTR lpString, int c); -DWORD GetNextCharM(LPCSTR lpString, LPCSTR* ppNext); +DWORD GetNextCharM(LPCSTR lpString, LPCSTR pLimit, LPCSTR* ppNext); +int PutNextCharM(LPSTR lpString, LPSTR pLimit, LPSTR* ppNext, DWORD Code); +DWORD GetNextCharW(LPCWSTR lpString, LPCWSTR pLimit, LPCWSTR* ppNext); +int PutNextCharW(LPWSTR lpString, LPWSTR pLimit, LPWSTR* ppNext, DWORD Code); +int GetCodeCountM(LPCSTR lpString, int CharCount); +int GetCodeCountW(LPCWSTR lpString, int CharCount); BOOL FixStringM(LPSTR pDst, LPCSTR pSrc); BOOL FixMultiStringM(LPSTR pDst, LPCSTR pSrc); BOOL CheckStringM(LPCSTR lpString); BOOL CheckMultiStringM(LPCSTR lpString); void FreeDuplicatedString(void* p); +int MultiByteToWideCharAlternative(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); +int WideCharToMultiByteAlternative(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar); int WINAPI WinMainM(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);