mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 17:59:25 +02:00
* win64 compile fixes
git-svn-id: trunk@3297 -
This commit is contained in:
parent
b36e38ead1
commit
d98336156f
12
ide/fp.pas
12
ide/fp.pas
@ -15,10 +15,10 @@
|
||||
program FP;
|
||||
|
||||
{$ifdef IncRes}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
{$R fpw32t.rc}
|
||||
{$R fpw32ico.rc}
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$endif IncRes}
|
||||
|
||||
{$I globdir.inc}
|
||||
@ -31,9 +31,9 @@ program FP;
|
||||
|
||||
uses
|
||||
{$ifndef NODEBUG}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
fpcygwin,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$endif NODEBUG}
|
||||
{$ifdef IDEHeapTrc}
|
||||
PPheap,
|
||||
@ -298,10 +298,10 @@ BEGIN
|
||||
writeln('þ Compiler Version '+Version_String);
|
||||
{$ifndef NODEBUG}
|
||||
writeln('þ GBD Version '+GDBVersion);
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
writeln('þ Cygwin "',GetCygwinFullName,'" version ',GetCygwinVersionString);
|
||||
CheckCygwinVersion;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$endif NODEBUG}
|
||||
|
||||
ProcessParams(true);
|
||||
|
@ -111,9 +111,11 @@ uses
|
||||
{$ifdef go32v2}
|
||||
dpmiexcp,
|
||||
{$endif}
|
||||
{$ifdef win32}
|
||||
signals,
|
||||
{$endif}
|
||||
{$ifdef windows}
|
||||
{$ifdef HasSignal}
|
||||
signals,
|
||||
{$endif}
|
||||
{$endif windows}
|
||||
FPString,FPUtils,FPConst,WUtils;
|
||||
|
||||
const
|
||||
|
@ -30,9 +30,13 @@ uses
|
||||
uses
|
||||
dpmiexcp;
|
||||
{$endif}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
uses
|
||||
windows, signals;
|
||||
windows
|
||||
{$ifdef HasSignal}
|
||||
,signals
|
||||
{$endif}
|
||||
;
|
||||
{$endif}
|
||||
|
||||
{$ifdef HasSignal}
|
||||
@ -204,16 +208,16 @@ Const
|
||||
CatchSignalsEnabled : boolean = false;
|
||||
|
||||
Procedure EnableCatchSignals;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var Mode: DWORD;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
begin
|
||||
if CatchSignalsEnabled then
|
||||
exit;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @Mode) then
|
||||
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), (Mode or ENABLE_MOUSE_INPUT) and not ENABLE_PROCESSED_INPUT);
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef go32v2}
|
||||
djgpp_set_ctrl_c(false);
|
||||
{$endif go32v2}
|
||||
|
@ -121,8 +121,10 @@ uses
|
||||
{$ifdef go32v2}
|
||||
dpmiexcp,
|
||||
{$endif}
|
||||
{$ifdef win32}
|
||||
signals,
|
||||
{$ifdef Windows}
|
||||
{$ifdef HasSignal}
|
||||
signals,
|
||||
{$endif}
|
||||
{$endif}
|
||||
{ $ifdef HasSignal}
|
||||
fpcatch,
|
||||
|
@ -21,9 +21,9 @@ end.
|
||||
interface
|
||||
{$i globdir.inc}
|
||||
uses
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
Windows,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
Objects,Dialogs,Drivers,Views,
|
||||
{$ifndef NODEBUG}
|
||||
GDBCon,GDBInt,
|
||||
@ -338,9 +338,9 @@ uses
|
||||
{$endif DOS}
|
||||
App,Strings,
|
||||
FVConsts,
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
Windebug,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
{$ifdef VER1_0}
|
||||
Linux,
|
||||
@ -468,20 +468,20 @@ begin
|
||||
{ should we also use / chars ? }
|
||||
for i:=1 to Length(st) do
|
||||
if st[i]='\' then
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
{ Don't touch at '\ ' used to escapes spaces in windows file names PM }
|
||||
if (i=length(st)) or (st[i+1]<>' ') then
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
st[i]:='/';
|
||||
{$ifdef win32}
|
||||
{ for win32 we should convert e:\ into //e/ PM }
|
||||
{$ifdef Windows}
|
||||
{ for Windows we should convert e:\ into //e/ PM }
|
||||
if (length(st)>2) and (st[2]=':') and (st[3]='/') then
|
||||
st:=CygDrivePrefix+'/'+st[1]+copy(st,3,length(st));
|
||||
{ support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
|
||||
for i:=Length(st) downto 1 do
|
||||
if (st[i]=' ') and ((i=1) or (st[i-1]<>'\')) then
|
||||
st:=copy(st,1,i-1)+'\'+copy(st,i,length(st));
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef go32v2}
|
||||
{ for go32v2 we should convert //e/ back into e:/ PM }
|
||||
if (length(st)>3) and (st[1]='/') and (st[2]='/') and (st[4]='/') then
|
||||
@ -500,13 +500,13 @@ begin
|
||||
{$ifdef Unix}
|
||||
OSFileName:=st;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
{$ifndef NODEBUG}
|
||||
{ for win32 we should convert /cygdrive/e/ into e:\ PM }
|
||||
{ for Windows we should convert /cygdrive/e/ into e:\ PM }
|
||||
if pos(CygDrivePrefix+'/',st)=1 then
|
||||
st:=st[Length(CygdrivePrefix)+2]+':\'+copy(st,length(CygdrivePrefix)+4,length(st));
|
||||
{$endif NODEBUG}
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{ support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
|
||||
for i:=Length(st) downto 2 do
|
||||
if (st[i]=' ') and (st[i-1]='\') then
|
||||
@ -762,14 +762,14 @@ begin
|
||||
else
|
||||
begin
|
||||
{$endif SUPPORT_REMOTE}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
{ Run the debugge in another console }
|
||||
if DebuggeeTTY<>'' then
|
||||
Command('set new-console on')
|
||||
else
|
||||
Command('set new-console off');
|
||||
NoSwitch:=DebuggeeTTY<>'';
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
{ Run the debuggee in another tty }
|
||||
if DebuggeeTTY <> '' then
|
||||
@ -1261,17 +1261,17 @@ begin
|
||||
end;
|
||||
{ In case we have something that the compiler touched }
|
||||
AskToReloadAllModifiedFiles;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
main_pid_valid:=false;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
end;
|
||||
|
||||
|
||||
procedure TDebugController.DoDebuggerScreen;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
IdeMode : DWord;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
begin
|
||||
if NoSwitch then
|
||||
begin
|
||||
@ -1283,7 +1283,7 @@ begin
|
||||
Message(Application,evBroadcast,cmDebuggerStopped,pointer(ptrint(RunCount)));
|
||||
PopStatus;
|
||||
end;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if NoSwitch then
|
||||
begin
|
||||
{ Ctrl-C as normal char }
|
||||
@ -1292,16 +1292,16 @@ begin
|
||||
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
|
||||
end;
|
||||
ChangeDebuggeeWindowTitleTo(Stopped_State);
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
end;
|
||||
|
||||
|
||||
procedure TDebugController.DoUserScreen;
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
IdeMode : DWord;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
begin
|
||||
Inc(RunCount);
|
||||
if NoSwitch then
|
||||
@ -1321,7 +1321,7 @@ begin
|
||||
PushStatus(msg_runningprogram);
|
||||
IDEApp.ShowUserScreen;
|
||||
end;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if NoSwitch then
|
||||
begin
|
||||
{ Ctrl-C as interrupt }
|
||||
@ -1330,7 +1330,7 @@ begin
|
||||
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
|
||||
end;
|
||||
ChangeDebuggeeWindowTitleTo(Running_State);
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
end;
|
||||
|
||||
{$endif NODEBUG}
|
||||
|
@ -287,9 +287,9 @@ begin
|
||||
if (StartupOptions and soHeapMonitor)=0 then HeapView^.Hide;
|
||||
Insert(HeapView);
|
||||
Drivers.ShowMouse;
|
||||
{$ifdef win32}
|
||||
// Win32ShowMouse;
|
||||
{$endif win32}
|
||||
{$ifdef Windows}
|
||||
// WindowsShowMouse;
|
||||
{$endif Windows}
|
||||
end;
|
||||
|
||||
procedure TIDEApp.InitDesktop;
|
||||
@ -907,35 +907,35 @@ begin
|
||||
{$ifndef go32v2}
|
||||
InitScreen;
|
||||
{$endif ndef go32v2}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
{ write the empty screen to dummy console handle }
|
||||
UpdateScreen(true);
|
||||
{$endif ndef win32}
|
||||
{$endif ndef Windows}
|
||||
InitEvents;
|
||||
InitSysError;
|
||||
CurDirChanged;
|
||||
{$ifndef win32}
|
||||
{$ifndef Windows}
|
||||
Message(Application,evBroadcast,cmUpdate,nil);
|
||||
{$endif win32}
|
||||
{$ifdef win32}
|
||||
// Win32ShowMouse;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Windows}
|
||||
// WindowsShowMouse;
|
||||
{$endif Windows}
|
||||
|
||||
if Assigned(UserScreen) then
|
||||
UserScreen^.SwitchBackToIDEScreen;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
{ This message was sent when the VideoBuffer was smaller
|
||||
than was the IdeApp thought => writes to random memory and random crashes... PM }
|
||||
Message(Application,evBroadcast,cmUpdate,nil);
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
SetKnownKeys;
|
||||
{$endif Unix}
|
||||
{$ifndef win32}
|
||||
{$ifndef Windows}
|
||||
{$ifndef go32v2}
|
||||
UpdateScreen(true);
|
||||
{$endif go32v2}
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
end;
|
||||
|
||||
function TIDEApp.AutoSave: boolean;
|
||||
|
@ -95,7 +95,7 @@ begin
|
||||
GetDir(DriveNumber,StoreDir2);
|
||||
{$ifndef FPC}
|
||||
ChDir(Copy(FileDir,1,2));
|
||||
{ sets InOutRes in win32 PM }
|
||||
{ sets InOutRes in Windows PM }
|
||||
{$endif not FPC}
|
||||
end;
|
||||
if (FileDir<>'') and ExistsDir(FileDir) then
|
||||
|
@ -435,7 +435,7 @@ begin
|
||||
LibLinkerSwitches^.SetCurrSel(RB2^.Value);
|
||||
OtherLinkerSwitches^.SetBooleanItem(1,CB2^.Mark(0));
|
||||
if LibLinkerSwitches^.GetCurrSelParam='X' then
|
||||
if CompareText(TargetSwitches^.GetCurrSelParam,'win32')=0 then
|
||||
if CompareText(TargetSwitches^.GetCurrSelParam,'Windows')=0 then
|
||||
if CompareText(AsmOutputSwitches^.GetCurrSelParam,'pecoff')<>0 then
|
||||
if ConfirmBox(
|
||||
FormatStrStr3(msg_xmustbesettoyforz_doyouwanttochangethis,
|
||||
@ -453,24 +453,24 @@ var R,R2,R3: TRect;
|
||||
D: PCenterDialog;
|
||||
RB,RB2 : PRadioButtons;
|
||||
CBStrip: PCheckBoxes;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
CB2: PCheckBoxes;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
IL: PEditorInputLine;
|
||||
{$endif Unix}
|
||||
L,I: longint;
|
||||
Items: PSItem;
|
||||
const
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
OtherFieldLines = 3;
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef Unix}
|
||||
OtherFieldLines = 3;
|
||||
{$else not Unix}
|
||||
OtherFieldLines = 0;
|
||||
{$endif Unix}
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
begin
|
||||
R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+1+2
|
||||
+ProfileInfoSwitches^.ItemCount+2+OtherFieldLines);
|
||||
@ -510,7 +510,7 @@ begin
|
||||
R2.Move(0,-1); R2.B.Y:=R2.A.Y+1;
|
||||
Insert(New(PLabel, Init(R2, label_debugger_profileswitches, RB2)));
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
R2.Move(0,ProfileInfoSwitches^.ItemCount+3);
|
||||
New(CB2,Init(R2,NewSItem(label_debugger_useanotherconsole, nil)));
|
||||
Insert(CB2);
|
||||
@ -521,7 +521,7 @@ begin
|
||||
CB2^.SetData(L);
|
||||
R2.Move(0,-1);
|
||||
Insert(New(PLabel, Init(R2,label_debugger_redirection, CB2)));
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
R2.Move(0,ProfileInfoSwitches^.ItemCount+3);
|
||||
New(IL, Init(R2, 255));
|
||||
@ -529,7 +529,7 @@ begin
|
||||
Insert(IL);
|
||||
R2.Move(0,-1);
|
||||
Insert(New(PLabel, Init(R2,label_debugger_useanothertty, IL)));
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
end;
|
||||
InsertButtons(D);
|
||||
RB^.Select;
|
||||
@ -538,12 +538,12 @@ begin
|
||||
DebugInfoSwitches^.SetCurrSel(RB^.Value);
|
||||
ProfileInfoSwitches^.SetCurrSel(RB2^.Value);
|
||||
OtherLinkerSwitches^.SetBooleanItem(0,CBStrip^.Mark(0));
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if CB2^.value<>0 then
|
||||
DebuggeeTTY:='on'
|
||||
else
|
||||
DebuggeeTTY:='';
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
DebuggeeTTY:=IL^.Data^;
|
||||
{$endif Unix}
|
||||
|
104
ide/fpredir.pas
104
ide/fpredir.pas
@ -33,7 +33,7 @@ Interface
|
||||
{$ifdef OS2}
|
||||
{$define shell_implemented}
|
||||
{$endif}
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
{$define implemented}
|
||||
{$endif}
|
||||
{$ifdef linux}
|
||||
@ -96,9 +96,9 @@ Uses
|
||||
{$ifdef netware_clib}
|
||||
nwserv,
|
||||
{$endif netware_clib}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
windows,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef unix}
|
||||
{$ifdef ver1_0}
|
||||
linux,
|
||||
@ -188,13 +188,13 @@ end;
|
||||
|
||||
{$ifdef TP}
|
||||
|
||||
{$ifndef win32}
|
||||
{$ifndef Windows}
|
||||
const
|
||||
UnusedHandle = -1;
|
||||
StdInputHandle = 0;
|
||||
StdOutputHandle = 1;
|
||||
StdErrorHandle = 2;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
|
||||
Type
|
||||
PtrRec = packed record
|
||||
@ -282,7 +282,7 @@ end;
|
||||
|
||||
{$endif def go32v2}
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
Function {$ifdef ver1_0}fdclose{$else}fpclose{$endif} (Handle : Longint) : boolean;
|
||||
begin
|
||||
{ Do we need this ?? }
|
||||
@ -394,9 +394,9 @@ function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
|
||||
ChangeRedirOut:=True;
|
||||
OutRedirDisabled:=False;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if SetStdHandle(Std_Output_Handle,FileRec(FOUT^).Handle) then
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}
|
||||
dup(StdOutputHandle,TempHOut);
|
||||
dup2(FileRec(FOUT^).Handle,StdOutputHandle);
|
||||
@ -406,7 +406,7 @@ function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
|
||||
{$endif}
|
||||
if (TempHOut<>UnusedHandle) and
|
||||
(StdOutputHandle<>UnusedHandle) then
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
begin
|
||||
ChangeRedirOut:=True;
|
||||
OutRedirDisabled:=False;
|
||||
@ -432,9 +432,9 @@ function ChangeRedirIn(Const Redir : String) : Boolean;
|
||||
ChangeRedirIn:=True;
|
||||
InRedirDisabled:=False;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if SetStdHandle(Std_Input_Handle,FileRec(FIN^).Handle) then
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}
|
||||
dup(StdInputHandle,TempHIn);
|
||||
dup2(FileRec(FIn^).Handle,StdInputHandle);
|
||||
@ -444,7 +444,7 @@ function ChangeRedirIn(Const Redir : String) : Boolean;
|
||||
{$endif}
|
||||
if (TempHIn<>UnusedHandle) and
|
||||
(StdInputHandle<>UnusedHandle) then
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
begin
|
||||
ChangeRedirIn:=True;
|
||||
InRedirDisabled:=False;
|
||||
@ -474,9 +474,9 @@ function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolea
|
||||
ChangeRedirError:=True;
|
||||
ErrorRedirDisabled:=False;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
if SetStdHandle(Std_Error_Handle,FileRec(FERR^).Handle) then
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}
|
||||
dup(StdErrorHandle,TempHError);
|
||||
dup2(FileRec(FERR^).Handle,StdErrorHandle);
|
||||
@ -486,7 +486,7 @@ function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolea
|
||||
{$endif}
|
||||
if (TempHError<>UnusedHandle) and
|
||||
(StdErrorHandle<>UnusedHandle) then
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
begin
|
||||
ChangeRedirError:=True;
|
||||
ErrorRedirDisabled:=False;
|
||||
@ -538,11 +538,11 @@ end;
|
||||
Handles^[StdOutputHandle]:=OldHandleOut;
|
||||
OldHandleOut:=StdOutputHandle;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Output_Handle,StdOutputHandle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHOut,StdOutputHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif FPC}
|
||||
Close (FOUT^);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}(TempHOut);
|
||||
@ -559,11 +559,11 @@ end;
|
||||
Handles^[StdInputHandle]:=OldHandleIn;
|
||||
OldHandleIn:=StdInputHandle;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Input_Handle,StdInputHandle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHIn,StdInputHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
Close (FIn^);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}(TempHIn);
|
||||
@ -580,11 +580,11 @@ end;
|
||||
{$ifndef FPC}
|
||||
Handles^[StdInputHandle]:=OldHandleIn;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Input_Handle,StdInputHandle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHIn,StdInputHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
InRedirDisabled:=True;
|
||||
end;
|
||||
@ -600,11 +600,11 @@ end;
|
||||
Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
|
||||
Handles^[StdInputHandle]:=Handles^[FileRec (FIn^).Handle];
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Input_Handle,FileRec(FIn^).Handle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FIn^).Handle,StdInputHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
InRedirDisabled:=False;
|
||||
end;
|
||||
@ -619,11 +619,11 @@ end;
|
||||
{$ifndef FPC}
|
||||
Handles^[StdOutputHandle]:=OldHandleOut;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Output_Handle,StdOutputHandle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHOut,StdOutputHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
OutRedirDisabled:=True;
|
||||
end;
|
||||
@ -639,11 +639,11 @@ end;
|
||||
Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
|
||||
Handles^[StdOutputHandle]:=Handles^[FileRec (FOut^).Handle];
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Output_Handle,FileRec(FOut^).Handle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FOut^).Handle,StdOutputHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
OutRedirDisabled:=False;
|
||||
end;
|
||||
@ -658,11 +658,11 @@ end;
|
||||
Handles^[StdErrorHandle]:=OldHandleError;
|
||||
OldHandleError:=StdErrorHandle;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Error_Handle,StdErrorHandle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHError,StdErrorHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
Close (FERR^);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}(TempHError);
|
||||
@ -679,11 +679,11 @@ end;
|
||||
{$ifndef FPC}
|
||||
Handles^[StdErrorHandle]:=OldHandleError;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Error_Handle,StdErrorHandle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHError,StdErrorHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
ErrorRedirDisabled:=True;
|
||||
end;
|
||||
@ -699,11 +699,11 @@ end;
|
||||
Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
|
||||
Handles^[StdErrorHandle]:=Handles^[FileRec (FErr^).Handle];
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Error_Handle,FileRec(FErr^).Handle);
|
||||
{$else not win32}
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FERR^).Handle,StdErrorHandle);
|
||||
{$endif not win32}
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
ErrorRedirDisabled:=False;
|
||||
end;
|
||||
@ -711,10 +711,10 @@ end;
|
||||
{............................................................................}
|
||||
|
||||
function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
mode : word;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
Begin
|
||||
RedirErrorOut:=0; RedirErrorIn:=0; RedirErrorError:=0;
|
||||
ExecuteResult:=0;
|
||||
@ -732,12 +732,12 @@ Begin
|
||||
ExecuteRedir:=(IOStatus=0) and (RedirErrorOut=0) and
|
||||
(RedirErrorIn=0) and (RedirErrorError=0) and
|
||||
(ExecuteResult=0);
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
// reenable mouse events
|
||||
GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @mode);
|
||||
mode:=mode or ENABLE_MOUSE_INPUT;
|
||||
SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), mode);
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
End;
|
||||
|
||||
{............................................................................}
|
||||
@ -948,10 +948,10 @@ end;
|
||||
{............................................................................}
|
||||
|
||||
procedure DosExecute(ProgName, ComLine : String);
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
StoreInherit : BOOL;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
|
||||
Begin
|
||||
{$IfDef MsDos}
|
||||
@ -977,10 +977,10 @@ end;
|
||||
end;
|
||||
{$endif}
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
StoreInherit:=ExecInheritsHandles;
|
||||
ExecInheritsHandles:=true;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
DosError:=0;
|
||||
If UseComSpec then
|
||||
Dos.Exec (Getenv('COMSPEC'),'/C '+MaybeQuoted(FixPath(progname))+' '+Comline)
|
||||
@ -991,9 +991,9 @@ end;
|
||||
else
|
||||
DosError:=2;
|
||||
end;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
ExecInheritsHandles:=StoreInherit;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
IOStatus:=DosError;
|
||||
ExecuteResult:=DosExitCode;
|
||||
{$endif}
|
||||
|
@ -20,9 +20,9 @@ end.
|
||||
{$else NODEBUG}
|
||||
interface
|
||||
uses
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
Windows,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
Objects,Dialogs,Drivers,Views,
|
||||
FPViews;
|
||||
|
||||
@ -342,7 +342,7 @@ Const
|
||||
rs.esp:=v
|
||||
else if reg='ebp' then
|
||||
rs.ebp:=v
|
||||
{ under win32 flags are on a register named ps !! PM }
|
||||
{ under Windows flags are on a register named ps !! PM }
|
||||
else if (reg='eflags') or (reg='ps') then
|
||||
rs.eflags:=v
|
||||
else if reg='cs' then
|
||||
|
@ -18,9 +18,9 @@ unit FPUsrScr;
|
||||
interface
|
||||
|
||||
uses
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
windows,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef Unix}
|
||||
{$ifdef VER1_0}
|
||||
linux,
|
||||
@ -194,9 +194,9 @@ type
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$ifdef win32}
|
||||
PWin32Screen = ^TWin32Screen;
|
||||
TWin32Screen = object(TScreen)
|
||||
{$ifdef Windows}
|
||||
PWindowsScreen = ^TWindowsScreen;
|
||||
TWindowsScreen = object(TScreen)
|
||||
constructor Init;
|
||||
destructor Done; virtual;
|
||||
public
|
||||
@ -975,10 +975,10 @@ end;
|
||||
{$endif}
|
||||
|
||||
{****************************************************************************
|
||||
TWin32Screen
|
||||
TWindowsScreen
|
||||
****************************************************************************}
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
|
||||
procedure UpdateFileHandles;
|
||||
begin
|
||||
@ -990,7 +990,7 @@ begin
|
||||
{TextRec(StdErr).Handle:=StdErrorHandle;}
|
||||
end;
|
||||
|
||||
constructor TWin32Screen.Init;
|
||||
constructor TWindowsScreen.Init;
|
||||
var
|
||||
SecurityAttr : Security_attributes;
|
||||
BigWin : Coord;
|
||||
@ -1016,9 +1016,9 @@ begin
|
||||
GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
|
||||
IdeMode:=ConsoleMode;
|
||||
{$ifdef debug}
|
||||
{define win32bigwin}
|
||||
{define Windowsbigwin}
|
||||
{$endif debug}
|
||||
{$ifdef win32bigwin}
|
||||
{$ifdef Windowsbigwin}
|
||||
GetConsoleScreenBufferInfo(StartScreenBufferHandle,
|
||||
@ConsoleScreenBufferInfo);
|
||||
BigWin.X:=ConsoleScreenBufferInfo.dwSize.X;
|
||||
@ -1030,7 +1030,7 @@ begin
|
||||
res:=SetConsoleScreenBufferSize(StartScreenBufferHandle,BigWin);
|
||||
if not res then
|
||||
error:=GetLastError;
|
||||
{$endif win32bigwin}
|
||||
{$endif Windowsbigwin}
|
||||
GetConsoleScreenBufferInfo(StartScreenBufferHandle,
|
||||
@ConsoleScreenBufferInfo);
|
||||
{ make sure that the IDE Screen Handle has the maximum display size
|
||||
@ -1046,7 +1046,7 @@ begin
|
||||
SwitchBackToIDEScreen;
|
||||
end;
|
||||
|
||||
destructor TWin32Screen.Done;
|
||||
destructor TWindowsScreen.Done;
|
||||
begin
|
||||
{ copy the Dos buffer content into the original ScreenBuffer
|
||||
which remains the startup std_output_handle PM }
|
||||
@ -1060,7 +1060,7 @@ begin
|
||||
inherited Done;
|
||||
end;
|
||||
|
||||
function TWin32Screen.GetWidth: integer;
|
||||
function TWindowsScreen.GetWidth: integer;
|
||||
var
|
||||
ConsoleScreenBufferInfo : Console_screen_buffer_info;
|
||||
begin
|
||||
@ -1069,7 +1069,7 @@ begin
|
||||
GetWidth:=ConsoleScreenBufferInfo.dwSize.X;
|
||||
end;
|
||||
|
||||
function TWin32Screen.GetHeight: integer;
|
||||
function TWindowsScreen.GetHeight: integer;
|
||||
var
|
||||
ConsoleScreenBufferInfo : Console_screen_buffer_info;
|
||||
begin
|
||||
@ -1078,7 +1078,7 @@ begin
|
||||
GetHeight:=ConsoleScreenBufferInfo.dwSize.Y;
|
||||
end;
|
||||
|
||||
function TWin32Screen.CanScroll : boolean;
|
||||
function TWindowsScreen.CanScroll : boolean;
|
||||
var
|
||||
ConsoleScreenBufferInfo : Console_screen_buffer_info;
|
||||
BufferLines : longint;
|
||||
@ -1092,7 +1092,7 @@ begin
|
||||
CanScroll:=(BufferLines>WindowLines);
|
||||
end;
|
||||
|
||||
function TWin32Screen.Scroll(i : integer) : integer;
|
||||
function TWindowsScreen.Scroll(i : integer) : integer;
|
||||
var
|
||||
ConsoleScreenBufferInfo : Console_screen_buffer_info;
|
||||
ConsoleWindow : Small_rect;
|
||||
@ -1116,7 +1116,7 @@ begin
|
||||
Scroll:=0;
|
||||
end;
|
||||
|
||||
procedure TWin32Screen.GetLine(Line: integer; var Text, Attr: string);
|
||||
procedure TWindowsScreen.GetLine(Line: integer; var Text, Attr: string);
|
||||
type
|
||||
CharInfoArray = Array [0..255] of Char_Info;
|
||||
var
|
||||
@ -1153,7 +1153,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TWin32Screen.GetCursorPos(var P: TPoint);
|
||||
procedure TWindowsScreen.GetCursorPos(var P: TPoint);
|
||||
var
|
||||
ConsoleScreenBufferInfo : Console_screen_buffer_info;
|
||||
begin
|
||||
@ -1163,7 +1163,7 @@ begin
|
||||
P.Y:=ConsoleScreenBufferInfo.dwCursorPosition.Y;
|
||||
end;
|
||||
|
||||
procedure TWin32Screen.BufferCopy(Src, Dest : THandle);
|
||||
procedure TWindowsScreen.BufferCopy(Src, Dest : THandle);
|
||||
type
|
||||
CharInfoArray = Array [0..256*255-1] of Char_Info;
|
||||
var
|
||||
@ -1243,7 +1243,7 @@ begin
|
||||
SetConsoleCursorPosition(Dest, ConsoleScreenBufferInfo.dwCursorPosition);
|
||||
end;
|
||||
|
||||
procedure TWin32Screen.Capture;
|
||||
procedure TWindowsScreen.Capture;
|
||||
begin
|
||||
{if StartScreenBufferHandle=IdeScreenBufferHandle then
|
||||
BufferCopy(IDEScreenBufferHandle,DosScreenBufferHandle)
|
||||
@ -1252,14 +1252,14 @@ begin
|
||||
SaveConsoleScreen;
|
||||
end;
|
||||
|
||||
procedure TWin32Screen.Restore;
|
||||
procedure TWindowsScreen.Restore;
|
||||
begin
|
||||
SwitchToConsoleScreen;
|
||||
end;
|
||||
|
||||
{ dummy for win32 as the Buffer screen
|
||||
{ dummy for Windows as the Buffer screen
|
||||
do hold all the info }
|
||||
procedure TWin32Screen.SaveIDEScreen;
|
||||
procedure TWindowsScreen.SaveIDEScreen;
|
||||
begin
|
||||
IdeScreenMode:=ScreenMode;
|
||||
GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
|
||||
@ -1268,9 +1268,9 @@ begin
|
||||
UpdateFileHandles;
|
||||
end;
|
||||
|
||||
{ dummy for win32 as the Buffer screen
|
||||
{ dummy for Windows as the Buffer screen
|
||||
do hold all the info }
|
||||
procedure TWin32Screen.SaveConsoleScreen;
|
||||
procedure TWindowsScreen.SaveConsoleScreen;
|
||||
begin
|
||||
GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
|
||||
{ set the dummy buffer as active already now PM }
|
||||
@ -1278,7 +1278,7 @@ begin
|
||||
UpdateFileHandles;
|
||||
end;
|
||||
|
||||
procedure TWin32Screen.SwitchToConsoleScreen;
|
||||
procedure TWindowsScreen.SwitchToConsoleScreen;
|
||||
begin
|
||||
SetConsoleActiveScreenBuffer(DosScreenBufferHandle);
|
||||
SetStdHandle(cardinal(Std_Output_Handle),DosScreenBufferHandle);
|
||||
@ -1287,7 +1287,7 @@ begin
|
||||
IDEActive:=false;
|
||||
end;
|
||||
|
||||
procedure TWin32Screen.SwitchBackToIDEScreen;
|
||||
procedure TWindowsScreen.SwitchBackToIDEScreen;
|
||||
var
|
||||
ConsoleScreenBufferInfo : Console_screen_buffer_info;
|
||||
WindowPos : Small_rect;
|
||||
@ -1480,8 +1480,8 @@ begin
|
||||
UserScreen:=New(PLinuxScreen, Init);
|
||||
{$else}
|
||||
|
||||
{$ifdef Win32}
|
||||
UserScreen:=New(PWin32Screen, Init);
|
||||
{$ifdef Windows}
|
||||
UserScreen:=New(PWindowsScreen, Init);
|
||||
{$else}
|
||||
{$ifdef OS2}
|
||||
UserScreen:=New(POS2Screen, Init);
|
||||
@ -1492,7 +1492,7 @@ begin
|
||||
UserScreen:=New(PScreen, Init);
|
||||
{$endif netwlibc}
|
||||
{$endif OS2}
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
{$endif Unix}
|
||||
{$endif Dos}
|
||||
end;
|
||||
|
@ -70,11 +70,13 @@
|
||||
{$define HasSysMsgUnit}
|
||||
{$endif}
|
||||
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
{$undef SUPPORTVESA}
|
||||
{$define SUPPORTREDIR}
|
||||
{$define WinClipSupported}
|
||||
{$define HasSignal}
|
||||
{$ifdef win32}
|
||||
{$define HasSignal}
|
||||
{$endif}
|
||||
{$define FSCaseInsensitive}
|
||||
{$define HasSysMsgUnit}
|
||||
{$endif}
|
||||
|
@ -32,9 +32,9 @@ interface
|
||||
{$ifdef UNIX}
|
||||
TermIos
|
||||
{$endif UNIX}
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
dword
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
{$ifdef go32v2}
|
||||
longint
|
||||
{$endif go32v2}
|
||||
@ -46,19 +46,19 @@ Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode);
|
||||
Procedure RestoreConsoleMode(const ConsoleMode : TConsoleMode);
|
||||
|
||||
implementation
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
uses
|
||||
windows;
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
|
||||
Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode);
|
||||
Begin
|
||||
{$ifdef UNIX}
|
||||
TCGetAttr(1,ConsoleMode);
|
||||
{$endif UNIX}
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
{$ifdef go32v2}
|
||||
ConsoleMode:=0;
|
||||
{$endif go32v2}
|
||||
@ -72,9 +72,9 @@ Begin
|
||||
{$ifdef UNIX}
|
||||
TCSetAttr(1,TCSANOW,ConsoleMode);
|
||||
{$endif UNIX}
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
{$ifdef go32v2}
|
||||
{$endif go32v2}
|
||||
End;
|
||||
|
@ -18,11 +18,11 @@ unit WHelp;
|
||||
interface
|
||||
|
||||
uses
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
{ placed here to avoid TRect to be found in windows unit
|
||||
for win32 target whereas its found in objects unit for other targets PM }
|
||||
for Windows target whereas its found in objects unit for other targets PM }
|
||||
windows,
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
Objects,
|
||||
WUtils;
|
||||
|
||||
@ -318,11 +318,11 @@ Function GetDosTicks:longint; { returns ticks at 18.2 Hz, just like DOS }
|
||||
{$endif}
|
||||
end;
|
||||
{$endif Unix}
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
begin
|
||||
GetDosTicks:=(Windows.GetTickCount*5484) div 100;
|
||||
end;
|
||||
{$endif Win32}
|
||||
{$endif Windows}
|
||||
{$ifdef go32v2}
|
||||
begin
|
||||
GetDosTicks:=MemL[$40:$6c];
|
||||
|
@ -41,10 +41,10 @@ implementation
|
||||
dos;
|
||||
{$endif DOS}
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
uses
|
||||
strings,windows;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
|
||||
{$ifdef DOS}
|
||||
function WinClipboardSupported : boolean;
|
||||
@ -94,7 +94,7 @@ begin
|
||||
end;
|
||||
{$endif DOS}
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
function WinClipboardSupported : boolean;
|
||||
begin
|
||||
WinClipboardSupported:=true;
|
||||
@ -127,7 +127,7 @@ begin
|
||||
else
|
||||
InternGetDataSize:=0;
|
||||
end;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
|
||||
|
||||
function GetTextWinClipboardSize : longint;
|
||||
@ -143,10 +143,10 @@ var
|
||||
r : Registers;
|
||||
M : MemPtr;
|
||||
{$endif DOS}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
h : HGlobal;
|
||||
pp : pchar;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
begin
|
||||
p:=nil;
|
||||
GetTextWinClipBoardData:=False;
|
||||
@ -169,7 +169,7 @@ begin
|
||||
RealIntr($2F,r);
|
||||
GetTextWinClipBoardData:=(r.ax<>0);
|
||||
{$endif DOS}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
h:=GetClipboardData(CF_OEMTEXT);
|
||||
if h<>0 then
|
||||
begin
|
||||
@ -180,7 +180,7 @@ begin
|
||||
GlobalUnlock(h);
|
||||
end;
|
||||
GetTextWinClipBoardData:=h<>0;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
CloseWinClipBoard;
|
||||
{$ifdef DOS}
|
||||
M.MoveDataFrom(l,P^);
|
||||
@ -194,11 +194,11 @@ var
|
||||
r : Registers;
|
||||
M : MemPtr;
|
||||
{$endif DOS}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
h : HGlobal;
|
||||
pp : pchar;
|
||||
res : boolean;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
begin
|
||||
SetTextWinClipBoardData:=False;
|
||||
if (l=0) or (l>65520) then
|
||||
@ -226,7 +226,7 @@ begin
|
||||
RealIntr($2F,r);
|
||||
FreeDosMem(M);
|
||||
{$endif DOS}
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
|
||||
pp:=pchar(GlobalLock(h));
|
||||
move(p^,pp^,l+1);
|
||||
@ -238,7 +238,7 @@ begin
|
||||
SetClipboardData(CF_TEXT,h);
|
||||
GlobalUnlock(h);
|
||||
SetTextWinClipBoardData:=res;
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
CloseWinClipBoard;
|
||||
end;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
This file is part of the Free Pascal Integrated Development Environment
|
||||
Copyright (c) 2000 by Pierre Muller
|
||||
|
||||
Win32 specific debugger routines for the IDE
|
||||
Windows specific debugger routines for the IDE
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
@ -20,9 +20,9 @@ interface
|
||||
|
||||
|
||||
uses
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
windows,
|
||||
{$endif win32}
|
||||
{$endif Windows}
|
||||
{$ifdef netwlibc}
|
||||
libc,
|
||||
{$else}
|
||||
@ -628,7 +628,7 @@ begin
|
||||
end;
|
||||
|
||||
function GetShortName(const n:string):string;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
hs,hs2 : string;
|
||||
i : longint;
|
||||
@ -639,7 +639,7 @@ var
|
||||
{$endif}
|
||||
begin
|
||||
GetShortName:=n;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
hs:=n+#0;
|
||||
i:=Windows.GetShortPathName(@hs[1],@hs2[1],high(hs2));
|
||||
if (i>0) and (i<=high(hs2)) then
|
||||
@ -656,7 +656,7 @@ begin
|
||||
end;
|
||||
|
||||
function GetLongName(const n:string):string;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
hs : string;
|
||||
hs2 : Array [0..255] of char;
|
||||
@ -669,7 +669,7 @@ var
|
||||
{$endif}
|
||||
begin
|
||||
GetLongName:=n;
|
||||
{$ifdef win32}
|
||||
{$ifdef Windows}
|
||||
hs:=n+#0;
|
||||
i:=Windows.GetFullPathName(@hs[1],256,hs2,j);
|
||||
if (i>0) and (i<=high(hs)) then
|
||||
@ -1345,7 +1345,7 @@ begin
|
||||
DosSleep (5);
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ifdef Win32}
|
||||
{$ifdef Windows}
|
||||
begin
|
||||
{ if the return value of this call is non zero then
|
||||
it means that a ReadFileEx or WriteFileEx have completed
|
||||
|
Loading…
Reference in New Issue
Block a user