new merge

This commit is contained in:
pierre 2000-11-15 00:14:10 +00:00
parent a257f878db
commit 30071b6a3d
21 changed files with 370 additions and 144 deletions

View File

@ -20,6 +20,19 @@ packages=api fv gdbint
[libs]
libgcc=1
[presettings]
ifeq ($(OS_TARGET),linux)
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
override FPCOPT+=-dUNIX
endif
endif
ifeq ($(OS_TARGET),freebsd)
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
override FPCOPT+=-dUNIX
endif
endif
[postsettings]
# when making a full version include the compiler

View File

@ -18,7 +18,7 @@ interface
{$i globdir.inc}
{$ifdef linux}
{$ifdef Unix}
uses
linux;
{$endif}
@ -52,7 +52,7 @@ uses
{$ifdef HasSignal}
{$ifdef linux}
{$ifdef Unix}
Procedure CatchSignal(Sig : Integer);cdecl;
{$else}
Function CatchSignal(Sig : longint):longint;
@ -122,7 +122,7 @@ begin
end;
end;
end;
{$ifndef linux}
{$ifndef Unix}
CatchSignal:=0;
{$endif}
end;
@ -145,7 +145,13 @@ end.
{
$Log$
Revision 1.2 2000-10-31 22:35:54 pierre
Revision 1.3 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.2 2000/11/14 09:23:55 marco
* Second batch
Revision 1.2 2000/10/31 22:35:54 pierre
* New big merge from fixes branch
Revision 1.1.2.1 2000/10/31 07:52:55 pierre
@ -182,4 +188,4 @@ end.
* empty file fixed
* fixed callback routines in fpdebug to have far for tp7
}
}

View File

