diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 16:39:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 16:39:04 +0300 |
commit | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch) | |
tree | 1437d0906218fae8827aed384026f2b7e656f4ac /plugins/Msg_Export/src | |
parent | fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff) |
BYTE -> uint8_t
Diffstat (limited to 'plugins/Msg_Export/src')
-rwxr-xr-x | plugins/Msg_Export/src/FileViewer.cpp | 6 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 4 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/utils.cpp | 6 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/utils.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index eeb31963ab..55e99279ff 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -148,7 +148,7 @@ private: // buffer size supplyed on win XP 4092 byte when streamin in
// optimal size it to fully use this buffer but we can guess
// how may bytes need converting in the file we are reading.
- BYTE abBuf[3300];
+ uint8_t abBuf[3300];
char szMyNick[100];
int nNickLen;
static int nOptimalReadLen;
@@ -763,7 +763,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, InsertMenu(hSysMenu, 0, MF_STRING | MF_BYPOSITION, ID_FV_SAVE_AS_RTF, LPGENW("Save as RTF"));
InsertMenu(hSysMenu, 0, MF_SEPARATOR | MF_BYPOSITION, 0, nullptr);
- BYTE bUseCC = (BYTE)g_plugin.getByte(szFileViewDB "UseCC", 0);
+ uint8_t bUseCC = (uint8_t)g_plugin.getByte(szFileViewDB "UseCC", 0);
InsertMenu(hSysMenu, 0, MF_STRING | MF_BYPOSITION | (bUseCC ? MF_CHECKED : 0), ID_FV_COLOR, LPGENW("Color..."));
if (bUseCC)
@@ -868,7 +868,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, }
if ((wParam & 0xFFF0) == ID_FV_COLOR) {
- BYTE bUseCC = !g_plugin.getByte(szFileViewDB "UseCC", 0);
+ uint8_t bUseCC = !g_plugin.getByte(szFileViewDB "UseCC", 0);
if (bUseCC) {
CHOOSECOLOR cc = { 0 };
cc.lStructSize = sizeof(cc);
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 33b999466c..b4707a0920 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -876,7 +876,7 @@ public: g_enRenameAction = eDAAutomatic;
else if (chkFcNothing.GetState() == BST_CHECKED)
g_enRenameAction = eDANothing;
- g_plugin.setByte("RenameAction", (BYTE)g_enRenameAction);
+ g_plugin.setByte("RenameAction", (uint8_t)g_enRenameAction);
if (chkFdPrompt.GetState() == BST_CHECKED)
g_enDeleteAction = eDAPromptUser;
@@ -884,7 +884,7 @@ public: g_enDeleteAction = eDAAutomatic;
else if (chkFdNothing.GetState() == BST_CHECKED)
g_enDeleteAction = eDANothing;
- g_plugin.setByte("DeleteAction", (BYTE)g_enDeleteAction);
+ g_plugin.setByte("DeleteAction", (uint8_t)g_enDeleteAction);
int nCount = listProtos.GetItemCount();
for (int nCur = 0; nCur < nCount; nCur++) {
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index ec199a5005..479723781c 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -66,7 +66,7 @@ bool g_bUseUtf8InNewFiles; bool g_bUseJson;
const char szUtf8ByteOrderHeader[] = "\xEF\xBB\xBF";
-bool bIsUtf8Header(BYTE * pucByteOrder)
+bool bIsUtf8Header(uint8_t * pucByteOrder)
{
return memcmp(pucByteOrder, szUtf8ByteOrderHeader, 3) == 0;
}
@@ -269,7 +269,7 @@ bool bWriteNewLine(HANDLE hFile, DWORD dwIndent) bool bWriteHexToFile(HANDLE hFile, void * pData, int nSize)
{
char cBuf[10];
- BYTE *p = (BYTE*)pData;
+ uint8_t *p = (uint8_t*)pData;
for (int n = 0; n < nSize; n++) {
mir_snprintf(cBuf, "%.2X ", p[n]);
if (!bWriteToFile(hFile, cBuf, 3))
@@ -670,7 +670,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF DWORD dwLowSize = GetFileSize(hFile, &dwHighSize);
if (dwLowSize == INVALID_FILE_SIZE || dwLowSize != 0 || dwHighSize != 0) {
DWORD dwDataRead = 0;
- BYTE ucByteOrder[3];
+ uint8_t ucByteOrder[3];
if (ReadFile(hFile, ucByteOrder, 3, &dwDataRead, nullptr))
bWriteUTF8Format = bIsUtf8Header(ucByteOrder);
diff --git a/plugins/Msg_Export/src/utils.h b/plugins/Msg_Export/src/utils.h index d4f9e1e93b..7db695bbd9 100755 --- a/plugins/Msg_Export/src/utils.h +++ b/plugins/Msg_Export/src/utils.h @@ -67,6 +67,6 @@ void ReplaceTimeVariables(wstring &sRet); bool bWriteIndentedToFile(HANDLE hFile, int nIndent, const wchar_t *pszSrc, bool bUtf8File);
bool bWriteNewLine(HANDLE hFile, DWORD dwIndent);
-bool bIsUtf8Header(BYTE *pucByteOrder);
+bool bIsUtf8Header(uint8_t *pucByteOrder);
#endif
|