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] [libs]
libgcc=1 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] [postsettings]
# when making a full version include the compiler # when making a full version include the compiler

View File

@ -18,7 +18,7 @@ interface
{$i globdir.inc} {$i globdir.inc}
{$ifdef linux} {$ifdef Unix}
uses uses
linux; linux;
{$endif} {$endif}
@ -52,7 +52,7 @@ uses
{$ifdef HasSignal} {$ifdef HasSignal}
{$ifdef linux} {$ifdef Unix}
Procedure CatchSignal(Sig : Integer);cdecl; Procedure CatchSignal(Sig : Integer);cdecl;
{$else} {$else}
Function CatchSignal(Sig : longint):longint; Function CatchSignal(Sig : longint):longint;
@ -122,7 +122,7 @@ begin
end; end;
end; end;
end; end;
{$ifndef linux} {$ifndef Unix}
CatchSignal:=0; CatchSignal:=0;
{$endif} {$endif}
end; end;
@ -145,7 +145,13 @@ end.
{ {
$Log$ $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 * New big merge from fixes branch
Revision 1.1.2.1 2000/10/31 07:52:55 pierre Revision 1.1.2.1 2000/10/31 07:52:55 pierre
@ -182,4 +188,4 @@ end.
* empty file fixed * empty file fixed
* fixed callback routines in fpdebug to have far for tp7 * fixed callback routines in fpdebug to have far for tp7
} }

View File

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

View File

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

View File

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

View File

