diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-12-31 17:08:47 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-12-31 17:08:47 +0000 |
commit | da87b3fa0479333cfe9505713f6ffaa54b9ba543 (patch) | |
tree | d4868e4947c3944bb3313a057ec3b189a876018f /plugins | |
parent | f33f9ebac9806cba6bfd89715566a65c29b5fee2 (diff) |
pascal code: reformat, small fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11700 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
62 files changed, 606 insertions, 655 deletions
diff --git a/plugins/Actman/m_actman.h b/plugins/Actman/m_actman.h deleted file mode 100644 index c900ba9c6c..0000000000 --- a/plugins/Actman/m_actman.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef M_ACTMAN
-#define M_ACTMAN
-
-#define ACCF_DISABLED 0x10000000 // action disabled
-#define ACCF_EXPORT 0x08000000 // action to export
-#define ACCF_VOLATILE 0x04000000 // don't save in DB
-#define ACCF_IMPORTED ACF_EXPORT
-#define ACCF_FLAGS (ACCF_DISABLED | ACCF_EXPORT | ACCF_IMPORTED | ACCF_VOLATILE)
-#define ACCF_ID 0x02000000 // for MS_ACT_SELECT, lParam is ID (else name)
-#define ACCF_CLEAR 0x01000000 // clear other flags, else - set
-
-
-typedef struct{
- WCHAR* Descr;
- DWORD ID;
- DWORD flags; // ACCF_* flags
- } TChain, *PChain;
-
-// Service to get list of all configured actions;
-// wParam : 0
-// lParam : address of destination list variable (address of pointer to TChain)
-// Notes: first 4 bytes of list = size of TChain structure (to add new fields in future)
-// Return value: count of elements;
-#define MS_ACT_GETLIST "Actions/GetList"
-
-// Service to free list of all configured actions got with MS_ACT_GETLIST service call;
-// wParam : 0
-// lParam : list address (pointer to ACTION returned by MS_ACT_GETLIST)
-#define MS_ACT_FREELIST "Actions/FreeList"
-
-// Service to call action defined in wParam;
-// wParam: ID of an action (see ACTION.ActID) when calling MS_ACT_RUN
-// or description of an action (see ACTION.ActDescr) when calling MS_ACT_RUNGROUP
-// lParam: parameter (will be passed to action called)
-#define MS_ACT_RUNBYID "Actions/RunById"
-#define MS_ACT_RUNBYNAME "Actions/RunByName"
-
-// Event: action group list was changed: something was added or deleted
-// wParam: set of ACTM_* flags
-// lParam : 0
-#define ME_ACT_CHANGED "Actions/Changed"
-
-// Starts action with 2 parameters
-// wParam: 0
-// lParam: pointer to TAct_Param
-
-#define MS_ACT_RUNPARAMS "Actions/RunWithParams"
-typedef struct TAct_Param
- {
- DWORD flags; // 0 - ID, 1 - Name
- DWORD ID; // Id or name
- WPARAM wParam;
- LPARAM lParam;
- } TAct_Param, *PAct_Param;
-
-#define ACTM_NEW 0x00000001
-#define ACTM_DELETE 0x00000002
-#define ACTM_RELOAD 0x00000004
-#define ACTM_RENAME 0x00000008
-#define ACTM_SORT 0x00000010
-#define ACTM_ACT 0x10000000 // do not check, internal
-#define ACTM_ACTS 0x20000000 // do not check, internal
-#define ACTM_LOADED 0x80000000
-
-
-#define ACIO_EXPORT 0x00000001 // export, else - import
-#define ACIO_APPEND 0x00000002 // append file on export
-#define ACIO_ASKEXIST 0x00000004 // ask, if action exists on import
-#define ACIO_SELECTED 0x00000008 // export selected actions only
-
-// wParam: ACIO_* flags
-// lParam: Unicode file name
-// Return - true, if totally succesful
-#define MS_ACT_INOUT "Actions/ImpExp"
-
-
-//Event: Export actions
-// wParam - ACIO_* flags
-// lParam - unicode filename
-#define ME_ACT_INOUT "Actions/InOut"
-
-
-// Select/unselect specified action
-// wParam: set of ACCF_* consts
-// lParam: unicode action name / number
-// Return - -1 if unsuccesful
-#define MS_ACT_SELECT "Actions/Select"
-
-
-// Event: Action started/finished
-// wParam - Action status: 0 - started, 1 - finished
-// lParam - action id
-
-#define ME_ACT_ACTION "Actions/Action"
-
-#endif
diff --git a/plugins/Actman/services.ini b/plugins/Actman/services.ini index 7d0bda9289..4b651f1fdd 100644 --- a/plugins/Actman/services.ini +++ b/plugins/Actman/services.ini @@ -508,6 +508,19 @@ short=0|param|b.ptr|native|native| descr=
plugin=
+[Structure:DBEVENTINFO]
+full=0| \
+dword (int) cbSize| \
+b.ptr (char *) szModule| \
+dword timestamp| \
+dword flags| \
+word eventType| \
+dword cbBlob| \
+b.ptr (PByte) pBlob|
+short=0|dword|b.ptr|dword|dword|word|dword|b.ptr|
+descr=
+plugin=
+
[Const:CALLSERVICE_NOTFOUND]
value=$80000000
value64=$8000000000000000
diff --git a/plugins/ExternalAPI/delphi/m_actman.inc b/plugins/ExternalAPI/delphi/m_actman.inc index 6a65b9446a..757ce0965b 100644 --- a/plugins/ExternalAPI/delphi/m_actman.inc +++ b/plugins/ExternalAPI/delphi/m_actman.inc @@ -148,7 +148,7 @@ const wParam - repeat count
lParam - unicode task name
Return - old repeat count value
- Note - works for all tasks with same started name
+ Note - works for all tasks with same started name. Returns old counter of last found task
}
MS_ACT_TASKCOUNT:PAnsiChar = 'Actions/TaskCount';
diff --git a/plugins/ExternalAPI/delphi/m_music.inc b/plugins/ExternalAPI/delphi/m_music.inc index d881708eef..f1cf3540fc 100644 --- a/plugins/ExternalAPI/delphi/m_music.inc +++ b/plugins/ExternalAPI/delphi/m_music.inc @@ -44,21 +44,21 @@ type type
pSongInfo=^tSongInfo;
tSongInfo = record
- artist :pWideChar;
- title :pWideChar;
- album :pWideChar;
- genre :pWideChar;
- comment :pWideChar;
- year :pWideChar;
- mfile :pWideChar; // media file
+ artist :PWideChar;
+ title :PWideChar;
+ album :PWideChar;
+ genre :PWideChar;
+ comment :PWideChar;
+ year :PWideChar;
+ mfile :PWideChar; // media file
kbps :dword;
khz :dword;
channels :dword;
track :dword;
total :dword; // music length
time :dword; // elapsed time
- wndtext :pWideChar; // window title
- player :pWideChar; // player name
+ wndtext :PWideChar; // window title
+ player :PWideChar; // player name
plyver :dword; // player version
icon :HICON; // player icon
fsize :dword; // media file size
@@ -71,9 +71,9 @@ type height :dword;
fps :dword;
date :int64;
- txtver :pWideChar;
- lyric :pWideChar;
- cover :pWideChar; // cover path
+ txtver :PWideChar;
+ lyric :PWideChar;
+ cover :PWideChar; // cover path
volume :dword;
url :PWideChar; // player homepage
winampwnd:HWND;
@@ -310,7 +310,7 @@ type tInitProc = function():integer;cdecl;
tDeInitProc = function():integer;cdecl;
tStatusProc = function(wnd:HWND):integer;cdecl;
- tNameProc = function(wnd:HWND;flags:integer):pWideChar;cdecl;
+ tNameProc = function(wnd:HWND;flags:integer):PWideChar;cdecl;
tCheckProc = function(wnd:HWND;flags:integer):HWND;cdecl;
tInfoProc = function(var SongInfo:tSongInfo;flags:integer):integer;cdecl;
tCommandProc = function(wnd:HWND;command:integer;value:integer):integer;cdecl;
diff --git a/plugins/ExternalAPI/delphi/m_text.inc b/plugins/ExternalAPI/delphi/m_text.inc index 5847cd92e1..11d6a5f0b0 100644 --- a/plugins/ExternalAPI/delphi/m_text.inc +++ b/plugins/ExternalAPI/delphi/m_text.inc @@ -40,7 +40,7 @@ type Register :function(const userTitle:PAnsiChar; options:dword):THANDLE; stdcall;
Create :function(userHandle:THANDLE; text:pointer):THANDLE; stdcall;
- CreateEx :function(userHandle:THANDLE; hContact:TMCONTACT; text:pointer; flags:dword):THANDLE; stdcall;
+ CreateEx :function(userHandle:THANDLE; text:pointer; flags:dword):THANDLE; stdcall;
Measure :function(dc:HDC; sz:PSIZE; text:THANDLE):int; stdcall;
Display :function(dc:HDC; pos:TPOINT; sz:TSIZE; text:THANDLE):int; stdcall;
SetParent :function(text:THANDLE; hwnd:HWND; rect:TRECT):int; stdcall;
diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc index aa57c9d0ba..81dfd125c0 100644 --- a/plugins/QuickSearch/i_ok.inc +++ b/plugins/QuickSearch/i_ok.inc @@ -138,16 +138,16 @@ end; function BuildLastSeenTimeInt(cont:THANDLE;modulename:PAnsiChar):cardinal;
var
- Day,Month,Year,Hours,Minutes:word;
+ day,month,year,hours,minutes:word;
begin
- Year:=DBReadWord(cont,modulename,'Year',0);
- if Year<>0 then
+ year:=DBReadWord(cont,modulename,'Year',0);
+ if year<>0 then
begin
- Month :=DBReadWord(cont,modulename,'Month' ,0);
- Day :=DBReadWord(cont,modulename,'Day' ,0);
- Hours :=DBReadWord(cont,modulename,'Hours' ,0);
- Minutes:=DBReadWord(cont,modulename,'Minutes',0);
- result:=Minutes+Hours*60+Day*60*24+Month*60*24*31+(Year-1980)*60*24*31*356; // was 366
+ month :=DBReadWord(cont,modulename,'Month' ,0);
+ day :=DBReadWord(cont,modulename,'Day' ,0);
+ hours :=DBReadWord(cont,modulename,'Hours' ,0);
+ minutes:=DBReadWord(cont,modulename,'Minutes',0);
+ result:=minutes+hours*60+day*60*24+month*60*24*31+(year-1980)*60*24*31*356; // was 366
end
else
result:=0;
diff --git a/plugins/QuickSearch/sr_frame.pas b/plugins/QuickSearch/sr_frame.pas index 4ff26b12b6..692692a5ad 100644 --- a/plugins/QuickSearch/sr_frame.pas +++ b/plugins/QuickSearch/sr_frame.pas @@ -64,7 +64,7 @@ function QSFrameProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRES var
urd:TUTILRESIZEDIALOG;
rc:TRECT;
- ti:TTOOLINFOW;
+ TI:TTOOLINFOW;
hwndTooltip:HWND;
begin
result:=0;
@@ -83,14 +83,14 @@ begin integer(CW_USEDEFAULT),integer(CW_USEDEFAULT),
Dialog,0,hInstance,nil);
- FillChar(ti,SizeOf(ti),0);
- ti.cbSize :=sizeof(TOOLINFO);
- ti.uFlags :=TTF_IDISHWND or TTF_SUBCLASS;
- ti.hwnd :=Dialog;
- ti.hinst :=hInstance;
- ti.uId :=GetDlgItem(Dialog,IDC_FRAME_OPEN);
- ti.lpszText:=pWideChar(TranslateW('Open QS window'));
- SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,tlparam(@ti));
+ FillChar(TI,SizeOf(TI),0);
+ TI.cbSize :=sizeof(TOOLINFO);
+ TI.uFlags :=TTF_IDISHWND or TTF_SUBCLASS;
+ TI.hwnd :=Dialog;
+ TI.hinst :=hInstance;
+ TI.uId :=GetDlgItem(Dialog,IDC_FRAME_OPEN);
+ TI.lpszText:=pWideChar(TranslateW('Open QS window'));
+ SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,tlparam(@TI));
SetButtonIcon(GetDlgItem(Dialog,IDC_FRAME_OPEN),QS_QS);
end;
diff --git a/plugins/QuickSearch/sr_optdialog.pas b/plugins/QuickSearch/sr_optdialog.pas index ce85d12cfc..1317397033 100644 --- a/plugins/QuickSearch/sr_optdialog.pas +++ b/plugins/QuickSearch/sr_optdialog.pas @@ -463,7 +463,7 @@ procedure adddbsettypes(list:HWND); begin
CB_AddStrDataW(list,TranslateW(stByte) ,QSTS_BYTE);
CB_AddStrDataW(list,TranslateW(stWord) ,QSTS_WORD);
- CB_AddStrDataW(list,TranslateW(stDword) ,QSTS_DWORD);
+ CB_AddStrDataW(list,TranslateW(stDWord) ,QSTS_DWORD);
CB_AddStrDataW(list,TranslateW(stSigned) ,QSTS_SIGNED);
CB_AddStrDataW(list,TranslateW(stHexnum) ,QSTS_HEXNUM);
CB_AddStrDataW(list,TranslateW(stString) ,QSTS_STRING);
@@ -994,6 +994,8 @@ begin QSTO_EVENTCOUNT: begin
pc:='Content is count of ALL contact events (not messages only)';
end;
+ else
+ pc:='Unknown';
end;
MessageBoxW(0,TranslateW(pc),TranslateW('Other info'),0);
end;
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas index 838e38fb13..16aa74bd2d 100644 --- a/plugins/QuickSearch/sr_window.pas +++ b/plugins/QuickSearch/sr_window.pas @@ -456,7 +456,7 @@ begin zeromemory(@li,sizeof(li));
li.mask :=LVIF_TEXT;
li.iItem :=item;
- li.iSubItem:=ColumnToListview(column); // buffer column to LV subitem
+ li.iSubItem:=ColumnToListView(column); // buffer column to LV subitem
li.pszText :=text;
SendMessageW(grid,LVM_SETITEMW,0,tlparam(@li));
diff --git a/plugins/Utils.pas/TextBlock.pas b/plugins/Utils.pas/TextBlock.pas index 13535b832a..25084fa0e9 100644 --- a/plugins/Utils.pas/TextBlock.pas +++ b/plugins/Utils.pas/TextBlock.pas @@ -19,7 +19,7 @@ type tChunk = record
_type:integer; // type
val :integer; // sign value or text length
- txt :pWideChar; // text value pointer
+ txt :PWideChar; // text value pointer
add :integer; // offset for text effect
dir :integer; // ping-pong directon
end;
@@ -36,7 +36,7 @@ type // working data
TextChunk :pChunkArray;
- Text :pWideChar; // for text chunks
+ Text :PWideChar; // for text chunks
TextColor :TCOLORREF;
BkColor :TCOLORREF;
@@ -71,7 +71,7 @@ type procedure myMouseDown(Sender:PControl;var Mouse:TMouseEventData);
procedure ClearText;
- function Split(src:pWideChar):pChunkArray;
+ function Split(src:PWideChar):pChunkArray;
procedure DrawChunks(dc:HDC;Chunk:pChunk;rc:TRECT;justpaint:boolean);
procedure DrawLines (dc:HDC;Chunk:pChunk;rc:TRECT;justpaint:boolean);
@@ -79,8 +79,8 @@ type function GetEffect(idx:integer):integer;
procedure SetEffect(idx:integer;value:integer);
- function GetText:pWideChar;
- procedure SetText(value:pWideChar);
+ function GetText:PWideChar;
+ procedure SetText(value:PWideChar);
function GetFontData:TLOGFONTW;
procedure SetFontData(const value:TLOGFONTW);
@@ -97,7 +97,7 @@ type property Font :integer index idx_font read GetEffect write SetEffect;
property FontData :TLOGFONTW read GetFontData write SetFontData;
- property BlockText:pWideChar read GetText write SetText;
+ property BlockText:PWideChar read GetText write SetText;
end;
function MakeNewTextBlock(AOwner:PControl;BkColor:TCOLORREF):pTextBlock;
@@ -191,12 +191,12 @@ begin end;
end;
-function tTextBlock.GetText:pWideChar;
+function tTextBlock.GetText:PWideChar;
begin
result:=pTextData(CustomData)^.Text;
end;
-procedure tTextBlock.SetText(value:pWideChar);
+procedure tTextBlock.SetText(value:PWideChar);
var
D:pTextData;
begin
diff --git a/plugins/Utils.pas/common.pas b/plugins/Utils.pas/common.pas index 87a4b57f6d..7b78d18160 100644 --- a/plugins/Utils.pas/common.pas +++ b/plugins/Utils.pas/common.pas @@ -50,8 +50,8 @@ function IIF(cond:bool;ret1,ret2:variant ):variant; overload; function Min(a,b:integer):integer;
function Max(a,b:integer):integer;
-function GetImageType (buf:pByte;mime:PAnsiChar=nil):dword;
-function GetImageTypeW(buf:pByte;mime:PWideChar=nil):int64;
+function GetImageType (buf:PByte;mime:PAnsiChar=nil):dword;
+function GetImageTypeW(buf:PByte;mime:PWideChar=nil):int64;
//----- Clipboard -----
@@ -91,7 +91,7 @@ const CP_UNICODE = 1200;
CP_REVERSEBOM = 65534;
// trying to recognize text encoding. Returns CP_
-function GetTextFormat(Buffer:pByte;sz:cardinal):integer;
+function GetTextFormat(Buffer:PByte;sz:cardinal):integer;
function AdjustLineBreaks(s:PWideChar):PWideChar;
@@ -282,7 +282,7 @@ begin result:= not ((Octets>0) or Ascii);
end;
-function GetTextFormat(Buffer:pByte;sz:cardinal):integer;
+function GetTextFormat(Buffer:PByte;sz:cardinal):integer;
var
test:integer;
begin
@@ -395,7 +395,7 @@ const (mime:'image/bmp' ; ext:'BMP')
);
-function GetImageType(buf:pByte;mime:PAnsiChar=nil):dword;
+function GetImageType(buf:PByte;mime:PAnsiChar=nil):dword;
var
i:integer;
begin
@@ -420,7 +420,7 @@ begin end;
end;
-function GetImageTypeW(buf:pByte;mime:PWideChar=nil):int64;
+function GetImageTypeW(buf:PByte;mime:PWideChar=nil):int64;
var
i:integer;
lmime:array [0..63] of AnsiChar;
@@ -962,7 +962,7 @@ 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;
@@ -1012,7 +1012,7 @@ var buf: array of Ansichar;
i:integer;
p:PAnsiChar;
- p1:pByte;
+ p1:PByte;
cnt:integer;
begin
SetLength(buf,len*4+1);
@@ -1041,7 +1041,7 @@ function Hash(s:pointer; len:integer{const Seed: longword=$9747b28c}): longword; var
lhash: longword;
k: longword;
- tmp,data: pByte;
+ tmp,data: PByte;
const
// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
diff --git a/plugins/Utils.pas/compilers.inc b/plugins/Utils.pas/compilers.inc index b3280f17d7..042991394d 100644 --- a/plugins/Utils.pas/compilers.inc +++ b/plugins/Utils.pas/compilers.inc @@ -944,3 +944,16 @@ {$DEFINE AllowInline}
{$ENDIF}
{$ENDIF}
+
+(*
+{$IFDEF FPC}
+ {$DEFINE AllowInline}
+{$ELSE}
+ {$IFDEF ConditionalExpressions}
+ // CompilerVersion defined in SYSTEM module, need to use not earlier
+ {$IF CompilerVersion >= 22}
+ {$DEFINE AllowInline}
+ {$IFEND}
+ {$ENDIF}
+{$ENDIF}
+*)
\ No newline at end of file diff --git a/plugins/Utils.pas/datetime.pas b/plugins/Utils.pas/datetime.pas index e2fa2e4809..99b85ee80b 100644 --- a/plugins/Utils.pas/datetime.pas +++ b/plugins/Utils.pas/datetime.pas @@ -28,14 +28,18 @@ function TimeStampToLocalTimeStamp(ts:int_ptr):int_ptr; function TimestampToDateTime(ts:int_ptr):TDateTime;
function TimestampToSystemTime(Time:DWord; var st:TSystemTime):PSystemTime;
-function DateTimeToStr(Time:Dword; Format:pWideChar=nil):pWideChar;
-function DateToStr (Time:Dword; Format:pWideChar=nil):pWideChar;
-function TimeToStr (Time:Dword; Format:pWideChar=nil):pWideChar;
+function DateTimeToStr(Time:Dword; Format:PWideChar=nil):PWideChar;
+function DateToStr (Time:Dword; Format:PWideChar=nil):PWideChar;
+function TimeToStr (Time:Dword; Format:PWideChar=nil):PWideChar;
function CompareDate(const one,two:TSystemTime):integer;
function CompareTime(const one,two:TSystemTime):integer;
function TimeToMidnight(const t:TSystemTime):integer;
-
+{
+procedure TimeToFileTime(var ft:TFILETIME;
+ Second:cardinal=0;Minute:cardinal=0;Hour:cardinal=0;Day:cardinal=0);
+procedure FileTimeToTime(const ft:TFILETIME; var Second,Minute,Hour,Day:cardinal);
+}
implementation
uses
@@ -144,11 +148,11 @@ begin result:=@st;
end;
-function DateTimeToStr(Time:Dword; Format:pWideChar=nil):pWideChar;
+function DateTimeToStr(Time:Dword; Format:PWideChar=nil):PWideChar;
var
buf:array [0..300] of WideChar;
st: TSystemTime;
- pc:pWideChar;
+ pc:PWideChar;
begin
TimestampToSystemTime(Time,st);
GetDateFormatW(LOCALE_USER_DEFAULT,0,@st,Format,@buf,300);
@@ -157,12 +161,12 @@ begin 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;
-function DateToStr(Time:Dword; Format:pWideChar=nil):pWideChar;
+function DateToStr(Time:Dword; Format:PWideChar=nil):PWideChar;
var
buf:array [0..300] of WideChar;
st: TSystemTime;
@@ -172,7 +176,7 @@ begin StrDupW(result,buf);
end;
-function TimeToStr(Time:Dword; Format:pWideChar=nil):pWideChar;
+function TimeToStr(Time:Dword; Format:PWideChar=nil):PWideChar;
var
buf:array [0..300] of WideChar;
st: TSystemTime;
@@ -227,4 +231,27 @@ begin result:=SecondsPerDay-(t.wHour*3600+t.wMinute*60+t.wSecond);
end;
+procedure TimeToFileTime(var ft:TFILETIME;
+ Second:cardinal=0;Minute:cardinal=0;Hour:cardinal=0;Day:cardinal=0);
+var
+ uli:ULARGE_INTEGER;
+begin
+ uli.QuadPart:=int64(Second+Minute*60+Hour*60*60+Day*SecondsPerDay)*10*1000*1000;
+ ft.dwLowDateTime :=uli.LowPart;
+ ft.dwHighDateTime:=uli.HighPart;
+end;
+
+procedure FileTimeToTime(const ft:TFILETIME; var Second,Minute,Hour,Day:cardinal);
+var
+ uli:ULARGE_INTEGER;
+begin
+ uli.LowPart :=ft.dwLowDateTime;
+ uli.HighPart:=ft.dwHighDateTime;
+ uli.QuadPart:=uli.QuadPart div (10*1000*1000);
+ Second:= uli.QuadPart mod 60;
+ Day := uli.QuadPart div SecondsPerDay;
+ Minute:=(uli.QuadPart div 60) mod 60;
+ Hour :=(uli.QuadPart mod SecondsPerDay) div (60*60);
+end;
+
end.
diff --git a/plugins/Utils.pas/dbsettings.pas b/plugins/Utils.pas/dbsettings.pas index 5679ef9fd1..8106fd7e66 100644 --- a/plugins/Utils.pas/dbsettings.pas +++ b/plugins/Utils.pas/dbsettings.pas @@ -35,7 +35,7 @@ function DBWriteUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiCha //function DBFreeVariant(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;
+function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:PAnsiChar=nil):int_ptr;
function DBDeleteModule(hContact:TMCONTACT;szModule:PAnsiChar):integer;
@@ -211,7 +211,7 @@ begin end;
type
- ppchar = ^pAnsiChar;
+ ppchar = ^PAnsiChar;
function EnumSettingsProc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
begin
@@ -226,12 +226,12 @@ begin result:=0;
end;
-function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:pAnsiChar=nil):int_ptr;
+function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:PAnsiChar=nil):int_ptr;
var
ces:TDBCONTACTENUMSETTINGS;
p:PAnsiChar;
code,num:integer;
- ptr:pAnsiChar;
+ ptr:PAnsiChar;
res:boolean;
len:cardinal;
mask:array [0..31] of AnsiChar;
diff --git a/plugins/Utils.pas/editwrapper.pas b/plugins/Utils.pas/editwrapper.pas index c6af1284e1..c5a8c3702f 100644 --- a/plugins/Utils.pas/editwrapper.pas +++ b/plugins/Utils.pas/editwrapper.pas @@ -27,7 +27,7 @@ function ShowEditField(Dialog:HWND; id:uint; mode:integer):boolean;overload; 1 - script
0 - new text
}
-function ShowEditBox(parent:HWND;var text:pWideChar;title:pWideChar):int_ptr;
+function ShowEditBox(parent:HWND;var text:PWideChar;title:PWideChar):int_ptr;
implementation
@@ -53,7 +53,7 @@ type procedure SetButtonTitle(btnwnd:HWND);
var
- title:pWideChar;
+ title:PWideChar;
ptr:pUserData;
begin
ptr:=pUserData(GetWindowLongPtrW(btnwnd,GWLP_USERDATA));
@@ -82,7 +82,7 @@ end; // if need to change button text, will pass button (not edit field) handle as parameter
function EditWndProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
- pc:pWideChar;
+ pc:PWideChar;
btnwnd:HWND;
ptr:pUserData;
wnd,wnd1:HWND;
@@ -386,18 +386,18 @@ end; type
pResultText = ^tResultText;
tResultText = record
- text:pWideChar;
+ text:PWideChar;
typ :integer;
end;
pSepDlgParam = ^tSepDlgParam;
tSepDlgParam = record
- title:pWideChar;
- text :pWideChar;
+ title:PWideChar;
+ text :PWideChar;
end;
function EditWndProcSep(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
- pc:pWideChar;
+ pc:PWideChar;
wnd,wnd1:HWND;
vhi:TVARHELPINFO;
p:pResultText;
@@ -537,7 +537,7 @@ begin end;
end;
-function ShowEditBox(parent:HWND;var text:pWideChar;title:pWideChar):int_ptr;
+function ShowEditBox(parent:HWND;var text:PWideChar;title:PWideChar):int_ptr;
var
tmp:pResultText;
par:tSepDlgParam;
diff --git a/plugins/Utils.pas/mApiCardM.pas b/plugins/Utils.pas/mApiCardM.pas index 81b6640d36..cad4b36b25 100644 --- a/plugins/Utils.pas/mApiCardM.pas +++ b/plugins/Utils.pas/mApiCardM.pas @@ -8,25 +8,25 @@ uses windows,messages; type
tmApiCard = class
private
- function GetDescription:pAnsiChar;
- function GetResultType :pAnsiChar;
- procedure SetCurrentService(item:pAnsiChar);
+ function GetDescription:PAnsiChar;
+ function GetResultType :PAnsiChar;
+ procedure SetCurrentService(item:PAnsiChar);
function GetWindowStatus:boolean;
public
- constructor Create(fname:pAnsiChar; lparent:HWND=0);
+ constructor Create(fname:PAnsiChar; lparent:HWND=0);
destructor Destroy; override;
procedure FillList(combo:HWND; mode:integer=0);
- function NameFromList(cb:HWND):pAnsiChar;
- function HashToName(ahash:longword):pAnsiChar;
- function FillParams(wnd:HWND{;item:pAnsiChar};wparam:boolean):pAnsiChar;
- function GetParam(wparam:boolean):pAnsiChar;
- procedure Show;//(item:pAnsiChar);
+ function NameFromList(cb:HWND):PAnsiChar;
+ function HashToName(ahash:longword):PAnsiChar;
+ function FillParams(wnd:HWND{;item:PAnsiChar};wparam:boolean):PAnsiChar;
+ function GetParam(wparam:boolean):PAnsiChar;
+ procedure Show;//(item:PAnsiChar);
- property Description:pAnsiChar read GetDescription;
- property ResultType :pAnsiChar read GetResultType;
- property Service :pAnsiChar write SetCurrentService;
- property Event :pAnsiChar write SetCurrentService;
+ property Description:PAnsiChar read GetDescription;
+ property ResultType :PAnsiChar read GetResultType;
+ property Service :PAnsiChar write SetCurrentService;
+ property Event :PAnsiChar write SetCurrentService;
property IsShown :boolean read GetWindowStatus;
private
storage:pointer;
@@ -36,7 +36,7 @@ type HelpWindow:HWND;
isServiceHelp:boolean;
- procedure Update(item:pAnsiChar=nil);
+ procedure Update(item:PAnsiChar=nil);
end;
function CreateServiceCard(parent:HWND=0):tmApiCard;
@@ -66,10 +66,10 @@ const ServiceHlpFile = 'plugins\services.ini';
EventsHlpFile = 'plugins\events.ini';
}
-function tmApiCard.GetResultType:pAnsiChar;
+function tmApiCard.GetResultType:PAnsiChar;
var
buf:array [0..2047] of AnsiChar;
- p:pAnsiChar;
+ p:PAnsiChar;
begin
if storage<>nil then
begin
@@ -83,7 +83,7 @@ begin result:=nil;
end;
-function tmApiCard.GetDescription:pAnsiChar;
+function tmApiCard.GetDescription:PAnsiChar;
begin
if storage<>nil then
begin
@@ -98,9 +98,9 @@ begin result:=HelpWindow<>0;
end;
-function tmApiCard.GetParam(wparam:boolean):pAnsiChar;
+function tmApiCard.GetParam(wparam:boolean):PAnsiChar;
var
- paramname:pAnsiChar;
+ paramname:PAnsiChar;
begin
if storage=nil then
begin
@@ -115,14 +115,14 @@ begin StrDup(result,GetParamSectionStr(current,paramname,''));
end;
-function tmApiCard.FillParams(wnd:HWND{;item:pAnsiChar};wparam:boolean):pAnsiChar;
+function tmApiCard.FillParams(wnd:HWND{;item:PAnsiChar};wparam:boolean):PAnsiChar;
var
buf :array [0..2047] of AnsiChar;
bufw:array [0..2047] of WideChar;
j:integer;
p,pp,pc:PAnsiChar;
- tmp:pWideChar;
- paramname:pAnsiChar;
+ tmp:PWideChar;
+ paramname:PAnsiChar;
begin
if storage=nil then
begin
@@ -182,7 +182,7 @@ begin SendMessage(wnd,CB_SETCURSEL,0,0);
end;
-function tmApiCard.HashToName(ahash:longword):pAnsiChar;
+function tmApiCard.HashToName(ahash:longword):PAnsiChar;
var
p,pp:PAnsiChar;
begin
@@ -203,10 +203,10 @@ begin end;
end;
-function tmApiCard.NameFromList(cb:HWND):pAnsiChar;
+function tmApiCard.NameFromList(cb:HWND):PAnsiChar;
var
buf:array [0..255] of AnsiChar;
- pc:pAnsiChar;
+ pc:PAnsiChar;
idx:integer;
begin
pc:=GetDlgText(cb,true);
@@ -383,7 +383,7 @@ begin end;
end;
-procedure tmApiCard.SetCurrentService(item:pAnsiChar);
+procedure tmApiCard.SetCurrentService(item:PAnsiChar);
begin
if (item=nil) or (item^=#0) then
current:=nil
@@ -391,7 +391,7 @@ begin current:=SearchSection(storage,item,namespace);
end;
-procedure tmApiCard.Update(item:pAnsiChar=nil);
+procedure tmApiCard.Update(item:PAnsiChar=nil);
begin
SendMessage(HelpWindow,WM_UPDATEHELP,0,LPARAM(self));
end;
@@ -399,7 +399,7 @@ end; procedure tmApiCard.Show;
var
note,
- title:pWideChar;
+ title:PWideChar;
begin
if HelpWindow=0 then
begin
@@ -436,7 +436,7 @@ begin Update(current);
end;
-constructor tmApiCard.Create(fname:pAnsiChar; lparent:HWND=0);
+constructor tmApiCard.Create(fname:PAnsiChar; lparent:HWND=0);
var
INIFile: array [0..511] of AnsiChar;
begin
@@ -450,13 +450,13 @@ begin ConvertFileName(fname,@INIFile);
// CallService(MS_UTILS_PATHTOABSOLUTE,
// WPARAM(PAnsiChar(ServiceHlpFile)),LPARAM(INIFile));
- if GetFSize(pAnsiChar(@INIFile))=0 then
+ if GetFSize(PAnsiChar(@INIFile))=0 then
begin
INIFile[0]:=#0;
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 c6cd05a17e..48b48da8df 100644 --- a/plugins/Utils.pas/memini.pas +++ b/plugins/Utils.pas/memini.pas @@ -2,25 +2,25 @@ unit memini; interface
-function OpenStorage(fname:pWideChar):pointer; overload;
-function OpenStorage(fname:pAnsiChar):pointer; overload;
-function OpenStorageBuf(buf:pAnsiChar):pointer;
+function OpenStorage(fname:PWideChar):pointer; overload;
+function OpenStorage(fname:PAnsiChar):pointer; overload;
+function OpenStorageBuf(buf:PAnsiChar):pointer;
procedure CloseStorage(storage:pointer);
-//function GetNamespaceList(storage:pointer):pAnsiChar;
-function GetSectionList(storage:pointer;namespace:pAnsiChar=nil):pAnsiChar;
-procedure FreeSectionList(ptr:pAnsiChar);
+//function GetNamespaceList(storage:pointer):PAnsiChar;
+function GetSectionList(storage:pointer;namespace:PAnsiChar=nil):PAnsiChar;
+procedure FreeSectionList(ptr:PAnsiChar);
-function GetParamStr(storage:pointer;section,param:pAnsiChar;default:pAnsiChar=nil;
- namespace:pAnsiChar=nil):pAnsiChar;
-function GetParamInt(storage:pointer;section,param:pAnsiChar;default:integer=0;
- namespace:pAnsiChar=nil):integer;
+function GetParamStr(storage:pointer;section,param:PAnsiChar;default:PAnsiChar=nil;
+ namespace:PAnsiChar=nil):PAnsiChar;
+function GetParamInt(storage:pointer;section,param:PAnsiChar;default:integer=0;
+ namespace:PAnsiChar=nil):integer;
-function SearchSection(storage:pointer;section:pAnsiChar;namespace:pAnsiChar=nil):pointer;
-function GetSectionName(section:pointer):pAnsiChar;
+function SearchSection(storage:pointer;section:PAnsiChar;namespace:PAnsiChar=nil):pointer;
+function GetSectionName(section:pointer):PAnsiChar;
-function GetParamSectionStr(section:pointer;param:pAnsiChar;default:pAnsiChar=nil):pAnsiChar;
-function GetParamSectionInt(section:pointer;param:pAnsiChar;default:integer=0):integer;
+function GetParamSectionStr(section:pointer;param:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
+function GetParamSectionInt(section:pointer;param:PAnsiChar;default:integer=0):integer;
implementation
@@ -35,8 +35,8 @@ type pParam = ^tParam;
tParam = record
hash :integer; // param name hash
- name :pAnsiChar; // points to source (for write only)
- value :pAnsiChar; // points to source? or modified
+ name :PAnsiChar; // points to source (for write only)
+ value :PAnsiChar; // points to source? or modified
assign:boolean; // newly assigned value or in INI buffer
end;
pSection = ^tSection;
@@ -44,23 +44,23 @@ type ns :integer; // namespace hash
code :integer; // section name hash
full :integer; // namespace+section name hash
- fullname:pAnsiChar; // pointer to namespace:name
- name :pAnsiChar; // pointer to name only
+ fullname:PAnsiChar; // pointer to namespace:name
+ name :PAnsiChar; // pointer to name only
numparam:integer;
arParams:array of tParam;
end;
pStorage = ^tStorage;
tStorage = record
- name :pAnsiChar; // filename
- buffer :pAnsiChar; // source (INI) text
+ name :PAnsiChar; // filename
+ buffer :PAnsiChar; // source (INI) text
numsect :integer;
arSection: array of tSection;
end;
-function HashOf(txt:pAnsiChar):integer;
+function HashOf(txt:PAnsiChar):integer;
begin
result:=Hash(txt,StrLen(txt));
{
@@ -74,7 +74,7 @@ begin end;
// sections adds 1 by 1, without duplicate check
-procedure AddSection(data:pStorage;anamespace,aname:pAnsiChar);
+procedure AddSection(data:pStorage;anamespace,aname:PAnsiChar);
var
i:integer;
fnhash:integer;
@@ -110,7 +110,7 @@ begin inc(data.numsect);
end;
-procedure AddParam(data:pStorage;aname,avalue:pAnsiChar;assignvalue:boolean);
+procedure AddParam(data:pStorage;aname,avalue:PAnsiChar;assignvalue:boolean);
begin
// search param with same name?
@@ -135,9 +135,9 @@ end; // quotes, multiline etc
// result = pointer to non-parameter line
// pointers: start of value, start of current line, end of value in line, end of current line
-function ProcessParamValue(var start:pAnsiChar):pAnsiChar;
+function ProcessParamValue(var start:PAnsiChar):PAnsiChar;
var
- lineend,eol,dst,bov:pAnsiChar;
+ lineend,eol,dst,bov:PAnsiChar;
multiline,crlf:boolean;
begin
@@ -213,7 +213,7 @@ end; procedure TranslateData(data:pStorage);
var
- pc2,pc1,pc:pAnsiChar;
+ pc2,pc1,pc:PAnsiChar;
len:integer;
begin
pc:=data^.buffer;
@@ -293,7 +293,7 @@ begin end;
-function OpenStorageBuf(buf:pAnsiChar):pointer;
+function OpenStorageBuf(buf:PAnsiChar):pointer;
begin
result:=nil;
if (buf<>nil) and (buf^<>#0) then
@@ -330,7 +330,7 @@ begin end;
end;
-function OpenStorage(fname:pWideChar):pointer;
+function OpenStorage(fname:PWideChar):pointer;
begin
if FileExists(fname) then
result:=OpenFileStorage(Reset(fname))
@@ -338,7 +338,7 @@ begin result:=nil;
end;
-function OpenStorage(fname:pAnsiChar):pointer;
+function OpenStorage(fname:PAnsiChar):pointer;
begin
if FileExists(fname) then
result:=OpenFileStorage(Reset(fname))
@@ -365,7 +365,7 @@ begin FreeMem(storage);
end;
{
-function GetNamespaceList(storage:pointer):pAnsiChar;
+function GetNamespaceList(storage:pointer):PAnsiChar;
begin
if storage=nil then
begin
@@ -375,10 +375,10 @@ begin end;
}
-function GetSectionList(storage:pointer;namespace:pAnsiChar=nil):pAnsiChar;
+function GetSectionList(storage:pointer;namespace:PAnsiChar=nil):PAnsiChar;
var
i,lsize,lns:integer;
- pc:pAnsiChar;
+ pc:PAnsiChar;
begin
if storage=nil then
begin
@@ -455,12 +455,12 @@ begin end;
end;
-procedure FreeSectionList(ptr:pAnsiChar);
+procedure FreeSectionList(ptr:PAnsiChar);
begin
FreeMem(ptr);
end;
-function SearchSection(storage:pointer;section:pAnsiChar;namespace:pAnsiChar=nil):pointer;
+function SearchSection(storage:pointer;section:PAnsiChar;namespace:PAnsiChar=nil):pointer;
var
i:integer;
nsn,nss:integer;
@@ -498,7 +498,7 @@ begin end;
end;
-function GetSectionName(section:pointer):pAnsiChar;
+function GetSectionName(section:pointer):PAnsiChar;
begin
if section=nil then
result:=nil
@@ -506,7 +506,7 @@ begin result:=pSection(section).name;
end;
-function SearchParameter(section:pointer;param:pAnsiChar):pointer;
+function SearchParameter(section:pointer;param:PAnsiChar):pointer;
var
i:integer;
nsp:integer;
@@ -529,7 +529,7 @@ begin end;
end;
-function GetParamSectionStr(section:pointer;param:pAnsiChar;default:pAnsiChar=nil):pAnsiChar;
+function GetParamSectionStr(section:pointer;param:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
var
pn:pParam;
begin
@@ -543,7 +543,7 @@ begin end;
end;
-function GetParamSectionInt(section:pointer;param:pAnsiChar;default:integer=0):integer;
+function GetParamSectionInt(section:pointer;param:PAnsiChar;default:integer=0):integer;
var
pn:pParam;
begin
@@ -555,7 +555,7 @@ begin if pn<>nil then
begin
if pn.value[0]='$' then
- result:=HexToInt(pAnsiChar(@pn.value[1]))
+ result:=HexToInt(PAnsiChar(@pn.value[1]))
else
result:=StrToInt(pn.value);
end;
@@ -563,8 +563,8 @@ begin end;
-function GetParamStr(storage:pointer;section,param:pAnsiChar;default:pAnsiChar=nil;
- namespace:pAnsiChar=nil):pAnsiChar;
+function GetParamStr(storage:pointer;section,param:PAnsiChar;default:PAnsiChar=nil;
+ namespace:PAnsiChar=nil):PAnsiChar;
var
sn:pSection;
begin
@@ -578,8 +578,8 @@ begin result:=GetParamSectionStr(sn,param,default);
end;
-function GetParamInt(storage:pointer;section,param:pAnsiChar;default:integer=0;
- namespace:pAnsiChar=nil):integer;
+function GetParamInt(storage:pointer;section,param:PAnsiChar;default:integer=0;
+ namespace:PAnsiChar=nil):integer;
var
sn:pSection;
begin
diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas index a1465b32fb..ed570ead7f 100644 --- a/plugins/Utils.pas/mircontacts.pas +++ b/plugins/Utils.pas/mircontacts.pas @@ -50,7 +50,7 @@ procedure SendToChat(hContact:TMCONTACT;pszText:PWideChar); //----- List of contacts (combobox) -----
-procedure FillContactList(list:HWND;filter:boolean=true;format:pWideChar=nil);
+procedure FillContactList(list:HWND;filter:boolean=true;format:PWideChar=nil);
function FindContact (list:HWND;contact:TMCONTACT):integer;
@@ -283,7 +283,7 @@ var uid:PAnsiChar;
ldbv:TDBVARIANT;
hContact:TMCONTACT;
- pw:pWideChar;
+ pw:PWideChar;
begin
result:=0;
uid:=nil;
@@ -367,7 +367,7 @@ var p,Proto,uid:PAnsiChar;
cws:TDBVARIANT;
section:array [0..63] of AnsiChar;
- pw:pWideChar;
+ pw:PWideChar;
is_chat:boolean;
begin
result:=0;
@@ -550,7 +550,7 @@ end; const
defformat = '%name% - %uid% (%account%:%group%)';
-procedure FillContactList(list:HWND; filter:boolean=true;format:pWideChar=nil);
+procedure FillContactList(list:HWND; filter:boolean=true;format:PWideChar=nil);
var
hContact:TMCONTACT;
buf:array [0..511] of WideChar;
diff --git a/plugins/Utils.pas/mirevents.pas b/plugins/Utils.pas/mirevents.pas index 1303746dce..3dbc22d191 100644 --- a/plugins/Utils.pas/mirevents.pas +++ b/plugins/Utils.pas/mirevents.pas @@ -50,7 +50,7 @@ function GetEventBaseType(hDBEvent : THANDLE ): TBaseEventType; overload; //----- Custom events processing -----
//procedure ReadEvent (hDBEvent: THANDLE; var EventInfo: TDBEventInfo; UseCP: Cardinal = CP_ACP);
-//function GetEventName(const Hi: THistoryItem):pAnsiChar;
+//function GetEventName(const Hi: THistoryItem):PAnsiChar;
function GetEventText(hDBEvent: THANDLE ; custom:boolean; cp:integer=CP_ACP):PWideChar; overload;
function GetEventText(const EventInfo: TDBEventInfo; custom:boolean; cp:integer=CP_ACP):PWideChar; overload;
@@ -83,8 +83,8 @@ begin EventInfo.cbBlob := BlobSize;
if BlobSize > 0 then
begin
- pAnsiChar(EventInfo.pBlob)[BlobSize ]:=#0;
- pAnsiChar(EventInfo.pBlob)[BlobSize+1]:=#0;
+ PAnsiChar(EventInfo.pBlob)[BlobSize ]:=#0;
+ PAnsiChar(EventInfo.pBlob)[BlobSize+1]:=#0;
end;
end
else
@@ -94,13 +94,13 @@ end; function GetEventCoreText(const EventInfo: TDBEventInfo; cp: integer = CP_ACP): PWideChar;
var
dbegt: TDBEVENTGETTEXT;
- msg: pWideChar;
+ msg: PWideChar;
begin
dbegt.dbei := @EventInfo;
dbegt.datatype := DBVT_WCHAR;
dbegt.codepage := cp;
- msg := pWideChar(CallService(MS_DB_EVENT_GETTEXT,0,LPARAM(@dbegt)));
+ msg := PWideChar(CallService(MS_DB_EVENT_GETTEXT,0,LPARAM(@dbegt)));
result := AdjustLineBreaks(msg);
result := rtrimw(result);
@@ -235,7 +235,7 @@ begin end;
const
- UrlPrefix: array[0..1] of pWideChar = (
+ UrlPrefix: array[0..1] of PWideChar = (
'www.',
'ftp.');
@@ -258,7 +258,7 @@ 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;
@@ -344,7 +344,7 @@ begin end;
*)
(*
-function GetEventName(const Hi: THistoryItem):pAnsiChar;
+function GetEventName(const Hi: THistoryItem):PAnsiChar;
var
MesType: THppMessageType;
mt: TBuiltinMessageType;
diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas index 976ee5bca1..d02fbcd7e8 100644 --- a/plugins/Utils.pas/mirutils.pas +++ b/plugins/Utils.pas/mirutils.pas @@ -20,30 +20,30 @@ function RegisterSingleIcon(resname,ilname,descr,group:PAnsiChar):int; // others
-function ConvertFileName(src:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
-function ConvertFileName(src:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
-function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
-function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:PAnsiChar;hContact:TMCONTACT=0):PAnsiChar; overload;
+function ConvertFileName(src:PWideChar;hContact:TMCONTACT=0):PWideChar; overload;
+function ConvertFileName(src:PAnsiChar;dst:PAnsiChar;hContact:TMCONTACT=0):PAnsiChar; overload;
+function ConvertFileName(src:PWideChar;dst:PWideChar;hContact:TMCONTACT=0):PWideChar; overload;
-procedure ShowPopupW(text:pWideChar;title:pWideChar=nil);
+procedure ShowPopupW(text:PWideChar;title:PWideChar=nil);
function GetAddonFileName(prefix,altname,path:PAnsiChar;ext:PAnsiChar):PAnsiChar;
function TranslateA2W(sz:PAnsiChar):PWideChar;
function MirandaCP:integer;
function isVarsInstalled:bool;
-function ParseVarString(astr:pAnsiChar;aContact:TMCONTACT=0;extra:pAnsiChar=nil):pAnsiChar; overload;
-function ParseVarString(astr:pWideChar;aContact:TMCONTACT=0;extra:pWideChar=nil):pWideChar; overload;
+function ParseVarString(astr:PAnsiChar;aContact:TMCONTACT=0;extra:PAnsiChar=nil):PAnsiChar; overload;
+function ParseVarString(astr:PWideChar;aContact:TMCONTACT=0;extra:PWideChar=nil):PWideChar; overload;
function ShowVarHelp(dlg:HWND;id:integer=0):integer;
-function CreateGroupW(name:pWideChar;hContact:TMCONTACT):integer;
+function CreateGroupW(name:PWideChar;hContact:TMCONTACT):integer;
function MakeGroupMenu(idxfrom:integer=100):HMENU;
-function GetNewGroupName(parent:HWND):pWideChar;
+function GetNewGroupName(parent:HWND):PWideChar;
const
MAX_REDIRECT_RECURSE = 4;
-function SendRequest(url:PAnsiChar;rtype:int;args:pAnsiChar=nil;hNetLib:THANDLE=0):pAnsiChar;
+function SendRequest(url:PAnsiChar;rtype:int;args:PAnsiChar=nil;hNetLib:THANDLE=0):PAnsiChar;
function GetFile(url:PAnsiChar;save_file:PAnsiChar;
hNetLib:THANDLE=0;recurse_count:integer=0):bool; overload;
@@ -52,7 +52,7 @@ function GetFile(url:PWideChar;save_file:PWideChar; hNetLib:THANDLE=0;recurse_count:integer=0):bool; overload;
function GetProxy(hNetLib:THANDLE):PAnsiChar;
-function LoadImageURL(url:pAnsiChar;size:integer=0):HBITMAP;
+function LoadImageURL(url:PAnsiChar;size:integer=0):HBITMAP;
implementation
@@ -75,9 +75,9 @@ begin SendMessage(btn,BM_SETIMAGE,IMAGE_ICON,result);
end;
-function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:PWideChar;dst:PWideChar;hContact:TMCONTACT=0):PWideChar; overload;
var
- pc:pWideChar;
+ pc:PWideChar;
begin
result:=dst;
dst^:=#0;
@@ -95,7 +95,7 @@ begin end;
end;
-function ConvertFileName(src:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:PWideChar;hContact:TMCONTACT=0):PWideChar; overload;
var
buf1:array [0..511] of WideChar;
begin
@@ -105,9 +105,9 @@ begin result:=nil;
end;
-function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
+function ConvertFileName(src:PAnsiChar;dst:PAnsiChar;hContact:TMCONTACT=0):PAnsiChar; overload;
var
- pc:pAnsiChar;
+ pc:PAnsiChar;
begin
result:=dst;
dst^:=#0;
@@ -125,7 +125,7 @@ begin end;
end;
-function ConvertFileName(src:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
+function ConvertFileName(src:PAnsiChar;hContact:TMCONTACT=0):PAnsiChar; overload;
var
buf1:array [0..511] of AnsiChar;
begin
@@ -151,10 +151,10 @@ begin result:=ServiceExists(MS_VARS_FORMATSTRING)<>0;
end;
-function ParseVarString(astr:pAnsiChar;aContact:TMCONTACT=0;extra:pAnsiChar=nil):pAnsiChar;
+function ParseVarString(astr:PAnsiChar;aContact:TMCONTACT=0;extra:PAnsiChar=nil):PAnsiChar;
var
tfi:TFORMATINFO;
- tmp,pc:pAnsiChar;
+ tmp,pc:PAnsiChar;
dat:TREPLACEVARSDATA;
begin
if (astr=nil) or (astr^=#0) then exit;
@@ -163,7 +163,7 @@ begin begin
FillChar(dat,SizeOf(TREPLACEVARSDATA),0);
dat.cbSize :=SizeOf(TREPLACEVARSDATA);
- pc:=pAnsiChar(CallService(MS_UTILS_REPLACEVARS,wparam(astr),lparam(@dat)));
+ pc:=PAnsiChar(CallService(MS_UTILS_REPLACEVARS,wparam(astr),lparam(@dat)));
astr:=pc;
end
else
@@ -190,10 +190,10 @@ begin mir_free(pc);
end;
-function ParseVarString(astr:pWideChar;aContact:TMCONTACT=0;extra:pWideChar=nil):pWideChar;
+function ParseVarString(astr:PWideChar;aContact:TMCONTACT=0;extra:PWideChar=nil):PWideChar;
var
tfi:TFORMATINFO;
- tmp,pc:pWideChar;
+ tmp,pc:PWideChar;
dat:TREPLACEVARSDATA;
begin
if (astr=nil) or (astr^=#0) then exit;
@@ -203,7 +203,7 @@ begin FillChar(dat,SizeOf(TREPLACEVARSDATA),0);
dat.cbSize :=SizeOf(TREPLACEVARSDATA);
dat.dwflags:=RVF_UNICODE;
- pc:=pWideChar(CallService(MS_UTILS_REPLACEVARS,wparam(astr),lparam(@dat)));
+ pc:=PWideChar(CallService(MS_UTILS_REPLACEVARS,wparam(astr),lparam(@dat)));
astr:=pc;
end
else
@@ -250,7 +250,7 @@ begin result:=CallService(MS_VARS_SHOWHELPEX,dlg,lparam(@vhi));
end;
-procedure ShowPopupW(text:pWideChar;title:pWideChar=nil);
+procedure ShowPopupW(text:PWideChar;title:PWideChar=nil);
var
ppdu:TPOPUPDATAW;
begin
@@ -268,7 +268,7 @@ end; function TranslateA2W(sz:PAnsiChar):PWideChar;
var
- tmp:pWideChar;
+ tmp:PWideChar;
begin
mGetMem(tmp,(StrLen(sz)+1)*SizeOf(WideChar));
Result:=TranslateW(FastAnsiToWideBuf(sz,tmp));
@@ -335,7 +335,7 @@ begin begin
StrCopy(filename,prefix);
p:=StrEnd(filename);
- CallService(MS_DB_GETPROFILENAME,SizeOf(filename)-integer(p-pAnsiChar(@filename)),lparam(p));
+ CallService(MS_DB_GETPROFILENAME,SizeOf(filename)-integer(p-PAnsiChar(@filename)),lparam(p));
ChangeExt(filename,ext);
result:=CheckPath(filename,profilepath,path);
end
@@ -359,12 +359,12 @@ begin end;
// Import plugin function adaptation
-function CreateGroupW(name:pWideChar;hContact:TMCONTACT):integer;
+function CreateGroupW(name:PWideChar;hContact:TMCONTACT):integer;
var
groupId:integer;
groupIdStr:array [0..10] of AnsiChar;
grbuf:array [0..127] of WideChar;
- p:pWideChar;
+ p:PWideChar;
begin
if (name=nil) or (name^=#0) then
begin
@@ -413,7 +413,7 @@ end; function MyStrSort(para1:pointer; para2:pointer):int; cdecl;
begin
- result:=StrCmpW(pWideChar(para1),pWideChar(para2));
+ result:=StrCmpW(PWideChar(para1),PWideChar(para2));
end;
function MakeGroupMenu(idxfrom:integer=100):HMENU;
@@ -421,7 +421,7 @@ var sl:TSortedList;
i:integer;
b:array [0..15] of AnsiChar;
- p:pWideChar;
+ p:PWideChar;
begin
result:=CreatePopupMenu;
i:=0;
@@ -439,14 +439,14 @@ begin inc(idxfrom);
for i:=0 to sl.realCount-1 do
begin
- AppendMenuW(result,MF_STRING,idxfrom+i,pWideChar(sl.Items[i]));
- p:=pWideChar(sl.Items[i])-1;
+ AppendMenuW(result,MF_STRING,idxfrom+i,PWideChar(sl.Items[i]));
+ p:=PWideChar(sl.Items[i])-1;
mFreeMem(p);
end;
List_Destroy(@sl);
end;
-function GetNewGroupName(parent:HWND):pWideChar;
+function GetNewGroupName(parent:HWND):PWideChar;
var
mmenu:HMENU;
i:integer;
@@ -465,7 +465,7 @@ begin DestroyMenu(mmenu);
end;
-function SendRequest(url:PAnsiChar;rtype:int;args:pAnsiChar=nil;hNetLib:THANDLE=0):pAnsiChar;
+function SendRequest(url:PAnsiChar;rtype:int;args:PAnsiChar=nil;hNetLib:THANDLE=0):PAnsiChar;
var
nlu:TNETLIBUSER;
req :TNETLIBHTTPREQUEST;
@@ -514,7 +514,7 @@ begin end
else
begin
- result:=pAnsiChar(int_ptr(resp^.resultCode and $0FFF));
+ result:=PAnsiChar(int_ptr(resp^.resultCode and $0FFF));
end;
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,lparam(resp));
end;
@@ -662,7 +662,7 @@ begin end;
end;
-function LoadImageURL(url:pAnsiChar;size:integer=0):HBITMAP;
+function LoadImageURL(url:PAnsiChar;size:integer=0):HBITMAP;
var
nlu:TNETLIBUSER;
req :TNETLIBHTTPREQUEST;
@@ -705,7 +705,7 @@ begin CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
end;
-function RegisterSingleIcon(resname,ilname,descr,group:pAnsiChar):int;
+function RegisterSingleIcon(resname,ilname,descr,group:PAnsiChar):int;
var
sid:TSKINICONDESC;
begin
diff --git a/plugins/Utils.pas/msninfo.pas b/plugins/Utils.pas/msninfo.pas index 12629b3305..35d90466c0 100644 --- a/plugins/Utils.pas/msninfo.pas +++ b/plugins/Utils.pas/msninfo.pas @@ -5,10 +5,10 @@ interface type
pMSNInfo = ^tMSNInfo;
tMSNInfo = record
- msnPlayer:pWideChar;
- msnArtist:pWideChar;
- msnTitle :pWideChar;
- msnAlbum :pWideChar;
+ msnPlayer:PWideChar;
+ msnArtist:PWideChar;
+ msnTitle :PWideChar;
+ msnAlbum :PWideChar;
end;
@@ -63,9 +63,9 @@ begin {FreeMem(anMSNInfo.msnAlbum); } //anMSNInfo.msnAlbum :=nil;
end;
-procedure Split(pc:pWideChar);
+procedure Split(pc:PWideChar);
var
- lpc:pWideChar;
+ lpc:PWideChar;
begin
// Player
anMSNInfo.msnPlayer:=pc;
@@ -137,7 +137,7 @@ begin if pMyCDS^.dwData=1351 then // Media player info
begin
ClearMSNInfo;
- Split(StrDupW(RealMSNData,pWideChar(pMyCDS^.lpData)));
+ Split(StrDupW(RealMSNData,PWideChar(pMyCDS^.lpData)));
end;
end;
else
diff --git a/plugins/Utils.pas/playlist.pas b/plugins/Utils.pas/playlist.pas index 656317677c..ca33c000e3 100644 --- a/plugins/Utils.pas/playlist.pas +++ b/plugins/Utils.pas/playlist.pas @@ -9,9 +9,9 @@ type fShuffle :boolean;
plSize :cardinal; // playlist entries
plCapacity:cardinal;
- base :pWideChar;
- name :pWideChar;
- descr :pWideChar;
+ base :PWideChar;
+ name :PWideChar;
+ descr :PWideChar;
plStrings :array of PWideChar;
CurElement:cardinal;
PlOrder :array of cardinal;
@@ -24,27 +24,27 @@ type function GetTrackNumber:integer;
procedure SetTrackNumber(value:integer);
- procedure AddLine(name,descr:pWideChar;new:boolean=true);
+ procedure AddLine(name,descr:PWideChar;new:boolean=true);
function ProcessElement(num:integer=-1):PWideChar; //virtual;
public
- constructor Create(fname:pWideChar);
+ constructor Create(fname:PWideChar);
destructor Free;
- procedure SetBasePath(path:pWideChar);
+ procedure SetBasePath(path:PWideChar);
- function GetSong(number:integer=-1):pWideChar;
+ function GetSong(number:integer=-1):PWideChar;
function GetCount:integer;
- function Next :pWideChar;
- function Previous:pWideChar;
+ function Next :PWideChar;
+ function Previous:PWideChar;
property Track :integer read GetTrackNumber write SetTrackNumber;
property Shuffle:boolean read GetShuffle write SetShuffle;
end;
-function isPlaylist(fname:pWideChar):integer;
-function CreatePlaylist(fname:pWideChar):tPlaylist;
+function isPlaylist(fname:PWideChar):integer;
+function CreatePlaylist(fname:PWideChar):tPlaylist;
function CreatePlaylistBuf(buf:pointer;format:integer):tPlaylist;
implementation
@@ -62,18 +62,18 @@ type tM3UPlaylist = class(tPlaylist)
private
public
- constructor Create(fname:pWideChar);
+ constructor Create(fname:PWideChar);
constructor CreateBuf(buf:pointer);
end;
tPLSPlaylist = class(tPlaylist)
private
public
- constructor Create(fname:pWideChar);
+ constructor Create(fname:PWideChar);
constructor CreateBuf(buf:pointer);
end;
-function isPlaylist(fname:pWideChar):integer;
+function isPlaylist(fname:PWideChar):integer;
var
ext:array [0..7] of WideChar;
begin
@@ -83,7 +83,7 @@ begin else result:=0;
end;
-function CreatePlaylist(fname:pWideChar):tPlaylist;
+function CreatePlaylist(fname:PWideChar):tPlaylist;
begin
case isPlaylist(fname) of
1: result:=tM3UPlaylist.Create(fname);
@@ -122,9 +122,9 @@ end; constructor tM3UPlaylist.CreateBuf(buf:pointer);
var
p:PAnsiChar;
- pp,pd:pWideChar;
- plBufW:pWideChar;
- lname,ldescr:pWideChar;
+ pp,pd:PWideChar;
+ plBufW:PWideChar;
+ lname,ldescr:PWideChar;
finish:boolean;
pltNew:boolean;
begin
@@ -163,11 +163,11 @@ begin mFreeMem(plBufW);
end;
-constructor tM3UPlaylist.Create(fname:pWideChar);
+constructor tM3UPlaylist.Create(fname:PWideChar);
var
f:THANDLE;
i:integer;
- plBuf:pAnsiChar;
+ plBuf:PAnsiChar;
begin
inherited;
@@ -195,10 +195,10 @@ end; constructor tPLSPlaylist.CreateBuf(buf:pointer);
var
- lname,ldescr:pWideChar;
+ lname,ldescr:PWideChar;
section,storage,sectionlist:pointer;
ffile,ftitle:array [0..31] of AnsiChar;
- f,t:pAnsiChar;
+ f,t:PAnsiChar;
i,size:integer;
begin
inherited;
@@ -227,9 +227,9 @@ begin CloseStorage(storage);
end;
-constructor tPLSPlaylist.Create(fname:pWideChar);
+constructor tPLSPlaylist.Create(fname:PWideChar);
var
- buf:pAnsiChar;
+ buf:PAnsiChar;
h:THANDLE;
size:integer;
begin
@@ -254,7 +254,7 @@ end; //----- -----
-constructor tPlaylist.Create(fName:pWideChar);
+constructor tPlaylist.Create(fName:PWideChar);
begin
// inherited;
@@ -288,19 +288,19 @@ begin inherited Free;
end;
-procedure tPlaylist.AddLine(name,descr:pWideChar;new:boolean=true);
+procedure tPlaylist.AddLine(name,descr:PWideChar;new:boolean=true);
begin
if plCapacity=0 then
begin
plCapacity:=plSizeStart;
SetLength(plStrings,plSizeStart*2);
- fillChar(plStrings[0],plSizeStart*2*SizeOf(pWideChar),0);
+ fillChar(plStrings[0],plSizeStart*2*SizeOf(PWideChar),0);
end
else if plSize=plCapacity then
begin
inc(plCapacity,plSizeStep);
SetLength(plStrings,plCapacity*2);
- fillChar(plStrings[plSize],plSizeStep*2*SizeOf(pWideChar),0);
+ fillChar(plStrings[plSize],plSizeStep*2*SizeOf(PWideChar),0);
end;
if new then
begin
@@ -315,10 +315,10 @@ begin inc(plSize);
end;
-procedure tPlaylist.SetBasePath(path:pWideChar);
+procedure tPlaylist.SetBasePath(path:PWideChar);
var
buf:array [0..MAX_PATH-1] of WideChar;
- p,pp:pWideChar;
+ p,pp:PWideChar;
begin
mFreeMem(base);
@@ -364,7 +364,7 @@ begin CurElement:=value;
end;
-function tPlaylist.ProcessElement(num:integer=-1):pWideChar;
+function tPlaylist.ProcessElement(num:integer=-1):PWideChar;
begin
if num<0 then
num:=Track
diff --git a/plugins/Utils.pas/protocols.pas b/plugins/Utils.pas/protocols.pas index 598d02ba50..bd59f16570 100644 --- a/plugins/Utils.pas/protocols.pas +++ b/plugins/Utils.pas/protocols.pas @@ -31,7 +31,7 @@ procedure FreeProtoList; function SetStatus(proto:PAnsiChar;status:integer;txt:PAnsiChar=pointer(-1)):integer;
function SetXStatus(proto:PAnsiChar;newstatus:integer;
- txt:pWideChar=nil;title:pWideChar=nil):integer;
+ txt:PWideChar=nil;title:PWideChar=nil):integer;
function GetXStatus(proto:PAnsiChar;txt:pointer=nil;title:pointer=nil):integer;
const
@@ -526,7 +526,7 @@ begin end;
function SetXStatus(proto:PAnsiChar;newstatus:integer;
- txt:pWideChar=nil;title:pWideChar=nil):integer;
+ txt:PWideChar=nil;title:PWideChar=nil):integer;
var
ics:TCUSTOM_STATUS;
begin
@@ -595,7 +595,7 @@ begin with ics do
begin
flags :=flags or CSSF_MASK_NAME or CSSF_UNICODE;
- szName.w:=pWideChar(title^);
+ szName.w:=PWideChar(title^);
end;
end;
@@ -605,7 +605,7 @@ begin with ics do
begin
flags:=flags or CSSF_MASK_MESSAGE or CSSF_UNICODE;
- szMessage.w:=pWideChar(txt^);
+ szMessage.w:=PWideChar(txt^);
end;
end;
@@ -623,11 +623,11 @@ begin if txt<>nil then
begin
- StrCopy(pc,'Msg'); pWideChar(txt^):=DBReadUnicode(0,proto,param,nil);
+ StrCopy(pc,'Msg'); PWideChar(txt^):=DBReadUnicode(0,proto,param,nil);
end;
if title<>nil then
begin
- StrCopy(pc,'Name'); pWideChar(title^):=DBReadUnicode(0,proto,param,nil);
+ StrCopy(pc,'Name'); PWideChar(title^):=DBReadUnicode(0,proto,param,nil);
end;
end;
}
diff --git a/plugins/Utils.pas/rtfole.pas b/plugins/Utils.pas/rtfole.pas index 1e646f53c1..56c8c0b298 100644 --- a/plugins/Utils.pas/rtfole.pas +++ b/plugins/Utils.pas/rtfole.pas @@ -164,7 +164,7 @@ procedure ReleaseObject(var Obj); procedure InitRichEditLibrary;
const
- RichEditClass:pAnsiChar = nil;
+ RichEditClass:PAnsiChar = nil;
implementation
diff --git a/plugins/Utils.pas/rtfutils.pas b/plugins/Utils.pas/rtfutils.pas index 905c98ef0e..9f545fc865 100644 --- a/plugins/Utils.pas/rtfutils.pas +++ b/plugins/Utils.pas/rtfutils.pas @@ -7,7 +7,7 @@ uses windows;
-function IsRTF(const Value: pWideChar): Boolean;
+function IsRTF(const Value: PWideChar): Boolean;
//used for Export only
function GetRichRTFW(RichEditHandle: THANDLE; var RTFStream: PWideChar;
@@ -32,14 +32,14 @@ procedure ReplaceCharFormat(RichEditHandle: THANDLE; const fromCF, toCF: CHARFOR function GetTextLength(RichEditHandle:THANDLE): Integer;
function GetTextRange (RichEditHandle:THANDLE; cpMin,cpMax: Integer): PWideChar;
-function BitmapToRTF(pict: HBITMAP): pAnsiChar;
+function BitmapToRTF(pict: HBITMAP): PAnsiChar;
implementation
uses
common;
-function IsRTF(const Value: pWideChar): Boolean;
+function IsRTF(const Value: PWideChar): Boolean;
const
RTF_BEGIN_1 = '{\RTF';
RTF_BEGIN_2 = '{URTF';
@@ -541,12 +541,12 @@ const HexDigitChr: array [0..15] of AnsiChar = ('0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F');
-function BitmapToRTF(pict: HBITMAP): pAnsiChar;
+function BitmapToRTF(pict: HBITMAP): PAnsiChar;
const
prefix = '{\rtf1 {\pict\dibitmap ';
postfix = ' }}';
var
- tmp, bi, bb, rtf: pAnsiChar;
+ tmp, bi, bb, rtf: PAnsiChar;
bis, bbs: cardinal;
len,cnt: integer;
begin
diff --git a/plugins/Utils.pas/sedit.pas b/plugins/Utils.pas/sedit.pas index 094839ca63..35f90b9dde 100644 --- a/plugins/Utils.pas/sedit.pas +++ b/plugins/Utils.pas/sedit.pas @@ -5,7 +5,7 @@ interface uses windows;
-function EditStructure(struct:pAnsiChar;parent:HWND=0):pAnsiChar;
+function EditStructure(struct:PAnsiChar;parent:HWND=0):PAnsiChar;
implementation
@@ -25,7 +25,7 @@ const ACI_DELETE :PAnsiChar = 'ACI_Delete';
const
- API_STRUCT_FILE:pAnsiChar = 'plugins\services.ini';
+ API_STRUCT_FILE:PAnsiChar = 'plugins\services.ini';
namespace = 'Structure';
{$ENDIF}
@@ -267,8 +267,8 @@ var tmp1:array [0..31] of WideChar;
li:TLVITEMW;
i,llen:integer;
- p,pc:pAnsiChar;
- pw:pWideChar;
+ p,pc:PAnsiChar;
+ pw:PWideChar;
begin
if (element.flags and SF_RETURN)<>0 then
ListView_SetCheckState(list,item,true);
@@ -432,12 +432,12 @@ end; //----- Data save -----
-function GetLVRow(var dst:pAnsiChar;list:HWND;item:integer):integer;
+function GetLVRow(var dst:PAnsiChar;list:HWND;item:integer):integer;
var
li:TLVITEMW;
buf:array [0..63] of WideChar;
- pc:pWideChar;
- pc1:pAnsiChar;
+ pc:PWideChar;
+ pc1:PAnsiChar;
len:integer;
{$IFDEF Miranda}isScript:boolean;{$ENDIF}
begin
@@ -599,7 +599,7 @@ begin // dst:=StrEnd(dst);
end;
-function SaveStructure(list:HWND;align:integer):pAnsiChar;
+function SaveStructure(list:HWND;align:integer):PAnsiChar;
var
p:PAnsiChar;
i:integer;
@@ -700,7 +700,7 @@ procedure FillLVData(Dialog:HWND;list:HWND;item:integer); var
buf:array [0..15] of WideChar;
dtype,i:integer;
- p:pWideChar;
+ p:PWideChar;
b,b1:boolean;
idcshow,idchide:integer;
li:TLVITEMW;
@@ -810,7 +810,7 @@ var idx:integer;
wnd:HWND;
buf:array [0..63] of WideChar;
- tmp:pWideChar;
+ tmp:PWideChar;
begin
// type
wnd:=GetDlgItem(Dialog,IDC_DATA_TYPE);
@@ -879,7 +879,7 @@ end; {$IFDEF Miranda}
procedure FillTemplates(wnd:HWND;lstorage:pointer);
var
- p,pp:pAnsiChar;
+ p,pp:PAnsiChar;
i:integer;
begin
SendMessage(wnd,CB_RESETCONTENT,0,0);
@@ -900,9 +900,9 @@ begin end;
{$ENDIF}
-procedure ReadableForm(wnd:HWND; struct:pAnsiChar);
+procedure ReadableForm(wnd:HWND; struct:PAnsiChar);
var
- p,pc,buf:pAnsiChar;
+ p,pc,buf:PAnsiChar;
element:tOneElement;
begin
GetMem(buf,StrLen(struct)*2);
@@ -947,8 +947,8 @@ end; function StructHelp(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
- tmp:pWideChar;
- pc:pAnsiChar;
+ tmp:PWideChar;
+ pc:PAnsiChar;
begin
result:=0;
case hMessage of
@@ -1003,7 +1003,7 @@ var b,b1,b2:boolean;
idchide,idcshow,csize:integer;
{$IFDEF Miranda}
- pc:pAnsiChar;
+ pc:PAnsiChar;
urd:TUTILRESIZEDIALOG;
{$ELSE}
rc,rc1:TRECT;
@@ -1037,7 +1037,7 @@ begin FillAlignTypeList(GetDlgItem(Dialog,IDC_DATA_ALIGN));
if lParam<>0 then
begin
- FillLVStruct(wnd,pAnsiChar(lParam)) // fill lv with current structure
+ FillLVStruct(wnd,PAnsiChar(lParam)) // fill lv with current structure
end
else
SendMessage(Dialog,WM_COMMAND,(CBN_SELCHANGE shl 16)+IDC_DATA_TYPE,
@@ -1357,11 +1357,11 @@ begin end;
end;
-function EditStructure(struct:pAnsiChar;parent:HWND=0):pAnsiChar;
+function EditStructure(struct:PAnsiChar;parent:HWND=0):PAnsiChar;
begin
InitCommonControls;
- result:=pAnsiChar(uint_ptr(DialogBoxParamW(hInstance,'IDD_STRUCTURE',
+ result:=PAnsiChar(uint_ptr(DialogBoxParamW(hInstance,'IDD_STRUCTURE',
parent,@StructEdit,LPARAM(struct))));
if uint_ptr(result)=uint_ptr(-1) then
diff --git a/plugins/Utils.pas/sparam.pas b/plugins/Utils.pas/sparam.pas index cf8077d59b..7dbfc12d21 100644 --- a/plugins/Utils.pas/sparam.pas +++ b/plugins/Utils.pas/sparam.pas @@ -47,10 +47,10 @@ const function CreateParamBlock(parent:HWND;x,y,width:integer;flags:dword=0):THANDLE;
function ClearParamFields(Dialog:HWND):HWND;
-function FillParam (Dialog:HWND;txt:pAnsiChar):integer;
+function FillParam (Dialog:HWND;txt:PAnsiChar):integer;
function SetParamValue (Dialog:HWND; flags:dword; value:pointer):boolean;
function GetParamValue (Dialog:HWND;var flags:dword;var value:pointer):boolean;
-function SetParamLabel (Dialog:HWND; lbl:pWideChar):HWND;
+function SetParamLabel (Dialog:HWND; lbl:PWideChar):HWND;
procedure ClearParam (flags:dword; var param);
function DuplicateParam(flags:dword; var sparam,dparam):dword;
@@ -109,7 +109,7 @@ begin SendMessage(wnd,CB_SETCURSEL,0,0);
end;
-function IsParamNumber(txt:pAnsiChar):boolean;
+function IsParamNumber(txt:PAnsiChar):boolean;
begin
if (txt[0] in ['0'..'9']) or ((txt[0]='-') and (txt[1] in ['0'..'9'])) or
((txt[0]='$') and (txt[1] in sHexNum)) or
@@ -133,7 +133,7 @@ end; function FixParamControls(Dialog:HWND;atype:dword):dword;
var
wnd,wnd1:HWND;
- pcw:pWideChar;
+ pcw:PWideChar;
begin
result:=atype;
@@ -169,9 +169,9 @@ begin end;
// get line from template
-function GetParamLine(src:pAnsiChar;dst:pWideChar;var ltype:integer):pAnsiChar;
+function GetParamLine(src:PAnsiChar;dst:PWideChar;var ltype:integer):PAnsiChar;
var
- pp,pc:pAnsiChar;
+ pp,pc:PAnsiChar;
j:integer;
savechar:AnsiChar;
begin
@@ -216,7 +216,7 @@ begin end;
// Set parameter value by parameter template
-function FillParam(Dialog:HWND;txt:pAnsiChar):integer;
+function FillParam(Dialog:HWND;txt:PAnsiChar):integer;
var
bufw:array [0..2047] of WideChar;
wnd:HWND;
@@ -265,15 +265,15 @@ function DlgParamProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRE var
wnd,wnd1:HWND;
proc:pointer;
- pcw:pWideChar;
- pc,pc1:pAnsiChar;
+ pcw:PWideChar;
+ pc,pc1:PAnsiChar;
i:integer;
begin
result:=0;
case hMessage of
WM_DESTROY: begin
- pc:=pAnsiChar(GetWindowLongPtrW(GetDlgItem(Dialog,IDC_STRUCT),GWLP_USERDATA));
+ pc:=PAnsiChar(GetWindowLongPtrW(GetDlgItem(Dialog,IDC_STRUCT),GWLP_USERDATA));
mFreeMem(pc);
end;
@@ -281,7 +281,7 @@ begin // hide window by ShowWindow function
if (lParam=0) and (wParam=0) then
begin
- pc:=pAnsiChar(SetWindowLongPtrW(GetDlgItem(Dialog,IDC_STRUCT),GWLP_USERDATA,0));
+ pc:=PAnsiChar(SetWindowLongPtrW(GetDlgItem(Dialog,IDC_STRUCT),GWLP_USERDATA,0));
mFreeMem(pc);
end;
end;
@@ -332,7 +332,7 @@ begin BN_CLICKED: begin
case loword(wParam) of
IDC_STRUCT: begin
- pc:=pAnsiChar(GetWindowLongPtrW(lParam,GWLP_USERDATA));
+ pc:=PAnsiChar(GetWindowLongPtrW(lParam,GWLP_USERDATA));
//!!!!
pc1:=EditStructure(pc{,Dialog});
if pc1<>nil then
@@ -463,7 +463,7 @@ begin result:=0;
end;
-function SetParamLabel(Dialog:HWND; lbl:pWideChar):HWND;
+function SetParamLabel(Dialog:HWND; lbl:PWideChar):HWND;
var
wnd:HWND;
begin
@@ -486,8 +486,8 @@ end; function SetParamValue(Dialog:HWND;flags:dword;value:pointer):boolean;
var
wnd,wnd1:HWND;
- pc:pAnsiChar;
- pcw:pWideChar;
+ pc:PAnsiChar;
+ pcw:PWideChar;
vtype:integer;
begin
if Dialog=0 then
@@ -529,10 +529,10 @@ begin wnd1:=GetDlgItem(Dialog,IDC_STRUCT);
ShowWindow(wnd1,SW_SHOW);
// delete old value
- pc:=pAnsiChar(GetWindowLongPtrW(wnd1,GWLP_USERDATA));
+ pc:=PAnsiChar(GetWindowLongPtrW(wnd1,GWLP_USERDATA));
mFreeMem(pc);
// set newly allocated
- SetWindowLongPtrW(wnd1,GWLP_USERDATA,long_ptr(StrDup(pc,pAnsiChar(value))));
+ SetWindowLongPtrW(wnd1,GWLP_USERDATA,long_ptr(StrDup(pc,PAnsiChar(value))));
//!!!!!!!!
end
else if (flags and ACF_NUMBER)<>0 then
@@ -590,8 +590,8 @@ begin end;
ACF_STRUCT: begin
flags:=flags or ACF_STRUCT;
- StrDup(pAnsiChar(value),
- pAnsiChar(GetWindowLongPtrW(GetDlgItem(Dialog,IDC_STRUCT),GWLP_USERDATA)));
+ StrDup(PAnsiChar(value),
+ PAnsiChar(GetWindowLongPtrW(GetDlgItem(Dialog,IDC_STRUCT),GWLP_USERDATA)));
end;
ACF_UNICODE: begin
flags:=flags or ACF_UNICODE;
@@ -621,23 +621,23 @@ begin if (flags and ACF_TEMPLATE)<>0 then
begin
flags:=flags and not (ACF_TEMPLATE or ACF_PARTYPE);
- GetParamLine(pAnsiChar(sparam),tmpdst,ltype);
+ GetParamLine(PAnsiChar(sparam),tmpdst,ltype);
case ltype of
ACF_NUMBER: begin
flags:=flags or ACF_NUMBER;
- StrDupW(pWideChar(dparam),pWideChar(@tmpdst));
+ StrDupW(PWideChar(dparam),PWideChar(@tmpdst));
end;
ACF_STRING: begin
flags:=flags or ACF_STRING;
- StrDupW(pWideChar(dparam),pWideChar(@tmpdst));
+ StrDupW(PWideChar(dparam),PWideChar(@tmpdst));
end;
ACF_UNICODE: begin
flags:=flags or ACF_UNICODE;
- StrDupW(pWideChar(dparam),pWideChar(@tmpdst));
+ StrDupW(PWideChar(dparam),PWideChar(@tmpdst));
end;
ACF_STRUCT: begin
flags:=flags or ACF_STRUCT;
- StrDup(pAnsiChar(dparam),pAnsiChar(sparam)+10); //10=StrLen('structure|')
+ StrDup(PAnsiChar(dparam),PAnsiChar(sparam)+10); //10=StrLen('structure|')
end;
ACF_CURRENT: flags:=flags or ACF_CURRENT;
ACF_RESULT : flags:=flags or ACF_RESULT;
@@ -647,31 +647,31 @@ begin else if (flags and (ACF_CURRENT or ACF_RESULT or ACF_PARAM))=0 then
begin
if (flags and ACF_NUMBER)<>0 then
- StrDupW(pWideChar(dparam),pWideChar(sparam))
+ StrDupW(PWideChar(dparam),PWideChar(sparam))
else if (flags and ACF_STRUCT)<>0 then
- StrDup(pAnsiChar(dparam),pAnsiChar(sparam))
+ StrDup(PAnsiChar(dparam),PAnsiChar(sparam))
else if (flags and ACF_UNICODE)<>0 then
- StrDupW(pWideChar(dparam),pWideChar(sparam))
+ StrDupW(PWideChar(dparam),PWideChar(sparam))
else
- StrDupW(pWideChar(dparam),pWideChar(sparam));
+ StrDupW(PWideChar(dparam),PWideChar(sparam));
end;
result:=flags;
end;
function TranslateParam(param:uint_ptr;flags:dword;hContact:TMCONTACT):uint_ptr;
var
- tmp1:pWideChar;
+ tmp1:PWideChar;
begin
if (flags and ACF_SCRIPT_PARAM)<>0 then
- result:=uint_ptr(ParseVarString(pWideChar(param),hContact));
+ result:=uint_ptr(ParseVarString(PWideChar(param),hContact));
- tmp1:=pWideChar(result);
+ tmp1:=PWideChar(result);
if (flags and ACF_NUMBER)=0 then
begin
if (flags and ACF_UNICODE)=0 then
- WideToAnsi(tmp1,pAnsiChar(result),MirandaCP)
+ WideToAnsi(tmp1,PAnsiChar(result),MirandaCP)
else
- StrDupW(pWideChar(result),tmp1);
+ StrDupW(PWideChar(result),tmp1);
end
else
result:=NumToInt(tmp1);
diff --git a/plugins/Utils.pas/srvblock.pas b/plugins/Utils.pas/srvblock.pas index 3630ef6148..cd58f8c6c4 100644 --- a/plugins/Utils.pas/srvblock.pas +++ b/plugins/Utils.pas/srvblock.pas @@ -15,7 +15,7 @@ const type
pServiceValue = ^tServiceValue;
tServiceValue = record
- service:pAnsiChar;
+ service:PAnsiChar;
wparam,
lparam: pointer;
w_flag,
@@ -31,8 +31,8 @@ function SetSrvBlockValue(Dialog:HWND;const value:tServiceValue):boolean; function GetSrvBlockValue(Dialog:HWND;var value:tServiceValue):boolean;
// service setting will load templates
-procedure SetSrvBlockService(Dialog:HWND; service:pAnsiChar);
-function GetSrvBlockService(Dialog:HWND):pAnsiChar;
+procedure SetSrvBlockService(Dialog:HWND; service:PAnsiChar);
+function GetSrvBlockService(Dialog:HWND):PAnsiChar;
implementation
@@ -164,9 +164,9 @@ begin end;
end;
-procedure ReloadService(Dialog:HWND;srv:pAnsiChar;setvalue:boolean);
+procedure ReloadService(Dialog:HWND;srv:PAnsiChar;setvalue:boolean);
var
- pc:pAnsiChar;
+ pc:PAnsiChar;
ApiCard:tmApiCard;
flag:dword;
begin
@@ -183,12 +183,12 @@ begin ptStruct: begin
if setvalue then
begin
- struct:=pAnsiChar(SetWindowLongPtrW(GetDlgItem(Dialog,IDC_WSTRUCT),GWLP_USERDATA,
+ struct:=PAnsiChar(SetWindowLongPtrW(GetDlgItem(Dialog,IDC_WSTRUCT),GWLP_USERDATA,
long_ptr(StrDup(struct,StrScan(pc,'|')+1))));
mFreeMem(struct);
end;
-{ struct:=pAnsiChar(GetWindowLongPtrW(GetDlgItem(Dialog,IDC_WSTRUCT),GWLP_USERDATA));
+{ struct:=PAnsiChar(GetWindowLongPtrW(GetDlgItem(Dialog,IDC_WSTRUCT),GWLP_USERDATA));
mFreeMem(struct);
StrDup(struct,StrScan(pc,'|')+1);
SetWindowLongPtrW(GetDlgItem(Dialog,IDC_WSTRUCT),GWLP_USERDATA,long_ptr(struct));
@@ -239,7 +239,7 @@ end; function DlgServiceProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
proc:pointer;
- pc:pAnsiChar;
+ pc:PAnsiChar;
ApiCard:tmApiCard;
begin
result:=0;
@@ -475,7 +475,7 @@ begin value.flags:=value.flags or ACF_SCRIPT_SERVICE;
end;
-procedure SetSrvBlockService(Dialog:HWND; service:pAnsiChar);
+procedure SetSrvBlockService(Dialog:HWND; service:PAnsiChar);
begin
if Dialog=0 then
exit;
@@ -483,7 +483,7 @@ begin ReloadService(Dialog,service,true);
end;
-function GetSrvBlockService(Dialog:HWND):pAnsiChar;
+function GetSrvBlockService(Dialog:HWND):PAnsiChar;
begin
if Dialog=0 then
begin
diff --git a/plugins/Utils.pas/strans.pas b/plugins/Utils.pas/strans.pas index fa92cd573b..1edc2f83ec 100644 --- a/plugins/Utils.pas/strans.pas +++ b/plugins/Utils.pas/strans.pas @@ -85,11 +85,11 @@ type end;
-function GetOneElement(txt:pAnsiChar;var res:tOneElement;
+function GetOneElement(txt:PAnsiChar;var res:tOneElement;
SizeOnly:boolean;num:integer=0):integer;
procedure FreeElement(var element:tOneElement);
-function MakeStructure(txt:pAnsiChar;aparam,alast:LPARAM
+function MakeStructure(txt:PAnsiChar;aparam,alast:LPARAM
{$IFDEF Miranda}; restype:integer=rtInt{$ENDIF}):pointer;
function GetStructureResult(var struct;atype:pinteger=nil;alen:pinteger=nil):int_ptr;
@@ -156,15 +156,15 @@ begin result:=summ;
end;
-procedure SkipSpace(var txt:pAnsiChar); {$IFDEF FPC}inline;{$ENDIF}
+procedure SkipSpace(var txt:PAnsiChar); {$IFDEF FPC}inline;{$ENDIF}
begin
while (txt^ in [' ',#9]) do inc(txt);
end;
-function GetOneElement(txt:pAnsiChar;var res:tOneElement;
+function GetOneElement(txt:PAnsiChar;var res:tOneElement;
SizeOnly:boolean;num:integer=0):integer;
var
- pc,pc1:pAnsiChar;
+ pc,pc1:PAnsiChar;
i,llen:integer;
begin
FillChar(res,SizeOf(res),0);
@@ -289,7 +289,7 @@ begin //!!
while not (pc^ in [#0,char_separator]) do inc(pc);
if txt<>pc then
- StrDup(pAnsiChar(res.text),txt,pc-txt)
+ StrDup(PAnsiChar(res.text),txt,pc-txt)
else
res.text:=nil;
end;
@@ -313,7 +313,7 @@ begin txt:=pc;
while not (pc^ in [#0,char_separator]) do inc(pc);
if txt<>pc then
- StrDup(pAnsiChar(res.text),txt,pc-txt)
+ StrDup(PAnsiChar(res.text),txt,pc-txt)
else
res.text:=nil;
end;
@@ -339,12 +339,12 @@ end; // within translation need to check array size limit
// "limit" = array size, elements, not bytes!
-procedure TranslateBlob(dst:pByte;const element:tOneElement);
+procedure TranslateBlob(dst:PByte;const element:tOneElement);
var
datatype:integer;
clen,len:integer;
- src:pAnsiChar;
- srcw:pWideChar absolute src;
+ src:PAnsiChar;
+ srcw:PWideChar absolute src;
buf:array [0..9] of AnsiChar;
bufw:array [0..4] of WideChar absolute buf;
begin
@@ -434,7 +434,7 @@ begin end
else
begin
- pWideChar(dst)^:=CharUTF8ToWide(src,@clen);
+ PWideChar(dst)^:=CharUTF8ToWide(src,@clen);
inc(src,clen{CharUTF8Len(src)});
inc(dst,2);
dec(len);
@@ -479,7 +479,7 @@ begin end;
end
else
- pWideChar(dst)^:=srcw^;
+ PWideChar(dst)^:=srcw^;
inc(srcw);
inc(dst,2);
dec(len);
@@ -507,17 +507,17 @@ begin end;
end;
-function MakeStructure(txt:pAnsiChar;aparam,alast:LPARAM
+function MakeStructure(txt:PAnsiChar;aparam,alast:LPARAM
{$IFDEF Miranda}; restype:integer=rtInt{$ENDIF}):pointer;
var
summ:int_ptr;
- lsrc:pAnsiChar;
- res:pByte;
- ppc,p,pc:pAnsiChar;
+ lsrc:PAnsiChar;
+ res:PByte;
+ ppc,p,pc:PAnsiChar;
{$IFDEF Miranda}
buf:array [0..31] of WideChar;
- pLast: pWideChar;
- valuein,value:pWideChar;
+ pLast: PWideChar;
+ valuein,value:PWideChar;
{$ENDIF}
amount,align:integer;
lmod,code,alen,ofs:integer;
@@ -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
@@ -623,7 +623,7 @@ begin if restype=rtInt then
pLast:=IntToStr(buf,alast)
else
- pLast:=pWideChar(alast);
+ pLast:=PWideChar(alast);
// BPTR,BARR - Ansi
// WPTR,WARR - Unicode
// BYTE,WORD,DWORD,QWORD,NATIVE - ???
@@ -649,7 +649,7 @@ begin SST_BARR,
SST_BPTR: begin
mFreeMem(element.text);
- WideToAnsi(value,pAnsiChar(element.text),MirandaCP);
+ WideToAnsi(value,PAnsiChar(element.text),MirandaCP);
mFreeMem(value);
end;
// Wide strings - replace UTF8 by Wide
@@ -677,7 +677,7 @@ begin pint_ptr(res)^:=aparam;
end;
SST_BYTE: begin
- pByte(res)^:=element.value;
+ PByte(res)^:=element.value;
end;
SST_WORD: begin
pWord(res)^:=element.value;
@@ -692,10 +692,10 @@ begin pint_ptr(res)^:=element.value;
end;
SST_BARR: begin
- TranslateBlob(pByte(res),element);
+ TranslateBlob(PByte(res),element);
end;
SST_WARR: begin
- TranslateBlob(pByte(res),element);
+ TranslateBlob(PByte(res),element);
end;
SST_BPTR: begin
if element.len=0 then
@@ -713,7 +713,7 @@ begin {$ENDIF}
mGetMem (lsrc ,element.len*SizeOf(AnsiChar));
FillChar(lsrc^,element.len*SizeOf(AnsiChar),0);
- TranslateBlob(pByte(lsrc),element);
+ TranslateBlob(PByte(lsrc),element);
pint_ptr(res)^:=uint_ptr(lsrc);
end;
end;
@@ -741,7 +741,7 @@ begin mGetMem (lsrc ,element.len*SizeOf(WideChar));
FillChar(lsrc^,element.len*SizeOf(WideChar),0);
//!!!!! variables script gives unicode, need to recognize it
- TranslateBlob(pByte(lsrc),element);
+ TranslateBlob(PByte(lsrc),element);
pint_ptr(res)^:=uint_ptr(lsrc);
end;
end;
@@ -763,7 +763,7 @@ function GetStructureResult(var struct;atype:pinteger=nil;alen:pinteger=nil):int var
loffset,ltype:integer;
begin
- with PStructResult(pAnsiChar(struct)-SizeOF(TStructResult))^ do
+ with PStructResult(PAnsiChar(struct)-SizeOF(TStructResult))^ do
begin
ltype :=typ ;
loffset:=offset;
@@ -775,17 +775,17 @@ begin SST_LAST : result:=0;
SST_PARAM: result:=0;
- SST_BYTE : result:=pByte (pAnsiChar(struct)+loffset)^;
- SST_WORD : result:=pWord (pAnsiChar(struct)+loffset)^;
- SST_DWORD : result:=pDword (pAnsiChar(struct)+loffset)^;
- SST_QWORD : result:=pint64 (pAnsiChar(struct)+loffset)^;
- SST_NATIVE: result:=pint_ptr(pAnsiChar(struct)+loffset)^;
+ SST_BYTE : result:=PByte (PAnsiChar(struct)+loffset)^;
+ SST_WORD : result:=pWord (PAnsiChar(struct)+loffset)^;
+ SST_DWORD : result:=pDword (PAnsiChar(struct)+loffset)^;
+ SST_QWORD : result:=pint64 (PAnsiChar(struct)+loffset)^;
+ SST_NATIVE: result:=pint_ptr(PAnsiChar(struct)+loffset)^;
- SST_BARR: result:=int_ptr(pAnsiChar(struct)+loffset); //??
- SST_WARR: result:=int_ptr(pAnsiChar(struct)+loffset); //??
+ SST_BARR: result:=int_ptr(PAnsiChar(struct)+loffset); //??
+ SST_WARR: result:=int_ptr(PAnsiChar(struct)+loffset); //??
- SST_BPTR: result:=pint_ptr(pAnsiChar(struct)+loffset)^; //??
- SST_WPTR: result:=pint_ptr(pAnsiChar(struct)+loffset)^; //??
+ SST_BPTR: result:=pint_ptr(PAnsiChar(struct)+loffset)^; //??
+ SST_WPTR: result:=pint_ptr(PAnsiChar(struct)+loffset)^; //??
else
result:=0;
end;
@@ -793,18 +793,18 @@ end; procedure FreeStructure(var struct);
var
- value:pAnsiChar;
+ value:PAnsiChar;
tmpl:pShortTemplate;
num,lmod:integer;
tmp:pointer;
begin
- tmp:=pointer(pAnsiChar(struct)-SizeOF(TStructResult)-SizeOf(dword));
+ tmp:=pointer(PAnsiChar(struct)-SizeOF(TStructResult)-SizeOf(dword));
num:=pdword(tmp)^;
- tmpl:=pointer(pAnsiChar(tmp)-num*SizeOf(tShortTemplate));
+ tmpl:=pointer(PAnsiChar(tmp)-num*SizeOf(tShortTemplate));
lmod:=uint_ptr(tmpl) mod SizeOf(pointer);
// align to pointer size border
if lmod<>0 then
- tmpl:=pointer(pAnsiChar(tmpl)-(SizeOf(pointer)-lmod));
+ tmpl:=pointer(PAnsiChar(tmpl)-(SizeOf(pointer)-lmod));
tmp:=tmpl;
@@ -812,7 +812,7 @@ begin case tmpl^.etype of
SST_BPTR,SST_WPTR: begin
//??
- value:=pAnsiChar(pint_ptr(pAnsiChar(struct)+tmpl^.offset)^);
+ value:=PAnsiChar(pint_ptr(PAnsiChar(struct)+tmpl^.offset)^);
{$IFDEF Miranda}
if (tmpl^.flags and SF_MMI)<>0 then
mir_free(value)
diff --git a/plugins/Utils.pas/syswin.pas b/plugins/Utils.pas/syswin.pas index 21ffdf6889..082e1444d5 100644 --- a/plugins/Utils.pas/syswin.pas +++ b/plugins/Utils.pas/syswin.pas @@ -6,7 +6,7 @@ interface uses windows;
type
- tFFWFilterProc = function(fname:pWideChar):boolean;
+ tFFWFilterProc = function(fname:PWideChar):boolean;
const
ThreadTimeout = 50;
@@ -22,16 +22,16 @@ 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 ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil;
+function ExecuteWaitW(AppPath:PWideChar; CmdLine:PWideChar=nil; DfltDirectory:PWideChar=nil;
Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
function ExecuteWait(AppPath:PAnsiChar; CmdLine:PAnsiChar=nil; DfltDirectory:PAnsiChar=nil;
Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
-function GetEXEbyWnd(w:HWND; var dst:pWideChar):pWideChar; overload;
+function GetEXEbyWnd(w:HWND; var dst:PWideChar):PWideChar; overload;
function GetEXEbyWnd(w:HWND; var dst:PAnsiChar):PAnsiChar; overload;
function IsExeRunning(exename:PWideChar):boolean; {hwnd}
@@ -57,7 +57,7 @@ function FindExecutableW(FileName, Directory: PWideChar; Result: PWideChar): HIN type pqword = ^int64;
{$ENDIF}
-function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil;
+function ExecuteWaitW(AppPath:PWideChar; CmdLine:PWideChar=nil; DfltDirectory:PWideChar=nil;
Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
var
flags: dword;
@@ -351,7 +351,7 @@ end; //----- work with EXE -----
-function GetEXEbyWnd(w:HWND; var dst:pWideChar):pWideChar;
+function GetEXEbyWnd(w:HWND; var dst:PWideChar):PWideChar;
var
hProcess:THANDLE;
ProcID:dword;
@@ -491,7 +491,7 @@ const procedure ArSwitch(idx:integer);
var
- h:pWideChar;
+ h:PWideChar;
begin
//clear old
while oldcnt>0 do
@@ -574,7 +574,7 @@ type ptrec = ^trec;
trec = record
handle:THANDLE;
- fname:pWideChar;
+ fname:PWideChar;
end;
type
@@ -590,29 +590,29 @@ var var
dummy:longint;
size:integer;
- pc:pWideChar;
+ pc:PWideChar;
begin
result:=0;
if NtQueryObject(ptrec(param)^.handle,ObjectNameInformation,
@tmpbuf,BufSize*SizeOf(WideChar),dummy)=0 then
begin
- // UNICODE_STRING: 2b - length, 2b - maxlen, (align), next - pWideChar
+ // UNICODE_STRING: 2b - length, 2b - maxlen, (align), next - PWideChar
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;
+ pword(PAnsiChar(ptrec(param)^.fname)+size)^:=0;
end
else
ptrec(param)^.fname:=nil;
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;
@@ -653,14 +653,14 @@ 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;
i:THANDLE;
c:THANDLE;
handles:dword;
- pc:pWideChar;
+ pc:PWideChar;
begin
result:=nil;
GetWindowThreadProcessId(wnd,@c);
diff --git a/plugins/Utils.pas/tb_chunk.inc b/plugins/Utils.pas/tb_chunk.inc index e3fa2ac068..2acf9b548b 100644 --- a/plugins/Utils.pas/tb_chunk.inc +++ b/plugins/Utils.pas/tb_chunk.inc @@ -99,10 +99,10 @@ begin end;
end;
-function Macro(var src:pWideChar;var Chunk:pChunk;TextColor,BkColor:TCOLORREF):boolean;
+function Macro(var src:PWideChar;var Chunk:pChunk;TextColor,BkColor:TCOLORREF):boolean;
const
NumMacro = 10;
- macros:array [0..NumMacro-1] of record txt:pWideChar; len:integer; code:integer; end = (
+ macros:array [0..NumMacro-1] of record txt:PWideChar; len:integer; code:integer; end = (
(txt:'{b}' ; len:3; code:ctOpenBold ),
(txt:'{/b}' ; len:4; code:ctCloseBold ),
(txt:'{i}' ; len:3; code:ctOpenItalic ),
@@ -114,7 +114,7 @@ const (txt:'{cf' ; len:3; code:ctOpenTextColor ),
(txt:'{bg' ; len:3; code:ctOpenBkColor ));
var
- pc,pc1:pWideChar;
+ pc,pc1:PWideChar;
typ,i,lval,ldir,ladd:integer;
c:WideChar;
begin
@@ -238,7 +238,7 @@ begin end;
end;
-function CreateTextChunk(var Chunk:pChunk;src:pWideChar):pWideChar;
+function CreateTextChunk(var Chunk:pChunk;src:PWideChar):PWideChar;
var
i:integer;
begin
@@ -278,7 +278,7 @@ end; procedure MeasureChunk(dc:HDC;Chunk:pChunk;var sz:TSIZE;block:Boolean);
var
- p:pWideChar;
+ p:PWideChar;
begin
if ((Chunk^._type shr 16)=0) and (Chunk^._type<>CT_NEWLINE) then
begin
@@ -342,7 +342,7 @@ end; procedure DrawChunk(dc:HDC;Chunk:pChunk;rc:TRECT);
var
- p:pWideChar;
+ p:PWideChar;
begin
if (Chunk^._type shr 16)=0 then
begin
@@ -587,7 +587,7 @@ begin end;
end;
-function tTextBlock.Split(src:pWideChar):pChunkArray;
+function tTextBlock.Split(src:PWideChar):pChunkArray;
var
Chunk:pChunk;
i:integer;
diff --git a/plugins/Utils.pas/utils.pas b/plugins/Utils.pas/utils.pas index 1fc444bd63..5b9b35118b 100644 --- a/plugins/Utils.pas/utils.pas +++ b/plugins/Utils.pas/utils.pas @@ -4,14 +4,14 @@ interface uses windows;
-function SaveTemporaryW(ptr:pointer;size:dword;ext:PWideChar=nil):pWideChar;
+function SaveTemporaryW(ptr:pointer;size:dword;ext:PWideChar=nil):PWideChar;
function SaveTemporary (ptr:pointer;size:dword;ext:PAnsiChar=nil):PAnsiChar;
implementation
uses common,io;
-function SaveTemporaryW(ptr:pointer;size:dword;ext:PWideChar=nil):pWideChar;
+function SaveTemporaryW(ptr:pointer;size:dword;ext:PWideChar=nil):PWideChar;
var
buf,buf1:array [0..MAX_PATH-1] of WideChar;
f:THANDLE;
@@ -21,7 +21,7 @@ begin ChangeExtW(buf1,ext);
f:=ReWrite(buf1);
- BlockWrite(f,pByte(ptr)^,size);
+ BlockWrite(f,PByte(ptr)^,size);
CloseHandle(f);
StrDupW(result,buf1);
end;
@@ -36,7 +36,7 @@ begin ChangeExt(buf1,ext);
f:=ReWrite(buf1);
- BlockWrite(f,pByte(ptr)^,size);
+ BlockWrite(f,PByte(ptr)^,size);
CloseHandle(f);
StrDup(result,buf1);
end;
diff --git a/plugins/Utils.pas/wrapper.pas b/plugins/Utils.pas/wrapper.pas index 47375b2558..0a8090b105 100644 --- a/plugins/Utils.pas/wrapper.pas +++ b/plugins/Utils.pas/wrapper.pas @@ -23,10 +23,10 @@ function StringToGUID(const astr:PWideChar):TGUID; overload; function CB_SelectData(cb:HWND;data:lparam):LRESULT; overload;
function CB_SelectData(Dialog:HWND;id:cardinal;data:lparam):LRESULT; overload;
function CB_GetData (cb:HWND;idx:integer=-1):LRESULT; overload;
-function CB_AddStrData (cb:HWND;astr:pAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload;
-function CB_AddStrData (Dialog:HWND;id:cardinal;astr:pAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload;
-function CB_AddStrDataW(cb:HWND;astr:pWideChar;data:lparam=0;idx:integer=-1):HWND; overload;
-function CB_AddStrDataW(Dialog:HWND;id:cardinal;astr:pWideChar;data:lparam=0;idx:integer=-1):HWND; overload;
+function CB_AddStrData (cb:HWND;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload;
+function CB_AddStrData (Dialog:HWND;id:cardinal;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload;
+function CB_AddStrDataW(cb:HWND;astr:PWideChar;data:lparam=0;idx:integer=-1):HWND; overload;
+function CB_AddStrDataW(Dialog:HWND;id:cardinal;astr:PWideChar;data:lparam=0;idx:integer=-1):HWND; overload;
// CommCtrl - ListView
Procedure ListView_GetItemTextA(list:HWND;i:WPARAM;iSubItem:integer;pszText:pointer;cchTextMax:integer);
@@ -170,7 +170,7 @@ begin a:=SendMessageW(wnd,WM_GETTEXTLENGTH,0,0)+1;
if a>1 then
begin
- mGetMem(pWideChar(result),a*SizeOf(WideChar));
+ mGetMem(PWideChar(result),a*SizeOf(WideChar));
SendMessageW(wnd,WM_GETTEXT,a,lparam(result));
end;
end;
@@ -214,7 +214,7 @@ begin result:=SendMessage(cb,CB_GETITEMDATA,idx,0);
end;
-function CB_AddStrData(cb:HWND;astr:pAnsiChar;data:lparam=0;idx:integer=-1):HWND;
+function CB_AddStrData(cb:HWND;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND;
begin
result:=cb;
if idx<0 then
@@ -224,12 +224,12 @@ begin SendMessageA(cb,CB_SETITEMDATA,idx,data);
end;
-function CB_AddStrData(Dialog:HWND;id:cardinal;astr:pAnsiChar;data:lparam=0;idx:integer=-1):HWND;
+function CB_AddStrData(Dialog:HWND;id:cardinal;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND;
begin
result:=CB_AddStrData(GetDlgItem(Dialog,id),astr,data,idx);
end;
-function CB_AddStrDataW(cb:HWND;astr:pWideChar;data:lparam=0;idx:integer=-1):HWND;
+function CB_AddStrDataW(cb:HWND;astr:PWideChar;data:lparam=0;idx:integer=-1):HWND;
begin
result:=cb;
if idx<0 then
@@ -239,7 +239,7 @@ begin SendMessage(cb,CB_SETITEMDATA,idx,data);
end;
-function CB_AddStrDataW(Dialog:HWND;id:cardinal;astr:pWideChar;data:lparam=0;idx:integer=-1):HWND;
+function CB_AddStrDataW(Dialog:HWND;id:cardinal;astr:PWideChar;data:lparam=0;idx:integer=-1):HWND;
begin
result:=CB_AddStrDataW(GetDlgItem(Dialog,id),astr,data,idx);
end;
@@ -268,15 +268,15 @@ var begin
result:=EmptyGUID;
if StrLenW(astr)<>38 then exit;
- result.D1:=HexToInt(pWideChar(@astr[01]),8);
- result.D2:=HexToInt(pWideChar(@astr[10]),4);
- result.D3:=HexToInt(pWideChar(@astr[15]),4);
+ result.D1:=HexToInt(PWideChar(@astr[01]),8);
+ result.D2:=HexToInt(PWideChar(@astr[10]),4);
+ result.D3:=HexToInt(PWideChar(@astr[15]),4);
- result.D4[0]:=HexToInt(pWideChar(@astr[20]),2);
- result.D4[1]:=HexToInt(pWideChar(@astr[22]),2);
+ result.D4[0]:=HexToInt(PWideChar(@astr[20]),2);
+ result.D4[1]:=HexToInt(PWideChar(@astr[22]),2);
for i:=2 to 7 do
begin
- result.D4[i]:=HexToInt(pWideChar(@astr[21+i*2]),2);
+ result.D4[i]:=HexToInt(PWideChar(@astr[21+i*2]),2);
end;
end;
@@ -540,7 +540,7 @@ var hfo :HFONT;
tm :TTEXTMETRIC;
size:TSIZE;
- tmp :pWideChar;
+ tmp :PWideChar;
begin
dc:=GetDC(wnd);
hfo:=SelectObject(dc,SendMessage(wnd,WM_GETFONT,0,0));
diff --git a/plugins/Utils.pas/zwrapper.pas b/plugins/Utils.pas/zwrapper.pas index 3d7cfa5f41..ca22a14f7c 100644 --- a/plugins/Utils.pas/zwrapper.pas +++ b/plugins/Utils.pas/zwrapper.pas @@ -38,7 +38,7 @@ begin Inc(outSize, delta);
ReallocMem(outBuffer, outSize);
- zstream.next_out := {$IFDEF FPC}PBytef{$ENDIF}(pByte(outBuffer) + zstream.total_out);
+ zstream.next_out := {$IFDEF FPC}PBytef{$ENDIF}(PByte(outBuffer) + zstream.total_out);
zstream.avail_out := delta;
Result := inflate(zstream, Z_NO_FLUSH);
if Result < 0 then Exit;
diff --git a/plugins/Watrack/formats/fmt_mp3.pas b/plugins/Watrack/formats/fmt_mp3.pas index 45c0888daa..e9d5d68eed 100644 --- a/plugins/Watrack/formats/fmt_mp3.pas +++ b/plugins/Watrack/formats/fmt_mp3.pas @@ -125,18 +125,18 @@ end; function SearchStart(f:THANDLE; var l:array of byte):Boolean;
var
CurPos:longint;
- Buf:array [0..ScanSize] of byte;
+ buf:array [0..ScanSize] of byte;
i,j:integer;
begin
CurPos:=FilePos(f)-4;
Seek(f,CurPos);
- j:=BlockRead(f,Buf,ScanSize);
+ j:=BlockRead(f,buf,ScanSize);
i:=0;
while i<j do
begin
- if (i<(j-2)) and (Buf[i]=$FF) and //FF FB E4
- ((Buf[i+1] and $E0)=$E0) and
- ((Buf[i+2] and $F0)<>$F0) then
+ if (i<(j-2)) and (buf[i]=$FF) and //FF FB E4
+ ((buf[i+1] and $E0)=$E0) and
+ ((buf[i+2] and $F0)<>$F0) then
begin
Seek(f,CurPos+i);
BlockRead(f,l,4);
@@ -257,7 +257,7 @@ var w:word;
b:byte;
flag:integer;
- version,layer:integer;
+ version,Layer:integer;
// vbitrate:integer;
// FrmCnt:integer;
begin
@@ -385,8 +385,8 @@ begin end;
l:=ReadDWord(p,endptr);
version:=(l2b(l)[1] and $18) shr 3;
- layer :=(l2b(l)[1] and $06) shr 1;
- Info.kbps :=btable[version and 1][layer-1][l2b(l)[2] shr 4];
+ Layer :=(l2b(l)[1] and $06) shr 1;
+ Info.kbps :=btable[version and 1][Layer-1][l2b(l)[2] shr 4];
Info.khz :=(stable[version][(l2b(l)[2] and $0C) shr 2]) div 1000;
Info.channels:=l2b(l)[3] shr 6;
if Info.channels=3 then
diff --git a/plugins/Watrack/formats/fmt_ogg.pas b/plugins/Watrack/formats/fmt_ogg.pas index d0ba567d08..fbe959d48b 100644 --- a/plugins/Watrack/formats/fmt_ogg.pas +++ b/plugins/Watrack/formats/fmt_ogg.pas @@ -5,12 +5,12 @@ unit fmt_OGG; interface
uses wat_api;
-function ReadOGG(var Info:wat_api.tSongInfo):boolean; cdecl;
-function ReadSPX(var Info:wat_api.tSongInfo):boolean; cdecl;
-function ReadfLaC(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadOGG(var Info:tSongInfo):boolean; cdecl;
+function ReadSPX(var Info:tSongInfo):boolean; cdecl;
+function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
implementation
-uses windows,common,io,tags,srv_format,utils, m_api;
+uses windows,common,io,tags,srv_format,base64,utils;
const
OGGSign = $5367674F; //OggS
@@ -95,12 +95,12 @@ const 5 : CUESHEET
}
type
- MetaHdr = packed record
+ tMetaHdr = packed record
blocktype:byte;
blocklen:array [0..2] of byte;
end;
type
- StreamInfo = packed record
+ tStreamInfo = packed record
MinBlockSize:word;
MaxBlocksize:word;
MinFrameSize:array [0..2] of byte;
@@ -109,10 +109,9 @@ type MD5:array [0..15] of byte;
end;
-procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:wat_api.tSongInfo);
+procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:tSongInfo);
var
- alen,len,values:dword;
- clen:int;
+ clen,alen,len,values:dword;
ls:PAnsiChar;
value:PAnsiChar;
cover:pByte;
@@ -151,7 +150,7 @@ begin else if (Info.track=0) and (lstrcmpia(ls,'TRACKNUMBER')=0) then Info.track:=StrToInt(value)
- else if (cover=nil) and (lstrcmpia(ls,'COVERART')=0) then cover:=mir_base64_decode(value,clen)
+ else if (cover=nil) and (lstrcmpia(ls,'COVERART')=0) then clen:=Base64Decode(value,cover)
else if lstrcmpia(ls,'COVERARTMIME')=0 then ext:=GetImageType(nil,value);
end;
dec(values);
@@ -185,7 +184,7 @@ begin end;
end;
-function ReadSPX(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadSPX(var Info:tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -243,7 +242,7 @@ begin result:=0;
end;
-function ReadOGG(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadOGG(var Info:tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -368,12 +367,12 @@ begin CloseHandle(f);
end;
-function ReadfLaC(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
var
f:THANDLE;
data64:int64;
- hdr:MetaHdr;
- frm:StreamInfo;
+ hdr:tMetaHdr;
+ frm:tStreamInfo;
id:dword;
flag:integer;
size:dword;
diff --git a/plugins/Watrack/formats/fmt_real.pas b/plugins/Watrack/formats/fmt_real.pas index 8d5f5bf72d..1d69a2f353 100644 --- a/plugins/Watrack/formats/fmt_real.pas +++ b/plugins/Watrack/formats/fmt_real.pas @@ -23,7 +23,7 @@ const type
tChunk = packed record
ID:dword;
- Len:dword; //with Chunk;
+ len:dword; //with Chunk;
end;
type
@@ -43,32 +43,32 @@ type procedure SkipStr(var p:PAnsiChar;alen:integer);
var
- len:integer;
+ llen:integer;
begin
if alen=2 then
- len:=(ord(p[0]) shl 8)+ord(p[1])
+ llen:=(ord(p[0]) shl 8)+ord(p[1])
else
- len:=ord(p[0]);
+ llen:=ord(p[0]);
inc(p,alen);
-// if len>0 then
- inc(p,len);
+// if llen>0 then
+ inc(p,llen);
end;
function ReadStr(var p:PAnsiChar;alen:integer):PAnsiChar;
var
- len:integer;
+ llen:integer;
begin
if alen=2 then
- len:=(ord(p[0]) shl 8)+ord(p[1])
+ llen:=(ord(p[0]) shl 8)+ord(p[1])
else
- len:=ord(p[0]);
+ llen:=ord(p[0]);
inc(p,alen);
- if len>0 then
+ if llen>0 then
begin
- mGetMem(result,len+1);
- move(p^,result^,len);
- result[len]:=#0;
- inc(p,len);
+ mGetMem(result,llen+1);
+ move(p^,result^,llen);
+ result[llen]:=#0;
+ inc(p,llen);
end
else
result:=nil;
@@ -103,15 +103,15 @@ begin while FilePos(f)<fsize do
begin
BlockRead(f,chunk,SizeOf(chunk));
- chunk.Len:=BSwap(chunk.Len);
+ chunk.len:=BSwap(chunk.len);
if (not (AnsiChar(chunk.ID and $FF) in ['A'..'Z','a'..'z','.'])) or
- (chunk.Len<SizeOf(chunk)) then
+ (chunk.len<SizeOf(chunk)) then
break;
if (chunk.ID=blkPROP) or (chunk.ID=blkCONT) or (chunk.ID=blkMDPR) then
begin
- mGetMem(buf,chunk.Len-SizeOf(chunk));
+ mGetMem(buf,chunk.len-SizeOf(chunk));
p:=buf;
- BlockRead(f,buf^,chunk.Len-SizeOf(chunk));
+ BlockRead(f,buf^,chunk.len-SizeOf(chunk));
if chunk.ID=blkPROP then
begin
inc(p,22);
@@ -273,7 +273,7 @@ begin end
else if chunk.ID=blkRMMD then //comment
begin
- Skip(f,chunk.Len-SizeOf(chunk));
+ Skip(f,chunk.len-SizeOf(chunk));
{
BlockRead(f,chunk,SizeOf(chunk)); //RJMD
chunk.len:=BSwap(chunk.len);
@@ -289,7 +289,7 @@ begin if chunk.ID=blk_RMF then
if FilePos(f)<>SizeOf(chunk) then // channels-1: ofs=$0A
break;
- Skip(f,chunk.Len-SizeOf(chunk));
+ Skip(f,chunk.len-SizeOf(chunk));
end;
end;
ReadID3v1(f,Info);
diff --git a/plugins/Watrack/formats/fmt_wma.pas b/plugins/Watrack/formats/fmt_wma.pas index ed575147ac..8027ce052d 100644 --- a/plugins/Watrack/formats/fmt_wma.pas +++ b/plugins/Watrack/formats/fmt_wma.pas @@ -295,7 +295,7 @@ type size :word;
bitmap :BITMAPINFOHEADER;
end;
- Prefix = packed record
+ tPrefix = packed record
StreamType :tGUID;
ECGUID :tGUID; // Error Correction
TimeOffset :int64;
@@ -309,7 +309,7 @@ var tmpguid:pGUID;
begin
tmpguid:=pointer(ptr);
- inc(ptr,SizeOf(Prefix)); //ofset to Type-Specific Data
+ inc(ptr,SizeOf(tPrefix)); //ofset to Type-Specific Data
if CompareGUID(tmpguid^,ASF_Audio_Media) then
begin
Info.channels:=pAudio(ptr)^.Channels;
diff --git a/plugins/Watrack/formats/tag_id3v1.inc b/plugins/Watrack/formats/tag_id3v1.inc index bd1db906bb..5e1f89539a 100644 --- a/plugins/Watrack/formats/tag_id3v1.inc +++ b/plugins/Watrack/formats/tag_id3v1.inc @@ -61,7 +61,7 @@ procedure ID3v1_CheckLyric(var Info:tSongInfo;f:THANDLE;ofs:integer); const
maxlen = 5100;
var
- tagHdr:array [0..9] of AnsiChar;
+ TagHdr:array [0..9] of AnsiChar;
buf:array [0..maxlen] of AnsiChar;
ptr,ptr1:PAnsiChar;
i,size:integer;
@@ -69,9 +69,9 @@ var c:dword;
begin
Seek(f,ofs);
- BlockRead(f,tagHdr,LyricEndLen);
- tagHdr[9]:=#0;
- if StrCmp(tagHdr,Lyric1End,LyricEndLen)=0 then
+ BlockRead(f,TagHdr,LyricEndLen);
+ TagHdr[9]:=#0;
+ if StrCmp(TagHdr,Lyric1End,LyricEndLen)=0 then
begin
if Info.lyric=nil then
begin
@@ -91,7 +91,7 @@ begin end;
end;
end
- else if StrCmp(tagHdr,Lyric2End,LyricEndLen)=0 then
+ else if StrCmp(TagHdr,Lyric2End,LyricEndLen)=0 then
begin
Seek(f,ofs-6);
BlockRead(f,buf,6);
diff --git a/plugins/Watrack/formats/tag_id3v2.inc b/plugins/Watrack/formats/tag_id3v2.inc index 78660fdb6d..5ee98ca9e1 100644 --- a/plugins/Watrack/formats/tag_id3v2.inc +++ b/plugins/Watrack/formats/tag_id3v2.inc @@ -307,17 +307,17 @@ begin end;
end;
-function ID3v2_PreReadTag(var frm:tID3v2FrameHdr;var src:PAnsiChar;ver:integer):PAnsiChar;
+function ID3v2_PreReadTag(var Frm:tID3v2FrameHdr;var src:PAnsiChar;ver:integer):PAnsiChar;
var
i:cardinal;
dst:PAnsiChar;
begin
- mGetMem(result,frm.Size);
- if Unsync or ((frm.Flags and $0200)<>0) then
+ mGetMem(result,Frm.Size);
+ if Unsync or ((Frm.Flags and $0200)<>0) then
begin
dst:=result;
i:=0;
- while i<frm.Size do
+ while i<Frm.Size do
begin
dst^:=src^;
inc(src);
@@ -332,8 +332,8 @@ begin end
else
begin
- move(src^,result^,frm.Size);
- inc(src,frm.Size);
+ move(src^,result^,Frm.Size);
+ inc(src,Frm.Size);
end;
end;
diff --git a/plugins/Watrack/i_cover.inc b/plugins/Watrack/i_cover.inc index 1a07b21637..96aec9da47 100644 --- a/plugins/Watrack/i_cover.inc +++ b/plugins/Watrack/i_cover.inc @@ -1,5 +1,5 @@ {any utils}
-function GetCover(var dst:pWideChar;mfile:pWideChar):boolean;
+function GetCover(var dst:pWideChar;MFile:pWideChar):boolean;
var
line,line1:array [0..511] of WideChar;
p,p1:PWideChar;
@@ -31,7 +31,7 @@ begin end
else
begin
- wr1:=ExtractW(mfile,false);
+ wr1:=ExtractW(MFile,false);
StrCopyW(line,wr1);
mFreeMem(wr1);
StrCatW(line,wr);
@@ -60,14 +60,14 @@ begin until p^=#0;
end;
-function GetLyric(var dst:pWideChar;mfile:pWideChar):boolean;
+function GetLyric(var dst:pWideChar;MFile:pWideChar):boolean;
var
buf:array [0..511] of WideChar;
f:THANDLE;
size:integer;
tmp:PAnsiChar;
begin
- StrCopyW(buf,mfile);
+ StrCopyW(buf,MFile);
ChangeExtW(buf,'txt');
f:=Reset(buf);
if f=THANDLE(INVALID_HANDLE_VALUE) then
diff --git a/plugins/Watrack/i_opt_1.inc b/plugins/Watrack/i_opt_1.inc index faec7ef0be..356f6b2a29 100644 --- a/plugins/Watrack/i_opt_1.inc +++ b/plugins/Watrack/i_opt_1.inc @@ -241,7 +241,7 @@ begin DefCheckPlayerList(GetDlgItem(Dialog,IDC_PLAYERLIST));
DefCheckFormatList(GetDlgItem(Dialog,IDC_FORMATLIST));
- saveopt;
+ SaveOpt;
result:=1;
end;
diff --git a/plugins/Watrack/i_options.inc b/plugins/Watrack/i_options.inc index 16a70ccd89..3feb4bf2e1 100644 --- a/plugins/Watrack/i_options.inc +++ b/plugins/Watrack/i_options.inc @@ -151,14 +151,14 @@ begin EnumFormats(@enumrf,0);
end;
-procedure saveopt;
+procedure SaveOpt;
begin
_saveopt;
WriteFormats;
WritePlayers;
end;
-procedure loadopt;
+procedure LoadOpt;
begin
_loadopt;
ReadPlayers;
diff --git a/plugins/Watrack/lastfm/i_last_api.inc b/plugins/Watrack/lastfm/i_last_api.inc index b43ba0703c..3f02458c52 100644 --- a/plugins/Watrack/lastfm/i_last_api.inc +++ b/plugins/Watrack/lastfm/i_last_api.inc @@ -8,7 +8,7 @@ const const
defreq = 'http://post.audioscrobbler.com/?hs=true&p=1.2.1&c=<client-id>&v=<client-ver>&u=<user>&t=<timestamp>&a=<auth>';
-function GetMD5Str(digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
+function GetMD5Str(const digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
begin
buf[00]:=HexDigitChrLo[digest[00] shr 4]; buf[01]:=HexDigitChrLo[digest[00] and $0F];
buf[02]:=HexDigitChrLo[digest[01] shr 4]; buf[03]:=HexDigitChrLo[digest[01] and $0F];
@@ -86,7 +86,7 @@ begin end;
end;
-function encode(dst,src:pAnsiChar):PAnsiChar;
+function Encode(dst,src:pAnsiChar):PAnsiChar;
begin
while src^<>#0 do
begin
@@ -121,12 +121,12 @@ begin pc:=StrCopyE(pc,'s='); pc:=StrCopyE(pc,session_id); //'?s='
pc:=StrCopyE(pc,'&a=');
if si^.artist=nil then pc:=StrCopyE(pc,'Unknown')
- else pc:=encode(pc,si^.artist);
+ else pc:=Encode(pc,si^.artist);
pc:=StrCopyE(pc,'&t=');
if si^.title =nil then pc:=StrCopyE(pc,'Unknown')
- else pc:=encode(pc,si^.title);
+ else pc:=Encode(pc,si^.title);
pc:=StrCopyE(pc,'&l='); if si^.total>0 then pc:=StrCopyE(pc,IntToStr(buf,si^.total));
- pc:=StrCopyE(pc,'&b='); pc:=encode(pc,si^.album);
+ pc:=StrCopyE(pc,'&b='); pc:=Encode(pc,si^.album);
pc:=StrCopyE(pc,'&n=');
if si^.track<>0 then
{pc:=}StrCopyE(pc,IntToStr(buf,si^.track));
@@ -160,10 +160,10 @@ begin pc:=StrCopyE(pc,'s=' ); pc:=StrCopyE(pc,session_id);
pc:=StrCopyE(pc,'&a[0]=');
if si^.artist=nil then pc:=StrCopyE(pc,'Unknown')
- else pc:=encode(pc,si^.artist);
+ else pc:=Encode(pc,si^.artist);
pc:=StrCopyE(pc,'&t[0]=');
if si^.title =nil then pc:=StrCopyE(pc,'Unknown')
- else pc:=encode(pc,si^.title);
+ else pc:=Encode(pc,si^.title);
pc:=StrCopyE(pc,'&i[0]='); pc:=StrCopyE(pc,timestamp);
pc:=StrCopyE(pc,'&r[0]=&m[0]=');
pc:=StrCopyE(pc,'&l[0]=');
@@ -176,7 +176,7 @@ begin begin
pc:=StrCopyE(pc,'&o[0]=R');
end;
- pc:=StrCopyE(pc,'&b[0]='); pc:=encode(pc,si^.album);
+ pc:=StrCopyE(pc,'&b[0]='); pc:=Encode(pc,si^.album);
pc:=StrCopyE(pc,'&n[0]=');
if si^.track<>0 then
{pc:=}StrCopyE(pc,IntToStr(buf,si^.track));
@@ -225,13 +225,13 @@ end; var
xmlparser:TXML_API_W;
-function FixInfo(info:pWideChar):pWideChar;
+function FixInfo(Info:pWideChar):pWideChar;
var
pc,ppc:pWideChar;
cnt:cardinal;
need:boolean;
begin
- pc:=info;
+ pc:=Info;
cnt:=0;
need:=false;
while pc^<>#0 do
@@ -248,8 +248,8 @@ begin end;
if need then
begin
- mGetMem(result,(StrLenW(info)+1+cnt)*SizeOf(WideChar));
- pc:=info;
+ mGetMem(result,(StrLenW(Info)+1+cnt)*SizeOf(WideChar));
+ pc:=Info;
ppc:=result;
while pc^<>#0 do
begin
@@ -265,7 +265,7 @@ begin ppc^:=#0;
end
else
- StrDupW(result,info);
+ StrDupW(result,Info);
end;
function GetArtistInfo(var data:tLastFMInfo;lang:integer):int;
diff --git a/plugins/Watrack/lastfm/i_last_dlg.inc b/plugins/Watrack/lastfm/i_last_dlg.inc index ee1f96092f..44beb5bdf7 100644 --- a/plugins/Watrack/lastfm/i_last_dlg.inc +++ b/plugins/Watrack/lastfm/i_last_dlg.inc @@ -18,13 +18,13 @@ const (code:'es' ; name: 'Spanish' ;)
);
-procedure ClearInfo(dlg:HWND);
+procedure ClearInfo(Dlg:HWND);
begin
- SetDlgItemTextW(dlg,IDC_DATA_ARTIST,'');
- SetDlgItemTextW(dlg,IDC_DATA_ALBUM ,'');
- SetDlgItemTextW(dlg,IDC_DATA_TRACK ,'');
- SetDlgItemTextW(dlg,IDC_DATA_TAGS ,'');
- SetDlgItemTextW(dlg,IDC_DATA_INFO ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_ARTIST,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_ALBUM ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_TRACK ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_TAGS ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_INFO ,'');
end;
procedure ClearData(var data:tLastFMInfo);
diff --git a/plugins/Watrack/lst_formats.inc b/plugins/Watrack/lst_formats.inc index 19db34ee40..745184c90c 100644 --- a/plugins/Watrack/lst_formats.inc +++ b/plugins/Watrack/lst_formats.inc @@ -8,7 +8,7 @@ ,fmt_flv in 'formats\fmt_flv.pas'
,fmt_aac in 'formats\fmt_aac.pas'
,fmt_mkv in 'formats\fmt_mkv.pas'
-,fmt_m4a in 'formats\fmt_m4a.pas'
+//,fmt_m4a in 'formats\fmt_m4a.pas'
,fmt_wma in 'formats\fmt_wma.pas'
,fmt_avi in 'formats\fmt_avi.pas'
,fmt_ogg in 'formats\fmt_ogg.pas'
diff --git a/plugins/Watrack/myshows/i_myshows_api.inc b/plugins/Watrack/myshows/i_myshows_api.inc index 6341793016..6f77819c64 100644 --- a/plugins/Watrack/myshows/i_myshows_api.inc +++ b/plugins/Watrack/myshows/i_myshows_api.inc @@ -42,7 +42,7 @@ begin MessageBoxW(0,@buf,'ERROR',MB_ICONERROR)
end;
-function GetMD5Str(digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
+function GetMD5Str(const digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
begin
buf[00]:=HexDigitChrLo[digest[00] shr 4]; buf[01]:=HexDigitChrLo[digest[00] and $0F];
buf[02]:=HexDigitChrLo[digest[01] shr 4]; buf[03]:=HexDigitChrLo[digest[01] and $0F];
diff --git a/plugins/Watrack/myshows/i_myshows_dlg.inc b/plugins/Watrack/myshows/i_myshows_dlg.inc index 1f51ed7d11..da128900d9 100644 --- a/plugins/Watrack/myshows/i_myshows_dlg.inc +++ b/plugins/Watrack/myshows/i_myshows_dlg.inc @@ -3,13 +3,13 @@ const
kinopoisk_info = 'http://www.kinopoisk.ru/level/1/film/';
-procedure ClearInfo(dlg:HWND);
+procedure ClearInfo(Dlg:HWND);
begin
- SetDlgItemTextW(dlg,IDC_DATA_SERIES ,'');
- SetDlgItemTextW(dlg,IDC_DATA_EPISODE,'');
- SetDlgItemTextW(dlg,IDC_DATA_TAGS ,'');
- SetDlgItemTextW(dlg,IDC_DATA_TAGS ,'');
- SetDlgItemTextW(dlg,IDC_DATA_INFO ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_SERIES ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_EPISODE,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_TAGS ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_TAGS ,'');
+ SetDlgItemTextW(Dlg,IDC_DATA_INFO ,'');
end;
function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
diff --git a/plugins/Watrack/players/pl_cowon.pas b/plugins/Watrack/players/pl_cowon.pas index 0ac7027426..5ee5ab4be6 100644 --- a/plugins/Watrack/players/pl_cowon.pas +++ b/plugins/Watrack/players/pl_cowon.pas @@ -65,8 +65,8 @@ const GET_STATUS_JETAUDIO_VER3 = 997;
const
- titlewnd:HWND = 0;
- hostwnd :HWND = 0;
+ TitleWnd:HWND = 0;
+ HostWnd :HWND = 0;
tmpstr :pWideChar=nil;
function HiddenWindProc(wnd:HWND; msg:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
@@ -90,19 +90,19 @@ end; function Init:integer;cdecl;
begin
- hostwnd:=CreateWindowExW(0,'STATIC',nil,0,1,1,1,1,HWND_MESSAGE,0,hInstance,nil);
- if hostwnd<>0 then
- SetWindowLongPtrW(hostwnd,GWL_WNDPROC,LONG_PTR(@HiddenWindProc));
- result:=hostwnd;
+ HostWnd:=CreateWindowExW(0,'STATIC',nil,0,1,1,1,1,HWND_MESSAGE,0,hInstance,nil);
+ if HostWnd<>0 then
+ SetWindowLongPtrW(HostWnd,GWL_WNDPROC,LONG_PTR(@HiddenWindProc));
+ result:=HostWnd;
end;
function DeInit:integer;cdecl;
begin
result:=0;
- if hostwnd<>0 then
+ if HostWnd<>0 then
begin
- DestroyWindow(hostwnd);
- hostwnd:=0;
+ DestroyWindow(HostWnd);
+ HostWnd:=0;
end;
end;
@@ -134,8 +134,8 @@ begin result:=FindWindow(PluginClass,PluginName);
}
if (result<>0) {and (result<>wnd)} then
- if EnumWindows(@chwnd,int_ptr(@titlewnd)) then
- titlewnd:=0;
+ if EnumWindows(@chwnd,int_ptr(@TitleWnd)) then
+ TitleWnd:=0;
end;
function GetWndText:pWideChar;
@@ -143,9 +143,9 @@ var p:pWideChar;
begin
result:=nil;
- if titlewnd<>0 then
+ if TitleWnd<>0 then
begin
- result:=GetDlgText(titlewnd);
+ result:=GetDlgText(TitleWnd);
if result<>nil then
begin
if StrScanW(result,'[')<>nil then
@@ -205,19 +205,19 @@ end; function GetFileName(wnd:HWND;flags:integer):pWideChar;cdecl;
begin
- SendMessage(wnd,WM_REMOCON_GETSTATUS,hostwnd,GET_STATUS_TRACK_FILENAME);
+ SendMessage(wnd,WM_REMOCON_GETSTATUS,HostWnd,GET_STATUS_TRACK_FILENAME);
result:=tmpstr;
end;
function GetArtist(wnd:HWND):pWideChar;
begin
- SendMessage(wnd,WM_REMOCON_GETSTATUS,hostwnd,GET_STATUS_TRACK_ARTIST);
+ SendMessage(wnd,WM_REMOCON_GETSTATUS,HostWnd,GET_STATUS_TRACK_ARTIST);
result:=tmpstr;
end;
function GetTitle(wnd:HWND):pWideChar;
begin
- SendMessage(wnd,WM_REMOCON_GETSTATUS,hostwnd,GET_STATUS_TRACK_TITLE);
+ SendMessage(wnd,WM_REMOCON_GETSTATUS,HostWnd,GET_STATUS_TRACK_TITLE);
result:=tmpstr;
end;
diff --git a/plugins/Watrack/players/pl_mpc.pas b/plugins/Watrack/players/pl_mpc.pas index bd0fade514..f5ac986c28 100644 --- a/plugins/Watrack/players/pl_mpc.pas +++ b/plugins/Watrack/players/pl_mpc.pas @@ -19,7 +19,7 @@ begin result:=FindWindowEx(0,wnd,MPCClass98,NIL);
end;
-function chwnd(awnd:HWND;Param:pdword):boolean; stdcall;
+function chwnd(awnd:HWND;param:pdword):boolean; stdcall;
var
s:array [0..31] of AnsiChar;
i:integer;
@@ -29,14 +29,14 @@ begin i:=StrIndex(PAnsiChar(@s),' / ');
if i<>0 then
begin
- if Param^=0 then
+ if param^=0 then
begin
s[i-1]:=#0;
- Param^:=TimeToInt(s);
+ param^:=TimeToInt(s);
end
else
begin
- Param^:=TimeToInt(s+i+2);
+ param^:=TimeToInt(s+i+2);
end;
result:=false;
end
diff --git a/plugins/Watrack/players/pl_mradio.pas b/plugins/Watrack/players/pl_mradio.pas index 779d0cf13d..2d27287796 100644 --- a/plugins/Watrack/players/pl_mradio.pas +++ b/plugins/Watrack/players/pl_mradio.pas @@ -190,7 +190,7 @@ begin begin
ptr:=PavatarCacheEntry(CallService(MS_AV_GETAVATARBITMAP,CurrentStation,0));
if ptr<>nil then
- AnsiToWide(ptr^.szFilename,result)
+ StrDupW(result,ptr^.szFilename);
end;
end;
diff --git a/plugins/Watrack/popup/pop_vars.inc b/plugins/Watrack/popup/pop_vars.inc index 2bbfce178b..0eee668070 100644 --- a/plugins/Watrack/popup/pop_vars.inc +++ b/plugins/Watrack/popup/pop_vars.inc @@ -5,14 +5,14 @@ var PopTitle,
PopText:pWideChar;
PopRequest,
- PopUpFile:dword;
- PopUpColor:dword;
- PopUpFore,
- PopUpBack:cardinal;
- PopUpPause:cardinal;
- PopUpDelay:integer;
- PopUpAction:cardinal;
- PopUpButtons:cardinal;
+ PopupFile:dword;
+ PopupColor:dword;
+ PopupFore,
+ PopupBack:cardinal;
+ PopupPause:cardinal;
+ PopupDelay:integer;
+ PopupAction:cardinal;
+ PopupButtons:cardinal;
DisablePlugin:integer;
IsPopup2Present:boolean;
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas index 212409324e..ca9462a12d 100644 --- a/plugins/Watrack/popup/popups.pas +++ b/plugins/Watrack/popup/popups.pas @@ -71,7 +71,7 @@ begin mFreeMem(buf);
end;
-function DumbPopupDlgProc(Wnd:HWND;msg:dword;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
+function DumbPopupDlgProc(wnd:HWND;msg:dword;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
si:pSongInfo;
h:HBITMAP;
@@ -88,7 +88,7 @@ begin 2: ShowWindow(si^.plwnd,SW_RESTORE);
3: CallServiceSync(MS_WAT_PRESSBUTTON,WAT_CTRL_NEXT,0);
end;
- SendMessage(Wnd,UM_DESTROYPOPUP,0,0);
+ SendMessage(wnd,UM_DESTROYPOPUP,0,0);
result:=1;
end;
UM_POPUPACTION: begin
@@ -97,13 +97,13 @@ begin end;
UM_FREEPLUGINDATA: begin
h:=0;
- h:=CallService(MS_POPUP_GETPLUGINDATA,Wnd,h);
+ h:=CallService(MS_POPUP_GETPLUGINDATA,wnd,h);
if h<>0 then
DeleteObject(h);
result:=0;
end;
else
- result:=DefWindowProc(Wnd,msg,wParam,lParam);
+ result:=DefWindowProc(wnd,msg,wParam,lParam);
end;
end;
@@ -150,7 +150,6 @@ var Icon:HICON;
sec:integer;
cb,ct:TCOLORREF;
- tmp:pAnsiChar;
begin
descr:=PWideChar(CallService(MS_WAT_REPLACETEXT,0,lparam(PopText)));
title:=PWideChar(CallService(MS_WAT_REPLACETEXT,0,lparam(PopTitle)));
@@ -218,9 +217,7 @@ begin hbmAvatar:=0;
if hbmAvatar=0 then
begin
- WideToAnsi(si.cover,tmp);
- hbmAvatar:=CallService(MS_UTILS_LOADBITMAP,0,lparam(tmp));
- mFreeMem(tmp);
+ hbmAvatar:=CallService(MS_UTILS_LOADBITMAPW,0,lparam(si.cover));
end;
end;
PluginData:=pointer(hbmAvatar);
diff --git a/plugins/Watrack/srv_format.pas b/plugins/Watrack/srv_format.pas index c5f2cef6ed..d07f600411 100644 --- a/plugins/Watrack/srv_format.pas +++ b/plugins/Watrack/srv_format.pas @@ -25,9 +25,9 @@ function ServiceFormat(wParam:WPARAM;lParam:LPARAM):integer;cdecl; procedure RegisterFormat(ext:PAnsiChar;proc:tReadFormatProc;flags:dword=0);
type
- MusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
+ TMusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
-function EnumFormats(param:MusEnumProc;lParam:LPARAM):bool;
+function EnumFormats(param:TMusEnumProc;lParam:LPARAM):bool;
function GetActiveFormat:pMusicFormat;
type
@@ -65,7 +65,7 @@ begin result:=@fmtLink^[0];
end;
-function EnumFormats(param:MusEnumProc;lParam:LPARAM):bool;
+function EnumFormats(param:TMusEnumProc;lParam:LPARAM):bool;
var
tmp:pFmtArray;
i,j:integer;
diff --git a/plugins/Watrack/srv_player.pas b/plugins/Watrack/srv_player.pas index 61429c345d..4c921500d2 100644 --- a/plugins/Watrack/srv_player.pas +++ b/plugins/Watrack/srv_player.pas @@ -22,9 +22,9 @@ procedure DefFillPlayerList (hwndList:HWND); procedure DefCheckPlayerList(hwndList:HWND);
type
- MusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
+ TMusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
-function EnumPlayers(param:MusEnumProc;lParam:LPARAM):bool;
+function EnumPlayers(param:TMusEnumProc;lParam:LPARAM):bool;
function GetPlayerNote(name:PAnsiChar):pWideChar;
function CheckAllPlayers(flags:integer;var status:integer; var PlayerChanged:bool):HWND;
function GetActivePlayer:pPlayerCell;
@@ -149,7 +149,7 @@ begin result:=@plyLink^[0];
end;
-function EnumPlayers(param:MusEnumProc;lParam:LPARAM):bool;
+function EnumPlayers(param:TMusEnumProc;lParam:LPARAM):bool;
var
tmp:pPlyArray;
i,j:integer;
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas index 5ff486747c..f2064f42c2 100644 --- a/plugins/Watrack/stat/statlog.pas +++ b/plugins/Watrack/stat/statlog.pas @@ -23,7 +23,7 @@ type Title :PAnsiChar;
MFile :PAnsiChar;
Album :PAnsiChar;
- next :pStatCell; // only for fill
+ Next :pStatCell; // only for fill
end;
type
@@ -269,12 +269,12 @@ begin result:=0;
end;
-procedure Resort(var Root:pCells;sort:integer;adirection:integer=smDirect);
+procedure Resort(var Root:pCells;Sort:integer;aDirection:integer=smDirect);
function CompareProc(First,Second:integer):integer;
begin
- result:=Compare(Root^.cells[First],Root^.cells[Second],sort);
- if direction=smReverse then
+ result:=Compare(Root^.Cells[First],Root^.Cells[Second],sort);
+ if aDirection=smReverse then
result:=-result;
end;
@@ -356,7 +356,7 @@ begin end
else
begin
- CurCell^.next:=Cell;
+ CurCell^.Next:=Cell;
CurCell:=Cell;
end;
end;
@@ -374,7 +374,7 @@ begin while CurCell<>nil do
begin
arr^.Cells[i]:=CurCell;
- CurCell:=CurCell.next;
+ CurCell:=CurCell.Next;
inc(i);
end;
result:=arr;
@@ -406,7 +406,7 @@ begin end;
end;
-procedure SortFile(fname:PAnsiChar;mode:integer;adirection:integer);
+procedure SortFile(fname:PAnsiChar;mode:integer;aDirection:integer);
var
Root:pCells;
buf:PAnsiChar;
@@ -418,8 +418,8 @@ begin Root:=BuildTree(buf1,buf);
if Root<>nil then
begin
- if (mode<>stArtist) or (adirection<>smDirect) then
- Resort(Root,mode,adirection);
+ if (mode<>stArtist) or (aDirection<>smDirect) then
+ Resort(Root,mode,aDirection);
OutputStat(buf1,Root);
ClearStatCells(Root);
end;
diff --git a/plugins/Watrack/status/i_opt_11.inc b/plugins/Watrack/status/i_opt_11.inc index 2bb1546015..8039dae4c1 100644 --- a/plugins/Watrack/status/i_opt_11.inc +++ b/plugins/Watrack/status/i_opt_11.inc @@ -254,7 +254,7 @@ end; function DlgProcOptions11(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
- Item:LV_ITEMA;
+ item:LV_ITEMA;
buf:array [0..127] of AnsiChar;
i,j:integer;
wnd:HWND;
@@ -418,11 +418,11 @@ begin else //IDC_STATUSLIST
begin
- Item.iItem:=PNMLISTVIEW(lParam)^.iItem;
- Item.mask:=LVIF_PARAM;
- SendMessageA(PNMLISTVIEW(lParam)^.hdr.hwndFrom,LVM_GETITEMA,0,tlparam(@Item));
-// ListView_GetItemA(PNMLISTVIEW(lParam)^.hdr.hwndFrom,Item);
- CurStatus:=GetStatusNum(Item.lParam);
+ item.iItem:=PNMLISTVIEW(lParam)^.iItem;
+ item.mask:=LVIF_PARAM;
+ SendMessageA(PNMLISTVIEW(lParam)^.hdr.hwndFrom,LVM_GETITEMA,0,tlparam(@item));
+// ListView_GetItemA(PNMLISTVIEW(lParam)^.hdr.hwndFrom,item);
+ CurStatus:=GetStatusNum(item.lParam);
RedrawFields(Dialog);
end;
end
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr index 7bd1de326b..54f3fbe986 100644 --- a/plugins/Watrack/watrack.dpr +++ b/plugins/Watrack/watrack.dpr @@ -568,7 +568,7 @@ begin CallService(MS_SYSTEM_WAITONHANDLE,hEvent,tlparam(p));
end;
- loadopt;
+ LoadOpt;
if DisablePlugin=dsPermanent then
CallService(MS_WAT_PLUGINSTATUS,1,0);
@@ -577,7 +577,7 @@ begin result:=0;
HookEvent(ME_SYSTEM_MODULELOAD ,@OnPluginLoad);
- HookEvent(ME_SYSTEM_MODULEUNLOAD,@OnPluginUnLoad);
+ HookEvent(ME_SYSTEM_MODULEUNLOAD,@OnPluginUnload);
end;
procedure FreeVariables;
@@ -647,7 +647,7 @@ begin result:=0;
end;
-function Load():int; cdecl;
+function Load:int; cdecl;
begin
result:=0;
Langpack_register;
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc index 75ad569839..468cb47992 100644 --- a/plugins/mRadio/i_tray.inc +++ b/plugins/mRadio/i_tray.inc @@ -131,7 +131,7 @@ begin result:=Service_SetStatus(wParam,lParam);
end;
-procedure CreateTrayMenu();
+procedure CreateTrayMenu;
var
mi:TCListMenuItem;
playstr:pWideChar;
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr index de83095d63..e929303b0d 100644 --- a/plugins/mRadio/mradio.dpr +++ b/plugins/mRadio/mradio.dpr @@ -157,7 +157,7 @@ begin result:=0;
end;
-function Load(): int; cdecl;
+function Load: int; cdecl;
var
desc:TPROTOCOLDESCRIPTOR;
begin
diff --git a/plugins/mRadio/rbass.pas b/plugins/mRadio/rbass.pas index dcf90f118d..41516866ce 100644 --- a/plugins/mRadio/rbass.pas +++ b/plugins/mRadio/rbass.pas @@ -133,9 +133,7 @@ begin end;
end;
-
-
-procedure MyStopBASS;
+procedure MyStopBass;
begin
if BassStatus=rbs_null then exit;
@@ -169,11 +167,11 @@ begin end;
end;
-procedure MyFreeBASS;
+procedure MyFreeBass;
begin
if BassStatus=rbs_init then
begin
- MyStopBASS;
+ MyStopBass;
BASS_Free;
BassStatus:=rbs_load;
@@ -188,7 +186,7 @@ begin mFreeMem(StationHeader);
mFreeMem(ActiveURL);
DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
- MyStopBASS;
+ MyStopBass;
end;
function GetDeviceNumber:integer;
@@ -214,7 +212,7 @@ begin until false;
end;
-function MyInitBASS:bool;
+function MyInitBass:bool;
var
num:integer;
begin
@@ -278,7 +276,7 @@ end; procedure MyUnloadBass;
begin
- MyFreeBASS;
+ MyFreeBass;
if BassStatus=rbs_load then
begin
mFreeMem(proxy);
@@ -290,7 +288,7 @@ begin end;
end;
-function MyLoadBASS:bool;
+function MyLoadBass:bool;
var
pc,custom:PWideChar;
basspath:PWideChar;
@@ -1146,7 +1144,7 @@ function ConstructFilter:pointer; var
pc:pWideChar;
ph:PDWord;
- Info:PBASS_PLUGININFO;
+ info:PBASS_PLUGININFO;
i:integer;
full:array [0..511] of WideChar;
tmpbuf1,tmpbuf2:array [0..127] of WideChar;
@@ -1169,10 +1167,10 @@ begin begin
while ph^<>0 do
begin
- Info:=BASS_PluginGetInfo(ph^);
- for i:=0 to Info^.formatc-1 do
+ info:=BASS_PluginGetInfo(ph^);
+ for i:=0 to info^.formatc-1 do
//!! need to translate Ansi -> wide
- with Info^.Formats[i] do
+ with info^.Formats[i] do
begin
pc:=MakeFilter(pc,FastAnsiToWideBuf(name,tmpbuf1),full,FastAnsiToWideBuf(exts,tmpbuf2));
end;
diff --git a/plugins/mRadio/rglobal.pas b/plugins/mRadio/rglobal.pas index 04c36e8696..07f3978dda 100644 --- a/plugins/mRadio/rglobal.pas +++ b/plugins/mRadio/rglobal.pas @@ -9,8 +9,6 @@ uses m_api,
playlist;
-{$include m_radio.inc}
-
const
cPluginName = 'mRadio';
const
|