From da87b3fa0479333cfe9505713f6ffaa54b9ba543 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Wed, 31 Dec 2014 17:08:47 +0000 Subject: pascal code: reformat, small fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@11700 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Watrack/players/pl_cowon.pas | 32 ++++++++++++++++---------------- plugins/Watrack/players/pl_mpc.pas | 8 ++++---- plugins/Watrack/players/pl_mradio.pas | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'plugins/Watrack/players') 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; -- cgit v1.2.3