@ -25,6 +25,7 @@ procedure SetRunParameters(const Params: string);
{ Compile } { Compile }
procedure Compile(const FileName, ConfigFile: string); procedure Compile(const FileName, ConfigFile: string);
procedure SetPrimaryFile(const fn:string); procedure SetPrimaryFile(const fn:string);
function LinkAfter : boolean;
implementation implementation
@ -44,6 +45,11 @@ uses
var var
RunParameters : string; RunParameters : string;
function LinkAfter : boolean;
begin
LinkAfter:=LinkAfterSwitches^.GetBooleanItem(0);
end;
function GetRunParameters: string; function GetRunParameters: string;
begin begin
GetRunParameters:=RunParameters; GetRunParameters:=RunParameters;
@ -85,8 +91,6 @@ begin
cmd:='@'+ConfigFile+' '+cmd; cmd:='@'+ConfigFile+' '+cmd;
if not UseExternalCompiler then if not UseExternalCompiler then
{$endif USE_EXTERNAL_COMPILER} {$endif USE_EXTERNAL_COMPILER}
if LinkAfter then
cmd:=cmd+' -s';
{ Add the switches from the primary file } { Add the switches from the primary file }
if PrimaryFileSwitches<>'' then if PrimaryFileSwitches<>'' then
cmd:=cmd+' '+PrimaryFileSwitches; cmd:=cmd+' '+PrimaryFileSwitches;
@ -212,7 +216,13 @@ end;
end. end.
{ {
$Log$ $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 merges from fixes branch
Revision 1.1.2.1 2000/11/13 16:59:09 pierre 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; var R,R2: TRect;
D: PCenterDialog; D: PCenterDialog;
RB2: PRadioButtons; RB2: PRadioButtons;
I: longint; CB : PCheckBoxes;
Count,I: longint;
Items: PSItem; Items: PSItem;
L: longint; L: longint;
begin begin
@ -372,27 +373,26 @@ begin
with D^ do with D^ do
begin begin
GetExtent(R); R.Grow(-3,-1); 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; Items:=nil;
for I:=GetEXEFormatCount downto 1 do for I:=Count-1 downto 0 do
Items:=NewSItem(GetEXEFormatName(TEXEFormat(I)),Items); Items:=NewSItem(LinkAfterSwitches^.ItemName(I), Items);
New(RB1, Init(R2, Items)); New(CB, Init(R2, Items));
Mask:=0; V:=1; for I:=0 to Count-1 do
for I:=1 to GetEXEFormatCount do if LinkAfterSwitches^.GetBooleanItem(I) then
begin CB^.Press(I);
if IsEXEFormatAvailable(TEXEFormat(I)) then Insert(CB);
Mask:=Mask or V; Dec(R2.A.Y);
V:=V shl 1; R2.B.Y:=R2.A.Y+1;
end; Insert(New(PLabel, Init(R2, label_compiler_linkafter, CB)));
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)));}
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; Items:=nil;
for I:=LibLinkerSwitches^.ItemCount-1 downto 0 do for I:=LibLinkerSwitches^.ItemCount-1 downto 0 do
Items:=NewSItem(LibLinkerSwitches^.ItemName(I), Items); Items:=NewSItem(LibLinkerSwitches^.ItemName(I), Items);
@ -400,6 +400,7 @@ begin
L:=LibLinkerSwitches^.GetCurrSel; L:=LibLinkerSwitches^.GetCurrSel;
RB2^.SetData(L); RB2^.SetData(L);
Insert(RB2); 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; 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))); Insert(New(PLabel, Init(R2, label_linker_preferredlibtype, RB2)));
end; end;
@ -416,6 +417,8 @@ begin
FormatStrStr3(msg_xmustbesettoyforz_doyouwanttochangethis, FormatStrStr3(msg_xmustbesettoyforz_doyouwanttochangethis,
label_compiler_assembleroutput,'pecoff','smartlinking'),nil,false)=cmYes then label_compiler_assembleroutput,'pecoff','smartlinking'),nil,false)=cmYes then
AsmOutputSwitches^.SetCurrSelParam('pecoff'); AsmOutputSwitches^.SetCurrSelParam('pecoff');
for I:=0 to LinkAfterSwitches^.ItemCount-1 do
LinkAfterSwitches^.SetBooleanItem(I,CB^.Mark(I));
end; end;
Dispose(D, Done); Dispose(D, Done);
end; end;
@ -429,9 +432,9 @@ var R,R2,R3: TRect;
{$ifdef win32} {$ifdef win32}
CB2: PCheckBoxes; CB2: PCheckBoxes;
{$endif win32} {$endif win32}
{$ifdef linux} {$ifdef Unix}
IL: PInputLine; IL: PInputLine;
{$endif linux} {$endif Unix}
IL2: PInputLine; IL2: PInputLine;
L,I: longint; L,I: longint;
Items: PSItem; Items: PSItem;
@ -439,11 +442,11 @@ const
{$ifdef win32} {$ifdef win32}
OtherFieldLines = 3; OtherFieldLines = 3;
{$else not win32} {$else not win32}
{$ifdef linux} {$ifdef Unix}
OtherFieldLines = 3; OtherFieldLines = 3;
{$else not linux} {$else not Unix}
OtherFieldLines = 0; OtherFieldLines = 0;
{$endif linux} {$endif Unix}
{$endif win32} {$endif win32}
begin begin
R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+2 R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+2
@ -497,7 +500,7 @@ begin
R2.Move(0,-1); R2.Move(0,-1);
Insert(New(PLabel, Init(R2,label_debugger_redirection, CB2))); Insert(New(PLabel, Init(R2,label_debugger_redirection, CB2)));
{$endif win32} {$endif win32}
{$ifdef linux} {$ifdef Unix}
R2.Move(0,4); R2.Move(0,4);
New(IL, Init(R2, 255)); New(IL, Init(R2, 255));
IL^.Data^:=DebuggeeTTY; IL^.Data^:=DebuggeeTTY;
@ -525,9 +528,9 @@ begin
else else
DebuggeeTTY:=''; DebuggeeTTY:='';
{$endif win32} {$endif win32}
{$ifdef linux} {$ifdef Unix}
DebuggeeTTY:=IL^.Data^; DebuggeeTTY:=IL^.Data^;
{$endif linux} {$endif Unix}
end; end;
Dispose(D, Done); Dispose(D, Done);
end; end;
@ -1231,7 +1234,16 @@ end;
{ {
$Log$ $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 * New big merge from fixes branch
Revision 1.1.2.4 2000/10/18 21:53:27 pierre Revision 1.1.2.4 2000/10/18 21:53:27 pierre
@ -1439,4 +1451,4 @@ end;
+ Switches are now written/read + Switches are now written/read
+ find and replace routines + find and replace routines
} }

