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/DbEditorPP | |
parent | fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff) |
BYTE -> uint8_t
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/settinglist.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/stdafx.h | 4 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/utils.cpp | 16 |
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 8408a23215..3ad32a0b21 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -354,7 +354,7 @@ void importSettings(MCONTACT hContact, char *utf8) case 'b':
case 'B':
if (sscanf(end + 2, "%u", &value) == 1)
- db_set_b(hContact, module, setting, (BYTE)value);
+ db_set_b(hContact, module, setting, (uint8_t)value);
break;
case 'w':
case 'W':
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index feade7ed71..d13c44bf7a 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -7,7 +7,7 @@ bool g_bServiceMode = false; bool g_bUsePopups;
CMPlugin g_plugin;
-BYTE nameOrder[NAMEORDERCOUNT];
+uint8_t nameOrder[NAMEORDERCOUNT];
HGENMENU hUserMenu;
MCONTACT hRestore;
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index fde94ed280..1ac1c76d98 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -494,7 +494,7 @@ bool CMainDlg::EditLabelWndProc(HWND hwnd, UINT uMsg, WPARAM wParam) case 'B':
val = wcstoul(&value[1], nullptr, 0);
if (!val || value[1] == '0') {
- res = !db_set_b(m_hContact, m_module, m_setting, (BYTE)val);
+ res = !db_set_b(m_hContact, m_module, m_setting, (uint8_t)val);
}
else
res = setTextValue(m_hContact, m_module, m_setting, value, dbv.type);
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h index 6a41564f88..eb60394086 100644 --- a/plugins/DbEditorPP/src/stdafx.h +++ b/plugins/DbEditorPP/src/stdafx.h @@ -175,9 +175,9 @@ extern bool g_bUsePopups; #define HEX_DWORD 4
// main
-char *StringFromBlob(BYTE *blob, WORD len);
+char *StringFromBlob(uint8_t *blob, WORD len);
int WriteBlobFromString(MCONTACT hContact, const char *module, const char *setting, const char *value, int len);
-wchar_t *DBVType(BYTE type);
+wchar_t *DBVType(uint8_t type);
DWORD getNumericValue(DBVARIANT *dbv);
int setNumericValue(MCONTACT hContact, const char *module, const char *setting, DWORD value, int type);
int IsRealUnicode(wchar_t *value);
diff --git a/plugins/DbEditorPP/src/utils.cpp b/plugins/DbEditorPP/src/utils.cpp index 5b93ac8ad1..1979392d12 100644 --- a/plugins/DbEditorPP/src/utils.cpp +++ b/plugins/DbEditorPP/src/utils.cpp @@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" -extern BYTE nameOrder[NAMEORDERCOUNT]; +extern uint8_t nameOrder[NAMEORDERCOUNT]; ///////////////////////////////////////////////////////////////////////////////////////// @@ -40,7 +40,7 @@ int ListView_SetItemTextA(HWND hwndLV, int i, int iSubItem, const char *pszText) ///////////////////////////////////////////////////////////////////////////////////////// -char* StringFromBlob(BYTE *blob, WORD len) +char* StringFromBlob(uint8_t *blob, WORD len) { int j; char tmp[16]; @@ -58,9 +58,9 @@ char* StringFromBlob(BYTE *blob, WORD len) int WriteBlobFromString(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue, int len) { int j = 0, i = 0; - BYTE b; + uint8_t b; int tmp, res = 0; - BYTE *data = (BYTE*)mir_alloc(2 + len / 2); + uint8_t *data = (uint8_t*)mir_alloc(2 + len / 2); if (!data) return 0; @@ -72,7 +72,7 @@ int WriteBlobFromString(MCONTACT hContact, const char *szModule, const char *szS (b >= 'A' && b <= 'F') || (b >= 'a' && b <= 'f')) { if (sscanf(&szValue[j], "%02X", &tmp) == 1) { - data[i++] = (BYTE)(tmp & 0xFF); + data[i++] = (uint8_t)(tmp & 0xFF); j++; } } @@ -87,10 +87,10 @@ int WriteBlobFromString(MCONTACT hContact, const char *szModule, const char *szS return res; } -wchar_t* DBVType(BYTE type) +wchar_t* DBVType(uint8_t type) { switch (type) { - case DBVT_BYTE: return L"BYTE"; + case DBVT_BYTE: return L"uint8_t"; case DBVT_WORD: return L"WORD"; case DBVT_DWORD: return L"DWORD"; case DBVT_ASCIIZ: return L"STRING"; @@ -120,7 +120,7 @@ int setNumericValue(MCONTACT hContact, const char *module, const char *setting, switch (type) { case DBVT_BYTE: if (value <= 0xFF) - return !db_set_b(hContact, module, setting, (BYTE)value); + return !db_set_b(hContact, module, setting, (uint8_t)value); break; case DBVT_WORD: |