@ -113,7 +113,7 @@ const
implementation
uses
{$ifdef linux}
{$ifdef Unix}
Linux,
{$endif}
{$ifdef go32v2}
@ -665,19 +665,27 @@ end;
DoCompile
****************************************************************************}
{ This function must return '' if
"Options|Directories|Exe and PPU directory" is empty }
function GetExePath: string;
var Path: string;
I: Sw_integer;
begin
Path:='.'+DirSep;
Path:='';
if DirectorySwitches<>nil then
with DirectorySwitches^ do
for I:=0 to ItemCount-1 do
begin
if Pos('EXE',KillTilde(ItemName(I)))>0 then
begin Path:=GetStringItem(I); Break; end;
if ItemParam(I)='-FE' then
begin
Path:=GetStringItem(I);
Break;
end;
end;
GetExePath:=CompleteDir(FExpand(Path));
if Path<>'' then
GetExePath:=CompleteDir(FExpand(Path))
else
GetExePath:='';
end;
function GetMainFile: string;
@ -752,7 +760,7 @@ begin
if ((DesktopFileFlags and dfSymbolInformation)<>0) then
WriteSymbolsFile(BrowserName);
{ MainFile:=FixFileName(FExpand(FileName));}
SetStatus('Preparing to compile...');
SetStatus('Preparing to compile...'+NameOf(MainFile));
If GetEXEPath<>'' then
EXEFile:=FixFileName(GetEXEPath+NameOf(MainFile)+ExeExt)
else
@ -847,7 +855,7 @@ begin
ChangeRedirOut(FPOutFileName,false);
ChangeRedirError(FPErrFileName,false);
{$endif}
{$ifdef linux}
{$ifdef Unix}
Shell(GetExePath+PpasFile+source_os.scriptext);
Error:=LinuxError;
{$else}
@ -1105,7 +1113,16 @@ end;
end.
{
$Log$
Revision 1.6 2000-11-13 17:37:41 pierre
Revision 1.7 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.11 2000/11/14 17:40:02 pierre
* fix the linking problem in another directory
Revision 1.1.2.10 2000/11/14 09:23:55 marco
* Second batch
Revision 1.6 2000/11/13 17:37:41 pierre
merges from fixes branch
Revision 1.1.2.9 2000/11/06 16:55:48 pierre

View File

@ -348,9 +348,9 @@ uses
{$ifdef win32}
Windebug,
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
Linux,FileCtrl,
{$endif linux}
{$endif Unix}
Systems,
FPString,FPVars,FPUtils,FPConst,FPSwitch,
FPIntf,FPCompil,FPIde,FPHelp,
@ -463,11 +463,11 @@ end;
{$endif}
function GDBFileName(st : string) : string;
{$ifndef Linux}
{$ifndef Unix}
var i : longint;
{$endif Linux}
{$endif Unix}
begin
{$ifdef Linux}
{$ifdef Unix}
GDBFileName:=st;
{$else}
{ should we also use / chars ? }
@ -604,7 +604,7 @@ begin
Command('set new-console off');
NoSwitch:=DebuggeeTTY<>'';
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
{ Run the debuggee in another tty }
if DebuggeeTTY <> '' then
begin
@ -616,7 +616,7 @@ begin
Command('tty '+TTYName(stdin));
NoSwitch := false;
end;
{$endif linux}
{$endif Unix}
{ Switch to user screen to get correct handles }
UserScreen;
inherited Run;
@ -808,7 +808,8 @@ begin
if fn='' then
Found:=false
else
Found:=IDEApp.OpenSearch(fn);
{ it is easier to handle with a * at the end }
Found:=IDEApp.OpenSearch(fn+'*');
Desktop^.Lock;
if not Found then
begin
@ -920,11 +921,11 @@ begin
Inc(RunCount);
if NoSwitch then
begin
{$ifdef linux}
{$ifdef Unix}
PushStatus(msg_runninginanotherwindow+DebuggeeTTY);
{$else not linux}
{$else not Unix}
PushStatus(msg_runninginanotherwindow);
{$endif linux}
{$endif Unix}
end
else
begin
@ -3374,7 +3375,16 @@ end.
{
$Log$
Revision 1.5 2000-11-13 17:37:41 pierre
Revision 1.6 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.10 2000/11/14 17:40:42 pierre
+ External linking now optional
Revision 1.1.2.9 2000/11/14 09:23:55 marco
* Second batch
Revision 1.5 2000/11/13 17:37:41 pierre
merges from fixes branch
Revision 1.1.2.8 2000/11/13 16:59:08 pierre

View File

@ -145,7 +145,7 @@ var
implementation
uses
{$ifdef linux}
{$ifdef Unix}
linux,
{$endif}
{$ifdef HasSignal}
@ -721,11 +721,11 @@ end;
procedure TIDEApp.ShowUserScreen;
begin
{$ifdef linux}
{$ifdef Unix}
{ We need to get the IDE screen's contents from the API's video buffer (JM) }
if assigned(userscreen) then
userscreen^.capture;
{$endif linux}
{$endif Unix}
DoneSysError;
DoneEvents;
DoneKeyboard;
@ -745,11 +745,11 @@ end;
procedure TIDEApp.ShowIDEScreen;
begin
{$ifndef linux}
{$ifndef Unix}
{ the video has to be initialized already for linux (JM) }
if Assigned(UserScreen) then
UserScreen^.SwitchBack;
{$endif linux}
{$endif Unix}
InitDosMem;
{$ifndef go32v2}
InitScreen;
@ -763,10 +763,10 @@ begin
InitSysError;
CurDirChanged;
Message(Application,evBroadcast,cmUpdate,nil);
{$ifdef linux}
{$ifdef Unix}
if Assigned(UserScreen) then
UserScreen^.SwitchBack;
{$endif linux}
{$endif Unix}
{$ifndef go32v2}
UpdateScreen(true);
{$endif go32v2}
@ -800,9 +800,9 @@ end;
function TIDEApp.DoExecute(ProgramPath, Params, InFile,OutFile: string; ExecType: TExecType): boolean;
var CanRun: boolean;
{$ifndef linux}
{$ifndef Unix}
PosExe: sw_integer;
{$endif linux}
{$endif Unix}
begin
SaveCancelled:=false;
CanRun:=AutoSave;
@ -825,25 +825,25 @@ begin
{ DO NOT use COMSPEC for exe files as the
ExitCode is lost in those cases PM }
{$ifndef linux}
{$ifndef Unix}
posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
{ if programpath was three char long => bug }
if (posexe>0) and (posexe=Length(ProgramPath)-3) then
begin
{$endif linux}
{$endif Unix}
if (InFile='') and (OutFile='') then
DosExecute(ProgramPath,Params)
else
ExecuteRedir(ProgramPath,Params,InFile,OutFile,'stderr');
{$ifndef linux}
{$ifndef Unix}
end
else if (InFile='') and (OutFile='') then
DosExecute(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params)
else
ExecuteRedir(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params,InFile,OutFile,'stderr');
{$endif linux}
{$endif Unix}
{$ifdef linux}
{$ifdef Unix}
if (DebuggeeTTY='') and (OutFile='') then
begin
Write(' Press any key to return to IDE');
@ -989,7 +989,7 @@ procedure TIDEApp.DosShell;
var
s : string;
begin
{$ifdef linux}
{$ifdef Unix}
s:=GetEnv('SHELL');
if s='' then
if ExistsFile('bin/sh') then
@ -1115,7 +1115,13 @@ end;
END.
{
$Log$
Revision 1.4 2000-10-31 22:35:54 pierre
Revision 1.5 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.12 2000/11/14 09:23:55 marco
* Second batch
Revision 1.4 2000/10/31 22:35:54 pierre
* New big merge from fixes branch
Revision 1.1.2.11 2000/10/18 21:53:27 pierre
@ -1499,4 +1505,4 @@ END.
+ options are now written/read
+ find and replace routines
}
}

View File

@ -25,6 +25,7 @@ procedure SetRunParameters(const Params: string);
{ Compile }
procedure Compile(const FileName, ConfigFile: string);
procedure SetPrimaryFile(const fn:string);
function LinkAfter : boolean;
implementation
@ -44,6 +45,11 @@ uses
var
RunParameters : string;
function LinkAfter : boolean;
begin
LinkAfter:=LinkAfterSwitches^.GetBooleanItem(0);
end;
function GetRunParameters: string;
begin
GetRunParameters:=RunParameters;
@ -85,8 +91,6 @@ begin
cmd:='@'+ConfigFile+' '+cmd;
if not UseExternalCompiler then
{$endif USE_EXTERNAL_COMPILER}
if LinkAfter then
cmd:=cmd+' -s';
{ Add the switches from the primary file }
if PrimaryFileSwitches<>'' then
cmd:=cmd+' '+PrimaryFileSwitches;
@ -212,7 +216,13 @@ end;
end.
{
$Log$
Revision 1.2 2000-11-13 17:37:42 pierre
Revision 1.3 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.2 2000/11/14 17:40:43 pierre
+ External linking now optional
Revision 1.2 2000/11/13 17:37:42 pierre
merges from fixes branch
Revision 1.1.2.1 2000/11/13 16:59:09 pierre

View File

@ -363,7 +363,8 @@ procedure TIDEApp.DoLinkerSwitch;
var R,R2: TRect;
D: PCenterDialog;
RB2: PRadioButtons;
I: longint;
CB : PCheckBoxes;
Count,I: longint;
Items: PSItem;
L: longint;
begin
@ -372,27 +373,26 @@ begin
with D^ do
begin
GetExtent(R); R.Grow(-3,-1);
{ R2.Copy(R); Inc(R2.A.Y); R2.B.Y:=R2.A.Y+GetEXEFormatCount; R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2;
Count:=LinkAfterSwitches^.ItemCount;
R2.Copy(R);
R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2 - 1;
Inc(R2.A.Y,1);
R2.B.Y:=R2.A.Y+Count;
Items:=nil;
for I:=GetEXEFormatCount downto 1 do
Items:=NewSItem(GetEXEFormatName(TEXEFormat(I)),Items);
New(RB1, Init(R2, Items));
Mask:=0; V:=1;
for I:=1 to GetEXEFormatCount do
begin
if IsEXEFormatAvailable(TEXEFormat(I)) then
Mask:=Mask or V;
V:=V shl 1;
end;
RB1^.SetButtonState($ffff,false);
RB1^.SetButtonState(Mask,true);
L:=ord(GetEXEFormat)-1;
RB1^.SetData(L);
Insert(RB1);
R2.Copy(R); R2.B.Y:=R2.A.Y+1;
Insert(New(PLabel, Init(R2, 'Output format', RB1)));}
for I:=Count-1 downto 0 do
Items:=NewSItem(LinkAfterSwitches^.ItemName(I), Items);
New(CB, Init(R2, Items));
for I:=0 to Count-1 do
if LinkAfterSwitches^.GetBooleanItem(I) then
CB^.Press(I);
Insert(CB);
Dec(R2.A.Y);
R2.B.Y:=R2.A.Y+1;
Insert(New(PLabel, Init(R2, label_compiler_linkafter, CB)));
R2.Copy(R); Inc(R2.A.Y); R2.B.Y:=R2.A.Y+LibLinkerSwitches^.ItemCount; R2.A.X:=R2.B.X-(R2.B.X-R2.A.X) div 2+1;
R2.Copy(R); Inc(R2.A.Y);
R2.B.Y:=R2.A.Y+LibLinkerSwitches^.ItemCount;
R2.A.X:=R2.B.X-(R2.B.X-R2.A.X) div 2+1;
Items:=nil;
for I:=LibLinkerSwitches^.ItemCount-1 downto 0 do
Items:=NewSItem(LibLinkerSwitches^.ItemName(I), Items);
@ -400,6 +400,7 @@ begin
L:=LibLinkerSwitches^.GetCurrSel;
RB2^.SetData(L);
Insert(RB2);
R2.Copy(R); R2.B.Y:=R2.A.Y+1; R2.A.X:=R2.B.X-(R2.B.X-R2.A.X) div 2+1;
Insert(New(PLabel, Init(R2, label_linker_preferredlibtype, RB2)));
end;
@ -416,6 +417,8 @@ begin
FormatStrStr3(msg_xmustbesettoyforz_doyouwanttochangethis,
label_compiler_assembleroutput,'pecoff','smartlinking'),nil,false)=cmYes then
AsmOutputSwitches^.SetCurrSelParam('pecoff');
for I:=0 to LinkAfterSwitches^.ItemCount-1 do
LinkAfterSwitches^.SetBooleanItem(I,CB^.Mark(I));
end;
Dispose(D, Done);
end;
@ -429,9 +432,9 @@ var R,R2,R3: TRect;
{$ifdef win32}
CB2: PCheckBoxes;
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
IL: PInputLine;
{$endif linux}
{$endif Unix}
IL2: PInputLine;
L,I: longint;
Items: PSItem;
@ -439,11 +442,11 @@ const
{$ifdef win32}
OtherFieldLines = 3;
{$else not win32}
{$ifdef linux}
{$ifdef Unix}
OtherFieldLines = 3;
{$else not linux}
{$else not Unix}
OtherFieldLines = 0;
{$endif linux}
{$endif Unix}
{$endif win32}
begin
R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+2
@ -497,7 +500,7 @@ begin
R2.Move(0,-1);
Insert(New(PLabel, Init(R2,label_debugger_redirection, CB2)));
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
R2.Move(0,4);
New(IL, Init(R2, 255));
IL^.Data^:=DebuggeeTTY;
@ -525,9 +528,9 @@ begin
else
DebuggeeTTY:='';
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
DebuggeeTTY:=IL^.Data^;
{$endif linux}
{$endif Unix}
end;
Dispose(D, Done);
end;
@ -1231,7 +1234,16 @@ end;
{
$Log$
Revision 1.3 2000-10-31 22:35:54 pierre
Revision 1.4 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.6 2000/11/14 17:40:43 pierre
+ External linking now optional
Revision 1.1.2.5 2000/11/14 09:40:35 marco
* Third batch renamefest
Revision 1.3 2000/10/31 22:35:54 pierre
* New big merge from fixes branch
Revision 1.1.2.4 2000/10/18 21:53:27 pierre
@ -1439,4 +1451,4 @@ end;
+ Switches are now written/read
+ find and replace routines
}
}

