mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 10:50:14 +02:00
amicommon: reindented dos/Create_Timer(), no functional changes
git-svn-id: trunk@30364 -
This commit is contained in:
parent
3003368ef4
commit
6128007f83
@ -317,26 +317,26 @@ end;
|
||||
|
||||
function Create_Timer(theUnit : longint) : pTimeRequest;
|
||||
var
|
||||
Error : longint;
|
||||
TimerPort : pMsgPort;
|
||||
TimeReq : pTimeRequest;
|
||||
Error : longint;
|
||||
TimerPort : pMsgPort;
|
||||
TimeReq : pTimeRequest;
|
||||
begin
|
||||
TimerPort := CreatePort(Nil, 0);
|
||||
if TimerPort = Nil then
|
||||
Create_Timer := Nil;
|
||||
TimeReq := pTimeRequest(CreateExtIO(TimerPort,sizeof(tTimeRequest)));
|
||||
if TimeReq = Nil then begin
|
||||
DeletePort(TimerPort);
|
||||
Create_Timer := Nil;
|
||||
end;
|
||||
Error := OpenDevice(TIMERNAME, theUnit, pIORequest(TimeReq), 0);
|
||||
if Error <> 0 then begin
|
||||
DeleteExtIO(pIORequest(TimeReq));
|
||||
DeletePort(TimerPort);
|
||||
Create_Timer := Nil;
|
||||
end;
|
||||
TimerBase := pointer(TimeReq^.tr_Node.io_Device);
|
||||
Create_Timer := pTimeRequest(TimeReq);
|
||||
TimerPort := CreatePort(Nil, 0);
|
||||
if TimerPort = Nil then
|
||||
Create_Timer := Nil;
|
||||
TimeReq := pTimeRequest(CreateExtIO(TimerPort,sizeof(tTimeRequest)));
|
||||
if TimeReq = Nil then begin
|
||||
DeletePort(TimerPort);
|
||||
Create_Timer := Nil;
|
||||
end;
|
||||
Error := OpenDevice(TIMERNAME, theUnit, pIORequest(TimeReq), 0);
|
||||
if Error <> 0 then begin
|
||||
DeleteExtIO(pIORequest(TimeReq));
|
||||
DeletePort(TimerPort);
|
||||
Create_Timer := Nil;
|
||||
end;
|
||||
TimerBase := pointer(TimeReq^.tr_Node.io_Device);
|
||||
Create_Timer := pTimeRequest(TimeReq);
|
||||
end;
|
||||
|
||||
Procedure Delete_Timer(WhichTimer : pTimeRequest);
|
||||
|
Loading…
Reference in New Issue
Block a user