mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 11:59:20 +02:00
freeing stopped external tools
git-svn-id: trunk@3791 -
This commit is contained in:
parent
2390fc3513
commit
0f3bc245a8
@ -235,6 +235,7 @@ type
|
|||||||
xtConstSet, // [] set
|
xtConstSet, // [] set
|
||||||
xtConstBoolean,// true, false
|
xtConstBoolean,// true, false
|
||||||
xtLongint, // longint
|
xtLongint, // longint
|
||||||
|
xtLongWord, // longword
|
||||||
xtWord, // word
|
xtWord, // word
|
||||||
xtCompilerFunc,// SUCC, PREC, LOW, HIGH, ORD, LENGTH
|
xtCompilerFunc,// SUCC, PREC, LOW, HIGH, ORD, LENGTH
|
||||||
xtNil // nil = pointer, class, procedure, method, ...
|
xtNil // nil = pointer, class, procedure, method, ...
|
||||||
@ -272,6 +273,7 @@ const
|
|||||||
'ConstSet',
|
'ConstSet',
|
||||||
'ConstBoolean',
|
'ConstBoolean',
|
||||||
'LongInt',
|
'LongInt',
|
||||||
|
'LongWord',
|
||||||
'Word',
|
'Word',
|
||||||
'CompilerFunc',
|
'CompilerFunc',
|
||||||
'Nil'
|
'Nil'
|
||||||
@ -279,7 +281,8 @@ const
|
|||||||
|
|
||||||
xtAllTypes = [Low(TExpressionTypeDesc)..High(TExpressionTypeDesc)]-[xtNone];
|
xtAllTypes = [Low(TExpressionTypeDesc)..High(TExpressionTypeDesc)]-[xtNone];
|
||||||
xtAllPredefinedTypes = xtAllTypes-[xtContext];
|
xtAllPredefinedTypes = xtAllTypes-[xtContext];
|
||||||
xtAllIntegerTypes = [xtInt64, xtQWord, xtConstOrdInteger, xtLongint, xtWord];
|
xtAllIntegerTypes = [xtInt64, xtQWord, xtConstOrdInteger, xtLongint,
|
||||||
|
xtLongWord, xtWord, xtCardinal];
|
||||||
xtAllBooleanTypes = [xtBoolean, xtByteBool, xtLongBool];
|
xtAllBooleanTypes = [xtBoolean, xtByteBool, xtLongBool];
|
||||||
xtAllRealTypes = [xtReal, xtConstReal, xtSingle, xtDouble, xtExtended,
|
xtAllRealTypes = [xtReal, xtConstReal, xtSingle, xtDouble, xtExtended,
|
||||||
xtCurrency, xtComp];
|
xtCurrency, xtComp];
|
||||||
@ -707,6 +710,8 @@ begin
|
|||||||
Result:=xtCurrency
|
Result:=xtCurrency
|
||||||
else if CompareIdentifiers(Identifier,'LONGINT')=0 then
|
else if CompareIdentifiers(Identifier,'LONGINT')=0 then
|
||||||
Result:=xtLongInt
|
Result:=xtLongInt
|
||||||
|
else if CompareIdentifiers(Identifier,'LONGWORD')=0 then
|
||||||
|
Result:=xtLongWord
|
||||||
else if CompareIdentifiers(Identifier,'WORD')=0 then
|
else if CompareIdentifiers(Identifier,'WORD')=0 then
|
||||||
Result:=xtWord
|
Result:=xtWord
|
||||||
else if CompareIdentifiers(Identifier,'LONGWORD')=0 then
|
else if CompareIdentifiers(Identifier,'LONGWORD')=0 then
|
||||||
@ -5642,6 +5647,7 @@ begin
|
|||||||
xtFile,
|
xtFile,
|
||||||
xtText,
|
xtText,
|
||||||
xtLongint,
|
xtLongint,
|
||||||
|
xtLongWord,
|
||||||
xtWord:
|
xtWord:
|
||||||
Result:=ExpressionTypeDescNames[ExprType.Desc];
|
Result:=ExpressionTypeDescNames[ExprType.Desc];
|
||||||
|
|
||||||
|
@ -1013,6 +1013,8 @@ begin
|
|||||||
Add('LOW' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('LOW' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('HIGH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('HIGH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('LENGTH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('LENGTH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
|
// only fpc 1.1
|
||||||
|
Add('LONGWORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
end;
|
end;
|
||||||
WordIsPredefinedDelphiIdentifier:=TKeyWordFunctionList.Create;
|
WordIsPredefinedDelphiIdentifier:=TKeyWordFunctionList.Create;
|
||||||
KeyWordLists.Add(WordIsPredefinedDelphiIdentifier);
|
KeyWordLists.Add(WordIsPredefinedDelphiIdentifier);
|
||||||
|
@ -147,7 +147,7 @@ begin
|
|||||||
try
|
try
|
||||||
TheProcess := TProcess.Create(nil);
|
TheProcess := TProcess.Create(nil);
|
||||||
TheProcess.CommandLine := CmdLine;
|
TheProcess.CommandLine := CmdLine;
|
||||||
TheProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut];
|
TheProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutput];
|
||||||
TheProcess.ShowWindow := swoNone;
|
TheProcess.ShowWindow := swoNone;
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
try
|
try
|
||||||
@ -160,7 +160,6 @@ begin
|
|||||||
OutputFilter.Execute(TheProcess);
|
OutputFilter.Execute(TheProcess);
|
||||||
end else begin
|
end else begin
|
||||||
TheProcess.Execute;
|
TheProcess.Execute;
|
||||||
TheProcess.WaitOnExit;
|
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
TheProcess.WaitOnExit;
|
TheProcess.WaitOnExit;
|
||||||
@ -190,6 +189,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.38 2003/01/06 10:51:40 mattias
|
||||||
|
freeing stopped external tools
|
||||||
|
|
||||||
Revision 1.37 2002/12/27 21:36:30 mattias
|
Revision 1.37 2002/12/27 21:36:30 mattias
|
||||||
fixed zombies on compile error
|
fixed zombies on compile error
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ function TClipboard.IndexOfCachedFormatID(FormatID: TClipboardFormat;
|
|||||||
CreateIfNotExists: boolean): integer;
|
CreateIfNotExists: boolean): integer;
|
||||||
var NewSize: integer;
|
var NewSize: integer;
|
||||||
begin
|
begin
|
||||||
//writeln('[TClipboard.IndexOfCachedFormatID] A ',ClipboardTypeName[ClipboardType]
|
//writeln('[TClipboard.IndexOfCachedFormatID] A ',ClipboardTypeName[ClipboardType]
|
||||||
//,' Format=',FormatID,' CreateIfNotExists=',CreateIfNotExists);
|
//,' Format=',FormatID,' CreateIfNotExists=',CreateIfNotExists);
|
||||||
if FormatID=0 then begin
|
if FormatID=0 then begin
|
||||||
Result:=-1;
|
Result:=-1;
|
||||||
if CreateIfNotExists then
|
if CreateIfNotExists then
|
||||||
@ -82,8 +82,8 @@ begin
|
|||||||
ClipboardTypeName[ClipboardType]);
|
ClipboardTypeName[ClipboardType]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//writeln('[TClipboard.IndexOfCachedFormatID] END ',ClipboardTypeName[ClipboardType]
|
//writeln('[TClipboard.IndexOfCachedFormatID] END ',ClipboardTypeName[ClipboardType]
|
||||||
//,' Format=',FormatID,' CreateIfNotExists=',CreateIfNotExists,' Result=',Result);
|
//,' Format=',FormatID,' CreateIfNotExists=',CreateIfNotExists,' Result=',Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TClipboard.AddFormat(FormatID: TClipboardFormat;
|
function TClipboard.AddFormat(FormatID: TClipboardFormat;
|
||||||
@ -187,8 +187,8 @@ end;
|
|||||||
procedure TClipboard.InternalOnRequest(const RequestedFormatID: TClipboardFormat;
|
procedure TClipboard.InternalOnRequest(const RequestedFormatID: TClipboardFormat;
|
||||||
AStream: TStream);
|
AStream: TStream);
|
||||||
begin
|
begin
|
||||||
//writeln('[TClipboard.InternalOnRequest] A ',ClipboardTypeName[ClipboardType]
|
//writeln('[TClipboard.InternalOnRequest] A ',ClipboardTypeName[ClipboardType]
|
||||||
//,' RequestedFormatID=',RequestedFormatID,' AStream=',AStream<>nil,' Allocated=',FAllocated);
|
//,' RequestedFormatID=',RequestedFormatID,' AStream=',AStream<>nil,' Allocated=',FAllocated);
|
||||||
if not FAllocated then exit;
|
if not FAllocated then exit;
|
||||||
if (RequestedFormatID=0) then begin
|
if (RequestedFormatID=0) then begin
|
||||||
// loosing ownership
|
// loosing ownership
|
||||||
@ -209,14 +209,14 @@ begin
|
|||||||
GetMem(FormatList,SizeOf(TClipboardFormat)*FCount);
|
GetMem(FormatList,SizeOf(TClipboardFormat)*FCount);
|
||||||
for i:=0 to FCount-1 do
|
for i:=0 to FCount-1 do
|
||||||
FormatList[i]:=FData[i].FormatID;
|
FormatList[i]:=FData[i].FormatID;
|
||||||
//writeln('[TClipboard.GetOwnerShip] A ',ClipboardTypeName[ClipboardType],' Allocated=',FAllocated);
|
//writeln('[TClipboard.GetOwnerShip] A ',ClipboardTypeName[ClipboardType],' Allocated=',FAllocated);
|
||||||
FAllocated:=ClipboardGetOwnerShip(ClipboardType,@InternalOnRequest,FCount,
|
FAllocated:=ClipboardGetOwnerShip(ClipboardType,@InternalOnRequest,FCount,
|
||||||
FormatList);
|
FormatList);
|
||||||
FreeMem(FormatList);
|
FreeMem(FormatList);
|
||||||
FSupportedFormatsChanged:=false;
|
FSupportedFormatsChanged:=false;
|
||||||
end;
|
end;
|
||||||
Result:=FAllocated;
|
Result:=FAllocated;
|
||||||
//writeln('[TClipboard.GetOwnerShip] END ',ClipboardTypeName[ClipboardType],' Allocated=',FAllocated);
|
//writeln('[TClipboard.GetOwnerShip] END ',ClipboardTypeName[ClipboardType],' Allocated=',FAllocated);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TClipboard.SetOnRequest(AnOnRequest: TClipboardRequestEvent);
|
procedure TClipboard.SetOnRequest(AnOnRequest: TClipboardRequestEvent);
|
||||||
@ -340,20 +340,20 @@ end;
|
|||||||
procedure TClipboard.SetAsText(const Value: string);
|
procedure TClipboard.SetAsText(const Value: string);
|
||||||
var s: string;
|
var s: string;
|
||||||
begin
|
begin
|
||||||
//writeln('[TClipboard.SetAsText] A ',ClipboardTypeName[ClipboardType],' "',Value,'"');
|
//writeln('[TClipboard.SetAsText] A ',ClipboardTypeName[ClipboardType],' "',Value,'"');
|
||||||
if Assigned(FOnRequest) then exit;
|
if Assigned(FOnRequest) then exit;
|
||||||
if Value<>'' then
|
if Value<>'' then
|
||||||
s:=Value
|
s:=Value
|
||||||
else
|
else
|
||||||
s:=#0;
|
s:=#0;
|
||||||
SetBuffer(PredefinedClipboardFormat(pcfText),s[1],length(Value));
|
SetBuffer(PredefinedClipboardFormat(pcfText),s[1],length(Value));
|
||||||
//writeln('[TClipboard.SetAsText] END ',ClipboardTypeName[ClipboardType],' "',Value,'"');
|
//writeln('[TClipboard.SetAsText] END ',ClipboardTypeName[ClipboardType],' "',Value,'"');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TClipboard.GetAsText: string;
|
function TClipboard.GetAsText: string;
|
||||||
var MemStream: TMemoryStream;
|
var MemStream: TMemoryStream;
|
||||||
begin
|
begin
|
||||||
//writeln('[TClipboard.GetAsText] A ',ClipboardTypeName[ClipboardType]);
|
//writeln('[TClipboard.GetAsText] A ',ClipboardTypeName[ClipboardType]);
|
||||||
Result:='';
|
Result:='';
|
||||||
MemStream:=TMemoryStream.Create;
|
MemStream:=TMemoryStream.Create;
|
||||||
try
|
try
|
||||||
@ -366,14 +366,14 @@ begin
|
|||||||
finally
|
finally
|
||||||
MemStream.Free;
|
MemStream.Free;
|
||||||
end;
|
end;
|
||||||
//writeln('[TClipboard.GetAsText] END ',ClipboardTypeName[ClipboardType],' "',Result,'"');
|
//writeln('[TClipboard.GetAsText] END ',ClipboardTypeName[ClipboardType],' "',Result,'"');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TClipboard.SupportedFormats(List: TStrings);
|
procedure TClipboard.SupportedFormats(List: TStrings);
|
||||||
var cnt, i: integer;
|
var cnt, i: integer;
|
||||||
FormatList: PClipboardFormat;
|
FormatList: PClipboardFormat;
|
||||||
begin
|
begin
|
||||||
//writeln('[TClipboard.SupportedFormats]');
|
//writeln('[TClipboard.SupportedFormats]');
|
||||||
List.Clear;
|
List.Clear;
|
||||||
if FAllocated then begin
|
if FAllocated then begin
|
||||||
for i:=0 to FCount-1 do
|
for i:=0 to FCount-1 do
|
||||||
@ -610,6 +610,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.11 2003/01/06 10:51:41 mattias
|
||||||
|
freeing stopped external tools
|
||||||
|
|
||||||
Revision 1.10 2002/10/24 10:05:51 lazarus
|
Revision 1.10 2002/10/24 10:05:51 lazarus
|
||||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user