summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2014-12-31 22:11:10 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2014-12-31 22:11:10 +0000
commitec7b7cf1c956bf17b60d788d73530fcbd12bf51f (patch)
tree45450baf5b76d8e57b9f198cb1fd9f8db9a6d31f
parent813851def848b52b92f59c379706ada6bebceba9 (diff)
temporary revert
git-svn-id: http://svn.miranda-ng.org/main/trunk@11705 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-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/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
23 files changed, 150 insertions, 146 deletions
diff --git a/plugins/Watrack/formats/fmt_mp3.pas b/plugins/Watrack/formats/fmt_mp3.pas
index e9d5d68eed..45c0888daa 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 fbe959d48b..d0ba567d08 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:tSongInfo):boolean; cdecl;
-function ReadSPX(var Info:tSongInfo):boolean; cdecl;
-function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
+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;
implementation
-uses windows,common,io,tags,srv_format,base64,utils;
+uses windows,common,io,tags,srv_format,utils, m_api;
const
OGGSign = $5367674F; //OggS
@@ -95,12 +95,12 @@ const
5 : CUESHEET
}
type
- tMetaHdr = packed record
+ MetaHdr = packed record
blocktype:byte;
blocklen:array [0..2] of byte;
end;
type
- tStreamInfo = packed record
+ StreamInfo = packed record
MinBlockSize:word;
MaxBlocksize:word;
MinFrameSize:array [0..2] of byte;
@@ -109,9 +109,10 @@ type
MD5:array [0..15] of byte;
end;
-procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:tSongInfo);
+procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:wat_api.tSongInfo);
var
- clen,alen,len,values:dword;
+ alen,len,values:dword;
+ clen:int;
ls:PAnsiChar;
value:PAnsiChar;
cover:pByte;
@@ -150,7 +151,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 clen:=Base64Decode(value,cover)
+ else if (cover=nil) and (lstrcmpia(ls,'COVERART')=0) then cover:=mir_base64_decode(value,clen)
else if lstrcmpia(ls,'COVERARTMIME')=0 then ext:=GetImageType(nil,value);
end;
dec(values);
@@ -184,7 +185,7 @@ begin
end;
end;
-function ReadSPX(var Info:tSongInfo):boolean; cdecl;
+function ReadSPX(var Info:wat_api.tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -242,7 +243,7 @@ begin
result:=0;
end;
-function ReadOGG(var Info:tSongInfo):boolean; cdecl;
+function ReadOGG(var Info:wat_api.tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -367,12 +368,12 @@ begin
CloseHandle(f);
end;
-function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
+function ReadfLaC(var Info:wat_api.tSongInfo):boolean; cdecl;
var
f:THANDLE;
data64:int64;
- hdr:tMetaHdr;
- frm:tStreamInfo;
+ hdr:MetaHdr;
+ frm:StreamInfo;
id:dword;
flag:integer;
size:dword;
diff --git a/plugins/Watrack/formats/fmt_real.pas b/plugins/Watrack/formats/fmt_real.pas
index 1d69a2f353..8d5f5bf72d 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
- llen:integer;
+ len:integer;
begin
if alen=2 then
- llen:=(ord(p[0]) shl 8)+ord(p[1])
+ len:=(ord(p[0]) shl 8)+ord(p[1])
else
- llen:=ord(p[0]);
+ len:=ord(p[0]);
inc(p,alen);
-// if llen>0 then
- inc(p,llen);
+// if len>0 then
+ inc(p,len);
end;
function ReadStr(var p:PAnsiChar;alen:integer):PAnsiChar;
var
- llen:integer;
+ len:integer;
begin
if alen=2 then
- llen:=(ord(p[0]) shl 8)+ord(p[1])
+ len:=(ord(p[0]) shl 8)+ord(p[1])
else
- llen:=ord(p[0]);
+ len:=ord(p[0]);
inc(p,alen);
- if llen>0 then
+ if len>0 then
begin
- mGetMem(result,llen+1);
- move(p^,result^,llen);
- result[llen]:=#0;
- inc(p,llen);
+ mGetMem(result,len+1);
+ move(p^,result^,len);
+ result[len]:=#0;
+ inc(p,len);
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 8027ce052d..ed575147ac 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;
- tPrefix = packed record
+ Prefix = packed record
StreamType :tGUID;
ECGUID :tGUID; // Error Correction
TimeOffset :int64;
@@ -309,7 +309,7 @@ var
tmpguid:pGUID;
begin
tmpguid:=pointer(ptr);
- inc(ptr,SizeOf(tPrefix)); //ofset to Type-Specific Data
+ inc(ptr,SizeOf(Prefix)); //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 5e1f89539a..bd1db906bb 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 5ee98ca9e1..78660fdb6d 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 96aec9da47..1a07b21637 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 356f6b2a29..faec7ef0be 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 3feb4bf2e1..16a70ccd89 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 3f02458c52..b43ba0703c 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(const digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
+function GetMD5Str(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 44beb5bdf7..ee1f96092f 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 745184c90c..19db34ee40 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 6f77819c64..6341793016 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(const digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
+function GetMD5Str(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 da128900d9..1f51ed7d11 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 5ee5ab4be6..0ac7027426 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 f5ac986c28..bd0fade514 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/popup/pop_vars.inc b/plugins/Watrack/popup/pop_vars.inc
index 0eee668070..2bbfce178b 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 ca9462a12d..212409324e 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,6 +150,7 @@ 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)));
@@ -217,7 +218,9 @@ begin
hbmAvatar:=0;
if hbmAvatar=0 then
begin
- hbmAvatar:=CallService(MS_UTILS_LOADBITMAPW,0,lparam(si.cover));
+ WideToAnsi(si.cover,tmp);
+ hbmAvatar:=CallService(MS_UTILS_LOADBITMAP,0,lparam(tmp));
+ mFreeMem(tmp);
end;
end;
PluginData:=pointer(hbmAvatar);
diff --git a/plugins/Watrack/srv_format.pas b/plugins/Watrack/srv_format.pas
index d07f600411..c5f2cef6ed 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
- TMusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
+ MusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
-function EnumFormats(param:TMusEnumProc;lParam:LPARAM):bool;
+function EnumFormats(param:MusEnumProc;lParam:LPARAM):bool;
function GetActiveFormat:pMusicFormat;
type
@@ -65,7 +65,7 @@ begin
result:=@fmtLink^[0];
end;
-function EnumFormats(param:TMusEnumProc;lParam:LPARAM):bool;
+function EnumFormats(param:MusEnumProc;lParam:LPARAM):bool;
var
tmp:pFmtArray;
i,j:integer;
diff --git a/plugins/Watrack/srv_player.pas b/plugins/Watrack/srv_player.pas
index 4c921500d2..61429c345d 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
- TMusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
+ MusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
-function EnumPlayers(param:TMusEnumProc;lParam:LPARAM):bool;
+function EnumPlayers(param:MusEnumProc;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:TMusEnumProc;lParam:LPARAM):bool;
+function EnumPlayers(param:MusEnumProc;lParam:LPARAM):bool;
var
tmp:pPlyArray;
i,j:integer;
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas
index f2064f42c2..5ff486747c 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 aDirection=smReverse then
+ result:=Compare(Root^.cells[First],Root^.cells[Second],sort);
+ if direction=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 8039dae4c1..2bb1546015 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 54f3fbe986..7bd1de326b 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;