View File

@ -19,7 +19,7 @@ Unit FPRedir;
Interface Interface
{$R-} {$R-}
{$ifndef linux} {$ifndef Unix}
{$S-} {$S-}
{$endif} {$endif}
@ -32,7 +32,7 @@ Interface
{$ifdef Win32} {$ifdef Win32}
{$define implemented} {$define implemented}
{$endif} {$endif}
{$ifdef linux} {$ifdef Unix}
{$define implemented} {$define implemented}
{$endif} {$endif}
@ -76,9 +76,9 @@ Uses
{$ifdef win32} {$ifdef win32}
windows, windows,
{$endif win32} {$endif win32}
{$ifdef linux} {$ifdef Unix}
linux, linux,
{$endif linux} {$endif Unix}
dos; dos;
var var
@ -125,7 +125,7 @@ Var
var var
TempHOut, TempHIn,TempHError : longint; 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 Dup(oldfile:longint;var newfile:longint):Boolean;
Function Dup2(oldfile,newfile:longint):Boolean; Function Dup2(oldfile,newfile:longint):Boolean;
Function fdClose(fd:longint):boolean; Function fdClose(fd:longint):boolean;
@ -678,7 +678,7 @@ end;
{$EndIf MsDos} {$EndIf MsDos}
SwapVectors; SwapVectors;
{ Must use shell() for linux for the wildcard expansion (PFV) } { Must use shell() for linux for the wildcard expansion (PFV) }
{$ifdef linux} {$ifdef Unix}
IOStatus:=0; IOStatus:=0;
ExecuteResult:=Shell(Progname+' '+Comline); ExecuteResult:=Shell(Progname+' '+Comline);
{ Signal that causes the stop of the shell } { Signal that causes the stop of the shell }
@ -725,7 +725,13 @@ Begin
End. End.
{ {
$Log$ $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 * New big merge from fixes branch
Revision 1.1.2.1 2000/10/04 13:29:59 pierre 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 * unit name of FPSwitches -> FPSwitch which is easier to use
* some fixes for tp7 compiling * some fixes for tp7 compiling
} }

View File

@ -510,6 +510,7 @@ const
label_compiler_runtimechecks = 'Run-time checks'; label_compiler_runtimechecks = 'Run-time checks';
label_compiler_optimizations = 'Optimizations'; label_compiler_optimizations = 'Optimizations';
label_compiler_targetprocessor = 'Target processor'; label_compiler_targetprocessor = 'Target processor';
label_compiler_linkafter = 'Linking stage';
label_compiler_verboseswitches = 'Verbose Switches'; label_compiler_verboseswitches = 'Verbose Switches';
label_compiler_browser = 'Browser'; label_compiler_browser = 'Browser';
label_compiler_assemblerreader = 'Assembler reader'; label_compiler_assemblerreader = 'Assembler reader';
@ -794,6 +795,8 @@ const
opt_stripalldebugsymbols = '~S~trip all debug symbols from executable'; opt_stripalldebugsymbols = '~S~trip all debug symbols from executable';
opt_gendebugsymbolinfo = 'Generate ~d~ebug symbol information'; opt_gendebugsymbolinfo = 'Generate ~d~ebug symbol information';
opt_gensymbolandbacktraceinfo = 'Generate also backtrace ~l~ine information'; opt_gensymbolandbacktraceinfo = 'Generate also backtrace ~l~ine information';
{ Link after options }
opt_linkafter = 'Call ~l~inker after';
{ Profiling options } { Profiling options }
opt_noprofileinfo = '~N~o profile information'; opt_noprofileinfo = '~N~o profile information';
opt_gprofinfo = 'Generate profile code for g~p~rof'; opt_gprofinfo = 'Generate profile code for g~p~rof';
@ -981,9 +984,18 @@ const
{ {
$Log$ $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) * 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 Revision 1.2 2000/08/22 09:41:40 pierre
* first big merge from fixes branch * first big merge from fixes branch
@ -1024,4 +1036,4 @@ const
* new set of Gabor changes: see fixes.txt * new set of Gabor changes: see fixes.txt
} }