View File

@ -19,7 +19,7 @@ Unit FPRedir;
Interface
{$R-}
{$ifndef linux}
{$ifndef Unix}
{$S-}
{$endif}
@ -32,7 +32,7 @@ Interface
{$ifdef Win32}
{$define implemented}
{$endif}
{$ifdef linux}
{$ifdef Unix}
{$define implemented}
{$endif}
@ -76,9 +76,9 @@ Uses
{$ifdef win32}
windows,
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
linux,
{$endif linux}
{$endif Unix}
dos;
var
@ -125,7 +125,7 @@ Var
var
TempHOut, TempHIn,TempHError : longint;
{ For linux the following functions exist
{ For Unix the following functions exist
Function Dup(oldfile:longint;var newfile:longint):Boolean;
Function Dup2(oldfile,newfile:longint):Boolean;
Function fdClose(fd:longint):boolean;
@ -678,7 +678,7 @@ end;
{$EndIf MsDos}
SwapVectors;
{ Must use shell() for linux for the wildcard expansion (PFV) }
{$ifdef linux}
{$ifdef Unix}
IOStatus:=0;
ExecuteResult:=Shell(Progname+' '+Comline);
{ Signal that causes the stop of the shell }
@ -725,7 +725,13 @@ Begin
End.
{
$Log$
Revision 1.2 2000-10-31 22:35:54 pierre
Revision 1.3 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.2 2000/11/14 09:40:35 marco
* Third batch renamefest
Revision 1.2 2000/10/31 22:35:54 pierre
* New big merge from fixes branch
Revision 1.1.2.1 2000/10/04 13:29:59 pierre
@ -835,4 +841,4 @@ End.
* unit name of FPSwitches -> FPSwitch which is easier to use
* some fixes for tp7 compiling
}
}

View File

@ -510,6 +510,7 @@ const
label_compiler_runtimechecks = 'Run-time checks';
label_compiler_optimizations = 'Optimizations';
label_compiler_targetprocessor = 'Target processor';
label_compiler_linkafter = 'Linking stage';
label_compiler_verboseswitches = 'Verbose Switches';
label_compiler_browser = 'Browser';
label_compiler_assemblerreader = 'Assembler reader';
@ -794,6 +795,8 @@ const
opt_stripalldebugsymbols = '~S~trip all debug symbols from executable';
opt_gendebugsymbolinfo = 'Generate ~d~ebug symbol information';
opt_gensymbolandbacktraceinfo = 'Generate also backtrace ~l~ine information';
{ Link after options }
opt_linkafter = 'Call ~l~inker after';
{ Profiling options }
opt_noprofileinfo = '~N~o profile information';
opt_gprofinfo = 'Generate profile code for g~p~rof';
@ -981,9 +984,18 @@ const
{
$Log$
Revision 1.3 2000-10-06 22:58:59 pierre
Revision 1.4 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.7 2000/11/14 17:40:43 pierre
+ External linking now optional
Revision 1.3 2000/10/06 22:58:59 pierre
* fixes for linux GDB tty command (merged)
Revision 1.1.2.6 2000/10/06 22:52:36 pierre
* fixes for linux GDB tty command
Revision 1.2 2000/08/22 09:41:40 pierre
* first big merge from fixes branch
@ -1024,4 +1036,4 @@ const
* new set of Gabor changes: see fixes.txt
}
}

