瀏覽代碼

Merged revisions 7224-7228,7230,7233,7239-7241,7244,7246,7253,7263,7275,7277,7279-7281,7285,7288-7289,7291-7293,7296,7300,7303,7310,7312,7318,7340-7341,7343,7345,7372-7373,7375-7376,7379,7381,7383-7388,7391-7392,7400,7404-7406,7411,7417-7418,7422,7425,7436,7441-7442,7444-7445,7450,7456,7463,7467,7475,7479,7486,7504,7506-7509,7522,7527,7534-7536,7545,7547-7550,7558-7559,7563-7565,7567,7570-7571,7573-7577,7586,7589,7592-7594,7607,7612,7615,7619-7620,7622-7623,7626,7628,7631,7633,7646,7663,7677,7681-7683,7689,7697,7704-7712,7725,7736,7738,7740,7744-7746,7751,7753,7764,7767,7769-7770,7776-7777,7788,7830,7836-7839,7846,7849,7862,7864-7865,7869,7872,7877,7882,7927-7929,7953,7961,7967,7971,7986-7987,7990-7994,7998-8000,8004-8006,8008-8012,8016,8027,8034,8036-8037,8039,8044,8046,8048,8051,8060,8071,8075-8076,8082-8083,8087-8089,8095-8096,8099-8100,8136,8187,8190,8193 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r7224 | jonas | 2007-05-01 11:21:53 +0200 (Tue, 01 May 2007) | 4 lines

+ added Mac OS X Terminal.app profile for the IDE:
* white on black
* correct mapping for most keys
........
r7253 | pierre | 2007-05-04 00:01:49 +0200 (Fri, 04 May 2007) | 1 line

* correct Read/write methods to use same parameter type as TStream ancestors
........
r7312 | pierre | 2007-05-12 00:14:54 +0200 (Sat, 12 May 2007) | 1 line

* more option updates
........
r7417 | pierre | 2007-05-22 08:59:54 +0200 (Tue, 22 May 2007) | 1 line

* avoid crash if removing several editor windows
........
r7418 | pierre | 2007-05-22 09:01:26 +0200 (Tue, 22 May 2007) | 1 line

+ Add GetLineCount method to TMemoryTextFile object
........
r7545 | pierre | 2007-06-01 18:15:32 +0200 (Fri, 01 Jun 2007) | 1 line

further html improvements
........
r7547 | pierre | 2007-06-02 00:54:27 +0200 (Sat, 02 Jun 2007) | 1 line

clean up DocDecodeNamedEntity
........
r7548 | pierre | 2007-06-02 01:23:09 +0200 (Sat, 02 Jun 2007) | 1 line

more DocDecodeNamedEntity cleanup
........
r7549 | pierre | 2007-06-02 01:59:59 +0200 (Sat, 02 Jun 2007) | 1 line

* Use bright forground colors for ansi files
........
r7550 | pierre | 2007-06-02 02:34:19 +0200 (Sat, 02 Jun 2007) | 1 line

* avoid debug message if DEBUG is not defined
........
r7577 | pierre | 2007-06-04 17:01:39 +0200 (Mon, 04 Jun 2007) | 1 line

* more switches updates
........
r8193 | florian | 2007-07-29 19:28:16 +0200 (Sun, 29 Jul 2007) | 2 lines

* take care of the efSyntaxHighlight flag when checking if syntax highlighting shall be on or off, resolves #4566
........

git-svn-id: branches/fixes_2_2@8546 -

peter 18 年之前
父節點
當前提交
7a79edacd7
共有 7 個文件被更改,包括 399 次插入37 次删除
  1. 1 0
      .gitattributes
  2. 21 3
      ide/Makefile
  3. 1 1
      ide/Makefile.fpc
  4. 274 0
      ide/fp.term
  5. 3 2
      ide/fpide.pas
  6. 31 11
      ide/fpmopts.inc
  7. 68 20
      ide/fpswitch.pas

+ 1 - 0
.gitattributes

@@ -649,6 +649,7 @@ ide/fakegdb/gdbcon.pas svneol=native#text/plain
 ide/fakegdb/gdbint.pas svneol=native#text/plain
 ide/fp.ans -text
 ide/fp.pas svneol=native#text/plain