View File

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

View File

@ -143,6 +143,7 @@ const
var var
LibLinkerSwitches, LibLinkerSwitches,
DebugInfoSwitches, DebugInfoSwitches,
LinkAfterSwitches,
ProfileInfoSwitches, ProfileInfoSwitches,
{MemorySizeSwitches, doubled !! } {MemorySizeSwitches, doubled !! }
SyntaxSwitches, SyntaxSwitches,
@ -691,6 +692,7 @@ begin
LibLinkerSwitches^.WriteItemsCfg; LibLinkerSwitches^.WriteItemsCfg;
DebugInfoSwitches^.WriteItemsCfg; DebugInfoSwitches^.WriteItemsCfg;
ProfileInfoSwitches^.WriteItemsCfg; ProfileInfoSwitches^.WriteItemsCfg;
LinkAfterSwitches^.WriteItemsCfg;
BrowserSwitches^.WriteItemsCfg; BrowserSwitches^.WriteItemsCfg;
{MemorySizeSwitches^.WriteItemsCfg;} {MemorySizeSwitches^.WriteItemsCfg;}
WriteCustom; WriteCustom;
@ -748,6 +750,7 @@ begin
res:=OptimizingGoalSwitches^.ReadItemsCfg(s); res:=OptimizingGoalSwitches^.ReadItemsCfg(s);
end; end;
'p' : res:=ProfileInfoSwitches^.ReadItemsCfg(s); 'p' : res:=ProfileInfoSwitches^.ReadItemsCfg(s);
's' : res:=LinkAfterSwitches^.ReadItemsCfg(s);
'R' : res:=AsmReaderSwitches^.ReadItemsCfg(s); 'R' : res:=AsmReaderSwitches^.ReadItemsCfg(s);
'S' : res:=SyntaxSwitches^.ReadItemsCfg(s); 'S' : res:=SyntaxSwitches^.ReadItemsCfg(s);
'T' : res:=TargetSwitches^.ReadItemsCfg(s); 'T' : res:=TargetSwitches^.ReadItemsCfg(s);
@ -946,6 +949,8 @@ begin
{ AddSelectItem('Generate ~d~bx symbol information','d'); { AddSelectItem('Generate ~d~bx symbol information','d');
does not work anyhow (PM) } does not work anyhow (PM) }
end; end;
New(LinkAfterSwitches,Init('s'));
LinkAfterSwitches^.AddBooleanItem(opt_linkafter,'',idNone);
New(ProfileInfoSwitches,InitSelect('p')); New(ProfileInfoSwitches,InitSelect('p'));
with ProfileInfoSwitches^ do with ProfileInfoSwitches^ do
begin begin
@ -1010,7 +1015,7 @@ begin
{$ifdef go32v2} {$ifdef go32v2}
TargetSwitches^.SetCurrSel(1); TargetSwitches^.SetCurrSel(1);
{$endif} {$endif}
{$ifdef linux} {$ifdef Linux}
TargetSwitches^.SetCurrSel(2); TargetSwitches^.SetCurrSel(2);
{$endif} {$endif}
{$ifdef win32} {$ifdef win32}
@ -1140,7 +1145,16 @@ end;
end. end.
{ {
$Log$ $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 * New big merge from fixes branch
Revision 1.1.2.4 2000/10/26 10:17:10 pierre Revision 1.1.2.4 2000/10/26 10:17:10 pierre
@ -1277,4 +1291,4 @@ end.
+ Switches updated + Switches updated
+ Run program + Run program
} }

View File

