diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
commit | b7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch) | |
tree | 468d9610a590685322ad2159a9bd2d9e2ba83f89 /plugins/AssocMgr | |
parent | 7de513f180c429859e246d1033d745b394e1fc28 (diff) |
new mir_snprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AssocMgr')
-rw-r--r-- | plugins/AssocMgr/src/assoclist.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 08616eb610..e85385a2f5 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -50,7 +50,7 @@ static mir_cs csAssocList; static BOOL IsAssocEnabled(const ASSOCDATA *assoc)
{
char szSetting[MAXMODULELABELLENGTH];
- mir_snprintf(szSetting, SIZEOF(szSetting), "enabled_%s", assoc->pszClassName);
+ mir_snprintf(szSetting, "enabled_%s", assoc->pszClassName);
return db_get_b(NULL, "AssocMgr", szSetting, (BYTE)!(assoc->flags&FTDF_DEFAULTDISABLED))!= 0;
}
@@ -58,13 +58,13 @@ static void SetAssocEnabled(const ASSOCDATA *assoc, BOOL fEnabled) {
char szSetting[MAXMODULELABELLENGTH];
TCHAR szDLL[MAX_PATH], szBuf[MAX_PATH];
- mir_snprintf(szSetting, SIZEOF(szSetting), "enabled_%s", assoc->pszClassName);
+ mir_snprintf(szSetting, "enabled_%s", assoc->pszClassName);
db_set_b(NULL, "AssocMgr", szSetting, (BYTE)fEnabled);
/* dll name for uninstall */
if(assoc->hInstance!= NULL && assoc->hInstance!= hInst && assoc->hInstance!= GetModuleHandle(NULL))
if( GetModuleFileName(assoc->hInstance, szBuf, SIZEOF(szBuf)))
if( PathToRelativeT(szBuf, szDLL)) {
- mir_snprintf(szSetting, SIZEOF(szSetting), "module_%s", assoc->pszClassName);
+ mir_snprintf(szSetting, "module_%s", assoc->pszClassName);
db_set_ts(NULL, "AssocMgr", szSetting, szDLL);
}
}
@@ -72,10 +72,10 @@ static void SetAssocEnabled(const ASSOCDATA *assoc, BOOL fEnabled) static void DeleteAssocEnabledSetting(const ASSOCDATA *assoc)
{
char szSetting[MAXMODULELABELLENGTH];
- mir_snprintf(szSetting, SIZEOF(szSetting), "enabled_%s", assoc->pszClassName);
+ mir_snprintf(szSetting, "enabled_%s", assoc->pszClassName);
db_unset(NULL, "AssocMgr", szSetting);
/* dll name for uninstall */
- mir_snprintf(szSetting, SIZEOF(szSetting), "module_%s", assoc->pszClassName);
+ mir_snprintf(szSetting, "module_%s", assoc->pszClassName);
db_unset(NULL, "AssocMgr", szSetting);
}
@@ -94,7 +94,7 @@ void CleanupAssocEnabledSettings(void) mir_cslock lck(csAssocList);
for(i = 0;i<nSettingsCount;++i) {
pszSuffix = &ppszSettings[i][8];
- mir_snprintf(szSetting, SIZEOF(szSetting), "module_%s", pszSuffix);
+ mir_snprintf(szSetting, "module_%s", pszSuffix);
if (!db_get_ts(NULL, "AssocMgr", szSetting, &dbv)) {
if( PathToAbsoluteT(dbv.ptszVal, szDLL)) {
/* file still exists? */
@@ -117,7 +117,7 @@ void CleanupAssocEnabledSettings(void) static __inline void RememberMimeTypeAdded(const char *pszMimeType, const char *pszFileExt, BYTE fAdded)
{
char szSetting[MAXMODULELABELLENGTH];
- mir_snprintf(szSetting, SIZEOF(szSetting), "mime_%s", pszMimeType);
+ mir_snprintf(szSetting, "mime_%s", pszMimeType);
if(fAdded) db_set_s(NULL, "AssocMgr", szSetting, pszFileExt);
else db_unset(NULL, "AssocMgr", szSetting);
}
@@ -127,7 +127,7 @@ static __inline BOOL WasMimeTypeAdded(const char *pszMimeType) char szSetting[MAXMODULELABELLENGTH];
DBVARIANT dbv;
BOOL fAdded = FALSE;
- mir_snprintf(szSetting, SIZEOF(szSetting), "mime_%s", pszMimeType);
+ mir_snprintf(szSetting, "mime_%s", pszMimeType);
if (!db_get(NULL, "AssocMgr", szSetting, &dbv)) fAdded = TRUE;
else db_free(&dbv);
return fAdded;
|