From 5ca0f5cdf6f42f4622da68d798af5646a001fef9 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Mon, 15 Dec 2014 18:55:29 +0000 Subject: pascal units: [de]capitalization Actman 30: small-small fix git-svn-id: http://svn.miranda-ng.org/main/trunk@11439 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Actman30/iac_service.pas | 6 +- plugins/Utils.pas/cbex.pas | 3 +- plugins/Utils.pas/common.pas | 326 +++++++++++++++++++------------------- plugins/Utils.pas/datetime.pas | 32 ++-- plugins/Utils.pas/editwrapper.pas | 2 +- plugins/Utils.pas/mApiCardM.pas | 12 +- plugins/Utils.pas/memini.pas | 2 +- plugins/Utils.pas/mircontacts.pas | 88 +++++----- plugins/Utils.pas/mirevents.pas | 18 +-- plugins/Utils.pas/playlist.pas | 14 +- plugins/Utils.pas/protocols.pas | 14 +- plugins/Utils.pas/sedit.pas | 10 +- plugins/Utils.pas/sparam.pas | 4 +- plugins/Utils.pas/srvblock.pas | 14 +- plugins/Utils.pas/strans.pas | 4 +- plugins/Utils.pas/syswin.pas | 56 +++---- plugins/Utils.pas/utils.pas | 2 +- plugins/Utils.pas/wrapdlgs.pas | 29 ++-- plugins/Utils.pas/wrapper.pas | 16 +- 19 files changed, 331 insertions(+), 321 deletions(-) diff --git a/plugins/Actman30/iac_service.pas b/plugins/Actman30/iac_service.pas index d670f2afec..498cccc6e2 100644 --- a/plugins/Actman30/iac_service.pas +++ b/plugins/Actman30/iac_service.pas @@ -31,9 +31,9 @@ const ACF_RUNICODE = $00020000; // Service result is Widestring ACF_RSTRUCT = $00040000; // Service result in structure ACF_RFREEMEM = $00080000; // Need to free memory - - ACF_SCRIPT_PARAM = $00001000; - ACF_SCRIPT_SERVICE = $00002000; +{ + ACF_SCRIPT_PARAM set in "sparam" unit + ACF_SCRIPT_SERVICE set in "srvblock" unit // dummy ACF_STRING = 0; diff --git a/plugins/Utils.pas/cbex.pas b/plugins/Utils.pas/cbex.pas index 9805b76634..59778fcee7 100644 --- a/plugins/Utils.pas/cbex.pas +++ b/plugins/Utils.pas/cbex.pas @@ -1,4 +1,5 @@ -unit CBEx; +unit cbex; + interface uses windows; diff --git a/plugins/Utils.pas/common.pas b/plugins/Utils.pas/common.pas index ce0ca4c22d..87a4b57f6d 100644 --- a/plugins/Utils.pas/common.pas +++ b/plugins/Utils.pas/common.pas @@ -39,7 +39,7 @@ var function IIF(cond:bool;ret1,ret2:integer ):integer; overload; function IIF(cond:bool;ret1,ret2:PAnsiChar):PAnsiChar; overload; -function IIF(cond:bool;ret1,ret2:pWideChar):pWideChar; overload; +function IIF(cond:bool;ret1,ret2:PWideChar):PWideChar; overload; function IIF(cond:bool;ret1,ret2:Extended ):Extended; overload; function IIF(cond:bool;ret1,ret2:tDateTime):tDateTime; overload; function IIF(cond:bool;ret1,ret2:pointer ):pointer; overload; @@ -76,10 +76,10 @@ procedure ShellSort(size:integer;Compare,Swap:tSortProc); //----- String processing ----- -function FormatStrW (fmt:pWideChar; const arr:array of pWideChar):pWideChar; -function FormatStr (fmt:pAnsiChar; const arr:array of pAnsiChar):pAnsiChar; -function FormatSimpleW(fmt:pWideChar; const arr:array of const):pWideChar; -function FormatSimple (fmt:pAnsiChar; const arr:array of const):pAnsiChar; +function FormatStrW (fmt:PWideChar; const arr:array of PWideChar):PWideChar; +function FormatStr (fmt:PAnsiChar; const arr:array of PAnsiChar):PAnsiChar; +function FormatSimpleW(fmt:PWideChar; const arr:array of const):PWideChar; +function FormatSimple (fmt:PAnsiChar; const arr:array of const):PAnsiChar; const SIGN_UNICODE = $FEFF; @@ -93,13 +93,13 @@ const // trying to recognize text encoding. Returns CP_ function GetTextFormat(Buffer:pByte;sz:cardinal):integer; -function AdjustLineBreaks(S:pWideChar):pWideChar; +function AdjustLineBreaks(s:PWideChar):PWideChar; //----- Encoding conversion ----- function WideToCombo(src:PWideChar;var dst;cp:integer=CP_ACP):integer; -function ChangeUnicode(str:PWideChar):PWideChar; +function ChangeUnicode(Str:PWideChar):PWideChar; function UTF8Len(src:PAnsiChar):integer; function WideToAnsi(src:PWideChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar; function AnsiToWide(src:PAnsiChar;var dst:PWideChar;cp:dword=CP_ACP):PWideChar; @@ -108,9 +108,9 @@ function UTF8ToAnsi(src:PAnsiChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar; function UTF8ToWide(src:PAnsiChar;var dst:PWideChar;len:cardinal=cardinal(-1)):PWideChar; function WideToUTF8(src:PWideChar;var dst:PAnsiChar):PAnsiChar; -function CharWideToUTF8(src:WideChar;var dst:pAnsiChar):integer; -function CharUTF8ToWide(src:pAnsiChar;pin:pinteger=nil):WideChar; -function CharUTF8Len(src:pAnsiChar):integer; +function CharWideToUTF8(src:WideChar;var dst:PAnsiChar):integer; +function CharUTF8ToWide(src:PAnsiChar;pin:pinteger=nil):WideChar; +function CharUTF8Len(src:PAnsiChar):integer; function FastWideToAnsiBuf(src:PWideChar;dst:PAnsiChar;len:cardinal=cardinal(-1)):PAnsiChar; function FastAnsiToWideBuf(src:PAnsiChar;dst:PWideChar;len:cardinal=cardinal(-1)):PWideChar; @@ -118,13 +118,13 @@ function FastWideToAnsi (src:PWideChar;var dst:PAnsiChar):PAnsiChar; function FastAnsiToWide (src:PAnsiChar;var dst:PWideChar):PWideChar; // encode/decode text (URL coding) -function Encode(dst,src:pAnsiChar):PAnsiChar; -function Decode(dst,src:pAnsiChar):PAnsiChar; +function Encode(dst,src:PAnsiChar):PAnsiChar; +function Decode(dst,src:PAnsiChar):PAnsiChar; // '\n'(#13#10) and '\t' (#9) (un)escaping function UnEscape(buf:PAnsiChar):PAnsiChar; function Escape (buf:PAnsiChar):PAnsiChar; -procedure UpperCase(src:pWideChar); -procedure LowerCase(src:pWideChar); +procedure UpperCase(src:PWideChar); +procedure LowerCase(src:PWideChar); //----- base strings functions ----- @@ -133,12 +133,12 @@ function StrDupW(var dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar; function StrEmpty:pointer; function StrDelete (aStr:PAnsiChar;pos,len:cardinal):PAnsiChar; function StrDeleteW(aStr:PWideChar;pos,len:cardinal):PWideChar; -function StrInsert (substr,src:PAnsiChar;pos:cardinal):PAnsiChar; -function StrInsertW(substr,src:PWideChar;pos:cardinal):PWideChar; +function StrInsert (SubStr,src:PAnsiChar;pos:cardinal):PAnsiChar; +function StrInsertW(SubStr,src:PWideChar;pos:cardinal):PWideChar; function StrReplace (src,SubStr,NewStr:PAnsiChar):PAnsiChar; -function StrReplaceW(src,SubStr,NewStr:pWideChar):PWideChar; -function CharReplace (dst:pAnsiChar;old,new:AnsiChar):PAnsiChar; -function CharReplaceW(dst:pWideChar;old,new:WideChar):PWideChar; +function StrReplaceW(src,SubStr,NewStr:PWideChar):PWideChar; +function CharReplace (dst:PAnsiChar;old,new:AnsiChar):PAnsiChar; +function CharReplaceW(dst:PWideChar;old,new:WideChar):PWideChar; function StrCmp (a,b:PAnsiChar;n:integer=0):integer; function StrCmpW(a,b:PWideChar;n:integer=0):integer; function StrEnd (const a:PAnsiChar):PAnsiChar; @@ -167,25 +167,25 @@ function GetPairChar(ch:WideChar):WideChar; overload; //----- String/number conversion ----- -function IntStrLen(Value:int64; base:integer=10):integer; +function IntStrLen(value:int64; base:integer=10):integer; -function IntToHex(dst:pWideChar;Value:int64;Digits:integer=0):pWideChar; overload; -function IntToHex(dst:PAnsiChar;Value:int64;Digits:integer=0):PAnsiChar; overload; -function IntToStr(dst:pWideChar;Value:int64;Digits:integer=0):pWideChar; overload; -function IntToStr(dst:PAnsiChar;Value:int64;Digits:integer=0):PAnsiChar; overload; -function StrToInt(src:pWideChar):int64; overload; +function IntToHex(dst:PWideChar;value:int64;digits:integer=0):PWideChar; overload; +function IntToHex(dst:PAnsiChar;value:int64;digits:integer=0):PAnsiChar; overload; +function IntToStr(dst:PWideChar;value:int64;digits:integer=0):PWideChar; overload; +function IntToStr(dst:PAnsiChar;value:int64;digits:integer=0):PAnsiChar; overload; +function StrToInt(src:PWideChar):int64; overload; function StrToInt(src:PAnsiChar):int64; overload; -function HexToInt(src:pWideChar;len:cardinal=$FFFF):int64; overload; +function HexToInt(src:PWideChar;len:cardinal=$FFFF):int64; overload; function HexToInt(src:PAnsiChar;len:cardinal=$FFFF):int64; overload; -function NumToInt(src:pWideChar):int64; overload; -function NumToInt(src:pAnsiChar):int64; overload; +function NumToInt(src:PWideChar):int64; overload; +function NumToInt(src:PAnsiChar):int64; overload; //----- Date and Time ----- function TimeToInt(stime:PAnsiChar):integer; overload; function TimeToInt(stime:PWideChar):integer; overload; -function IntToTime(dst:pWideChar;time:integer):pWideChar; overload; -function IntToTime(dst:PAnsiChar;time:integer):PAnsiChar; overload; +function IntToTime(dst:PWideChar;Time:integer):PWideChar; overload; +function IntToTime(dst:PAnsiChar;Time:integer):PAnsiChar; overload; { filesize to string conversion @@ -198,17 +198,17 @@ function IntToTime(dst:PAnsiChar;time:integer):PAnsiChar; overload; 3=(caps) '' ,'KB','MB' postfix calculated from 'divider' value } -function IntToK(dst:pWideChar;value,divider,prec,post:integer):pWideChar; +function IntToK(dst:PWideChar;value,divider,prec,post:integer):PWideChar; // filename work function ChangeExt (src,ext:PAnsiChar):PAnsiChar; function ChangeExtW(src,ext:PWideChar):PWideChar; function Extract (s:PAnsiChar;name:Boolean=true):PAnsiChar; -function ExtractW(s:pWideChar;name:Boolean=true):pWideChar; -function GetExt(fname,dst:pWideChar;maxlen:dword=100):pWideChar; overload; +function ExtractW(s:PWideChar;name:Boolean=true):PWideChar; +function GetExt(fname,dst:PWideChar;maxlen:dword=100):PWideChar; overload; function GetExt(fname,dst:PAnsiChar;maxlen:dword=100):PAnsiChar; overload; -function isPathAbsolute(path:pWideChar):boolean; overload; +function isPathAbsolute(path:PWideChar):boolean; overload; function isPathAbsolute(path:PAnsiChar):boolean; overload; //----------------------------------------------------------------------------- @@ -339,7 +339,7 @@ function IIF(cond:bool;ret1,ret2:PAnsiChar):PAnsiChar; overload;{$IFDEF AllowInl begin if cond then result:=ret1 else result:=ret2; end; -function IIF(cond:bool;ret1,ret2:pWideChar):pWideChar; overload;{$IFDEF AllowInline}inline;{$ENDIF} +function IIF(cond:bool;ret1,ret2:PWideChar):PWideChar; overload;{$IFDEF AllowInline}inline;{$ENDIF} begin if cond then result:=ret1 else result:=ret2; end; @@ -491,7 +491,7 @@ end; function PasteFromClipboard(Ansi:boolean;cp:dword=CP_ACP):pointer; var - p:pWideChar; + p:PWideChar; fh:THANDLE; begin result:=nil; @@ -503,7 +503,7 @@ begin if fh<>0 then begin p:=GlobalLock(fh); - StrDupW(pWideChar(result),p); + StrDupW(PWideChar(result),p); end else begin @@ -511,7 +511,7 @@ begin if fh<>0 then begin p:=GlobalLock(fh); - AnsiToWide(PAnsiChar(p),pWideChar(result),cp); + AnsiToWide(PAnsiChar(p),PWideChar(result),cp); end; end; end @@ -558,27 +558,27 @@ begin mGetMem(PAnsiChar(dst),i); StrCopy(PAnsiChar(dst),pc); mFreeMem(pc); - StrCopyW(pWideChar(PAnsiChar(dst)+j),src); + StrCopyW(PWideChar(PAnsiChar(dst)+j),src); result:=i; end; -function ChangeUnicode(str:PWideChar):PWideChar; +function ChangeUnicode(Str:PWideChar):PWideChar; var i,len:integer; begin - result:=str; - if (str=nil) or (str^=#0) then + result:=Str; + if (Str=nil) or (Str^=#0) then exit; - if (word(str^)=$FFFE) or (word(str^)=$FEFF) then + if (word(Str^)=$FFFE) or (word(Str^)=$FEFF) then begin - len:=StrLenW(str); - if word(str^)=$FFFE then + len:=StrLenW(Str); + if word(Str^)=$FFFE then begin i:=len-1; - while i>0 do // str^<>#0 + while i>0 do // Str^<>#0 begin - pword(str)^:=swap(pword(str)^); - inc(str); + pword(Str)^:=swap(pword(Str)^); + inc(Str); dec(i); end; end; @@ -655,7 +655,7 @@ begin end; end; -function CalcUTF8Len(src:pWideChar):integer; +function CalcUTF8Len(src:PWideChar):integer; begin result:=0; if src<>nil then @@ -673,7 +673,7 @@ begin end; end; -function CharWideToUTF8(src:WideChar;var dst:pAnsiChar):integer; +function CharWideToUTF8(src:WideChar;var dst:PAnsiChar):integer; begin if src<#$0080 then begin @@ -699,7 +699,7 @@ begin inc(dst); dst^:=#0; end; -function CharUTF8ToWide(src:pAnsiChar;pin:pinteger=nil):WideChar; +function CharUTF8ToWide(src:PAnsiChar;pin:pinteger=nil):WideChar; var cnt:integer; w:word; @@ -730,7 +730,7 @@ begin result:=WideChar(w); end; -function CharUTF8Len(src:pAnsiChar):integer; +function CharUTF8Len(src:PAnsiChar):integer; begin {!!} if (ord(src^) and $80)=0 then @@ -782,7 +782,7 @@ end; function UTF8ToAnsi(src:PAnsiChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar; var - tmp:pWideChar; + tmp:PWideChar; begin UTF8ToWide(src,tmp); result:=WideToAnsi(tmp,dst,cp); @@ -962,13 +962,13 @@ var begin for i:=0 to Length-1 do begin - if pByte(p1)^<>pbyte(p2)^ then + if pByte(P1)^<>pbyte(P2)^ then begin result:=false; exit; end; - inc(pbyte(p1)); - inc(pbyte(p2)); + inc(pbyte(P1)); + inc(pbyte(P2)); end; result:=true; end; @@ -1011,7 +1011,7 @@ procedure ShowDump(ptr:pbyte;len:integer); var buf: array of Ansichar; i:integer; - p:pAnsiChar; + p:PAnsiChar; p1:pByte; cnt:integer; begin @@ -1136,7 +1136,7 @@ begin end; end; -function Encode(dst,src:pAnsiChar):PAnsiChar; +function Encode(dst,src:PAnsiChar):PAnsiChar; begin while src^<>#0 do begin @@ -1155,7 +1155,7 @@ begin result:=dst; end; -function Decode(dst,src:pAnsiChar):PAnsiChar; +function Decode(dst,src:PAnsiChar):PAnsiChar; begin while (src^<>#0) and (src^<>'&') do begin @@ -1201,7 +1201,7 @@ begin result:=buf; end; -procedure UpperCase(src:pWideChar); +procedure UpperCase(src:PWideChar); var c:WideChar; begin @@ -1217,7 +1217,7 @@ begin end; end; -procedure LowerCase(src:pWideChar); +procedure LowerCase(src:PWideChar); var c:WideChar; begin @@ -1240,7 +1240,7 @@ const function IntToK(dst:pWidechar;value,divider,prec,post:integer):pWidechar; var tmp:integer; - p:pWideChar; + p:PWideChar; ls:array [0..4] of WideChar; begin result:=dst; @@ -1280,10 +1280,10 @@ end; //----- String processing ----- -function FormatStrW(fmt:pWideChar; const arr:array of pWideChar):pWideChar; +function FormatStrW(fmt:PWideChar; const arr:array of PWideChar):PWideChar; var i,len:integer; - pc:pWideChar; + pc:PWideChar; number:integer; begin result:=nil; @@ -1320,10 +1320,10 @@ begin pc^:=#0; end; -function FormatStr(fmt:pAnsiChar; const arr:array of pAnsiChar):pAnsiChar; +function FormatStr(fmt:PAnsiChar; const arr:array of PAnsiChar):PAnsiChar; var i,len:integer; - pc:pAnsiChar; + pc:PAnsiChar; number:integer; begin result:=nil; @@ -1360,10 +1360,10 @@ begin pc^:=#0; end; -function FormatSimpleW(fmt:pWideChar; const arr:array of const):pWideChar; +function FormatSimpleW(fmt:PWideChar; const arr:array of const):PWideChar; var i,len:integer; - pc:pWideChar; + pc:PWideChar; number:integer; begin result:=nil; @@ -1420,10 +1420,10 @@ begin pc^:=#0; end; -function FormatSimple(fmt:pAnsiChar; const arr:array of const):pAnsiChar; +function FormatSimple(fmt:PAnsiChar; const arr:array of const):PAnsiChar; var i,len:integer; - pc:pAnsiChar; + pc:PAnsiChar; number:integer; begin result:=nil; @@ -1480,17 +1480,17 @@ begin pc^:=#0; end; -function AdjustLineBreaks(S:pWideChar):pWideChar; +function AdjustLineBreaks(s:PWideChar):PWideChar; var Source, Dest: PWideChar; Extra, len: Integer; begin Result := nil; - len := StrLenW(S); + len := StrLenW(s); if len=0 then exit; - Source := S; + Source := s; Extra := 0; while Source^ <> #0 do begin @@ -1508,11 +1508,11 @@ begin if Extra = 0 then begin - StrDupW(Result, S); + StrDupW(Result, s); end else begin - Source := S; + Source := s; mGetMem(Result, (len + Extra + 1) * SizeOf(WideChar)); Dest := Result; while Source^ <> #0 do @@ -1545,7 +1545,7 @@ end; function StrDup(var dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar; var l:cardinal; - p:pAnsiChar; + p:PAnsiChar; begin if (src=nil) or (src^=#0) then dst:=nil @@ -1571,7 +1571,7 @@ end; function StrDupW(var dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar; var l:cardinal; - p:pWideChar; + p:PWideChar; begin if (src=nil) or (src^=#0) then dst:=nil @@ -1602,7 +1602,7 @@ end; function StrCopyE(dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar; var l:cardinal; - p:pAnsiChar; + p:PAnsiChar; begin if dst<>nil then begin @@ -1630,7 +1630,7 @@ end; function StrCopyEW(dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar; var l:cardinal; - p:pWideChar; + p:PWideChar; begin if dst<>nil then begin @@ -1658,7 +1658,7 @@ end; function StrCopy(dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar; var l:cardinal; - p:pAnsiChar; + p:PAnsiChar; begin if dst<>nil then begin @@ -1685,7 +1685,7 @@ end; function StrCopyW(dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar; var l:cardinal; - p:pWideChar; + p:PWideChar; begin if dst<>nil then begin @@ -1743,32 +1743,32 @@ begin result:=aStr; end; -function StrInsert(substr,src:PAnsiChar;pos:cardinal):PAnsiChar; +function StrInsert(SubStr,src:PAnsiChar;pos:cardinal):PAnsiChar; var i:cardinal; p:PAnsiChar; begin - i:=StrLen(substr); + i:=StrLen(SubStr); if i<>0 then begin p:=src+pos; move(p^,(p+i)^,StrLen(src)-pos+1); - move(substr^,p^,i); + move(SubStr^,p^,i); end; result:=src; end; -function StrInsertW(substr,src:PWideChar;pos:cardinal):PWideChar; +function StrInsertW(SubStr,src:PWideChar;pos:cardinal):PWideChar; var i:cardinal; p:PWideChar; begin - i:=StrLenW(substr); + i:=StrLenW(SubStr); if i<>0 then begin p:=src+pos; move(p^,(p+i)^,(StrLenW(src)-pos+1)*SizeOf(PWideChar)); - move(substr^,p^,i*SizeOf(WideChar)); + move(SubStr^,p^,i*SizeOf(WideChar)); end; result:=src; end; @@ -1803,7 +1803,7 @@ begin until false; end; -function StrReplaceW(src,SubStr,NewStr:pWideChar):PWideChar; +function StrReplaceW(src,SubStr,NewStr:PWideChar):PWideChar; var i,j,l:integer; k:integer; @@ -1833,7 +1833,7 @@ begin until false; end; -function CharReplace(dst:pAnsiChar;old,new:AnsiChar):PAnsiChar; +function CharReplace(dst:PAnsiChar;old,new:AnsiChar):PAnsiChar; begin result:=dst; if dst<>nil then @@ -1846,7 +1846,7 @@ begin end; end; -function CharReplaceW(dst:pWideChar;old,new:WideChar):PWideChar; +function CharReplaceW(dst:PWideChar;old,new:WideChar):PWideChar; begin result:=dst; if dst<>nil then @@ -2020,7 +2020,7 @@ end; function StrPos(const aStr, aSubStr: PAnsiChar): PAnsiChar; var Str, SubStr: PAnsiChar; - Ch: AnsiChar; + ch: AnsiChar; begin if (aStr = nil) or (aStr^ = #0) or (aSubStr = nil) or (aSubStr^ = #0) then begin @@ -2028,9 +2028,9 @@ begin Exit; end; Result := aStr; - Ch := aSubStr^; + ch := aSubStr^; repeat - if Result^ = Ch then + if Result^ = ch then begin Str := Result; SubStr := aSubStr; @@ -2053,7 +2053,7 @@ end; function StrIndex(const aStr, aSubStr: PAnsiChar):integer; var - p:pAnsiChar; + p:PAnsiChar; begin p:=StrPos(aStr,aSubStr); if p=nil then @@ -2065,7 +2065,7 @@ end; function StrPosW(const aStr, aSubStr: PWideChar): PWideChar; var Str, SubStr: PWideChar; - Ch: WideChar; + ch: WideChar; begin if (aStr = nil) or (aStr^ = #0) or (aSubStr = nil) or (aSubStr^ = #0) then begin @@ -2073,9 +2073,9 @@ begin Exit; end; Result := aStr; - Ch := aSubStr^; + ch := aSubStr^; repeat - if Result^ = Ch then + if Result^ = ch then begin Str := Result; SubStr := aSubStr; @@ -2098,7 +2098,7 @@ end; function StrIndexW(const aStr, aSubStr: PWideChar):integer; var - p:pWideChar; + p:PWideChar; begin p:=StrPosW(aStr,aSubStr); if p=nil then @@ -2164,7 +2164,7 @@ begin end; end; -function ExtractW(s:pWideChar;name:Boolean=true):pWideChar; +function ExtractW(s:PWideChar;name:Boolean=true):PWideChar; var i:integer; begin @@ -2183,7 +2183,7 @@ begin end; end; -function GetExt(fname,dst:pWideChar;maxlen:dword=100):pWideChar; +function GetExt(fname,dst:PWideChar;maxlen:dword=100):PWideChar; var ppc,pc:PWideChar; begin @@ -2257,13 +2257,13 @@ begin end; end; -function isPathAbsolute(path:pWideChar):boolean; +function isPathAbsolute(path:PWideChar):boolean; begin result:=((path[1]=':') and (path[2]='\')) or ((path[0]='\') {and (path[1]='\')}) or (StrPosW(path,'://')<>nil); end; -function isPathAbsolute(path:pAnsiChar):boolean; +function isPathAbsolute(path:PAnsiChar):boolean; begin result:=((path[1]=':') and (path[2]='\')) or ((path[0]='\') {and (path[1]='\')}) or (StrPos(path,'://')<>nil); @@ -2303,15 +2303,15 @@ begin result:=TimeToInt(FastWideToAnsiBuf(stime,buf)); end; -function IntToTime(dst:PAnsiChar;time:integer):PAnsiChar; +function IntToTime(dst:PAnsiChar;Time:integer):PAnsiChar; var day,hour,minute,sec:array [0..7] of AnsiChar; d,h:integer; begin result:=dst; - h:=time div 3600; - dec(time,h*3600); - IntToStr(sec,(time mod 60),2); + h:=Time div 3600; + dec(Time,h*3600); + IntToStr(sec,(Time mod 60),2); d:=h div 24; if d>0 then begin @@ -2327,7 +2327,7 @@ begin if h>0 then begin IntToStr(hour,h); - IntToStr(minute,(time div 60),2); + IntToStr(minute,(Time div 60),2); dst^:=hour[0]; inc(dst); if hour[1]<>#0 then begin @@ -2339,7 +2339,7 @@ begin end else begin - IntToStr(minute,time div 60); + IntToStr(minute,Time div 60); dst^:=minute[0]; inc(dst); if minute[1]<>#0 then begin @@ -2352,16 +2352,16 @@ begin dst^:=#0; end; -function IntToTime(dst:pWideChar;time:integer):pWideChar; +function IntToTime(dst:PWideChar;Time:integer):PWideChar; var buf:array [0..63] of AnsiChar; begin - result:=FastAnsiToWideBuf(IntToTime(buf,time),dst); + result:=FastAnsiToWideBuf(IntToTime(buf,Time),dst); end; //----- String/number conversion ----- -function NumToInt(src:pWideChar):int64; +function NumToInt(src:PWideChar):int64; begin result:=0; if src=nil then exit; @@ -2378,7 +2378,7 @@ begin result:=StrToInt(src); end; -function NumToInt(src:pAnsiChar):int64; +function NumToInt(src:PAnsiChar):int64; begin result:=0; if src=nil then exit; @@ -2395,7 +2395,7 @@ begin result:=StrToInt(src); end; -function StrToInt(src:pWideChar):int64; +function StrToInt(src:PWideChar):int64; var sign:boolean; begin @@ -2437,83 +2437,83 @@ begin end; end; -function IntStrLen(Value:int64; base:integer=10):integer; +function IntStrLen(value:int64; base:integer=10):integer; var i:uint64; begin result:=0; - if (base=10) and (Value<0) then + if (base=10) and (value<0) then inc(result); - i:=ABS(Value); + i:=ABS(value); repeat i:=i div base; inc(result); until i=0; end; -function IntToStr(dst:PAnsiChar;Value:int64;Digits:integer=0):PAnsiChar; +function IntToStr(dst:PAnsiChar;value:int64;digits:integer=0):PAnsiChar; var i:uint64; begin - if Digits<=0 then + if digits<=0 then begin - if Value<0 then - Digits:=1 + if value<0 then + digits:=1 else - Digits:=0; - i:=ABS(Value); + digits:=0; + i:=ABS(value); repeat i:=i div 10; - inc(Digits); + inc(digits); until i=0; end; - dst[Digits]:=#0; - i:=ABS(Value); + dst[digits]:=#0; + i:=ABS(value); repeat - dec(Digits); - dst[Digits]:=AnsiChar(ord('0')+(i mod 10)); + dec(digits); + dst[digits]:=AnsiChar(ord('0')+(i mod 10)); i:=i div 10; - if (Value<0) and (Digits=1) then + if (value<0) and (digits=1) then begin dst[0]:='-'; break; end; - until Digits=0; + until digits=0; result:=dst; end; -function IntToStr(dst:pWideChar;Value:int64;Digits:integer=0):pWideChar; +function IntToStr(dst:PWideChar;value:int64;digits:integer=0):PWideChar; var i:uint64; begin - if Digits<=0 then + if digits<=0 then begin - if Value<0 then - Digits:=1 + if value<0 then + digits:=1 else - Digits:=0; - i:=ABS(Value); + digits:=0; + i:=ABS(value); repeat i:=i div 10; - inc(Digits); + inc(digits); until i=0; end; - dst[Digits]:=#0; - i:=ABS(Value); + dst[digits]:=#0; + i:=ABS(value); repeat - dec(Digits); - dst[Digits]:=WideChar(ord('0')+(i mod 10)); + dec(digits); + dst[digits]:=WideChar(ord('0')+(i mod 10)); i:=i div 10; - if (Value<0) and (Digits=1) then + if (value<0) and (digits=1) then begin dst[0]:='-'; break; end; - until Digits=0; + until digits=0; result:=dst; end; -function HexToInt(src:pWideChar;len:cardinal=$FFFF):int64; +function HexToInt(src:PWideChar;len:cardinal=$FFFF):int64; begin result:=0; while (src^<>#0) and (len>0) do @@ -2549,47 +2549,47 @@ begin end; end; -function IntToHex(dst:pWidechar;Value:int64;Digits:integer=0):pWideChar; +function IntToHex(dst:pWidechar;value:int64;digits:integer=0):PWideChar; var i:dword; begin - if Digits<=0 then + if digits<=0 then begin - Digits:=0; - i:=Value; + digits:=0; + i:=value; repeat i:=i shr 4; - inc(Digits); + inc(digits); until i=0; end; - dst[Digits]:=#0; + dst[digits]:=#0; repeat - Dec(Digits); - dst[Digits]:=WideChar(HexDigitChr[Value and $F]); - Value:=Value shr 4; - until Digits=0; + Dec(digits); + dst[digits]:=WideChar(HexDigitChr[value and $F]); + value:=value shr 4; + until digits=0; result:=dst; end; -function IntToHex(dst:PAnsiChar;Value:int64;Digits:integer=0):PAnsiChar; +function IntToHex(dst:PAnsiChar;value:int64;digits:integer=0):PAnsiChar; var i:dword; begin - if Digits<=0 then + if digits<=0 then begin - Digits:=0; - i:=Value; + digits:=0; + i:=value; repeat i:=i shr 4; - inc(Digits); + inc(digits); until i=0; end; - dst[Digits]:=#0; + dst[digits]:=#0; repeat - Dec(Digits); - dst[Digits]:=HexDigitChr[Value and $F]; - Value:=Value shr 4; - until Digits=0; + Dec(digits); + dst[digits]:=HexDigitChr[value and $F]; + value:=value shr 4; + until digits=0; result:=dst; end; diff --git a/plugins/Utils.pas/datetime.pas b/plugins/Utils.pas/datetime.pas index 4b13d7b3f4..e2fa2e4809 100644 --- a/plugins/Utils.pas/datetime.pas +++ b/plugins/Utils.pas/datetime.pas @@ -1,4 +1,4 @@ -unit DateTime; +unit datetime; interface @@ -26,7 +26,7 @@ procedure UnixTimeToFileTime(ts:int_ptr; var pft:TFILETIME); function FileTimeToUnixTime(const pft: TFILETIME):int_ptr; function TimeStampToLocalTimeStamp(ts:int_ptr):int_ptr; function TimestampToDateTime(ts:int_ptr):TDateTime; -function TimestampToSystemTime(Time:DWord; var ST:TSystemTime):PSystemTime; +function TimestampToSystemTime(Time:DWord; var st:TSystemTime):PSystemTime; function DateTimeToStr(Time:Dword; Format:pWideChar=nil):pWideChar; function DateToStr (Time:Dword; Format:pWideChar=nil):pWideChar; @@ -134,30 +134,30 @@ begin Result := UnixDateDelta + TimeStampToLocalTimeStamp(ts) / SecondsPerDay; end; -function TimestampToSystemTime(Time:DWord; var ST:TSystemTime):PSystemTime; +function TimestampToSystemTime(Time:DWord; var st:TSystemTime):PSystemTime; var aft,lft:TFILETIME; begin UnixTimeToFileTime(Time,aft); FileTimeToLocalFileTime(aft, lft); - FileTimeToSystemTime(lft,ST); - result:=@ST; + FileTimeToSystemTime(lft,st); + result:=@st; end; function DateTimeToStr(Time:Dword; Format:pWideChar=nil):pWideChar; var buf:array [0..300] of WideChar; - ST: TSystemTime; + st: TSystemTime; pc:pWideChar; begin - TimestampToSystemTime(Time,ST); - GetDateFormatW(LOCALE_USER_DEFAULT,0,@ST,Format,@buf,300); + TimestampToSystemTime(Time,st); + GetDateFormatW(LOCALE_USER_DEFAULT,0,@st,Format,@buf,300); if Format<>nil then - GetTimeFormatW(LOCALE_USER_DEFAULT,0,@ST,@buf,@buf,300) + GetTimeFormatW(LOCALE_USER_DEFAULT,0,@st,@buf,@buf,300) else begin pc:=StrEndW(@buf); pc^:=' '; inc(pc); - GetTimeFormatW(LOCALE_USER_DEFAULT,0,@ST,nil,pc,300-(pc-pWideChar(@buf))) + GetTimeFormatW(LOCALE_USER_DEFAULT,0,@st,nil,pc,300-(pc-pWideChar(@buf))) end; StrDupW(result,buf); end; @@ -165,20 +165,20 @@ end; function DateToStr(Time:Dword; Format:pWideChar=nil):pWideChar; var buf:array [0..300] of WideChar; - ST: TSystemTime; + st: TSystemTime; begin - TimestampToSystemTime(Time,ST); - GetDateFormatW(LOCALE_USER_DEFAULT,0,@ST,Format,@buf,300); + TimestampToSystemTime(Time,st); + GetDateFormatW(LOCALE_USER_DEFAULT,0,@st,Format,@buf,300); StrDupW(result,buf); end; function TimeToStr(Time:Dword; Format:pWideChar=nil):pWideChar; var buf:array [0..300] of WideChar; - ST: TSystemTime; + st: TSystemTime; begin - TimestampToSystemTime(Time,ST); - GetTimeFormatW(LOCALE_USER_DEFAULT,0,@ST,Format,@buf,300); + TimestampToSystemTime(Time,st); + GetTimeFormatW(LOCALE_USER_DEFAULT,0,@st,Format,@buf,300); StrDupW(result,buf); end; diff --git a/plugins/Utils.pas/editwrapper.pas b/plugins/Utils.pas/editwrapper.pas index 0a6d13d1d5..c6af1284e1 100644 --- a/plugins/Utils.pas/editwrapper.pas +++ b/plugins/Utils.pas/editwrapper.pas @@ -1,4 +1,4 @@ -unit EditWrapper; +unit editwrapper; interface diff --git a/plugins/Utils.pas/mApiCardM.pas b/plugins/Utils.pas/mApiCardM.pas index febdf4f783..81b6640d36 100644 --- a/plugins/Utils.pas/mApiCardM.pas +++ b/plugins/Utils.pas/mApiCardM.pas @@ -161,7 +161,7 @@ begin if pp^<>#0 then begin bufw[j]:=' '; bufw[j+1]:='-'; bufw[j+2]:=' '; inc(j,3); - FastAnsitoWideBuf(pp+1,tmp); + FastAnsiToWideBuf(pp+1,tmp); StrCopyW(bufw+j,TranslateW(tmp)); SendMessageW(wnd,CB_ADDSTRING,0,lparam(@bufw)); end @@ -170,7 +170,7 @@ begin end else begin - FastAnsitoWideBuf(p,tmp); + FastAnsiToWideBuf(p,tmp); SendMessageW(wnd,CB_ADDSTRING,0,lparam(TranslateW(tmp))); if (p=@buf) and (StrCmp(p,'structure')=0) then break; @@ -420,7 +420,7 @@ begin end; SendMessageW(HelpWindow,WM_SETTEXT,0,LPARAM(TranslateW(title))); - SendMessageW(GetDlgItem(HelpWindow,IDC_HLP_NOTE),WM_SETTEXT,0,LPARAM(TranslateW(Note))); + SendMessageW(GetDlgItem(HelpWindow,IDC_HLP_NOTE),WM_SETTEXT,0,LPARAM(TranslateW(note))); end; end else @@ -438,11 +438,11 @@ end; constructor tmApiCard.Create(fname:pAnsiChar; lparent:HWND=0); var - IniFile: array [0..511] of AnsiChar; + INIFile: array [0..511] of AnsiChar; begin inherited Create; - StrCopy(@IniFile,fname); + StrCopy(@INIFile,fname); HelpWindow:=0; current:=nil; if fname<>nil then @@ -456,7 +456,7 @@ begin end; parent:=lparent; end; - storage:=OpenStorage(pAnsiChar(@IniFile)); + storage:=OpenStorage(pAnsiChar(@INIFile)); end; destructor tmApiCard.Destroy; diff --git a/plugins/Utils.pas/memini.pas b/plugins/Utils.pas/memini.pas index 31e7d58747..c6cd05a17e 100644 --- a/plugins/Utils.pas/memini.pas +++ b/plugins/Utils.pas/memini.pas @@ -52,7 +52,7 @@ type end; pStorage = ^tStorage; tStorage = record - Name :pAnsiChar; // filename + name :pAnsiChar; // filename buffer :pAnsiChar; // source (INI) text numsect :integer; diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas index 50d700b802..cdc71dbb08 100644 --- a/plugins/Utils.pas/mircontacts.pas +++ b/plugins/Utils.pas/mircontacts.pas @@ -10,14 +10,14 @@ uses //----- Contact info ----- function GetContactProtoAcc(hContact:TMCONTACT):PAnsiChar; -function GetContactProto(hContact: TMCONTACT): pAnsiChar; overload; -function GetContactProto(hContact: TMCONTACT; var SubContact: TMCONTACT; var SubProtocol: pAnsiChar): pAnsiChar; overload; -function GetContactDisplayName(hContact: TMCONTACT; Proto: pAnsiChar = nil; Contact: boolean = false): PWideChar; -function GetContactID(hContact: TMCONTACT; Proto: pAnsiChar = nil; Contact: boolean = false): PAnsiChar; +function GetContactProto(hContact: TMCONTACT): PAnsiChar; overload; +function GetContactProto(hContact: TMCONTACT; var SubContact: TMCONTACT; var SubProtocol: PAnsiChar): PAnsiChar; overload; +function GetContactDisplayName(hContact: TMCONTACT; Proto: PAnsiChar = nil; Contact: boolean = false): PWideChar; +function GetContactID(hContact: TMCONTACT; Proto: PAnsiChar = nil; Contact: boolean = false): PAnsiChar; -function GetContactCodePage (hContact: TMCONTACT; Proto: pAnsiChar; var UsedDefault: boolean): Cardinal; overload; -function GetContactCodePage (hContact: TMCONTACT; const Proto: pAnsiChar = nil): Cardinal; overload; -function WriteContactCodePage(hContact: TMCONTACT; CodePage: Cardinal; Proto: pAnsiChar = nil): boolean; +function GetContactCodePage (hContact: TMCONTACT; Proto: PAnsiChar; var UsedDefault: boolean): Cardinal; overload; +function GetContactCodePage (hContact: TMCONTACT; const Proto: PAnsiChar = nil): Cardinal; overload; +function WriteContactCodePage(hContact: TMCONTACT; CodePage: Cardinal; Proto: PAnsiChar = nil): boolean; function GetContactStatus(hContact:TMCONTACT):integer; @@ -29,13 +29,13 @@ function IsMirandaUser(hContact:TMCONTACT):integer; // >0=Miranda; 0=Not miranda // -2 - deleted account, -1 - disabled account, 0 - hidden // 1 - metacontact, 2 - submetacontact, positive - active // proto - ASSIGNED buffer -function IsContactActive(hContact:TMCONTACT;proto:pAnsiChar=nil):integer; +function IsContactActive(hContact:TMCONTACT;Proto:PAnsiChar=nil):integer; //----- Save / Load contact ----- function LoadContact(group,setting:PAnsiChar):TMCONTACT; function SaveContact(hContact:TMCONTACT;group,setting:PAnsiChar):integer; -function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):TMCONTACT; +function FindContactHandle(Proto:PAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):TMCONTACT; //----- Another functions ----- @@ -71,13 +71,13 @@ begin result:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)); end; -function GetContactProto(hContact: TMCONTACT): pAnsiChar; +function GetContactProto(hContact: TMCONTACT): PAnsiChar; {$IFDEF AllowInline}inline;{$ENDIF} begin Result := PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0)); end; -function GetContactProto(hContact: TMCONTACT; var SubContact: TMCONTACT; var SubProtocol: pAnsiChar): pAnsiChar; +function GetContactProto(hContact: TMCONTACT; var SubContact: TMCONTACT; var SubProtocol: PAnsiChar): PAnsiChar; begin Result := GetContactProto(hContact); if StrCmp(Result, META_PROTO)=0 then @@ -92,7 +92,7 @@ begin end; end; -function GetContactDisplayName(hContact: TMCONTACT; Proto: pAnsiChar = nil; Contact: boolean = false): PWideChar; +function GetContactDisplayName(hContact: TMCONTACT; Proto: PAnsiChar = nil; Contact: boolean = false): PWideChar; var ci: TContactInfo; pUnk:PWideChar; @@ -129,7 +129,7 @@ begin end; end; -function GetContactID(hContact: TMCONTACT; Proto: pAnsiChar = nil; Contact: boolean = false): PAnsiChar; +function GetContactID(hContact: TMCONTACT; Proto: PAnsiChar = nil; Contact: boolean = false): PAnsiChar; var uid: PAnsiChar; dbv: TDBVARIANT; @@ -142,7 +142,7 @@ begin if Proto = nil then Proto := GetContactProto(hContact); uid := PAnsiChar(CallProtoService(Proto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0)); - if (int_ptr(uid) <> CALLSERVICE_NOTFOUND) and (uid <> nil) then + if (uid <> PAnsiChar(CALLSERVICE_NOTFOUND)) and (uid <> nil) then begin // DBGetContactSettingStr comparing to DBGetContactSetting don't translate strings // when uType=0 (DBVT_ASIS) @@ -169,7 +169,7 @@ begin end; end; -function GetContactCodePage(hContact: TMCONTACT; Proto: pAnsiChar; var UsedDefault: boolean) : Cardinal; +function GetContactCodePage(hContact: TMCONTACT; Proto: PAnsiChar; var UsedDefault: boolean) : Cardinal; begin if Proto = nil then Proto := GetContactProto(hContact); @@ -186,14 +186,14 @@ begin Result := GetACP(); end; -function GetContactCodePage(hContact: TMCONTACT; const Proto: pAnsiChar = nil): Cardinal; +function GetContactCodePage(hContact: TMCONTACT; const Proto: PAnsiChar = nil): Cardinal; var def: boolean; begin Result := GetContactCodePage(hContact, Proto, def); end; -function WriteContactCodePage(hContact: TMCONTACT; CodePage: Cardinal; Proto: pAnsiChar = nil): boolean; +function WriteContactCodePage(hContact: TMCONTACT; CodePage: Cardinal; Proto: PAnsiChar = nil): boolean; begin Result := false; if Proto = nil then @@ -236,7 +236,7 @@ begin result:=-1; end; -function IsContactActive(hContact:TMCONTACT;proto:pAnsiChar=nil):integer; +function IsContactActive(hContact:TMCONTACT;Proto:PAnsiChar=nil):integer; var p:PPROTOACCOUNT; name: array [0..31] of AnsiChar; @@ -268,14 +268,14 @@ begin if StrCmp(GetContactProto(hContact),META_PROTO)=0 then result:=1; end; - if proto<>nil then - StrCopy(proto,@name); + if Proto<>nil then + StrCopy(Proto,@name); end else begin result:=-2; - if proto<>nil then - proto^:=#0; + if Proto<>nil then + Proto^:=#0; end; end; @@ -286,9 +286,9 @@ const opt_cuid = 'cuid'; opt_ischat = 'ischat'; -function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):TMCONTACT; +function FindContactHandle(Proto:PAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):TMCONTACT; var - uid:pAnsiChar; + uid:PAnsiChar; ldbv:TDBVARIANT; hContact:TMCONTACT; pw:pWideChar; @@ -297,8 +297,8 @@ begin uid:=nil; if not is_chat then begin - uid:=pAnsiChar(CallProtoService(proto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0)); - if uid=pAnsiChar(CALLSERVICE_NOTFOUND) then exit; + uid:=PAnsiChar(CallProtoService(Proto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0)); + if uid=PAnsiChar(CALLSERVICE_NOTFOUND) then exit; end; hContact:=db_find_first(); @@ -308,14 +308,14 @@ begin begin if IsChat(hContact) then begin - pw:=DBReadUnicode(hContact,proto,'ChatRoomID'); + pw:=DBReadUnicode(hContact,Proto,'ChatRoomID'); if StrCmpW(pw,dbv.szVal.W)=0 then result:=hContact; mFreeMem(pw); end end else begin - if DBReadSetting(hContact,proto,uid,@ldbv)=0 then + if DBReadSetting(hContact,Proto,uid,@ldbv)=0 then begin if dbv._type=ldbv._type then begin @@ -347,13 +347,13 @@ end; function LoadContact(group,setting:PAnsiChar):TMCONTACT; var - p,proto:pAnsiChar; + p,Proto:PAnsiChar; section:array [0..63] of AnsiChar; dbv:TDBVARIANT; is_chat:boolean; begin p:=StrCopyE(section,setting); - StrCopy(p,opt_cproto); proto :=DBReadString(0,group,section); + StrCopy(p,opt_cproto); Proto :=DBReadString(0,group,section); StrCopy(p,opt_ischat); is_chat:=DBReadByte (0,group,section,0)<>0; StrCopy(p,opt_cuid ); if is_chat then @@ -361,9 +361,9 @@ begin else DBReadSetting(0,group,section,@dbv); - result:=FindContactHandle(proto,dbv,is_chat); + result:=FindContactHandle(Proto,dbv,is_chat); - mFreeMem(proto); + mFreeMem(Proto); if not is_chat then DBFreeVariant(@dbv) else @@ -372,31 +372,31 @@ end; function SaveContact(hContact:TMCONTACT;group,setting:PAnsiChar):integer; var - p,proto,uid:pAnsiChar; + p,Proto,uid:PAnsiChar; cws:TDBVARIANT; section:array [0..63] of AnsiChar; pw:pWideChar; is_chat:boolean; begin result:=0; - proto:=GetContactProtoAcc(hContact); - if proto<>nil then + Proto:=GetContactProtoAcc(hContact); + if Proto<>nil then begin p:=StrCopyE(section,setting); is_chat:=IsChat(hContact); if is_chat then begin - pw:=DBReadUnicode(hContact,proto,'ChatRoomID'); + pw:=DBReadUnicode(hContact,Proto,'ChatRoomID'); StrCopy(p,opt_cuid); DBWriteUnicode(0,group,section,pw); mFreeMem(pw); result:=1; end else begin - uid:=pAnsiChar(CallProtoService(proto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0)); - if uid<>pAnsiChar(CALLSERVICE_NOTFOUND) then + uid:=PAnsiChar(CallProtoService(Proto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0)); + if uid<>PAnsiChar(CALLSERVICE_NOTFOUND) then begin - if DBReadSetting(hContact,proto,uid,@cws)=0 then + if DBReadSetting(hContact,Proto,uid,@cws)=0 then begin StrCopy(p,opt_cuid); DBWriteSetting(0,group,section,@cws); DBFreeVariant(@cws); @@ -406,7 +406,7 @@ begin end; if result<>0 then begin - StrCopy(p,opt_cproto); DBWriteString(0,group,section,proto); + StrCopy(p,opt_cproto); DBWriteString(0,group,section,Proto); StrCopy(p,opt_ischat); DBWriteByte (0,group,section,ord(is_chat)); end; end; @@ -564,9 +564,9 @@ var buf:array [0..511] of WideChar; buf1:array [0..63] of WideChar; p:PWideChar; - uid:pAnsiChar; + uid:PAnsiChar; ldbv:TDBVARIANT; - acc:pAnsiChar; + acc:PAnsiChar; lName, lGroup, lAccount, @@ -619,8 +619,8 @@ begin end else begin - uid:=pAnsiChar(CallProtoService(acc,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0)); - if uid<>pAnsiChar(CALLSERVICE_NOTFOUND) then + uid:=PAnsiChar(CallProtoService(acc,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0)); + if uid<>PAnsiChar(CALLSERVICE_NOTFOUND) then begin if DBReadSetting(hContact,acc,uid,@ldbv)=0 then begin diff --git a/plugins/Utils.pas/mirevents.pas b/plugins/Utils.pas/mirevents.pas index 62ffecb61e..1303746dce 100644 --- a/plugins/Utils.pas/mirevents.pas +++ b/plugins/Utils.pas/mirevents.pas @@ -33,7 +33,7 @@ const procedure GetEventInfo (hDBEvent: THANDLE; var EventInfo: TDBEventInfo); function GetEventTimestamp(hDBEvent: THANDLE): DWord; function GetEventDateTime (hDBEvent: THANDLE): TDateTime; -function GetEventCoreText (const EventInfo: TDBEventInfo; CP: integer = CP_ACP): PWideChar; +function GetEventCoreText (const EventInfo: TDBEventInfo; cp: integer = CP_ACP): PWideChar; //----- Event check ----- @@ -91,14 +91,14 @@ begin EventInfo.cbBlob := 0; end; -function GetEventCoreText(const EventInfo: TDBEventInfo; CP: integer = CP_ACP): PWideChar; +function GetEventCoreText(const EventInfo: TDBEventInfo; cp: integer = CP_ACP): PWideChar; var dbegt: TDBEVENTGETTEXT; msg: pWideChar; begin dbegt.dbei := @EventInfo; dbegt.datatype := DBVT_WCHAR; - dbegt.codepage := CP; + dbegt.codepage := cp; msg := pWideChar(CallService(MS_DB_EVENT_GETTEXT,0,LPARAM(@dbegt))); @@ -258,13 +258,13 @@ const (Proto: 'outlook:/'; Idn: False;), (Proto: 'callto:/'; Idn: False;)); -function TextHasUrls(Text: pWideChar): Boolean; +function TextHasUrls(text: pWideChar): Boolean; var i,len: Integer; buf,pPos: PWideChar; begin Result := False; - len := StrLenW(Text); + len := StrLenW(text); if len=0 then exit; // search in URL Prefixes like "www" @@ -272,10 +272,10 @@ begin for i := 0 to High(UrlPrefix) do begin - pPos := StrPosW(Text, UrlPrefix[i]); + pPos := StrPosW(text, UrlPrefix[i]); if not Assigned(pPos) then continue; - Result := ((uint_ptr(pPos) = uint_ptr(Text)) or not IsWideCharAlphaNumeric((pPos - 1)^)) and + Result := ((uint_ptr(pPos) = uint_ptr(text)) or not IsWideCharAlphaNumeric((pPos - 1)^)) and IsWideCharAlphaNumeric((pPos + StrLenW(UrlPrefix[i]))^); if Result then exit; @@ -283,9 +283,9 @@ begin // search in url protos like "http:/" - if StrPosW(Text,':/') = nil then exit; + if StrPosW(text,':/') = nil then exit; - StrDupW(buf,Text); + StrDupW(buf,text); CharLowerBuffW(buf,len); for i := 0 to High(UrlProto) do diff --git a/plugins/Utils.pas/playlist.pas b/plugins/Utils.pas/playlist.pas index 12c7cbcf05..656317677c 100644 --- a/plugins/Utils.pas/playlist.pas +++ b/plugins/Utils.pas/playlist.pas @@ -62,7 +62,7 @@ type tM3UPlaylist = class(tPlaylist) private public - constructor Create(fName:pWideChar); + constructor Create(fname:pWideChar); constructor CreateBuf(buf:pointer); end; @@ -163,19 +163,21 @@ begin mFreeMem(plBufW); end; -constructor tM3UPlaylist.Create(fName:pWideChar); +constructor tM3UPlaylist.Create(fname:pWideChar); var f:THANDLE; i:integer; plBuf:pAnsiChar; begin - f:=Reset(fName); + inherited; + + f:=Reset(fname); if f<>THANDLE(INVALID_HANDLE_VALUE) then begin i:=integer(FileSize(f)); if i=-1 then - i:=integer(GetFSize(fName)); + i:=integer(GetFSize(fname)); if i<>-1 then begin mGetMem(plBuf,i+1); @@ -225,7 +227,7 @@ begin CloseStorage(storage); end; -constructor tPLSPlaylist.Create(fName:pWideChar); +constructor tPLSPlaylist.Create(fname:pWideChar); var buf:pAnsiChar; h:THANDLE; @@ -283,7 +285,7 @@ begin end; plStrings:=nil; -// inherited; + inherited Free; end; procedure tPlaylist.AddLine(name,descr:pWideChar;new:boolean=true); diff --git a/plugins/Utils.pas/protocols.pas b/plugins/Utils.pas/protocols.pas index c311cb8936..598d02ba50 100644 --- a/plugins/Utils.pas/protocols.pas +++ b/plugins/Utils.pas/protocols.pas @@ -218,7 +218,7 @@ procedure FillProtoList(list:HWND;withIcons:bool=false); var item:TLVITEMW; lvc:TLVCOLUMN; - i,NewItem:integer; + i,newItem:integer; cli:PCLIST_INTERFACE; begin FillChar(lvc,SizeOf(lvc),0); @@ -280,7 +280,7 @@ procedure FillStatusList(proto:uint_ptr;list:HWND;withIcons:bool=false); procedure AddString(num:integer;enabled:boolean;cli:PCLIST_INTERFACE); var item:LV_ITEMW; - NewItem:integer; + newItem:integer; begin FillChar(item,SizeOf(item),0); item.iItem :=num; @@ -373,14 +373,14 @@ procedure CheckStatusList(list:HWND;ProtoNum:uint_ptr); var i:integer; - Item:TLVITEM; + item:TLVITEM; begin for i:=1 to ListView_GetItemCount(list)-1 do //skip default begin - Item.iItem:=i; - Item.mask:=LVIF_PARAM; - ListView_GetItem(list,Item); - SetStatusMask(Item.lParam,ListView_GetCheckState(list,i)=BST_CHECKED) + item.iItem:=i; + item.mask:=LVIF_PARAM; + ListView_GetItem(list,item); + SetStatusMask(item.lParam,ListView_GetCheckState(list,i)=BST_CHECKED) end; end; diff --git a/plugins/Utils.pas/sedit.pas b/plugins/Utils.pas/sedit.pas index 8fef4dcebb..094839ca63 100644 --- a/plugins/Utils.pas/sedit.pas +++ b/plugins/Utils.pas/sedit.pas @@ -1,5 +1,5 @@ {structure editor} -unit SEdit; +unit sedit; interface @@ -116,7 +116,7 @@ begin FillChar(ti,SizeOf(ti),0); ti.cbSize :=sizeof(TOOLINFO); ti.uFlags :=TTF_IDISHWND or TTF_SUBCLASS; - ti.hwnd :=dialog; + ti.hwnd :=Dialog; ti.hinst :=hInstance; ti.uId :=GetDlgItem(Dialog,IDC_DATA_NEW); {$IFDEF Miranda} @@ -1064,7 +1064,7 @@ begin urd.lpTemplate:='IDD_STRUCTURE';//MAKEINTRESOURCEA(IDD_STRUCTURE); urd.lParam :=0; urd.pfnResizer:=@StructEditDlgResizer; - CallService(MS_UTILS_RESIZEDIALOG,0,tlparam(@urd)); + CallService(MS_UTILS_RESIZEDIALOG,0,TLPARAM(@urd)); {$ELSE} GetWindowRect(Dialog,rc); @@ -1231,7 +1231,7 @@ begin li.iSubItem :=0; li.StateMask:=LVIS_FOCUSED+LVIS_SELECTED; li.State :=LVIS_FOCUSED+LVIS_SELECTED; - SendMessageW(wnd,LVM_SETITEMW,0,tlparam(@li)); + SendMessageW(wnd,LVM_SETITEMW,0,TLPARAM(@li)); end; CheckList(Dialog); end; @@ -1335,7 +1335,7 @@ begin if item.pszText<>nil then begin item.mask:=LVIF_TEXT; - SendMessageW(hdr.hWndFrom,LVM_SETITEMW,0,tlparam(@item)); + SendMessageW(hdr.hWndFrom,LVM_SETITEMW,0,TLPARAM(@item)); result:=1; end; end; diff --git a/plugins/Utils.pas/sparam.pas b/plugins/Utils.pas/sparam.pas index 623391769e..cf8077d59b 100644 --- a/plugins/Utils.pas/sparam.pas +++ b/plugins/Utils.pas/sparam.pas @@ -195,7 +195,7 @@ begin if pp^<>#0 then begin dst[j+1]:='-'; dst[j+2]:=' '; inc(j,3); - FastAnsitoWideBuf(pp+1,dst+j); + FastAnsiToWideBuf(pp+1,dst+j); StrCopyW(dst+j,TranslateW(dst+j)); end; ltype:=ACF_NUMBER; @@ -203,7 +203,7 @@ begin else begin ltype:=FixParam(src); - StrCopyW(dst,TranslateW(FastAnsitoWideBuf(src,dst))); + StrCopyW(dst,TranslateW(FastAnsiToWideBuf(src,dst))); end; if pc<>nil then diff --git a/plugins/Utils.pas/srvblock.pas b/plugins/Utils.pas/srvblock.pas index d8e4465f0b..6bfaff37b7 100644 --- a/plugins/Utils.pas/srvblock.pas +++ b/plugins/Utils.pas/srvblock.pas @@ -9,8 +9,8 @@ uses windows; const - ACF_SCRIPT_SERVICE = $01000000; // high byte of dword - ACF_SCRIPT_EXPAND = $10000000; // all subblocks are visible + ACF_SCRIPT_SERVICE = $00800000; // high bit in low byte of hight word (lower uses in actions + ACF_SCRIPT_EXPAND = $10000000; // all subblocks are visible (block creation only) type pServiceValue = ^tServiceValue; @@ -153,9 +153,15 @@ begin GetClientRect(lpar,rc); SetWindowPos(res,HWND_TOP,pt.x,pt.y+rc.bottom+10,0,0,SWP_NOZORDER or SWP_NOSIZE); end; + else + wnd:=0; + wndb:=0; + end; + if wnd<>0 then + begin + EnableWindow(wnd ,false); + ShowWindow (wndb,SW_SHOW); end; - EnableWindow(wnd ,false); - ShowWindow (wndb,SW_SHOW); end; procedure ReloadService(Dialog:HWND;srv:pAnsiChar;setvalue:boolean); diff --git a/plugins/Utils.pas/strans.pas b/plugins/Utils.pas/strans.pas index 0ed7c44bad..fa92cd573b 100644 --- a/plugins/Utils.pas/strans.pas +++ b/plugins/Utils.pas/strans.pas @@ -588,7 +588,7 @@ begin mGetMem (tmpl,summ); FillChar(tmpl^,summ,0); - res:=pByte(pAnsiChar(tmpl)+addsize-SizeOf(tStructResult)-SizeOf(dword)); + res:=pByte(pAnsiChar(tmpl)+addsize-SizeOf(TStructResult)-SizeOf(dword)); pdword(res)^:=amount; inc(res,SizeOf(dword)); with PStructResult(res)^ do begin @@ -597,7 +597,7 @@ begin offset:=ofs; end; - inc(res,SizeOf(tStructResult)); + inc(res,SizeOf(TStructResult)); result:=res; pc:=ppc; diff --git a/plugins/Utils.pas/syswin.pas b/plugins/Utils.pas/syswin.pas index 661963d5e6..21ffdf6889 100644 --- a/plugins/Utils.pas/syswin.pas +++ b/plugins/Utils.pas/syswin.pas @@ -22,9 +22,9 @@ procedure ProcessMessages; function GetFocusedChild(wnd:HWND):HWND; function GetAssoc(key:PAnsiChar):PAnsiChar; function GetFileFromWnd(wnd:HWND;Filter:tFFWFilterProc; - flags:dword=gffdMultiThread+gffdOld;timeout:cardinal=ThreadTimeout):pWideChar; + flags:dword=gffdMultiThread+gffdOld;TimeOut:cardinal=ThreadTimeout):pWideChar; -function WaitFocusedWndChild(Wnd:HWND):HWND; +function WaitFocusedWndChild(wnd:HWND):HWND; function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil; Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword; @@ -60,7 +60,7 @@ type pqword = ^int64; function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil; Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword; var - Flags: dword; + flags: dword; {$IFDEF FPC} Startup: StartupInfo; {$ELSE} @@ -76,9 +76,9 @@ begin exit; if lstrcmpiw(GetExt(AppPath,ext1,7),GetExt(App,ext2,7))<>0 then CmdLine:=AppPath; - Flags := CREATE_NEW_CONSOLE; + flags := CREATE_NEW_CONSOLE; if Show = SW_HIDE then - Flags := Flags or CREATE_NO_WINDOW; + flags := flags or CREATE_NO_WINDOW; FillChar(Startup, SizeOf(Startup),0); with Startup do begin @@ -95,7 +95,7 @@ begin inc(p); StrCopyW(p,CmdLine); end; - if CreateProcessW(nil,App,nil,nil,FALSE,Flags,nil,DfltDirectory,Startup,ProcInf) then + if CreateProcessW(nil,App,nil,nil,FALSE,flags,nil,DfltDirectory,Startup,ProcInf) then begin if TimeOut<>0 then begin @@ -123,7 +123,7 @@ end; function ExecuteWait(AppPath:PAnsiChar; CmdLine:PAnsiChar=nil; DfltDirectory:PAnsiChar=nil; Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword; var - Flags: dword; + flags: dword; {$IFDEF FPC} Startup: StartupInfo; {$ELSE} @@ -139,9 +139,9 @@ begin exit; if lstrcmpia(GetExt(AppPath,ext1,7),GetExt(App,ext2,7))<>0 then CmdLine:=AppPath; - Flags := CREATE_NEW_CONSOLE; + flags := CREATE_NEW_CONSOLE; if Show = SW_HIDE then - Flags := Flags or CREATE_NO_WINDOW; + flags := flags or CREATE_NO_WINDOW; FillChar(Startup, SizeOf(Startup),0); with Startup do begin @@ -158,7 +158,7 @@ begin inc(p); StrCopy(p,CmdLine); end; - if CreateProcessA(nil,App,nil,nil,FALSE,Flags,nil,DfltDirectory,Startup,ProcInf) then + if CreateProcessA(nil,App,nil,nil,FALSE,flags,nil,DfltDirectory,Startup,ProcInf) then begin if TimeOut<>0 then begin @@ -241,26 +241,26 @@ begin AttachThreadInput(dwThreadID,dwTargetOwner,FALSE); end; -function WaitFocusedWndChild(Wnd:HWND):HWND; +function WaitFocusedWndChild(wnd:HWND):HWND; var T1,T2:integer; - W:HWND; + w:HWND; begin Sleep(50); T1:=GetTickCount; repeat - W:=GetTopWindow(Wnd); - if W=0 then W:=Wnd; - W:=GetFocusedChild(W); - if W<>0 then + w:=GetTopWindow(wnd); + if w=0 then w:=wnd; + w:=GetFocusedChild(w); + if w<>0 then begin - Wnd:=W; + wnd:=w; break; end; T2:=GetTickCount; if Abs(T1-T2)>100 then break; until false; - Result:=Wnd; + Result:=wnd; end; function SendString(wnd:HWND;astr:PWideChar):integer; @@ -586,7 +586,7 @@ const // depends of record align offset=SizeOf(pointer) div 2; // 4 for win64, 2 for win32 var - TmpBuf:array [0..BufSize-1] of WideChar; + tmpbuf:array [0..BufSize-1] of WideChar; var dummy:longint; size:integer; @@ -595,15 +595,15 @@ begin result:=0; if NtQueryObject(ptrec(param)^.handle,ObjectNameInformation, - @TmpBuf,BufSize*SizeOf(WideChar),dummy)=0 then + @tmpbuf,BufSize*SizeOf(WideChar),dummy)=0 then begin // UNICODE_STRING: 2b - length, 2b - maxlen, (align), next - pWideChar - size:=pword(@TmpBuf)^; // length in bytes + size:=pword(@tmpbuf)^; // length in bytes if size>=0 then begin GetMem(ptrec(param)^.fname,size+SizeOf(WideChar)); // length in bytes - pc:=pWideChar(pint_ptr(@TmpBuf[offset])^); + pc:=pWideChar(pint_ptr(@tmpbuf[offset])^); move(pc^,ptrec(param)^.fname^,size); // can be without zero pword(pAnsiChar(ptrec(param)^.fname)+size)^:=0; end @@ -612,7 +612,7 @@ begin end; end; -function TestHandle(Handle:THANDLE;MultiThread:bool;timeout:cardinal):pWideChar; +function TestHandle(Handle:THANDLE;MultiThread:bool;TimeOut:cardinal):pWideChar; var hThread:THANDLE; rec:trec; @@ -623,8 +623,8 @@ begin { // check what it - file if (NtQueryObject(Handle,ObjectTypeInformation, - @TmpBuf,BufSize*SizeOf(WideChar),dummy)<>0) or - (StrCmpW(TmpBuf+$30,'File')<>0) then + @tmpbuf,BufSize*SizeOf(WideChar),dummy)<>0) or + (StrCmpW(tmpbuf+$30,'File')<>0) then Exit; } // check what it disk file @@ -642,7 +642,7 @@ begin else begin hThread:=BeginThread(nil,0,@GetName,@rec,0,res); - if WaitForSingleObject(hThread,timeout)=WAIT_TIMEOUT then + if WaitForSingleObject(hThread,TimeOut)=WAIT_TIMEOUT then begin TerminateThread(hThread,0); end @@ -653,7 +653,7 @@ begin end; function GetFileFromWnd(wnd:HWND;Filter:tFFWFilterProc; - flags:dword=gffdMultiThread+gffdOld;timeout:cardinal=ThreadTimeout):pWideChar; + flags:dword=gffdMultiThread+gffdOld;TimeOut:cardinal=ThreadTimeout):pWideChar; var hProcess,h:THANDLE; pid:THANDLE; @@ -680,7 +680,7 @@ begin begin if DuplicateHandle(pid,i,hProcess,@h,GENERIC_READ,false,0) then begin - pc:=TestHandle(h,(flags and gffdMultiThread)<>0,timeout); + pc:=TestHandle(h,(flags and gffdMultiThread)<>0,TimeOut); if pc<>nil then begin // if GetFileType(h)=FILE_TYPE_DISK then diff --git a/plugins/Utils.pas/utils.pas b/plugins/Utils.pas/utils.pas index 8c16e03f81..1fc444bd63 100644 --- a/plugins/Utils.pas/utils.pas +++ b/plugins/Utils.pas/utils.pas @@ -1,4 +1,4 @@ -unit Utils; +unit utils; interface diff --git a/plugins/Utils.pas/wrapdlgs.pas b/plugins/Utils.pas/wrapdlgs.pas index 21dcffd9e5..b1cb85dd52 100644 --- a/plugins/Utils.pas/wrapdlgs.pas +++ b/plugins/Utils.pas/wrapdlgs.pas @@ -58,19 +58,20 @@ function SHGetPathFromIDListW(pidl: PItemIDList; pszPath: PWideChar): bool; stdc procedure CoTaskMemFree(pv: pointer); stdcall; external 'ole32.dll' name 'CoTaskMemFree'; +// ShlObj unit constants const BIF_RETURNONLYFSDIRS = $0001; { For finding a folder to start document searching } - BIF_DONTGOBELOWDOMAIN = $0002; { For starting the Find Computer } - BIF_STATUSTEXT = $0004; - BIF_RETURNFSANCESTORS = $0008; - BIF_EDITBOX = $0010; - BIF_VALIDATE = $0020; { insist on valid result (or CANCEL) } +// BIF_DONTGOBELOWDOMAIN = $0002; { For starting the Find Computer } +// BIF_STATUSTEXT = $0004; +// BIF_RETURNFSANCESTORS = $0008; +// BIF_EDITBOX = $0010; +// BIF_VALIDATE = $0020; { insist on valid result (or CANCEL) } BIF_NEWDIALOGSTYLE = $0040; { Use the new dialog layout with the ability to resize } { Caller needs to call OleInitialize() before using this API (c) JVCL } - BIF_BROWSEFORCOMPUTER = $1000; { Browsing for Computers. } - BIF_BROWSEFORPRINTER = $2000; { Browsing for Printers } - BIF_BROWSEINCLUDEFILES = $4000; { Browsing for Everything } - +// BIF_BROWSEFORCOMPUTER = $1000; { Browsing for Computers. } +// BIF_BROWSEFORPRINTER = $2000; { Browsing for Printers } +// BIF_BROWSEINCLUDEFILES = $4000; { Browsing for Everything } +{ BFFM_INITIALIZED = 1; BFFM_SELCHANGED = 2; @@ -78,7 +79,7 @@ const BFFM_ENABLEOK = WM_USER + 101; BFFM_SETSELECTION = WM_USER + 102; BFFM_SETSELECTIONW = WM_USER + 103; - +} function SelectDirectory(Caption:PAnsiChar;var Directory:PAnsiChar;Parent:HWND=0):Boolean; var BrowseInfo:TBrowseInfoA; @@ -93,10 +94,10 @@ begin BrowseInfo.lpszTitle :=Caption; BrowseInfo.ulFlags :=BIF_RETURNONLYFSDIRS or BIF_NEWDIALOGSTYLE; - ItemIDList:=ShBrowseForFolderA(BrowseInfo); + ItemIDList:=SHBrowseForFolderA(BrowseInfo); if ItemIDList<>nil then begin - ShGetPathFromIDListA(ItemIDList,Buffer); + SHGetPathFromIDListA(ItemIDList,Buffer); StrDup(Directory,Buffer); CoTaskMemFree(ItemIDList); result:=true; @@ -117,10 +118,10 @@ begin BrowseInfo.lpszTitle :=Caption; BrowseInfo.ulFlags :=BIF_RETURNONLYFSDIRS or BIF_NEWDIALOGSTYLE; - ItemIDList:=ShBrowseForFolderW(BrowseInfo); + ItemIDList:=SHBrowseForFolderW(BrowseInfo); if ItemIDList<>nil then begin - ShGetPathFromIDListW(ItemIDList,Buffer); + SHGetPathFromIDListW(ItemIDList,Buffer); StrDupW(Directory,Buffer); CoTaskMemFree(ItemIDList); result:=true; diff --git a/plugins/Utils.pas/wrapper.pas b/plugins/Utils.pas/wrapper.pas index 9e9e8b4b78..47375b2558 100644 --- a/plugins/Utils.pas/wrapper.pas +++ b/plugins/Utils.pas/wrapper.pas @@ -33,8 +33,8 @@ Procedure ListView_GetItemTextA(list:HWND;i:WPARAM;iSubItem:integer;pszText:poin Procedure ListView_GetItemTextW(list:HWND;i:WPARAM;iSubItem:integer;pszText:pointer;cchTextMax:integer); function LV_GetLParam (list:HWND;item:integer=-1):LRESULT; function LV_SetLParam (list:HWND;lParam:LPARAM;item:integer=-1):LRESULT; -function LV_ItemAtPos(list:HWND;pt:TPOINT;var SubItem:dword):integer; overload; -function LV_ItemAtPos(list:HWND;x,y:integer;var SubItem:dword):integer; overload; +function LV_ItemAtPos(list:HWND;pt:TPOINT;var subitem:dword):integer; overload; +function LV_ItemAtPos(list:HWND;x,y:integer;var subitem:dword):integer; overload; procedure LV_SetItem (list:HWND;str:PAnsiChar;item:integer;subitem:integer=0); procedure LV_SetItemW(list:HWND;str:PWideChar;item:integer;subitem:integer=0); function LV_MoveItem(list:HWND;direction:integer;item:integer=-1):integer; @@ -367,7 +367,7 @@ begin result:=lParam; end; -function LV_ItemAtPos(list:HWND;Pt:TPOINT;var SubItem:dword):integer; +function LV_ItemAtPos(list:HWND;Pt:TPOINT;var subitem:dword):integer; var HTI:LV_HITTESTINFO; begin @@ -375,11 +375,11 @@ begin HTI.pt.y := pt.Y; SendMessage(list,LVM_SUBITEMHITTEST,0,lparam(@HTI)); Result :=HTI.iItem; - if @SubItem<>nil then - SubItem:=HTI.iSubItem; + if @subitem<>nil then + subitem:=HTI.iSubItem; end; -function LV_ItemAtPos(list:HWND;x,y:integer;var SubItem:dword):integer; overload; +function LV_ItemAtPos(list:HWND;x,y:integer;var subitem:dword):integer; overload; var HTI:LV_HITTESTINFO; begin @@ -387,8 +387,8 @@ begin HTI.pt.y := y; SendMessage(list,LVM_SUBITEMHITTEST,0,lparam(@HTI)); Result :=HTI.iItem; - if @SubItem<>nil then - SubItem:=HTI.iSubItem; + if @subitem<>nil then + subitem:=HTI.iSubItem; end; function LV_Compare(lParam1,lParam2,param:LPARAM):integer; stdcall; -- cgit v1.2.3