View File

@ -510,6 +510,7 @@ const
label_compiler_runtimechecks = 'Fut s-idejû ellenrzsek';
label_compiler_optimizations = 'Optimaliz ci¢k';
label_compiler_targetprocessor = 'Cl-processzor';
label_compiler_linkafter = 'Linking stage'; { NOT TRANSLATED }
label_compiler_verboseswitches = 'Verbose kapcsol¢k';
label_compiler_browser = 'Tall¢z¢';
label_compiler_assemblerreader = 'Assembler olvas¢';
@ -795,6 +796,8 @@ const
opt_stripalldebugsymbols = 'Debug szimb¢lumok elt vol¡t ~s~a';
opt_gendebugsymbolinfo = '~D~ebug szimb¢lum info gener l sa';
opt_gensymbolandbacktraceinfo = 'Backtrace sorinfom ci¢ gener ~l~ sa is';
{ Link after options }
opt_linkafter = 'Call ~l~inker after'; { NOT TRANSLATED }
{ Profiling options }
opt_noprofileinfo = '~N~incs profile inform ci¢';
opt_gprofinfo = 'Profile inf¢ gener l sa g~p~rof-hoz';
@ -983,9 +986,14 @@ const
{
$Log$
Revision 1.3 2000-10-31 22:35:55 pierre
* New big merge from fixes branch
Revision 1.4 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.7 2000/11/14 17:40:44 pierre
+ External linking now optional
Revision 1.3 2000/10/31 22:35:55 pierre
* New big merge from fixes branch
Revision 1.1.2.6 2000/10/18 21:53:27 pierre
* several Gabor fixes
@ -1036,4 +1044,4 @@ const
* new set of Gabor changes: see fixes.txt
}
}