@ -77,7 +77,7 @@ type
end; end;
{$endif} {$endif}
{$ifdef Linux} {$ifdef Unix}
PLinuxScreen = ^TLinuxScreen; PLinuxScreen = ^TLinuxScreen;
TLinuxScreen = object(TScreen) TLinuxScreen = object(TScreen)
constructor Init; constructor Init;
@ -452,7 +452,7 @@ end;
TLinuxScreen TLinuxScreen
****************************************************************************} ****************************************************************************}
{$ifdef Linux} {$ifdef Unix}
constructor TLinuxScreen.Init; constructor TLinuxScreen.Init;
begin begin
@ -702,7 +702,7 @@ begin
{$ifdef DOS} {$ifdef DOS}
UserScreen:=New(PDOSScreen, Init); UserScreen:=New(PDOSScreen, Init);
{$else} {$else}
{$ifdef LINUX} {$ifdef Unix}
UserScreen:=New(PLinuxScreen, Init); UserScreen:=New(PLinuxScreen, Init);
{$else} {$else}
@ -711,7 +711,7 @@ begin
{$else} {$else}
UserScreen:=New(PScreen, Init); UserScreen:=New(PScreen, Init);
{$endif Win32} {$endif Win32}
{$endif Linux} {$endif Unix}
{$endif Dos} {$endif Dos}
end; end;
@ -729,7 +729,13 @@ end;
end. end.
{ {
$Log$ $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 * New big merge from fixes branch
Revision 1.1.2.3 2000/10/10 21:24:56 pierre 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 Revision 1.1 2000/07/13 09:48:36 michael
+ Initial import + Initial import
} }

View File