+ide/fp.term -text svneol=unset#application/octet-stream
 ide/fp32.ico -text
 ide/fp32.rc -text
 ide/fpcalc.pas svneol=native#text/plain

+ 21 - 3
ide/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/08/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/08/22]
 #
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -231,7 +231,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=ide
-override PACKAGE_VERSION=2.2.1
+override PACKAGE_VERSION=2.0.0
 ifndef PPC_TARGET
 PPC_TARGET=$(CPU_TARGET)
 endif
@@ -409,6 +409,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=compiler
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=compiler
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=compiler
 endif
@@ -562,6 +565,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fp
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fp
 endif
@@ -717,6 +723,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-Sg
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-Sg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-Sg
 endif
@@ -1800,6 +1809,12 @@ REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_GDBINT=1
 REQUIRE_PACKAGES_REGEXPR=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FV=1
+REQUIRE_PACKAGES_GDBINT=1
+REQUIRE_PACKAGES_REGEXPR=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
@@ -2661,6 +2676,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_COMPILER=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_COMPILER=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_COMPILER=1
 endif

+ 1 - 1
ide/Makefile.fpc

@@ -6,7 +6,7 @@
 
 [package]
 name=ide
-version=2.2.1
+version=2.0.0
 
 [target]
 dirs=compiler

+ 274 - 0
ide/fp.term