View File

@ -143,6 +143,7 @@ const
var
LibLinkerSwitches,
DebugInfoSwitches,
LinkAfterSwitches,
ProfileInfoSwitches,
{MemorySizeSwitches, doubled !! }
SyntaxSwitches,
@ -691,6 +692,7 @@ begin
LibLinkerSwitches^.WriteItemsCfg;
DebugInfoSwitches^.WriteItemsCfg;
ProfileInfoSwitches^.WriteItemsCfg;
LinkAfterSwitches^.WriteItemsCfg;
BrowserSwitches^.WriteItemsCfg;
{MemorySizeSwitches^.WriteItemsCfg;}
WriteCustom;
@ -748,6 +750,7 @@ begin
res:=OptimizingGoalSwitches^.ReadItemsCfg(s);
end;
'p' : res:=ProfileInfoSwitches^.ReadItemsCfg(s);
's' : res:=LinkAfterSwitches^.ReadItemsCfg(s);
'R' : res:=AsmReaderSwitches^.ReadItemsCfg(s);
'S' : res:=SyntaxSwitches^.ReadItemsCfg(s);
'T' : res:=TargetSwitches^.ReadItemsCfg(s);
@ -946,6 +949,8 @@ begin
{ AddSelectItem('Generate ~d~bx symbol information','d');
does not work anyhow (PM) }
end;
New(LinkAfterSwitches,Init('s'));
LinkAfterSwitches^.AddBooleanItem(opt_linkafter,'',idNone);
New(ProfileInfoSwitches,InitSelect('p'));
with ProfileInfoSwitches^ do
begin
@ -1010,7 +1015,7 @@ begin
{$ifdef go32v2}
TargetSwitches^.SetCurrSel(1);
{$endif}
{$ifdef linux}
{$ifdef Linux}
TargetSwitches^.SetCurrSel(2);
{$endif}
{$ifdef win32}
@ -1140,7 +1145,16 @@ end;
end.
{
$Log$
Revision 1.3 2000-10-31 22:35:55 pierre
Revision 1.4 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.6 2000/11/14 17:40:44 pierre
+ External linking now optional
Revision 1.1.2.5 2000/11/14 09:40:35 marco
* Third batch renamefest
Revision 1.3 2000/10/31 22:35:55 pierre
* New big merge from fixes branch
Revision 1.1.2.4 2000/10/26 10:17:10 pierre
@ -1277,4 +1291,4 @@ end.
+ Switches updated
+ Run program
}
}

View File

@ -77,7 +77,7 @@ type
end;
{$endif}
{$ifdef Linux}
{$ifdef Unix}
PLinuxScreen = ^TLinuxScreen;
TLinuxScreen = object(TScreen)
constructor Init;
@ -452,7 +452,7 @@ end;
TLinuxScreen
****************************************************************************}
{$ifdef Linux}
{$ifdef Unix}
constructor TLinuxScreen.Init;
begin
@ -702,7 +702,7 @@ begin
{$ifdef DOS}
UserScreen:=New(PDOSScreen, Init);
{$else}
{$ifdef LINUX}
{$ifdef Unix}
UserScreen:=New(PLinuxScreen, Init);
{$else}
@ -711,7 +711,7 @@ begin
{$else}
UserScreen:=New(PScreen, Init);
{$endif Win32}
{$endif Linux}
{$endif Unix}
{$endif Dos}
end;
@ -729,7 +729,13 @@ end;
end.
{
$Log$
Revision 1.5 2000-10-31 22:35:55 pierre
Revision 1.6 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.4 2000/11/14 09:23:56 marco
* Second batch
Revision 1.5 2000/10/31 22:35:55 pierre
* New big merge from fixes branch
Revision 1.1.2.3 2000/10/10 21:24:56 pierre
@ -755,4 +761,4 @@ end.
Revision 1.1 2000/07/13 09:48:36 michael
+ Initial import
}
}

View File