@ -20,7 +20,7 @@ interface
uses Objects; uses Objects;
const const
{$ifdef linux} {$ifdef Unix}
dirsep = '/'; dirsep = '/';
listsep = [';',':']; listsep = [';',':'];
exeext = ''; exeext = '';
@ -121,15 +121,15 @@ end;
function FixFileName(const s:string):string; function FixFileName(const s:string):string;
var var
i : longint; i : longint;
{$ifdef Linux} {$ifdef Unix}
NoPath : boolean; NoPath : boolean;
{$endif} {$endif}
begin begin
{$ifdef Linux}NoPath:=true;{$endif} {$ifdef Unix}NoPath:=true;{$endif}
for i:=length(s) downto 1 do for i:=length(s) downto 1 do
begin begin
case s[i] of case s[i] of
{$ifdef Linux} {$ifdef Unix}
'/','\' : begin '/','\' : begin
FixFileName[i]:='/'; FixFileName[i]:='/';
NoPath:=false; {Skip lowercasing path: 'X11'<>'x11' } NoPath:=false; {Skip lowercasing path: 'X11'<>'x11' }
@ -301,7 +301,7 @@ var
N1,N2 : NameStr; N1,N2 : NameStr;
E1,E2 : Extstr; E1,E2 : Extstr;
begin begin
{$ifdef linux} {$ifdef Unix}
FSplit(What,D1,N1,E1); FSplit(What,D1,N1,E1);
FSplit(Mask,D2,N2,E2); FSplit(Mask,D2,N2,E2);
{$else} {$else}
@ -493,7 +493,13 @@ end;
END. END.
{ {
$Log$ $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 merges from fixes branch
Revision 1.1.2.4 2000/11/13 16:59:09 pierre 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} = ''; PrimaryFilePara : string{$ifdef GABOR}[80]{$endif} = '';
GDBOutputFile : string{$ifdef GABOR}[50]{$endif} = GDBOutputFileName; GDBOutputFile : string{$ifdef GABOR}[50]{$endif} = GDBOutputFileName;
IsEXECompiled : boolean = false; IsEXECompiled : boolean = false;
LinkAfter : boolean = true; { LinkAfter : boolean = true; changed into a function }
MainHasDebugInfo : boolean = false; MainHasDebugInfo : boolean = false;
UseMouse : boolean = true; UseMouse : boolean = true;
MainFile : string{$ifdef GABOR}[60]{$endif} = ''; MainFile : string{$ifdef GABOR}[60]{$endif} = '';
@ -102,7 +102,13 @@ implementation
END. END.
{ {
$Log$ $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 + Initial import
Revision 1.33 2000/06/16 08:50:42 pierre 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 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} function EditorWindow(P: PView): boolean; {$ifndef FPC}far;{$endif}
begin begin
EditorWindow:=(TypeOf(P^)=TypeOf(TSourceWindow)) and EditorWindow:=(TypeOf(P^)=TypeOf(TSourceWindow)) and
{$ifdef linux} {$ifdef Unix}
(PSourceWindow(P)^.Editor^.FileName=Name); (PSourceWindow(P)^.Editor^.FileName=Name);
{$else} {$else}
(UpcaseStr(PSourceWindow(P)^.Editor^.FileName)=UpcaseStr(Name)); (UpcaseStr(PSourceWindow(P)^.Editor^.FileName)=UpcaseStr(Name));
{$endif def linux} {$endif Unix}
end; end;
begin begin
EditorWindowFile:=pointer(Desktop^.FirstThat(@EditorWindow)); EditorWindowFile:=pointer(Desktop^.FirstThat(@EditorWindow));
@ -3160,6 +3160,9 @@ begin
{$endif} {$endif}
{$ifdef os2} {$ifdef os2}
OSStr:='OS/2'; OSStr:='OS/2';
{$endif}
{$ifdef FreeBSD}
OSStr:='FreeBSD';
{$endif} {$endif}
R.Assign(0,0,38,14{$ifdef NODEBUG}-1{$endif}); R.Assign(0,0,38,14{$ifdef NODEBUG}-1{$endif});
inherited Init(R, dialog_about); inherited Init(R, dialog_about);
@ -3572,7 +3575,13 @@ end;
END. END.
{ {
$Log$ $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 merges from fixes branch
Revision 1.1.2.13 2000/11/06 16:55:48 pierre Revision 1.1.2.13 2000/11/06 16:55:48 pierre

View File

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

View File

@ -419,7 +419,8 @@ begin
if LineNo<GetLineCount then if LineNo<GetLineCount then
begin begin
P:=GetLine(LineNo); P:=GetLine(LineNo);
P^.SetFlagState(Flag,ASet); if assigned(P) then
P^.SetFlagState(Flag,ASet);
end; end;
end; end;
@ -531,6 +532,8 @@ begin
if (0<=LineNo) and (LineNo<GetLineCount) then if (0<=LineNo) and (LineNo<GetLineCount) then
begin begin
L:=GetLine(LineNo); L:=GetLine(LineNo);
if not assigned(L) then
exit;
DF:=IGetLineFormat(Binding,LineNo); DF:=IGetLineFormat(Binding,LineNo);
DT:=L^.GetText; DT:=L^.GetText;
p:=0; p:=0;
@ -554,7 +557,10 @@ var P: PCustomLine;
LI: PEditorLineInfo; LI: PEditorLineInfo;
S: string; S: string;
begin 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 if P=nil then LI:=nil else
LI:=P^.GetEditorInfo(Binding^.Editor); LI:=P^.GetEditorInfo(Binding^.Editor);
if LI=nil then S:='' else S:=LI^.GetFormat; if LI=nil then S:='' else S:=LI^.GetFormat;
@ -1825,7 +1831,13 @@ end;
END. END.
{ {
$Log$ $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) * (merged)
Revision 1.1.2.6 2000/11/03 15:49:26 pierre 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 Revision 1.1.2.3 2000/09/18 13:20:55 pierre
New bunch of Gabor changes New bunch of Gabor changes
} }

View File

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

View File

@ -289,9 +289,9 @@ procedure DisposeRecord(var R: TRecord);
implementation implementation
uses uses
{$ifdef Linux} {$ifdef Unix}
linux, linux,
{$endif Linux} {$endif Unix}
{$IFDEF OS2} {$IFDEF OS2}
DosCalls, DosCalls,
{$ENDIF OS2} {$ENDIF OS2}
@ -309,7 +309,7 @@ Function GetDosTicks:longint; { returns ticks at 18.2 Hz, just like DOS }
GetDosTicks := L div 55; GetDosTicks := L div 55;
end; end;
{$ENDIF} {$ENDIF}
{$IFDEF LINUX} {$IFDEF Unix}
var var
tv : TimeVal; tv : TimeVal;
tz : TimeZone; tz : TimeZone;
@ -317,7 +317,7 @@ Function GetDosTicks:longint; { returns ticks at 18.2 Hz, just like DOS }
GetTimeOfDay(tv); {Timezone no longer used?} GetTimeOfDay(tv); {Timezone no longer used?}
GetDosTicks:=((tv.Sec mod 86400) div 60)*1092+((tv.Sec mod 60)*1000000+tv.USec) div 54945; GetDosTicks:=((tv.Sec mod 86400) div 60)*1092+((tv.Sec mod 60)*1000000+tv.USec) div 54945;
end; end;
{$endif Linux} {$endif Unix}
{$ifdef Win32} {$ifdef Win32}
begin begin
GetDosTicks:=(Windows.GetTickCount*5484) div 100; GetDosTicks:=(Windows.GetTickCount*5484) div 100;
@ -1308,12 +1308,20 @@ end;
END. END.
{ {
$Log$ $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 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 * 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 Revision 1.2 2000/10/31 22:35:56 pierre
* New big merge from fixes branch * New big merge from fixes branch

View File

@ -150,6 +150,7 @@ type
procedure HandleEvent(var Event: TEvent); virtual; procedure HandleEvent(var Event: TEvent); virtual;
procedure SetCurPtr(X,Y: sw_integer); virtual; procedure SetCurPtr(X,Y: sw_integer); virtual;
function GetLineCount: sw_integer; virtual; function GetLineCount: sw_integer; virtual;
function GetLine(LineNo: sw_integer): PCustomLine; virtual;
function GetLineText(Line: sw_integer): string; virtual; function GetLineText(Line: sw_integer): string; virtual;
function GetDisplayText(I: sw_integer): string; virtual; function GetDisplayText(I: sw_integer): string; virtual;
function GetLinkCount: sw_integer; virtual; function GetLinkCount: sw_integer; virtual;
@ -750,6 +751,11 @@ begin
GetLineCount:=Count; GetLineCount:=Count;
end; end;
function THelpViewer.GetLine(LineNo: sw_integer): PCustomLine;
begin
{Abstract; used in wcedit unit ! }
GetLine:=nil;
end;
function THelpViewer.GetDisplayText(I: sw_integer): string; function THelpViewer.GetDisplayText(I: sw_integer): string;
begin begin
GetDisplayText:=ExtractTabs(GetLineText(I),DefaultTabSize); GetDisplayText:=ExtractTabs(GetLineText(I),DefaultTabSize);
@ -1318,7 +1324,13 @@ end;
END. END.
{ {
$Log$ $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 + Initial import
Revision 1.18 2000/06/22 09:07:14 pierre Revision 1.18 2000/06/22 09:07:14 pierre

View File

@ -24,9 +24,9 @@ uses
{$ifdef win32} {$ifdef win32}
windows, windows,
{$endif win32} {$endif win32}
{$ifdef linux} {$ifdef Unix}
linux, linux,
{$endif linux} {$endif Unix}
Dos,Objects; Dos,Objects;
const const
@ -34,7 +34,7 @@ const
kbCtrlGrayMinus = $8e00; kbCtrlGrayMinus = $8e00;
kbCtrlGrayMul = $9600; kbCtrlGrayMul = $9600;
TempFirstChar = {$ifndef Linux}'~'{$else}'_'{$endif}; TempFirstChar = {$ifndef Unix}'~'{$else}'_'{$endif};
TempExt = '.tmp'; TempExt = '.tmp';
TempNameLen = 8; TempNameLen = 8;
@ -174,7 +174,7 @@ procedure GiveUpTimeSlice;
const LastStrToIntResult : integer = 0; const LastStrToIntResult : integer = 0;
LastHexToIntResult : integer = 0; LastHexToIntResult : integer = 0;
DirSep : char = {$ifdef Linux}'/'{$else}'\'{$endif}; DirSep : char = {$ifdef Unix}'/'{$else}'\'{$endif};
procedure RegisterWUtils; procedure RegisterWUtils;
@ -1142,7 +1142,7 @@ begin
intr($2f,r); intr($2f,r);
end; end;
{$endif} {$endif}
{$ifdef Linux} {$ifdef Unix}
var var
req,rem : timespec; req,rem : timespec;
begin begin
@ -1183,7 +1183,13 @@ BEGIN
END. END.
{ {
$Log$ $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 merges from fixes branch
Revision 1.1.2.9 2000/11/13 16:59:10 pierre Revision 1.1.2.9 2000/11/13 16:59:10 pierre