From 1b8b8be9c0635ab458c35316d9635a56283c70af Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 14 Oct 1999 14:22:23 +0000 Subject: [PATCH] * if no ini file is found the ide uses some useful defaults --- ide/text/fpswitch.pas | 62 ++++++++++++++++++++++++++++++++++++++++++- ide/text/winclip.pas | 5 +++- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/ide/text/fpswitch.pas b/ide/text/fpswitch.pas index 31786c56f5..907f80265f 100644 --- a/ide/text/fpswitch.pas +++ b/ide/text/fpswitch.pas @@ -685,6 +685,10 @@ end; *****************************************************************************} procedure InitSwitches; + +var + i,OldSwitchesMode : TSwitchMode; + begin New(SyntaxSwitches,Init('S')); with SyntaxSwitches^ do @@ -813,6 +817,59 @@ begin if SwitchesPath='' then SwitchesPath:=SwitchesName; SwitchesPath:=FExpand(SwitchesPath); + + { setup some useful defaults } + OldSwitchesMode:=SwitchesMode; + for i:=low(TSwitchMode) to high(TSwitchMode) do + begin + SwitchesMode:=i; + { default is Pentium } + ProcessorSwitches^.SetCurrSel(1); + { AT&T reader } + AsmReaderSwitches^.SetCurrSel(1); + { 128k stack } + MemorySwitches^.SetLongintItem(0,65536*2); + { 2 MB heap } + MemorySwitches^.SetLongintItem(1,1024*1024*2); + { goto/lable allowed } + SyntaxSwitches^.SetBooleanItem(3,true); + case i of + om_debug: + begin + { debugging info on } + DebugInfoSwitches^.SetCurrSel(1); + { range checking } + CodegenSwitches^.SetBooleanItem(0,true); + { io checking } + CodegenSwitches^.SetBooleanItem(2,true); + { overflow checking } + CodegenSwitches^.SetBooleanItem(3,true); + end; + om_normal: + begin + OptimizationSwitches^.SetBooleanItem(2,true); + end; + om_release: + begin + OptimizationSwitches^.SetBooleanItem(2,true); + OptimizationSwitches^.SetBooleanItem(3,true); + end; + end; + { set appriopriate default target } +{$ifdef go32v2} + TargetSwitches^.SetCurrSel(1); +{$endif} +{$ifdef linux} + TargetSwitches^.SetCurrSel(2); +{$endif} +{$ifdef win32} + TargetSwitches^.SetCurrSel(4); +{$endif} +{$ifdef os2} + TargetSwitches^.SetCurrSel(3); +{$endif} + end; + SwitchesMode:=OldSwitchesMode; end; @@ -841,7 +898,10 @@ end; end. { $Log$ - Revision 1.13 1999-04-29 09:36:12 peter + Revision 1.14 1999-10-14 14:22:23 florian + * if no ini file is found the ide uses some useful defaults + + Revision 1.13 1999/04/29 09:36:12 peter * fixed hotkeys with Compiler switches * fixed compiler status dialog * Run shows again the output diff --git a/ide/text/winclip.pas b/ide/text/winclip.pas index ddc239a108..354ff68fd2 100644 --- a/ide/text/winclip.pas +++ b/ide/text/winclip.pas @@ -263,5 +263,8 @@ end; end. { - $Log $ + $Log$ + Revision 1.3 1999-10-14 14:22:23 florian + * if no ini file is found the ide uses some useful defaults + }