@ -20,7 +20,7 @@ interface
uses Objects;
const
{$ifdef linux}
{$ifdef Unix}
dirsep = '/';
listsep = [';',':'];
exeext = '';
@ -121,15 +121,15 @@ end;
function FixFileName(const s:string):string;
var
i : longint;
{$ifdef Linux}
{$ifdef Unix}
NoPath : boolean;
{$endif}
begin
{$ifdef Linux}NoPath:=true;{$endif}
{$ifdef Unix}NoPath:=true;{$endif}
for i:=length(s) downto 1 do
begin
case s[i] of
{$ifdef Linux}
{$ifdef Unix}
'/','\' : begin
FixFileName[i]:='/';
NoPath:=false; {Skip lowercasing path: 'X11'<>'x11' }
@ -301,7 +301,7 @@ var
N1,N2 : NameStr;
E1,E2 : Extstr;
begin
{$ifdef linux}
{$ifdef Unix}
FSplit(What,D1,N1,E1);
FSplit(Mask,D2,N2,E2);
{$else}
@ -493,7 +493,13 @@ end;
END.
{
$Log$
Revision 1.4 2000-11-13 17:37:42 pierre
Revision 1.5 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.5 2000/11/14 09:23:56 marco
* Second batch
Revision 1.4 2000/11/13 17:37:42 pierre
merges from fixes branch
Revision 1.1.2.4 2000/11/13 16:59:09 pierre

View File

@ -47,7 +47,7 @@ const ClipboardWindow : PClipboardWindow = nil;
PrimaryFilePara : string{$ifdef GABOR}[80]{$endif} = '';
GDBOutputFile : string{$ifdef GABOR}[50]{$endif} = GDBOutputFileName;
IsEXECompiled : boolean = false;
LinkAfter : boolean = true;
{ LinkAfter : boolean = true; changed into a function }
MainHasDebugInfo : boolean = false;
UseMouse : boolean = true;
MainFile : string{$ifdef GABOR}[60]{$endif} = '';
@ -102,7 +102,13 @@ implementation
END.
{
$Log$
Revision 1.1 2000-07-13 09:48:36 michael
Revision 1.2 2000-11-15 00:14:10 pierre
new merge
Revision 1.1.2.1 2000/11/14 17:40:44 pierre
+ External linking now optional
Revision 1.1 2000/07/13 09:48:36 michael
+ Initial import
Revision 1.33 2000/06/16 08:50:42 pierre
@ -285,4 +291,4 @@ END.
Revision 1.0 1998/12/23 07:34:40 gabor
}
}

View File

@ -619,11 +619,11 @@ function EditorWindowFile(const Name : String): PSourceWindow;
function EditorWindow(P: PView): boolean; {$ifndef FPC}far;{$endif}
begin
EditorWindow:=(TypeOf(P^)=TypeOf(TSourceWindow)) and
{$ifdef linux}
{$ifdef Unix}
(PSourceWindow(P)^.Editor^.FileName=Name);
{$else}
(UpcaseStr(PSourceWindow(P)^.Editor^.FileName)=UpcaseStr(Name));
{$endif def linux}
{$endif Unix}
end;
begin
EditorWindowFile:=pointer(Desktop^.FirstThat(@EditorWindow));
@ -3160,6 +3160,9 @@ begin
{$endif}
{$ifdef os2}
OSStr:='OS/2';
{$endif}
{$ifdef FreeBSD}
OSStr:='FreeBSD';
{$endif}
R.Assign(0,0,38,14{$ifdef NODEBUG}-1{$endif});
inherited Init(R, dialog_about);
@ -3572,7 +3575,13 @@ end;
END.
{
$Log$
Revision 1.4 2000-11-13 17:37:42 pierre
Revision 1.5 2000-11-15 00:14:11 pierre
new merge
Revision 1.1.2.14 2000/11/14 09:08:49 marco
* First batch IDE renamefest
Revision 1.4 2000/11/13 17:37:42 pierre
merges from fixes branch
Revision 1.1.2.13 2000/11/06 16:55:48 pierre

View File

@ -40,6 +40,15 @@
{$define HasSignal}
{$endif}
{$ifdef FreeBSD}
{$undef SUPPORTVESA}
{$define SUPPORTREDIR}
{$undef WinClipSupported}
{$define HasSignal}
{$endif}
{$ifdef Win32}
{$undef SUPPORTVESA}
{$define SUPPORTREDIR}
@ -113,4 +122,4 @@
{$ifdef NOWINCLIP}
{$undef WINCLIPSUPPORTED}
{$endif}
{$endif}

View File

@ -419,7 +419,8 @@ begin
if LineNo<GetLineCount then
begin
P:=GetLine(LineNo);
P^.SetFlagState(Flag,ASet);
if assigned(P) then
P^.SetFlagState(Flag,ASet);
end;
end;
@ -531,6 +532,8 @@ begin
if (0<=LineNo) and (LineNo<GetLineCount) then
begin
L:=GetLine(LineNo);
if not assigned(L) then
exit;
DF:=IGetLineFormat(Binding,LineNo);
DT:=L^.GetText;
p:=0;
@ -554,7 +557,10 @@ var P: PCustomLine;
LI: PEditorLineInfo;
S: string;
begin
if (0<=LineNo) and (LineNo<GetLineCount) then P:=GetLine(LineNo) else P:=nil;
if (0<=LineNo) and (LineNo<GetLineCount) then
P:=GetLine(LineNo)
else
P:=nil;
if P=nil then LI:=nil else
LI:=P^.GetEditorInfo(Binding^.Editor);
if LI=nil then S:='' else S:=LI^.GetFormat;
@ -1825,7 +1831,13 @@ end;
END.
{
$Log$
Revision 1.4 2000-11-03 16:05:38 pierre
Revision 1.5 2000-11-15 00:14:11 pierre
new merge
Revision 1.1.2.7 2000/11/14 23:41:32 pierre
* fix for bug 1234
Revision 1.4 2000/11/03 16:05:38 pierre
* (merged)
Revision 1.1.2.6 2000/11/03 15:49:26 pierre
@ -1843,4 +1855,4 @@ END.
Revision 1.1.2.3 2000/09/18 13:20:55 pierre
New bunch of Gabor changes
}
}