@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>WindowSettings</key>
+	<array>
+		<dict>
+			<key>AutoFocus</key>
+			<string>NO</string>
+			<key>Autowrap</key>
+			<string>NO</string>
+			<key>BackgroundImagePath</key>
+			<string></string>
+			<key>Backwrap</key>
+			<string>YES</string>
+			<key>Bell</key>
+			<string>NO</string>
+			<key>BlinkCursor</key>
+			<string>NO</string>
+			<key>BlinkText</key>
+			<string>YES</string>
+			<key>CleanCommands</key>
+			<string>rlogin;telnet</string>
+			<key>Columns</key>
+			<string>132</string>
+			<key>CursorShape</key>
+			<string>0</string>
+			<key>CustomTitle</key>
+			<string>Terminal</string>
+			<key>DeleteKeySendsBackspace</key>
+			<string>NO</string>
+			<key>DisableAnsiColors</key>
+			<string>NO</string>
+			<key>DoubleBold</key>
+			<string>YES</string>
+			<key>DoubleColumnsForDoubleWide</key>
+			<string>NO</string>
+			<key>DoubleWideChars</key>
+			<string>YES</string>
+			<key>EnableDragCopy</key>
+			<string>YES</string>
+			<key>ExecutionString</key>
+			<string>/usr/local/bin/fp</string>
+			<key>FontAntialiasing</key>
+			<string>NO</string>
+			<key>FontHeightSpacing</key>
+			<string>1</string>
+			<key>FontWidthSpacing</key>
+			<string>1</string>
+			<key>IsMiniaturized</key>
+			<string>NO</string>
+			<key>KeyBindings</key>
+			<dict>
+				<key>$F700</key>
+				<string></string>
+				<key>$F701</key>
+				<string></string>
+				<key>$F702</key>
+				<string></string>
+				<key>$F703</key>
+				<string></string>
+				<key>$F704</key>
+				<string>OP</string>
+				<key>$F705</key>
+				<string>OQ</string>
+				<key>$F706</key>
+				<string>OR</string>
+				<key>$F707</key>
+				<string>OS</string>
+				<key>$F708</key>
+				<string>[25~</string>
+				<key>$F709</key>
+				<string>[26~</string>
+				<key>$F70A</key>
+				<string>[28~</string>
+				<key>$F70B</key>
+				<string>[29~</string>
+				<key>$F70C</key>
+				<string>[31~</string>
+				<key>$F70D</key>
+				<string>[22~</string>
+				<key>$F70E</key>
+				<string>[33~</string>
+				<key>$F70F</key>
+				<string>[34~</string>
+				<key>$F728</key>
+				<string>[3~</string>
+				<key>$F729</key>
+				<string></string>
+				<key>$F72B</key>
+				<string></string>
+				<key>$F72C</key>
+				<string>[5~</string>
+				<key>$F72D</key>
+				<string>[6~</string>
+				<key>F704</key>
+				<string>OP</string>
+				<key>F705</key>
+				<string>OQ</string>
+				<key>F706</key>
+				<string>OR</string>
+				<key>F707</key>
+				<string>OS</string>
+				<key>F708</key>
+				<string>[15~</string>
+				<key>F709</key>
+				<string>[17~</string>
+				<key>F70A</key>
+				<string>[18~</string>
+				<key>F70B</key>
+				<string>[19~</string>
+				<key>F70C</key>
+				<string>[20~</string>
+				<key>F70D</key>
+				<string>[21~</string>
+				<key>F70E</key>
+				<string>[23~</string>
+				<key>F70F</key>
+				<string>[24~</string>
+				<key>F710</key>
+				<string>[25~</string>
+				<key>F711</key>
+				<string>[26~</string>
+				<key>F712</key>
+				<string>[28~</string>
+				<key>F713</key>
+				<string>[29~</string>
+				<key>F714</key>
+				<string>[31~</string>
+				<key>F715</key>
+				<string>[32~</string>
+				<key>F716</key>
+				<string>[33~</string>
+				<key>F717</key>
+				<string>[34~</string>
+				<key>F728</key>
+				<string>[3~</string>
+				<key>F729</key>
+				<string></string>
+				<key>F72B</key>
+				<string></string>
+				<key>F72C</key>
+				<string>[5~</string>
+				<key>F72D</key>
+				<string>[6~</string>
+				<key>^F700</key>
+				<string></string>
+				<key>^F701</key>
+				<string></string>
+				<key>^F702</key>
+				<string></string>
+				<key>^F703</key>
+				<string></string>
+				<key>^F704</key>
+				<string>OP</string>
+				<key>^F705</key>
+				<string>OQ</string>
+				<key>^F706</key>
+				<string>OR</string>
+				<key>^F707</key>
+				<string>OS</string>
+				<key>^F708</key>
+				<string>[15~</string>
+				<key>^F709</key>
+				<string>[17~</string>
+				<key>^F70A</key>
+				<string>[18~</string>
+				<key>^F70B</key>
+				<string>[19~</string>
+				<key>^F70C</key>
+				<string>[20~</string>
+				<key>^F70D</key>
+				<string>[21~</string>
+				<key>^F728</key>
+				<string>[3~</string>
+				<key>^F729</key>
+				<string></string>
+				<key>^F72B</key>
+				<string></string>
+				<key>~F704</key>
+				<string>OP</string>
+				<key>~F705</key>
+				<string>OQ</string>
+				<key>~F706</key>
+				<string>OR</string>
+				<key>~F707</key>
+				<string>OS</string>
+				<key>~F708</key>
+				<string>[15~</string>
+				<key>~F709</key>
+				<string>[17~</string>
+				<key>~F70A</key>
+				<string>[18~</string>
+				<key>~F70B</key>
+				<string>[19~</string>
+				<key>~F70C</key>
+				<string>[20~</string>
+				<key>~F70D</key>
+				<string>[21~</string>
+				<key>~F70E</key>
+				<string>[23~</string>
+				<key>~F70F</key>
+				<string>[24~</string>
+				<key>~F710</key>
+				<string>[25~</string>
+				<key>~F711</key>
+				<string>[26~</string>
+				<key>~F712</key>
+				<string>[28~</string>
+			</dict>
+			<key>Meta</key>
+			<string>27</string>
+			<key>NSFixedPitchFont</key>
+			<string>Monaco</string>
+			<key>NSFixedPitchFontSize</key>
+			<real>10</real>
+			<key>OptionClickToMoveCursor</key>
+			<string>NO</string>
+			<key>PadBottom</key>
+			<string>3</string>
+			<key>PadLeft</key>
+			<string>5</string>
+			<key>PadRight</key>
+			<string>3</string>
+			<key>PadTop</key>
+			<string>3</string>
+			<key>RewrapOnResize</key>
+			<string>YES</string>
+			<key>Rows</key>
+			<string>59</string>
+			<key>SaveLines</key>
+			<string>10000</string>
+			<key>ScrollRegionCompat</key>
+			<string>NO</string>
+			<key>ScrollRows</key>
+			<string>0</string>
+			<key>Scrollback</key>
+			<string>YES</string>
+			<key>Scrollbar</key>
+			<string>YES</string>
+			<key>Shell</key>
+			<string></string>
+			<key>ShellExitAction</key>
+			<string>2</string>
+			<key>StrictEmulation</key>
+			<string>NO</string>
+			<key>StringEncoding</key>
+			<string>4</string>
+			<key>TermCapString</key>
+			<string>xterm-color</string>
+			<key>TerminalOpaqueness</key>
+			<real>1</real>
+			<key>TextColors</key>
+			<string>0.500 0.500 0.500 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.500 0.500 0.500 0.667 0.667 0.667 1.000 1.000 1.000 </string>
+			<key>TitleBits</key>
+			<string>27</string>
+			<key>Translate</key>
+			<string>YES</string>
+			<key>UseCtrlVEscapes</key>
+			<string>YES</string>
+			<key>VisualBell</key>
+			<string>YES</string>
+			<key>WinLocULY</key>
+			<string>1002</string>
+			<key>WinLocX</key>
+			<string>35</string>
+			<key>WinLocY</key>
+			<string>0</string>
+			<key>WindowCloseAction</key>
+			<string>1</string>
+		</dict>
+	</array>
+</dict>
+</plist>

+ 3 - 2
ide/fpide.pas

@@ -535,7 +535,8 @@ resourcestring  menu_local_gotosource = '~G~oto source';
                 label_compiler_mode = 'Compiler ~m~ode';
                 label_compiler_runtimechecks = 'Run-time checks';
                 label_compiler_optimizations = 'Optimizations';
-                label_compiler_targetprocessor = 'Target processor';
+                label_compiler_opt_targetprocessor = 'Optimization target processor';
+                label_compiler_codegen_targetprocessor = 'Code generation target processor';
                 label_compiler_linkafter = 'Linking stage';
                 label_compiler_verboseswitches = 'Verbose Switches';
                 label_compiler_browser = 'Browser';
@@ -767,7 +768,7 @@ end;
 
 function IDEUseSyntaxHighlight(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
 begin
-  IDEUseSyntaxHighlight:=(Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts);
+  IDEUseSyntaxHighlight:=(Editor^.IsFlagSet(efSyntaxHighlight)) and ((Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts));
 end;
 
 function IDEUseTabsPattern(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}

+ 31 - 11
ide/fpmopts.inc

@@ -63,7 +63,7 @@ procedure TIDEApp.DoCompilerSwitch;
 var R,R2,R3,TabR,TabIR: TRect;
     D: PCenterDialog;
     CB1,CB2,CB3,CB4,CB5: PCheckBoxes;
-    RB1,RB2,RB3,RB4,RB5,RB6: PRadioButtons;
+    RB1,RB1b,RB2,RB3,RB4,RB5,RB6: PRadioButtons;
     Items: PSItem;
     IL: PEditorInputLine;
     IL2: PEditorInputLine;
@@ -71,7 +71,7 @@ var R,R2,R3,TabR,TabIR: TRect;
     I,L: longint;
     Tab: PTab;
     Label11,Label12,
-    Label21,Label22,Label23,
+    Label21,Label22,Label23,Label23b,
     Label31,Label41,
     Label51,Label52,Label53: PLabel;
 begin
@@ -172,22 +172,39 @@ begin
     R2.B.Y:=R2.A.Y+1;
 
     { --- Sheet 3 --- }
-    Count:=ProcessorSwitches^.ItemCount;
+    Count:=ProcessorOptimizationSwitches^.ItemCount;
     R.Copy(TabIR);
     R2.Copy(R);
     R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2;
+    Dec(R2.B.X,4);
     R2.B.Y:=R2.A.Y+Count;
     Items:=nil;
     for I:=Count-1 downto 0 do
-      Items:=NewSItem(ProcessorSwitches^.ItemName(I), Items);
+      Items:=NewSItem(ProcessorOptimizationSwitches^.ItemName(I), Items);
     New(RB1, Init(R2, Items));
-    L:=ProcessorSwitches^.GetCurrSel;
+    L:=ProcessorOptimizationSwitches^.GetCurrSel;
     RB1^.SetData(L);
     Dec(R2.A.Y);
     R2.B.Y:=R2.A.Y+1;
-    New(Label23, Init(R2, label_compiler_targetprocessor, RB1));
+    New(Label23, Init(R2, label_compiler_opt_targetprocessor, RB1));
 
-    { --- Sheet 3 --- }
+    Count:=ProcessorCodeGenerationSwitches^.ItemCount;
+    R.Copy(TabIR);
+    R2.Copy(R);
+    R2.A.X:=R2.A.X+(R2.B.X-R2.A.X) div 2;
+    R2.B.X:=R2.B.X-3;
+    R2.B.Y:=R2.A.Y+Count;
+    Items:=nil;
+    for I:=Count-1 downto 0 do
+      Items:=NewSItem(ProcessorCodeGenerationSwitches^.ItemName(I), Items);
+    New(RB1b, Init(R2, Items));
+    L:=ProcessorCodeGenerationSwitches^.GetCurrSel;
+    RB1b^.SetData(L);
+    Dec(R2.A.Y);
+    R2.B.Y:=R2.A.Y+1;
+    New(Label23b, Init(R2, label_compiler_codegen_targetprocessor, RB1b));
+
+    { --- Sheet 4 --- }
     Count:=VerboseSwitches^.ItemCount;
     R.Copy(TabIR);
     R2.Copy(R);
@@ -204,7 +221,7 @@ begin
     R2.B.Y:=R2.A.Y+1;
     New(Label31, Init(R2, label_compiler_verboseswitches, CB4));
 
-    { --- Sheet 4 --- }
+    { --- Sheet 5 --- }
     Count:=BrowserSwitches^.ItemCount;
     R.Copy(TabIR);
     R2.Copy(R);
@@ -220,7 +237,7 @@ begin
     R2.B.Y:=R2.A.Y+1;
     New(Label41, Init(R2, label_compiler_browser, RB4));
 
-    { --- Sheet 5 --- }
+    { --- Sheet 6 --- }
     Count:=AsmReaderSwitches^.ItemCount;
     R2.Copy(TabIR);
     R2.B.X:=R2.B.X-(R2.B.X-R2.A.X) div 2;
@@ -287,7 +304,9 @@ begin
       NewTabDef('~P~rocessor',RB1,
         NewTabItem(Label23,
         NewTabItem(RB1,
-        nil)),
+        NewTabItem(Label23b,
+        NewTabItem(RB1b,
+        nil)))),
       NewTabDef(page_compiler_verbose,CB4,
         NewTabItem(Label31,
         NewTabItem(CB4,
@@ -341,7 +360,8 @@ begin
     for I:=0 to VerboseSwitches^.ItemCount-1 do
       VerboseSwitches^.SetBooleanItem(I,CB4^.Mark(I));
     OptimizingGoalSwitches^.SetCurrSel(RB3^.Value);
-    ProcessorSwitches^.SetCurrSel(RB1^.Value);
+    ProcessorOptimizationSwitches^.SetCurrSel(RB1^.Value);
+    ProcessorCodeGenerationSwitches^.SetCurrSel(RB1b^.Value);
     AsmReaderSwitches^.SetCurrSel(RB5^.Value);
     for I:=0 to AsmInfoSwitches^.ItemCount-1 do
       AsmInfoSwitches^.SetBooleanItem(I,CB5^.Mark(I));

+ 68 - 20
ide/fpswitch.pas

@@ -35,7 +35,7 @@ type
        idStackSize,idHeapSize,idStrictVarStrings,idExtendedSyntax,
        idMMXOps,idTypedAddress,idPackRecords,idPackEnum,idStackFrames,
        idReferenceInfo,idDebugInfo,idBoolEval,
-       idLongString,idTypeInfo);
+       idAnsiString,idTypeInfo);
 
     TSwitchMode = (om_Normal,om_Debug,om_Release);
 
@@ -170,7 +170,8 @@ var
     CodegenSwitches,
     OptimizationSwitches,
     OptimizingGoalSwitches,
-    ProcessorSwitches,
+    ProcessorCodeGenerationSwitches,
+    ProcessorOptimizationSwitches,
     AsmReaderSwitches,
     AsmInfoSwitches,
     AsmOutputSwitches,
@@ -222,6 +223,7 @@ const
       opt_allowstaticinobjects = 'Allow STATIC in objects';
       opt_assertions = 'Include assertion code';
       opt_kylix = 'Load Kylix compat. unit';
+      opt_ansistring = 'Use Ansi Strings';
       opt_strictvarstrings = 'Strict var-strings';
       opt_extendedsyntax = 'Extended syntax';
       opt_allowmmxoperations = 'Allow MMX operations';
@@ -247,15 +249,17 @@ const
       opt_overflowchecking = 'Integer ~o~verflow checking';
       opt_objmethcallvalid = 'Object ~m~ethod call checking';
       { Code generation }
-      opt_pic = '~P~osition independend code';
+      opt_pic = '~P~osition independent code';
       opt_smart = '~C~reate smartlinkable units';
       { Code options }
-      opt_generatefastercode = 'Generate ~f~aster code';
+      //opt_generatefastercode = 'Generate ~f~aster code';
       opt_generatesmallercode = 'Generate s~m~aller code';
       opt_useregistervariables = 'Use regis~t~er-variables';
       opt_uncertainoptimizations = '~U~ncertain optimizations';
       opt_level1optimizations = 'Level ~1~ optimizations';
       opt_level2optimizations = 'Level ~2~ optimizations';
+      opt_level3optimizations = 'Level ~3~ optimizations';
+      { optimization processor target }
       opt_i386486 = 'i~3~86/i486';
       opt_pentium = 'Pentium (tm)';
       opt_pentiummmx = 'PentiumMM~X~ (tm)';
@@ -265,6 +269,7 @@ const
       opt_m68020 = 'm680~2~0';
       { Assembler options }
       opt_directassembler = '~D~irect assembler';
+      opt_defaultassembler = '~D~efault style assembler';
       opt_attassembler = '~A~T&T style assembler';
       opt_intelassembler = '~I~ntel style assembler';
       opt_motassembler = '~M~otorola style assembler';
@@ -274,8 +279,10 @@ const
       opt_listtempallocation = 'list ~t~emp allocation';
       opt_listnodeallocation = 'list ~n~ode allocation';
       opt_useasmpipe = 'use ~p~ipe with assembler';
+      { Assembler output selection }
       opt_usedefaultas = 'Use ~d~efault output';
       opt_usegnuas = 'Use ~G~NU as';
+      { I386 assembler output selection }
       opt_usenasmcoff = 'Use ~N~ASM coff';
       opt_usenasmwin32 = 'Use NASM ~w~in32';
       opt_usenasmwdosx= 'Use ~N~ASM w~d~osx';
@@ -289,6 +296,7 @@ const
       opt_usepecoff = 'Use internal ~p~ecoff';
       opt_usepecoffwdosx = 'Use internal pewdos~x~';
       opt_useelf= 'Use internal ~e~lf';
+
       { Browser options }
       opt_nobrowser = 'N~o~ browser';
       opt_globalonlybrowser = 'Only Glob~a~l browser';
@@ -887,8 +895,11 @@ function TSwitches.ReadItemsCfg(const s:string):boolean;
   begin
     { empty items are not equivalent to others !! }
     { but -dGDB didn't work because of this PM }
-    CheckItem:=((P^.Param='') and ((S='') or (P^.typ=ot_String))) or
-               ((Length(P^.Param)>0) and (P^.Param=Copy(s,1,length(P^.Param))));
+    CheckItem:=((P^.Param='') and ((S='') or (P^.typ in [ot_Boolean,ot_String]))) or
+               ((Length(P^.Param)>0) and (P^.Param=S) and
+                not (P^.typ in [ot_Boolean,ot_String])) or
+               ((Length(P^.Param)>0) and (P^.typ<>ot_Select) and
+                (P^.Param=Copy(s,1,length(P^.Param))));
   end;
 
 var
@@ -941,13 +952,14 @@ begin
      SwitchesMode := SWM;
      Writeln(CfgFile,'#IFDEF '+SwitchesModeStr[SwitchesMode]);
      TargetSwitches^.WriteItemsCfg;
+     CompilerModeSwitches^.WriteItemsCfg;
      VerboseSwitches^.WriteItemsCfg;
      SyntaxSwitches^.WriteItemsCfg;
-     CompilerModeSwitches^.WriteItemsCfg;
      CodegenSwitches^.WriteItemsCfg;
      OptimizationSwitches^.WriteItemsCfg;
      OptimizingGoalSwitches^.WriteItemsCfg;
-     ProcessorSwitches^.WriteItemsCfg;
+     ProcessorCodeGenerationSwitches^.WriteItemsCfg;
+     ProcessorOptimizationSwitches^.WriteItemsCfg;
      AsmReaderSwitches^.WriteItemsCfg;
      AsmInfoSwitches^.WriteItemsCfg;
      AsmOutputSwitches^.WriteItemsCfg;
@@ -1005,6 +1017,8 @@ begin
                res:=CodegenSwitches^.ReadItemsCfg(s);
                if not res then
                  res:=MemorySwitches^.ReadItemsCfg(s);
+               if not res then
+                 res:=ProcessorCodeGenerationSwitches^.ReadItemsCfg(s);
              end;
        'd' : res:=ConditionalSwitches^.ReadItemsCfg(s);
        'F' : res:=DirectorySwitches^.ReadItemsCfg(s);
@@ -1012,7 +1026,7 @@ begin
        'O' : begin
                res:=true;
                if not OptimizationSwitches^.ReadItemsCfg(s) then
-                 if not ProcessorSwitches^.ReadItemsCfg(s) then
+                 if not ProcessorOptimizationSwitches^.ReadItemsCfg(s) then
                    res:=OptimizingGoalSwitches^.ReadItemsCfg(s);
              end;
        'M' : res:=CompilerModeSwitches^.ReadItemsCfg(s);
@@ -1154,6 +1168,7 @@ begin
 //     AddBooleanItem(opt_tp7compatibility,'o',idNone);
 //     AddBooleanItem(opt_delphicompatibility,'d',idNone);
      AddBooleanItem(opt_assertions,'a',idNone);
+     AddBooleanItem(opt_ansistring,'h',idAnsiString);
      AddBooleanItem(opt_kylix,'k',idNone);
      AddBooleanItem(opt_allowstaticinobjects,'s',idNone);
      AddBooleanItem(opt_clikeoperators,'c',idNone);
@@ -1198,17 +1213,18 @@ begin
   New(OptimizingGoalSwitches,InitSelect('O'));
   with OptimizingGoalSwitches^ do
     begin
-       AddSelectItem(opt_generatefastercode,'G',idNone);
-       AddSelectItem(opt_generatesmallercode,'g',idNone);
+       //AddSelectItem(opt_generatefastercode,'G',idNone);
+       AddSelectItem(opt_generatesmallercode,'s',idNone);
     end;
   New(OptimizationSwitches,Init('O'));
   with OptimizationSwitches^ do
    begin
 {$ifdef I386}
-     AddBooleanItem(opt_useregistervariables,'r',idNone);
-     AddBooleanItem(opt_uncertainoptimizations,'u',idNone);
+     AddBooleanItem(opt_useregistervariables,'oregvar',idNone);
+     AddBooleanItem(opt_uncertainoptimizations,'ouncertain',idNone);
      AddBooleanItem(opt_level1optimizations,'1',idNone);
      AddBooleanItem(opt_level2optimizations,'2',idNone);
+     AddBooleanItem(opt_level3optimizations,'3',idNone);
 {$else not I386}
  {$ifdef m68k}
      AddBooleanItem(opt_level1optimizations,'a',idNone);
@@ -1216,8 +1232,36 @@ begin
  {$endif m68k}
 {$endif I386}
    end;
-  New(ProcessorSwitches,InitSelect('O'));
-  with ProcessorSwitches^ do
+  New(ProcessorOptimizationSwitches,InitSelect('O'));
+  with ProcessorOptimizationSwitches^ do
+   begin
+     for cpu:=low(tcputype) to high(tcputype) do
+       begin
+         st:=cputypestr[cpu];
+{$ifdef I386}
+         if st='386' then
+           st:=opt_i386486;
+         if st='PENTIUM' then
+           st:=opt_pentium;
+         if st='PENTIUM2' then
+           st:=opt_pentiummmx;
+         if st='PENTIUM3' then
+           st:=opt_pentiumpro;
+         if st='PENTIUM4' then
+           st:=opt_pentiumiv;
+{$endif not I386}
+{$ifdef m68k}
+         if st='68000' then
+           st:=opt_m68000;
+         if st='68020' then
+           st:=opt_m68020;
+{$endif m68k}
+         if st<>'' then
+           AddSelectItem(st,'p'+cputypestr[cpu],idNone);
+       end;
+   end;
+  New(ProcessorCodeGenerationSwitches,InitSelect('C'));
+  with ProcessorCodeGenerationSwitches^ do
    begin
      for cpu:=low(tcputype) to high(tcputype) do
        begin
@@ -1256,12 +1300,14 @@ begin
   with AsmReaderSwitches^ do
    begin
 {$ifdef I386}
+     AddSelectItem(opt_defaultassembler,'default',idNone);
 {     AddSelectItem(opt_directassembler,'direct',idAsmDirect);}
      AddSelectItem(opt_attassembler,'att',idAsmATT);
      AddSelectItem(opt_intelassembler,'intel',idAsmIntel);
 {$endif I386}
 {$ifdef M68K}
-     AddSelectItem(opt_standardassembler,'standard',idAsmStandard);
+     AddSelectItem(opt_defaultassembler,'default',idNone);
+     //AddSelectItem(opt_standardassembler,'standard',idAsmStandard);
      AddSelectItem(opt_motassembler,'motorola',idAsmMot);
 {$endif M68K}
    end;
@@ -1362,7 +1408,7 @@ begin
        SwitchesMode:=i;
 {$ifdef i386}
        { default is Pentium }
-       ProcessorSwitches^.SetCurrSel(1);
+       ProcessorOptimizationSwitches^.SetCurrSel(1);
        { AT&T reader }
        AsmReaderSwitches^.SetCurrSel(1);
 {$endif i386}
@@ -1432,7 +1478,8 @@ begin
   dispose(CodegenSwitches,Done);
   dispose(OptimizationSwitches,Done);
   dispose(OptimizingGoalSwitches,Done);
-  dispose(ProcessorSwitches,Done);
+  dispose(ProcessorOptimizationSwitches,Done);
+  dispose(ProcessorCodeGenerationSwitches,Done);
   dispose(BrowserSwitches,Done);
   dispose(TargetSwitches,Done);
   dispose(AsmReaderSwitches,Done);
@@ -1497,7 +1544,7 @@ begin
     idReferenceInfo   : AddSwitch('Y'+P^.GetSwitchStr(SM));
     idDebugInfo       : AddSwitch('D'+P^.GetSwitchStr(SM));
     idBoolEval        : AddSwitch('B'+P^.GetSwitchStr(SM));
-    idLongString      : AddSwitch('H'+P^.GetSwitchStr(SM));
+    idAnsiString      : AddSwitch('H'+P^.GetSwitchStr(SM));
     idTypeInfo        : AddSwitch('M'+P^.GetSwitchStr(SM));
    end;
 end;
@@ -1520,7 +1567,8 @@ begin
   EnumSwitches(CodegenSwitches);
   EnumSwitches(OptimizationSwitches);
   EnumSwitches(OptimizingGoalSwitches);
-  EnumSwitches(ProcessorSwitches);
+  EnumSwitches(ProcessorOptimizationSwitches);
+  EnumSwitches(ProcessorCodeGenerationSwitches);
   EnumSwitches(AsmReaderSwitches);
   EnumSwitches(AsmInfoSwitches);
   EnumSwitches(AsmOutputSwitches);