summaryrefslogtreecommitdiff
path: root/include/m_core.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-15 07:27:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-15 07:27:19 +0000
commit6082f8c569cd3df0ebdcec61a223027868207473 (patch)
tree4273e813b6dfdde2819c499595f18827d5fb7ac4 /include/m_core.h
parenta2c85825aaec89e4602615b30e1af45c13adc4dd (diff)
bin2hex/bin2hexW = eliminates many places with printf("%02x")
git-svn-id: http://svn.miranda-ng.org/main/trunk@5698 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_core.h')
-rw-r--r--include/m_core.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/m_core.h b/include/m_core.h
index 7d80dc6931..73937eb366 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -692,6 +692,9 @@ MIR_CORE_DLL(int) wildcmpw(const WCHAR *name, const WCHAR *mask);
MIR_CORE_DLL(int) wildcmpi(const char *name, const char *mask);
MIR_CORE_DLL(int) wildcmpiw(const WCHAR *name, const WCHAR *mask);
+MIR_CORE_DLL(char*) bin2hex(const void *pData, size_t len, char *dest);
+MIR_CORE_DLL(WCHAR*) bin2hexW(const void *pData, size_t len, WCHAR *dest);
+
__forceinline char* lrtrim(char *str) { return ltrim(rtrim(str)); };
__forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
@@ -719,19 +722,21 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
#define mir_tstrdup mir_wstrdup
#define mir_tstrndup mir_wstrndup
- #define replaceStrT replaceStrW
- #define rtrimt rtrimw
- #define ltrimt ltrimw
+ #define replaceStrT replaceStrW
+ #define bin2hexT bin2hexW
+
+ #define rtrimt rtrimw
+ #define ltrimt ltrimw
#define ltrimpt ltrimpw
- #define wildcmpt wildcmpw
+ #define wildcmpt wildcmpw
#define wildcmpit wildcmpiw
- #define mir_sntprintf mir_snwprintf
+ #define mir_sntprintf mir_snwprintf
#define mir_vsntprintf mir_vsnwprintf
- #define mir_writeLogT mir_writeLogW
+ #define mir_writeLogT mir_writeLogW
#define mir_writeLogVT mir_writeLogVW
#else
#define mir_t2a(s) mir_strdup(s)
@@ -746,7 +751,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
#define mir_tstrdup mir_strdup
#define mir_tstrndup mir_strndup
- #define replaceStrT replaceStr
+
+ #define replaceStrT replaceStr
+ #define bin2hexT bin2hex
#define rtrimt rtrim
#define ltrimt ltrim
@@ -755,10 +762,10 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
#define wildcmpt wildcmp
#define wildcmpit wildcmpi
- #define mir_sntprintf mir_snprintf
+ #define mir_sntprintf mir_snprintf
#define mir_vsntprintf mir_vsnprintf
- #define mir_writeLogT mir_writeLogA
+ #define mir_writeLogT mir_writeLogA
#define mir_writeLogVT mir_writeLogVA
#endif