View File

@ -688,7 +688,7 @@ type
TCodeEditorDialog = function(Dialog: Integer; Info: Pointer): Word;
const
EOL : String[2] = {$ifdef Linux}#10;{$else}#13#10;{$endif}
EOL : String[2] = {$ifdef Unix}#10;{$else}#13#10;{$endif}
cmCopyWin = 240;
cmPasteWin = 241;
@ -1526,7 +1526,8 @@ begin
for I:=0 to Count-1 do
begin
L:=GetLine(I);
L^.AddEditorInfo(Idx,AEditor);
if Assigned(L) then
L^.AddEditorInfo(Idx,AEditor);
end;
BindingsChanged;
@ -1544,7 +1545,8 @@ begin
for I:=0 to Count-1 do
begin
L:=GetLine(I);
L^.RemoveEditorInfo(AEditor);
if Assigned(L) then
L^.RemoveEditorInfo(AEditor);
end;
Bindings^.Free(B);
@ -2956,7 +2958,14 @@ begin
Lock;
for Y:=StartY to EndY do
begin
L:=GetLine(Y); EI:=L^.GetEditorInfo(@Self);
L:=GetLine(Y);
if assigned(L) then
EI:=L^.GetEditorInfo(@Self)
else
begin
CreateFold:=False;
exit;
end;
if Y=StartY then
ParentF:=EI^.Fold
else
@ -3001,11 +3010,17 @@ end;
procedure TCustomCodeEditor.RemoveAllFolds;
var I: sw_integer;
L: PCustomLine;
begin
for I:=0 to GetLineCount-1 do
with GetLine(I)^ do
with GetEditorInfo(@Self)^ do
SetFold(nil);
begin
L:=GetLine(I);
if not assigned(L) then exit;
with L^ do
with GetEditorInfo(@Self)^ do
SetFold(nil);
end;
DrawView;
end;
@ -3144,6 +3159,7 @@ begin
for I:=0 to Count-1 do
begin
L:=GetLine(I);
if not assigned(L) then exit;
if I=LineNo then
L^.SetFlags(L^.GetFlags or Flags)
else
@ -3564,8 +3580,16 @@ begin
if (0<=AY) and (AY<LineCount) then
begin
Line:=GetLine(AY);
IsBreak:=GetLine(AY)^.IsFlagSet(lfBreakpoint);
EI:=Line^.GetEditorInfo(@Self);
if assigned(Line) then
begin
IsBreak:=Line^.IsFlagSet(lfBreakpoint);
EI:=Line^.GetEditorInfo(@Self);
end
else
begin
IsBreak:=false;
EI:=nil;
end;
end
else
begin
@ -4221,13 +4245,17 @@ var L: PCustomLine;
LI: PEditorLineInfo;
F: PFold;
begin
F:=nil; LI:=nil;
F:=nil;
if IsFlagSet(efFolds) then
if (0<=EditorLine) and (EditorLine<GetLineCount) then
begin
L:=GetLine(EditorLine);
if Assigned(L) then LI:=L^.GetEditorInfo(@Self);
if Assigned(LI) then F:=LI^.Fold;
if Assigned(L) then
LI:=L^.GetEditorInfo(@Self)
else
LI:=nil;
if Assigned(LI) then
F:=LI^.Fold;
end;
GetLineFold:=F;
end;
@ -4425,7 +4453,10 @@ begin
if CurPos.Y<GetLineCount then
begin
L:=GetLine(CurPos.Y);
EI:=L^.GetEditorInfo(@Self);
if not assigned(L) then
EI:=nil
else
EI:=L^.GetEditorInfo(@Self);
end
else
EI:=nil;
@ -6153,7 +6184,6 @@ function TCustomCodeEditorCore.SaveAreaToStream(Editor: PCustomCodeEditor; Strea
var S: string;
OK: boolean;
Line: Sw_integer;
P: PCustomLine;
begin
if EndP.X=0 then
begin
@ -6169,8 +6199,7 @@ begin
OK:=(Stream^.Status=stOK); Line:=StartP.Y;
while OK and (Line<=EndP.Y) and (Line<GetLineCount) do
begin
P:=GetLine(Line);
S:=P^.GetText;
S:=GetLineText(Line);
{ Remove all traling spaces PM }
if not Editor^.IsFlagSet(efKeepTrailingSpaces) then
While (Length(S)>0) and (S[Length(S)]=' ') do
@ -6571,7 +6600,16 @@ end;
END.
{
$Log$
Revision 1.5 2000-11-13 17:37:42 pierre
Revision 1.6 2000-11-15 00:14:11 pierre
new merge
Revision 1.1.2.17 2000/11/14 23:41:32 pierre
* fix for bug 1234
Revision 1.1.2.16 2000/11/14 09:08:50 marco
* First batch IDE renamefest
Revision 1.5 2000/11/13 17:37:42 pierre
merges from fixes branch
Revision 1.1.2.15 2000/11/13 16:55:09 pierre

View File

@ -289,9 +289,9 @@ procedure DisposeRecord(var R: TRecord);
implementation
uses
{$ifdef Linux}
{$ifdef Unix}
linux,
{$endif Linux}
{$endif Unix}
{$IFDEF OS2}
DosCalls,
{$ENDIF OS2}
@ -309,7 +309,7 @@ Function GetDosTicks:longint; { returns ticks at 18.2 Hz, just like DOS }
GetDosTicks := L div 55;
end;
{$ENDIF}
{$IFDEF LINUX}
{$IFDEF Unix}
var
tv : TimeVal;
tz : TimeZone;
@ -317,7 +317,7 @@ Function GetDosTicks:longint; { returns ticks at 18.2 Hz, just like DOS }
GetTimeOfDay(tv); {Timezone no longer used?}
GetDosTicks:=((tv.Sec mod 86400) div 60)*1092+((tv.Sec mod 60)*1000000+tv.USec) div 54945;
end;
{$endif Linux}
{$endif Unix}
{$ifdef Win32}
begin
GetDosTicks:=(Windows.GetTickCount*5484) div 100;
@ -1308,12 +1308,20 @@ end;
END.
{
$Log$
Revision 1.4 2000-11-13 17:37:43 pierre
Revision 1.5 2000-11-15 00:14:11 pierre
new merge
Revision 1.1.2.3 2000/11/14 09:08:51 marco
* First batch IDE renamefest
Revision 1.4 2000/11/13 17:37:43 pierre
merges from fixes branch
Revision 1.3 2000/11/11 23:05:31 hajny
Revision 1.1.2.2 2000/11/12 19:48:20 hajny
* OS/2 implementation of GetDosTicks added
Revision 1.3 2000/11/11 23:05:31 hajny
Revision 1.2 2000/10/31 22:35:56 pierre
* New big merge from fixes branch

View File

@ -150,6 +150,7 @@ type
procedure HandleEvent(var Event: TEvent); virtual;
procedure SetCurPtr(X,Y: sw_integer); virtual;
function GetLineCount: sw_integer; virtual;
function GetLine(LineNo: sw_integer): PCustomLine; virtual;
function GetLineText(Line: sw_integer): string; virtual;
function GetDisplayText(I: sw_integer): string; virtual;
function GetLinkCount: sw_integer; virtual;
@ -750,6 +751,11 @@ begin
GetLineCount:=Count;
end;
function THelpViewer.GetLine(LineNo: sw_integer): PCustomLine;
begin
{Abstract; used in wcedit unit ! }
GetLine:=nil;
end;
function THelpViewer.GetDisplayText(I: sw_integer): string;
begin
GetDisplayText:=ExtractTabs(GetLineText(I),DefaultTabSize);
@ -1318,7 +1324,13 @@ end;
END.
{
$Log$
Revision 1.1 2000-07-13 09:48:37 michael
Revision 1.2 2000-11-15 00:14:11 pierre
new merge
Revision 1.1.2.1 2000/11/14 23:41:33 pierre
* fix for bug 1234
Revision 1.1 2000/07/13 09:48:37 michael
+ Initial import
Revision 1.18 2000/06/22 09:07:14 pierre

View File

@ -24,9 +24,9 @@ uses
{$ifdef win32}
windows,
{$endif win32}
{$ifdef linux}
{$ifdef Unix}
linux,
{$endif linux}
{$endif Unix}
Dos,Objects;
const
@ -34,7 +34,7 @@ const
kbCtrlGrayMinus = $8e00;
kbCtrlGrayMul = $9600;
TempFirstChar = {$ifndef Linux}'~'{$else}'_'{$endif};
TempFirstChar = {$ifndef Unix}'~'{$else}'_'{$endif};
TempExt = '.tmp';
TempNameLen = 8;
@ -174,7 +174,7 @@ procedure GiveUpTimeSlice;
const LastStrToIntResult : integer = 0;
LastHexToIntResult : integer = 0;
DirSep : char = {$ifdef Linux}'/'{$else}'\'{$endif};
DirSep : char = {$ifdef Unix}'/'{$else}'\'{$endif};
procedure RegisterWUtils;
@ -1142,7 +1142,7 @@ begin
intr($2f,r);
end;
{$endif}
{$ifdef Linux}
{$ifdef Unix}
var
req,rem : timespec;
begin
@ -1183,7 +1183,13 @@ BEGIN
END.
{
$Log$
Revision 1.7 2000-11-13 17:37:44 pierre
Revision 1.8 2000-11-15 00:14:11 pierre
new merge
Revision 1.1.2.10 2000/11/14 09:08:51 marco
* First batch IDE renamefest
Revision 1.7 2000/11/13 17:37:44 pierre
merges from fixes branch
Revision 1.1.2.9 2000/11/13 16:59:10 pierre