mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 15:49:27 +02:00
clean up win32 ifdefs
git-svn-id: trunk@4484 -
This commit is contained in:
parent
f88cba2a80
commit
b8131d303a
@ -39,7 +39,7 @@ unit CmdLineDebugger;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Process, Debugger, Forms, DBGUtils;
|
||||
Classes, Process, Debugger, Forms, LazConf, DBGUtils;
|
||||
|
||||
type
|
||||
TCmdLineDebugger = class(TDebugger)
|
||||
@ -173,7 +173,7 @@ constructor TCmdLineDebugger.Create(const AExternalDebugger: String);
|
||||
begin
|
||||
FDbgProcess := nil;
|
||||
FLineEnds := TStringList.Create;
|
||||
FLineEnds.Add(LINE_END);
|
||||
FLineEnds.Add(LineBreak);
|
||||
FReading := False;
|
||||
FFlushAfterRead := False;
|
||||
FPeekOffset := 0;
|
||||
@ -360,7 +360,7 @@ begin
|
||||
DoDbgOutput('<' + ACommand + '>');
|
||||
if ACommand <> ''
|
||||
then FDbgProcess.Input.Write(ACommand[1], Length(ACommand));
|
||||
FDbgProcess.Input.Write(LINE_END, 1);
|
||||
FDbgProcess.Input.Write(LineBreak, 1);
|
||||
end
|
||||
else begin
|
||||
WriteLN('[TCmdLineDebugger.SendCmdLn] Unable to send <', ACommand, '>. No process running.');
|
||||
@ -382,6 +382,9 @@ initialization
|
||||
end.
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.21 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.20 2003/08/08 07:49:56 mattias
|
||||
fixed mem leaks in debugger
|
||||
|
||||
|
@ -62,13 +62,6 @@ function GetPart(const ASkipTo, AnEnd: array of String; var ASource: String; con
|
||||
function ConvertToCString(const AText: String): String;
|
||||
function DeleteEscapeChars(const AText: String; const AEscapeChar: Char): String;
|
||||
|
||||
const
|
||||
{$IFDEF WIN32}
|
||||
LINE_END = #13#10;
|
||||
{$ELSE}
|
||||
LINE_END = #10;
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -288,6 +281,9 @@ end;
|
||||
end.
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.9 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.8 2003/07/09 00:13:18 marc
|
||||
* fixed cached items.object storage if TCheckListBox
|
||||
* Changed DebuggerOptions dialog to use new TCheckListBox
|
||||
|
@ -37,8 +37,8 @@ unit GDBMIDebugger;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Process, SysUtils, Dialogs, DBGUtils, Debugger, CmdLineDebugger,
|
||||
GDBTypeInfo, BaseDebugManager;
|
||||
Classes, Process, SysUtils, Dialogs, LazConf, DBGUtils, Debugger,
|
||||
CmdLineDebugger, GDBTypeInfo, BaseDebugManager;
|
||||
|
||||
type
|
||||
TGDBMIProgramInfo = record
|
||||
@ -879,11 +879,12 @@ begin
|
||||
Line := StripLN(ReadLine);
|
||||
while DebugProcessRunning and (Line <> '(gdb) ') do
|
||||
begin
|
||||
S := S + Line + LINE_END;
|
||||
S := S + Line + LineBreak;
|
||||
Line := StripLN(ReadLine);
|
||||
end;
|
||||
if S <> ''
|
||||
then MessageDlg('Debugger', 'Initialization output: ' + LINE_END + S, mtInformation, [mbOK], 0);
|
||||
then MessageDlg('Debugger', 'Initialization output: ' + LineBreak + S,
|
||||
mtInformation, [mbOK], 0);
|
||||
end;
|
||||
|
||||
function TGDBMIDebugger.ProcessResult(var ANewState: TDBGState;
|
||||
@ -948,7 +949,7 @@ begin
|
||||
if (RightStr(S, 2) = '\n') and (RightStr(S, 3) <> '\\n')
|
||||
then begin
|
||||
// Delete lineend symbol & add lineend
|
||||
S := Copy(S, 1, Length(S) - 2) + LINE_END;
|
||||
S := Copy(S, 1, Length(S) - 2) + LineBreak;
|
||||
end;
|
||||
AResultValues := AResultValues + S;
|
||||
end
|
||||
@ -2065,6 +2066,9 @@ initialization
|
||||
end.
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.38 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.37 2003/08/08 10:24:48 mattias
|
||||
fixed initialenabled, debuggertype, linkscaner open string constant
|
||||
|
||||
|
@ -37,7 +37,8 @@ unit SSHGDBMIDebugger;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Dialogs, Controls, GDBMIDebugger, DBGUtils, BaseDebugManager;
|
||||
Classes, SysUtils, Dialogs, Controls, LazConf, GDBMIDebugger, DBGUtils,
|
||||
BaseDebugManager;
|
||||
|
||||
type
|
||||
TSSHGDBMIDebugger = class(TGDBMIDebugger)
|
||||
@ -81,7 +82,7 @@ begin
|
||||
if Pos('authenticity', Line) > 0
|
||||
then begin
|
||||
//
|
||||
S := Line + LINE_END + ReadLine + ReadLine;
|
||||
S := Line + LineBreak + ReadLine + ReadLine;
|
||||
if MessageDlg('Debugger', S, mtConfirmation, [mbYes, mbNo], 0) <> mrYes
|
||||
then begin
|
||||
SendCmdLn('no');
|
||||
@ -107,7 +108,7 @@ begin
|
||||
// something else, read the line
|
||||
Line := ReadLine;
|
||||
if MessageDlg('Debugger',
|
||||
'Response: ' + LINE_END + Line + LINE_END + 'Continue ?',
|
||||
'Response: ' + LineBreak + Line + LineBreak + 'Continue ?',
|
||||
mtConfirmation, [mbYes, mbNo], 0) <> mrYes
|
||||
then begin
|
||||
DebugProcess.Terminate(0);
|
||||
@ -126,7 +127,7 @@ begin
|
||||
else begin
|
||||
// We got an unexpected result
|
||||
MessageDlg('Debugger',
|
||||
'Unexpected result:' + LINE_END + Line + LINE_END + 'The debugger wil be terminated.',
|
||||
'Unexpected result:' + LineBreak + Line + LineBreak + 'The debugger wil be terminated.',
|
||||
mtInformation, [mbOK], 0);
|
||||
DebugProcess.Terminate(0);
|
||||
end;
|
||||
@ -139,6 +140,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.3 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.2 2003/07/30 23:15:39 marc
|
||||
* Added RegisterDebugger
|
||||
|
||||
|
@ -26,7 +26,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, LResources, StdCtrls,
|
||||
Buttons, ExtCtrls, IDEProcs, LazarusIDEStrConsts;
|
||||
Buttons, ExtCtrls, LazConf, IDEProcs, LazarusIDEStrConsts;
|
||||
|
||||
type
|
||||
TAboutForm = class(TForm)
|
||||
@ -70,7 +70,7 @@ begin
|
||||
FPixmap.LoadFromLazarusResource('lazarus_about_logo');
|
||||
Label1.Caption := lisVersion+' #: '+lisLazarusVersionString;
|
||||
|
||||
Memo1.Lines.Text:=Format(lisAboutLazarusMsg,[EmptyLine,EmptyLine,EmptyLine]);
|
||||
Memo1.Lines.Text:=Format(lisAboutLazarusMsg,[LineBreak,LineBreak,LineBreak]);
|
||||
Button1.Caption:=lisClose;
|
||||
|
||||
OnResize:=@AboutFormResize;
|
||||
|
@ -40,7 +40,7 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, Forms, Controls, Dialogs, Menus, FileCtrl, Laz_XMLCfg,
|
||||
SynEdit, CodeCache, CodeToolManager, DebugOptionsFrm,
|
||||
SynEdit, CodeCache, CodeToolManager, LazConf, DebugOptionsFrm,
|
||||
CompilerOptions, EditorOptions, EnvironmentOpts, KeyMapping, UnitEditor,
|
||||
Project, IDEProcs, InputHistory, Debugger, RunParamsOpts, ExtToolDialog,
|
||||
IDEOptionDefs, LazarusIDEStrConsts, ProjectDefs, BaseDebugManager, MainBar,
|
||||
@ -436,9 +436,9 @@ end;
|
||||
procedure TManagedBreakPoint.OnSourceMarkGetHint(SenderMark: TSourceMark;
|
||||
var Hint: string);
|
||||
begin
|
||||
Hint:=GetBreakPointStateDescription(Self)+EndOfLine
|
||||
+'Hitcount: '+IntToStr(Hitcount)+EndOfLine
|
||||
+'Action: '+GetBreakPointActionsDescription(Self)+EndOfLine
|
||||
Hint:=GetBreakPointStateDescription(Self)+LineBreak
|
||||
+'Hitcount: '+IntToStr(Hitcount)+LineBreak
|
||||
+'Action: '+GetBreakPointActionsDescription(Self)+LineBreak
|
||||
+'Condition: '+Expression;
|
||||
end;
|
||||
|
||||
@ -1574,6 +1574,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.61 2003/08/15 14:28:47 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.60 2003/08/08 10:24:47 mattias
|
||||
fixed initialenabled, debuggertype, linkscaner open string constant
|
||||
|
||||
|
@ -77,7 +77,7 @@ implementation
|
||||
|
||||
|
||||
const
|
||||
LineBreak = {$IFDEF win32}#13+{$ENDIF}#10;
|
||||
LineBreak = #10;
|
||||
ContextLineCount = 3;
|
||||
|
||||
type
|
||||
|
@ -1023,14 +1023,8 @@ begin
|
||||
'EnvironmentOptions/CompilerFilename/Value',FCompilerFilename));
|
||||
LoadRecentList(XMLConfig,FCompilerFileHistory,
|
||||
'EnvironmentOptions/CompilerFilename/History/');
|
||||
if FCompilerFileHistory.Count=0 then begin
|
||||
{$IFDEF win32}
|
||||
FCompilerFileHistory.Add('c:\pp\bin\win32\ppc386.exe');
|
||||
{$ELSE}
|
||||
FCompilerFileHistory.Add('/usr/bin/ppc386');
|
||||
FCompilerFileHistory.Add('/opt/fpc/ppc386');
|
||||
{$ENDIF}
|
||||
end;
|
||||
if FCompilerFileHistory.Count=0 then
|
||||
GetDefaultCompilerFilenames(FCompilerFileHistory);
|
||||
FPCSourceDirectory:=XMLConfig.GetValue(
|
||||
'EnvironmentOptions/FPCSourceDirectory/Value',FFPCSourceDirectory);
|
||||
LoadRecentList(XMLConfig,FFPCSourceDirHistory,
|
||||
@ -1043,15 +1037,8 @@ begin
|
||||
'EnvironmentOptions/TestBuildDirectory/Value',FTestBuildDirectory);
|
||||
LoadRecentList(XMLConfig,FTestBuildDirHistory,
|
||||
'EnvironmentOptions/TestBuildDirectory/History/');
|
||||
if FTestBuildDirHistory.Count=0 then begin
|
||||
{$IFDEF win32}
|
||||
FTestBuildDirHistory.Add('c:\tmp\');
|
||||
FTestBuildDirHistory.Add('c:\windows\temp\');
|
||||
{$ELSE}
|
||||
FTestBuildDirHistory.Add('/tmp/');
|
||||
FTestBuildDirHistory.Add('/var/tmp/');
|
||||
{$ENDIF}
|
||||
end;
|
||||
if FTestBuildDirHistory.Count=0 then
|
||||
GetDefaultTestBuildDirs(FTestBuildDirHistory);
|
||||
|
||||
// backup
|
||||
LoadBackupInfo(FBackupInfoProjectFiles
|
||||
|
@ -30,7 +30,8 @@ unit IDEProcs;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Laz_XMLCfg, GetText, FileCtrl, FileProcs, SynRegExpr;
|
||||
Classes, SysUtils, Laz_XMLCfg, GetText, FileCtrl, FileProcs, SynRegExpr,
|
||||
LazConf;
|
||||
|
||||
type
|
||||
// comments
|
||||
@ -67,12 +68,6 @@ type
|
||||
procedure(const ErrorData: TCopyErrorData; var Handled: boolean;
|
||||
Data: TObject) of object;
|
||||
|
||||
//
|
||||
const
|
||||
// ToDo: find the constant in the fpc units.
|
||||
EndOfLine: shortstring={$IFDEF win32}#13+{$ENDIF}#10;
|
||||
EmptyLine: shortstring={$IFDEF win32}#13#10#13#10{$ELSE}#10#10{$ENDIF};
|
||||
|
||||
// file operations
|
||||
function BackupFile(const Filename, BackupFilename: string): boolean;
|
||||
function ClearFile(const Filename: string; RaiseOnError: boolean): boolean;
|
||||
|
@ -156,6 +156,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings);
|
||||
begin
|
||||
List.Add('/usr/bin/ppc386');
|
||||
List.Add('/opt/fpc/ppc386');
|
||||
end;
|
||||
|
||||
procedure GetDefaultTestBuildDirs(List: TStrings);
|
||||
begin
|
||||
List.Add('/tmp/');
|
||||
List.Add('/var/tmp/');
|
||||
end;
|
||||
|
||||
{---------------------------------------------------------------------------
|
||||
procedure InternalInit;
|
||||
---------------------------------------------------------------------------}
|
||||
|
@ -100,7 +100,7 @@ end;
|
||||
|
||||
function FindDefaultCompilerPath: string;
|
||||
begin
|
||||
Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':',
|
||||
Result:=SearchFileInPath('ppc386.exe','',GetEnv('PATH'),':',
|
||||
[sffDontSearchInBasePath]);
|
||||
if Result<>'' then exit;
|
||||
Result:='c:\pp\bin\win32\ppc386.exe';
|
||||
@ -109,7 +109,7 @@ end;
|
||||
|
||||
function FindDefaultMakePath: string;
|
||||
begin
|
||||
Result:=SearchFileInPath('make','',GetEnv('PATH'),':',
|
||||
Result:=SearchFileInPath('make.exe','',GetEnv('PATH'),':',
|
||||
[sffDontSearchInBasePath]);
|
||||
end;
|
||||
|
||||
@ -142,6 +142,17 @@ begin
|
||||
if DirectoryExists(Result) then exit;
|
||||
end;
|
||||
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings);
|
||||
begin
|
||||
List.Add('c:\pp\bin\win32\ppc386.exe');
|
||||
end;
|
||||
|
||||
procedure GetDefaultTestBuildDirs(List: TStrings);
|
||||
begin
|
||||
List.Add('c:\tmp\');
|
||||
List.Add('c:\windows\temp\');
|
||||
end;
|
||||
|
||||
{---------------------------------------------------------------------------
|
||||
procedure InternalInit;
|
||||
---------------------------------------------------------------------------}
|
||||
@ -155,6 +166,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.9 2003/08/15 14:01:20 mattias
|
||||
combined lazconf things for unix
|
||||
|
||||
|
@ -46,7 +46,7 @@ interface
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
SysUtils, Classes, FileCtrl, IDEProcs;
|
||||
SysUtils, Classes, FileCtrl;
|
||||
|
||||
{ Config Path Functions }
|
||||
|
||||
@ -79,6 +79,14 @@ uses
|
||||
// returns the standard file extension (e.g '.exe')
|
||||
function GetDefaultExecutableExt: string;
|
||||
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings);
|
||||
procedure GetDefaultTestBuildDirs(List: TStrings);
|
||||
|
||||
const
|
||||
// ToDo: find the constant in the fpc units.
|
||||
LineBreak = {$IFDEF win32}#13+{$ENDIF}#10;
|
||||
EmptyLine = LineBreak+LineBreak;
|
||||
EndOfLine: shortstring = LineBreak;
|
||||
|
||||
implementation
|
||||
|
||||
@ -130,6 +138,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.17 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.16 2003/08/15 14:01:20 mattias
|
||||
combined lazconf things for unix
|
||||
|
||||
|
@ -511,8 +511,6 @@ const
|
||||
'.pas', '.pas', '.pas', '.pas', '.txt', '.pas'
|
||||
);
|
||||
|
||||
DefaultTargetFileExt : string = {$IFDEF win32}'.exe'{$ELSE}''{$ENDIF};
|
||||
|
||||
DefaultProjectFlags = [pfSaveClosedUnits];
|
||||
ProjectFlagNames : array[TProjectFlag] of string = (
|
||||
'SaveClosedFiles', 'SaveOnlyProjectUnits'
|
||||
@ -1194,7 +1192,7 @@ begin
|
||||
UpdateProjectDirectory;
|
||||
fPublishOptions:=TPublishProjectOptions.Create(Self);
|
||||
fRunParameterOptions:=TRunParamsOptions.Create;
|
||||
fTargetFileExt := DefaultTargetFileExt;
|
||||
fTargetFileExt := GetDefaultExecutableExt;
|
||||
fTitle := '';
|
||||
fUnitList := TList.Create; // list of TUnitInfo
|
||||
|
||||
@ -1480,7 +1478,7 @@ begin
|
||||
'ProjectOptions/General/AutoCreateForms/Value', true);
|
||||
IconPath := xmlconfig.GetValue('ProjectOptions/General/IconPath/Value', './');
|
||||
TargetFileExt := xmlconfig.GetValue(
|
||||
'ProjectOptions/General/TargetFileExt/Value', DefaultTargetFileExt);
|
||||
'ProjectOptions/General/TargetFileExt/Value', GetDefaultExecutableExt);
|
||||
Title := xmlconfig.GetValue('ProjectOptions/General/Title/Value', '');
|
||||
fJumpHistory.LoadFromXMLConfig(xmlconfig,'ProjectOptions/');
|
||||
if FileVersion<2 then
|
||||
@ -1642,7 +1640,7 @@ begin
|
||||
fProjectInfoFile := '';
|
||||
UpdateProjectDirectory;
|
||||
fPublishOptions.Clear;
|
||||
fTargetFileExt := DefaultTargetFileExt;
|
||||
fTargetFileExt := GetDefaultExecutableExt;
|
||||
fTitle := '';
|
||||
EndUpdate;
|
||||
end;
|
||||
@ -2668,6 +2666,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.133 2003/08/15 14:28:48 mattias
|
||||
clean up win32 ifdefs
|
||||
|
||||
Revision 1.132 2003/07/14 09:03:39 mattias
|
||||
deactivated FCL TDataModule
|
||||
|
||||
|
@ -41,7 +41,8 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Buttons, ComCtrls, StdCtrls, ExtCtrls,
|
||||
FileCtrl, LResources, Dialogs, LCLProc,
|
||||
IDEProcs, PackageDefs, LazarusIDEStrConsts, IDEOptionDefs, PackageSystem;
|
||||
LazConf, IDEProcs, PackageDefs, LazarusIDEStrConsts, IDEOptionDefs,
|
||||
PackageSystem;
|
||||
|
||||
type
|
||||
TOpenInstalledPackagesDlg = class(TCustomForm)
|
||||
@ -125,7 +126,7 @@ begin
|
||||
Format(lisOIPFilename, [CurPkg.Filename]);
|
||||
if CurPkg.AutoCreated then
|
||||
HintStr:=Format(lisOIPThisPackageWasAutomaticallyCreated, [HintStr+
|
||||
EndOfLine]);
|
||||
LineBreak]);
|
||||
if CurPkg.Missing then
|
||||
HintStr:=Format(lisOIPThisPackageIsInstalledButTheLpkFileWasNotFound, [
|
||||
HintStr+EndOfLine]);
|
||||
|
@ -40,7 +40,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Buttons, ComCtrls,
|
||||
StdCtrls, ExtCtrls, Menus, Dialogs, Graphics, FileCtrl, AVL_Tree,
|
||||
LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts,
|
||||
LazConf, LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts,
|
||||
Project, BrokenDependenciesDlg, PackageDefs, PackageSystem, PackageEditor;
|
||||
|
||||
type
|
||||
@ -531,7 +531,7 @@ begin
|
||||
// filename and title
|
||||
InfoStr:=Format(lisOIPFilename, [Pkg.Filename]);
|
||||
// state
|
||||
InfoStr:=Format(lisPckExplState, [InfoStr+EndOfLine]);
|
||||
InfoStr:=Format(lisPckExplState, [InfoStr+LineBreak]);
|
||||
if Pkg.AutoCreated then
|
||||
AddState(lisPckExplAutoCreated);
|
||||
if Pkg.Installed<>pitNope then
|
||||
@ -540,7 +540,7 @@ begin
|
||||
AddState(lisPckExplInstallOnNextStart);
|
||||
if (Pkg.AutoInstall=pitNope) and (Pkg.Installed<>pitNope) then
|
||||
AddState(lisPckExplUninstallOnNextStart);
|
||||
InfoStr:=Format(lisOIPDescriptionDescription, [InfoStr+EndOfLine,
|
||||
InfoStr:=Format(lisOIPDescriptionDescription, [InfoStr+LineBreak,
|
||||
BreakString(Pkg.Description, 60, length(lisOIPDescription))]);
|
||||
end;
|
||||
InfoMemo.Text:=InfoStr;
|
||||
|
Loading…
Reference in New Issue
Block a user