summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Utils.pas')
-rw-r--r--plugins/Utils.pas/TextBlock.pas16
-rw-r--r--plugins/Utils.pas/common.pas18
-rw-r--r--plugins/Utils.pas/compilers.inc13
-rw-r--r--plugins/Utils.pas/datetime.pas45
-rw-r--r--plugins/Utils.pas/dbsettings.pas8
-rw-r--r--plugins/Utils.pas/editwrapper.pas16
-rw-r--r--plugins/Utils.pas/mApiCardM.pas62
-rw-r--r--plugins/Utils.pas/memini.pas86
-rw-r--r--plugins/Utils.pas/mircontacts.pas8
-rw-r--r--plugins/Utils.pas/mirevents.pas16
-rw-r--r--plugins/Utils.pas/mirutils.pas74
-rw-r--r--plugins/Utils.pas/msninfo.pas14
-rw-r--r--plugins/Utils.pas/playlist.pas62
-rw-r--r--plugins/Utils.pas/protocols.pas12
-rw-r--r--plugins/Utils.pas/rtfole.pas2
-rw-r--r--plugins/Utils.pas/rtfutils.pas10
-rw-r--r--plugins/Utils.pas/sedit.pas38
-rw-r--r--plugins/Utils.pas/sparam.pas66
-rw-r--r--plugins/Utils.pas/srvblock.pas20
-rw-r--r--plugins/Utils.pas/strans.pas82
-rw-r--r--plugins/Utils.pas/syswin.pas30
-rw-r--r--plugins/Utils.pas/tb_chunk.inc14
-rw-r--r--plugins/Utils.pas/utils.pas8
-rw-r--r--plugins/Utils.pas/wrapper.pas32
-rw-r--r--plugins/Utils.pas/zwrapper.pas2
25 files changed, 397 insertions, 357 deletions
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;