diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-13 17:11:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-13 17:11:58 +0000 |
commit | f51995e13679a37851baef8e7f52f2d993cbc7c1 (patch) | |
tree | 25ccd03cf2dc4b897cc0dc6fcbe4cc78ddb122c7 /plugins/Utils.pas | |
parent | fe1e8456d2488095f409a4f2d38b7251abdedccf (diff) |
mode old database junk to die
git-svn-id: http://svn.miranda-ng.org/main/trunk@17291 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Utils.pas')
-rw-r--r-- | plugins/Utils.pas/dbsettings.pas | 12 | ||||
-rw-r--r-- | plugins/Utils.pas/mircontacts.pas | 14 | ||||
-rw-r--r-- | plugins/Utils.pas/mirutils.pas | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Utils.pas/dbsettings.pas b/plugins/Utils.pas/dbsettings.pas index 8106fd7e66..df2b28aa22 100644 --- a/plugins/Utils.pas/dbsettings.pas +++ b/plugins/Utils.pas/dbsettings.pas @@ -32,7 +32,7 @@ function DBWriteString (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiCha function DBWriteUTF8 (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):int_ptr;
function DBWriteUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):int_ptr;
-//function DBFreeVariant(dbv:PDBVARIANT):int_ptr;
+//function db_free(dbv:PDBVARIANT):int_ptr;
function DBDeleteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:PAnsiChar=nil):int_ptr;
@@ -87,7 +87,7 @@ begin else
result:=StrLen(dbv.szVal.a);
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
function DBReadString(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
@@ -106,7 +106,7 @@ begin else
StrDup(result,default);
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
function DBReadUTF8(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
@@ -130,7 +130,7 @@ begin else
StrDupW(result,default);
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
function DBReadStruct(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
@@ -147,7 +147,7 @@ begin if ptr=nil then
mGetMem(ptr,size);
move(dbv.pbVal^,ptr^,size);
- DBFreeVariant(@dbv);
+ db_free(@dbv);
result:=uint_ptr(ptr)
end
else
@@ -328,7 +328,7 @@ begin if DBReadSetting(hContact,szModule,szSetting,@ldbv)=0 then
begin
result:=ldbv._type;
- DBFreeVariant(@ldbv);
+ db_free(@ldbv);
end
else
result:=DBVT_DELETED;
diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas index 0863c0cd35..cb87d93b5a 100644 --- a/plugins/Utils.pas/mircontacts.pas +++ b/plugins/Utils.pas/mircontacts.pas @@ -131,9 +131,9 @@ begin uid := PAnsiChar(CallProtoService(Proto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0));
if (uid <> PAnsiChar(CALLSERVICE_NOTFOUND)) and (uid <> nil) then
begin
- // DBGetContactSettingStr comparing to DBGetContactSetting don't translate strings
+ // db_get_s comparing to DBGetContactSetting don't translate strings
// when uType=0 (DBVT_ASIS)
- if DBGetContactSettingStr(hContact, Proto, uid, @dbv, DBVT_ASIS) = 0 then
+ if db_get_s(hContact, Proto, uid, @dbv, DBVT_ASIS) = 0 then
begin
case dbv._type of
DBVT_BYTE: StrDup(Result, IntToStr(buf,dbv.bVal));
@@ -150,7 +150,7 @@ begin end;
end;
// free variant
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
end;
end;
@@ -315,7 +315,7 @@ begin end;
end;
end;
- DBFreeVariant(@ldbv);
+ db_free(@ldbv);
end;
end;
// added 2011.04.20
@@ -344,7 +344,7 @@ begin mFreeMem(Proto);
if not is_chat then
- DBFreeVariant(@dbv)
+ db_free(@dbv)
else
mFreeMem(dbv.szVal.W);
end;
@@ -378,7 +378,7 @@ begin if DBReadSetting(hContact,Proto,uid,@cws)=0 then
begin
StrCopy(p,opt_cuid); DBWriteSetting(0,group,section,@cws);
- DBFreeVariant(@cws);
+ db_free(@cws);
result:=1;
end;
end;
@@ -613,7 +613,7 @@ begin StrReplaceW(buf,'%uid%',p);
if ldbv._type in [DBVT_UTF8,DBVT_ASCIIZ] then
mFreeMem(p);
- DBFreeVariant(@ldbv);
+ db_free(@ldbv);
end;
end;
StrReplaceW(buf,'%uid%',nil);
diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas index dee3bbdc87..bbedeb252b 100644 --- a/plugins/Utils.pas/mirutils.pas +++ b/plugins/Utils.pas/mirutils.pas @@ -299,7 +299,7 @@ var altfilename,filename:array [0..127] of AnsiChar;
p:PAnsiChar;
begin
- CallService(MS_DB_GETPROFILEPATH,300,lparam(@profilepath));
+ Profile_GetPathA(300,@profilepath);
p:=StrEnd(profilepath);
p^:='\'; inc(p);
p^:=#0;
@@ -309,7 +309,7 @@ begin begin
StrCopy(filename,prefix);
p:=StrEnd(filename);
- CallService(MS_DB_GETPROFILENAME,SizeOf(filename)-integer(p-PAnsiChar(@filename)),lparam(p));
+ Profile_GetNameA(Sizeof(filename)-integer(p-PAnsiChar(@filename)),p);
ChangeExt(filename,ext);
result:=CheckPath(filename,profilepath,path);
end
|