mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:19:17 +02:00
* who uses C style operators in the heart of FPC ;)? fixed
git-svn-id: trunk@12764 -
This commit is contained in:
parent
a10de0a71f
commit
344ccfce72
@ -266,11 +266,13 @@ begin
|
|||||||
FillDWord(tmpbuf,256 div 4,0);
|
FillDWord(tmpbuf,256 div 4,0);
|
||||||
if NameFromLock(dlock,@tmpbuf[1],255) then begin
|
if NameFromLock(dlock,@tmpbuf[1],255) then begin
|
||||||
counter:=1;
|
counter:=1;
|
||||||
while tmpbuf[counter]<>#0 do counter+=1;
|
while tmpbuf[counter]<>#0 do
|
||||||
|
inc(counter);
|
||||||
tmpbuf[0]:=Char(counter-1);
|
tmpbuf[0]:=Char(counter-1);
|
||||||
GetArgv0Ambient:=tmpbuf;
|
GetArgv0Ambient:=tmpbuf;
|
||||||
{ Append slash,if we're not in root directory of a volume }
|
{ Append slash,if we're not in root directory of a volume }
|
||||||
if tmpbuf[counter-1]<>':' then GetArgv0Ambient+='/';
|
if tmpbuf[counter-1]<>':' then
|
||||||
|
GetArgv0Ambient:=GetArgv0Ambient+'/';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -281,10 +283,10 @@ begin
|
|||||||
counter:=0;
|
counter:=0;
|
||||||
while (progname[counter]<>#0) do begin
|
while (progname[counter]<>#0) do begin
|
||||||
tmpbuf[counter+1]:=progname[counter];
|
tmpbuf[counter+1]:=progname[counter];
|
||||||
counter+=1;
|
inc(counter);
|
||||||
end;
|
end;
|
||||||
tmpbuf[0]:=Char(counter);
|
tmpbuf[0]:=Char(counter);
|
||||||
GetArgv0Ambient+=tmpbuf;
|
GetArgv0Ambient:=GetArgv0Ambient+tmpbuf;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -31,7 +31,7 @@ procedure GotResizeWindow;
|
|||||||
function HasResizeWindow(var winw:longint; var winh: longint): boolean;
|
function HasResizeWindow(var winw:longint; var winh: longint): boolean;
|
||||||
|
|
||||||
var
|
var
|
||||||
videoWindow : pWindow;
|
videoWindow : pWindow;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -80,7 +80,7 @@ begin
|
|||||||
WA_IDCMP,IDCMP_VANILLAKEY Or IDCMP_RAWKEY Or
|
WA_IDCMP,IDCMP_VANILLAKEY Or IDCMP_RAWKEY Or
|
||||||
IDCMP_CLOSEWINDOW Or IDCMP_CHANGEWINDOW,
|
IDCMP_CLOSEWINDOW Or IDCMP_CHANGEWINDOW,
|
||||||
WA_Title,DWord(PChar('Free Pascal Video Output')),
|
WA_Title,DWord(PChar('Free Pascal Video Output')),
|
||||||
WA_Flags,(WFLG_GIMMEZEROZERO Or WFLG_SMART_REFRESH Or WFLG_NOCAREREFRESH Or
|
WA_Flags,(WFLG_GIMMEZEROZERO Or WFLG_SMART_REFRESH Or WFLG_NOCAREREFRESH Or
|
||||||
WFLG_ACTIVATE Or WFLG_DRAGBAR Or WFLG_DEPTHGADGET Or
|
WFLG_ACTIVATE Or WFLG_DRAGBAR Or WFLG_DEPTHGADGET Or
|
||||||
WFLG_SIZEGADGET Or WFLG_SIZEBBOTTOM Or
|
WFLG_SIZEGADGET Or WFLG_SIZEBBOTTOM Or
|
||||||
WFLG_CLOSEGADGET)
|
WFLG_CLOSEGADGET)
|
||||||
@ -130,7 +130,7 @@ begin
|
|||||||
dx := (Mode.col * 8) - videoWindow^.GZZWidth;
|
dx := (Mode.col * 8) - videoWindow^.GZZWidth;
|
||||||
dy := (Mode.row * 16) - videoWindow^.GZZHeight;
|
dy := (Mode.row * 16) - videoWindow^.GZZHeight;
|
||||||
SizeWindow(videoWindow,dx,dy);
|
SizeWindow(videoWindow,dx,dy);
|
||||||
|
|
||||||
ScreenWidth:=Mode.col;
|
ScreenWidth:=Mode.col;
|
||||||
ScreenHeight:=Mode.row;
|
ScreenHeight:=Mode.row;
|
||||||
ScreenColor:=Mode.color;
|
ScreenColor:=Mode.color;
|
||||||
@ -164,7 +164,7 @@ begin
|
|||||||
if crType <> crBlock then begin
|
if crType <> crBlock then begin
|
||||||
SetABPenDrMd(videoWindow^.RPort,videoPens[tmpFGColor],videoPens[tmpBGColor],JAM2);
|
SetABPenDrMd(videoWindow^.RPort,videoPens[tmpFGColor],videoPens[tmpBGColor],JAM2);
|
||||||
end else begin
|
end else begin
|
||||||
{ in case of block cursor, swap fg/bg colors
|
{ in case of block cursor, swap fg/bg colors
|
||||||
and BltTemplate() below will take care of everything }
|
and BltTemplate() below will take care of everything }
|
||||||
SetABPenDrMd(videoWindow^.RPort,videoPens[tmpBGColor],videoPens[tmpFGColor],JAM2);
|
SetABPenDrMd(videoWindow^.RPort,videoPens[tmpBGColor],videoPens[tmpFGColor],JAM2);
|
||||||
end;
|
end;
|
||||||
@ -195,7 +195,7 @@ begin
|
|||||||
counter:=0;
|
counter:=0;
|
||||||
while not smallforce and (counter<(VideoBufSize div 4)-1) do begin
|
while not smallforce and (counter<(VideoBufSize div 4)-1) do begin
|
||||||
if PDWord(VideoBuf)[counter]<>PDWord(OldVideoBuf)[counter] then smallforce:=true;
|
if PDWord(VideoBuf)[counter]<>PDWord(OldVideoBuf)[counter] then smallforce:=true;
|
||||||
counter+=1;
|
inc(counter);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ begin
|
|||||||
move(VideoBuf^,OldVideoBuf^,VideoBufSize);
|
move(VideoBuf^,OldVideoBuf^,VideoBufSize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (cursorType<>oldcursorType) or
|
if (cursorType<>oldcursorType) or
|
||||||
(CursorX<>oldCursorX) or (CursorY<>oldCursorY) or
|
(CursorX<>oldCursorX) or (CursorY<>oldCursorY) or
|
||||||
smallforce then begin
|
smallforce then begin
|
||||||
DrawChar(oldCursorY,oldCursorX,crHidden);
|
DrawChar(oldCursorY,oldCursorX,crHidden);
|
||||||
@ -245,7 +245,7 @@ end;
|
|||||||
procedure SysSetCursorType(NewType: Word);
|
procedure SysSetCursorType(NewType: Word);
|
||||||
begin
|
begin
|
||||||
cursorType:=newType;
|
cursorType:=newType;
|
||||||
{ FIXME: halfBlock cursors are not supported for now
|
{ FIXME: halfBlock cursors are not supported for now
|
||||||
by the rendering code }
|
by the rendering code }
|
||||||
if cursorType = crHalfBlock then cursorType:=crBlock;
|
if cursorType = crHalfBlock then cursorType:=crBlock;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user