summaryrefslogtreecommitdiff
path: root/plugins/Watrack
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack')
-rw-r--r--plugins/Watrack/formats/fmt_mp3.pas16
-rw-r--r--plugins/Watrack/formats/fmt_ogg.pas29
-rw-r--r--plugins/Watrack/formats/fmt_real.pas40
-rw-r--r--plugins/Watrack/formats/fmt_wma.pas4
-rw-r--r--plugins/Watrack/formats/tag_id3v1.inc10
-rw-r--r--plugins/Watrack/formats/tag_id3v2.inc12
-rw-r--r--plugins/Watrack/i_cover.inc8
-rw-r--r--plugins/Watrack/i_opt_1.inc2
-rw-r--r--plugins/Watrack/i_options.inc4
-rw-r--r--plugins/Watrack/lastfm/i_last_api.inc26
-rw-r--r--plugins/Watrack/lastfm/i_last_dlg.inc12
-rw-r--r--plugins/Watrack/lst_formats.inc2
-rw-r--r--plugins/Watrack/myshows/i_myshows_api.inc2
-rw-r--r--plugins/Watrack/myshows/i_myshows_dlg.inc12
-rw-r--r--plugins/Watrack/players/pl_cowon.pas32
-rw-r--r--plugins/Watrack/players/pl_mpc.pas8
-rw-r--r--plugins/Watrack/players/pl_mradio.pas2
-rw-r--r--plugins/Watrack/popup/pop_vars.inc16
-rw-r--r--plugins/Watrack/popup/popups.pas13
-rw-r--r--plugins/Watrack/srv_format.pas6
-rw-r--r--plugins/Watrack/srv_player.pas6
-rw-r--r--plugins/Watrack/stat/statlog.pas18
-rw-r--r--plugins/Watrack/status/i_opt_11.inc12
-rw-r--r--plugins/Watrack/watrack.dpr6
24 files changed, 147 insertions, 151 deletions
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;