Pārlūkot izejas kodu

Merged revisions 1040,2592,3246,3297,3431-3433,3436,3443,3451,3453,3467-3468,3474,3479,3483,3495,3534,3572,3770,3776,3801,3836-3837,3879,3890,3940 via svnmerge from
http://[email protected]/svn/fpc/trunk

........
r1040 | florian | 2005-09-02 23:47:45 +0200 (Fri, 02 Sep 2005) | 2 lines

* activated resourcestrings

........
r2592 | daniel | 2006-02-15 12:36:45 +0100 (Wed, 15 Feb 2006) | 2 lines

* Rename Borland convention to CUA-91 convention.

........
r3246 | daniel | 2006-04-17 17:57:57 +0200 (Mon, 17 Apr 2006) | 2 lines

* Fix compilation.

........
r3297 | peter | 2006-04-20 13:27:53 +0200 (Thu, 20 Apr 2006) | 2 lines

* win64 compile fixes

........
r3431 | daniel | 2006-05-06 16:35:42 +0200 (Sat, 06 May 2006) | 2 lines

* Redesigned the directory option menu.

........
r3432 | daniel | 2006-05-06 18:16:25 +0200 (Sat, 06 May 2006) | 4 lines

* IDE version number to 1.0.8
- Remove giveuptimeslice from wutils (duplicate in drivers.pas)
- Remove Unix compat hack (now handled by video unit).

........
r3433 | daniel | 2006-05-06 19:36:24 +0200 (Sat, 06 May 2006) | 2 lines

* Make listbox in window list one column smaller.

........
r3436 | daniel | 2006-05-06 20:54:17 +0200 (Sat, 06 May 2006) | 2 lines

* Cosmetic arrow change

........
r3443 | daniel | 2006-05-07 00:57:20 +0200 (Sun, 07 May 2006) | 3 lines

* Video and keyboard initialization spaghetti organized and hopefully fixed.
- Remove useless function from validate.pas

........
r3451 | daniel | 2006-05-07 17:32:38 +0200 (Sun, 07 May 2006) | 2 lines

- Remove ver1_0 ifdef

........
r3453 | daniel | 2006-05-08 00:32:43 +0200 (Mon, 08 May 2006) | 3 lines

* More ver1_0 defines removed
* Update compiler options

........
r3467 | daniel | 2006-05-10 00:13:21 +0200 (Wed, 10 May 2006) | 2 lines

* Redesigned syntax tab on compiler options screen

........
r3468 | daniel | 2006-05-10 00:18:43 +0200 (Wed, 10 May 2006) | 2 lines

* Reorder options

........
r3474 | daniel | 2006-05-11 09:46:09 +0200 (Thu, 11 May 2006) | 3 lines

* If overflow checking enabled, disable it for hash calculation. IDE
now works fine if range checking and overflow checking are enabled.

........
r3479 | daniel | 2006-05-11 17:01:27 +0200 (Thu, 11 May 2006) | 2 lines

* Remove color selection and startup option menus for now.

........
r3483 | daniel | 2006-05-12 12:07:46 +0200 (Fri, 12 May 2006) | 2 lines

- Remove redundant inttohex function.

........
r3495 | daniel | 2006-05-13 19:50:29 +0200 (Sat, 13 May 2006) | 2 lines

* Val can handle hexadecimal just fine, no need for specialized routines.

........
r3534 | peter | 2006-05-14 22:27:55 +0200 (Sun, 14 May 2006) | 2 lines

* compile fixes

........
r3572 | daniel | 2006-05-18 23:35:46 +0200 (Thu, 18 May 2006) | 2 lines

* Move processor options to their own tab.

........
r3770 | daniel | 2006-06-03 13:30:54 +0200 (Sat, 03 Jun 2006) | 2 lines

* Fix display refresh command.

........
r3776 | daniel | 2006-06-03 16:35:27 +0200 (Sat, 03 Jun 2006) | 2 lines

* Update default compiler options.

........
r3801 | daniel | 2006-06-04 23:24:16 +0200 (Sun, 04 Jun 2006) | 2 lines

* Update paste command after cut/copy.

........
r3836 | daniel | 2006-06-10 17:35:34 +0200 (Sat, 10 Jun 2006) | 2 lines

* Change two precondition checks into assertions.

........
r3837 | daniel | 2006-06-10 20:48:24 +0200 (Sat, 10 Jun 2006) | 2 lines

* Some improvements regarding code readability.

........
r3879 | marco | 2006-06-16 22:04:22 +0200 (Fri, 16 Jun 2006) | 2 lines

* small fixes due to tcentre

........
r3890 | marco | 2006-06-18 15:19:28 +0200 (Sun, 18 Jun 2006) | 2 lines

* Fixes from Dave Strodtman

........
r3940 | hajny | 2006-06-25 15:56:23 +0200 (Sun, 25 Jun 2006) | 1 line

* ugly hyphenation fixed
........

git-svn-id: branches/fixes_2_0@3955 -

peter 19 gadi atpakaļ
vecāks
revīzija
0b12257021

+ 8 - 8
ide/fp.pas

@@ -15,10 +15,10 @@
 program FP;
 program FP;
 
 
 {$ifdef IncRes}
 {$ifdef IncRes}
-{$ifdef win32}
+{$ifdef Windows}
 {$R fpw32t.rc}
 {$R fpw32t.rc}
 {$R fpw32ico.rc}
 {$R fpw32ico.rc}
-{$endif win32}
+{$endif Windows}
 {$endif IncRes}
 {$endif IncRes}
 
 
 {$I globdir.inc}
 {$I globdir.inc}
@@ -31,9 +31,9 @@ program FP;
 
 
 uses
 uses
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
-{$ifdef win32}
+{$ifdef Windows}
   fpcygwin,
   fpcygwin,
-{$endif win32}
+{$endif Windows}
 {$endif NODEBUG}
 {$endif NODEBUG}
 {$ifdef IDEHeapTrc}
 {$ifdef IDEHeapTrc}
   PPheap,
   PPheap,
@@ -176,9 +176,9 @@ begin
                  ButtonCount:=0;
                  ButtonCount:=0;
                end;
                end;
 {$ifdef fpc}
 {$ifdef fpc}
-          'F' :
+{          'F' :
              if Length(Param)=1 then
              if Length(Param)=1 then
-               NoExtendedFrame:=true;
+               NoExtendedFrame:=true;}
 {$ifdef Unix}
 {$ifdef Unix}
           'T' :  DebuggeeTTY:=Copy(Param,2,High(Param));
           'T' :  DebuggeeTTY:=Copy(Param,2,High(Param));
 {$endif Unix}
 {$endif Unix}
@@ -308,10 +308,10 @@ BEGIN
   writeln(bullet+' Compiler Version '+Version_String);
   writeln(bullet+' Compiler Version '+Version_String);
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
   writeln(bullet+' GBD Version '+GDBVersion);
   writeln(bullet+' GBD Version '+GDBVersion);
- {$ifdef win32}
+ {$ifdef Windows}
    writeln(bullet+' Cygwin "',GetCygwinFullName,'" version ',GetCygwinVersionString);
    writeln(bullet+' Cygwin "',GetCygwinFullName,'" version ',GetCygwinVersionString);
    CheckCygwinVersion;
    CheckCygwinVersion;
- {$endif win32}
+ {$endif Windows}
 {$endif NODEBUG}
 {$endif NODEBUG}
 
 
   ProcessParams(true);
   ProcessParams(true);

+ 5 - 3
ide/fpcalc.pas

@@ -111,9 +111,11 @@ uses
 {$ifdef go32v2}
 {$ifdef go32v2}
   dpmiexcp,
   dpmiexcp,
 {$endif}
 {$endif}
-{$ifdef win32}
-  signals,
-{$endif}
+{$ifdef windows}
+ {$ifdef HasSignal}
+    signals,
+  {$endif}
+{$endif windows}
   FPString,FPUtils,FPConst,WUtils;
   FPString,FPUtils,FPConst,WUtils;
 
 
 const
 const

+ 10 - 6
ide/fpcatch.pas

@@ -30,9 +30,13 @@ uses
 uses
 uses
   dpmiexcp;
   dpmiexcp;
 {$endif}
 {$endif}
-{$ifdef win32}
+{$ifdef Windows}
 uses
 uses
-  windows, signals;
+  windows
+  {$ifdef HasSignal}
+    ,signals
+  {$endif}
+  ;
 {$endif}
 {$endif}
 
 
 {$ifdef HasSignal}
 {$ifdef HasSignal}
@@ -204,16 +208,16 @@ Const
   CatchSignalsEnabled : boolean = false;
   CatchSignalsEnabled : boolean = false;
 
 
 Procedure EnableCatchSignals;
 Procedure EnableCatchSignals;
-{$ifdef win32}
+{$ifdef Windows}
   var Mode: DWORD;
   var Mode: DWORD;
-{$endif win32}
+{$endif Windows}
 begin
 begin
   if CatchSignalsEnabled then
   if CatchSignalsEnabled then
     exit;
     exit;
-{$ifdef win32}
+{$ifdef Windows}
   if GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @Mode) then
   if GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @Mode) then
     SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), (Mode or ENABLE_MOUSE_INPUT) and not ENABLE_PROCESSED_INPUT);
     SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), (Mode or ENABLE_MOUSE_INPUT) and not ENABLE_PROCESSED_INPUT);
-{$endif win32}
+{$endif Windows}
 {$ifdef go32v2}
 {$ifdef go32v2}
   djgpp_set_ctrl_c(false);
   djgpp_set_ctrl_c(false);
 {$endif go32v2}
 {$endif go32v2}

+ 4 - 2
ide/fpcompil.pas

@@ -121,8 +121,10 @@ uses
 {$ifdef go32v2}
 {$ifdef go32v2}
   dpmiexcp,
   dpmiexcp,
 {$endif}
 {$endif}
-{$ifdef win32}
-  signals,
+{$ifdef Windows}
+  {$ifdef HasSignal}
+    signals,
+  {$endif}
 {$endif}
 {$endif}
 { $ifdef HasSignal}
 { $ifdef HasSignal}
   fpcatch,
   fpcatch,

+ 26 - 26
ide/fpdebug.pas

@@ -21,9 +21,9 @@ end.
 interface
 interface
 {$i globdir.inc}
 {$i globdir.inc}
 uses
 uses
-{$ifdef win32}
+{$ifdef Windows}
   Windows,
   Windows,
-{$endif win32}
+{$endif Windows}
   Objects,Dialogs,Drivers,Views,
   Objects,Dialogs,Drivers,Views,
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
   GDBCon,GDBInt,
   GDBCon,GDBInt,
@@ -40,7 +40,7 @@ type
 
 
      { if true the current debugger raw will stay in middle of
      { if true the current debugger raw will stay in middle of
        editor window when debugging PM }
        editor window when debugging PM }
-     CenterDebuggerRow : boolean;
+     CenterDebuggerRow : TCentre;
      Disableallinvalidbreakpoints : boolean;
      Disableallinvalidbreakpoints : boolean;
      OrigPwd,  { pwd at startup }
      OrigPwd,  { pwd at startup }
      LastFileName : string;
      LastFileName : string;
@@ -338,9 +338,9 @@ uses
 {$endif DOS}
 {$endif DOS}
   App,Strings,
   App,Strings,
   FVConsts,
   FVConsts,
-{$ifdef win32}
+{$ifdef Windows}
   Windebug,
   Windebug,
-{$endif win32}
+{$endif Windows}
 {$ifdef Unix}
 {$ifdef Unix}
   {$ifdef VER1_0}
   {$ifdef VER1_0}
     Linux,
     Linux,
@@ -468,20 +468,20 @@ begin
 { should we also use / chars ? }
 { should we also use / chars ? }
   for i:=1 to Length(st) do
   for i:=1 to Length(st) do
     if st[i]='\' then
     if st[i]='\' then
-{$ifdef win32}
+{$ifdef Windows}
   { Don't touch at '\ ' used to escapes spaces in windows file names PM }
   { Don't touch at '\ ' used to escapes spaces in windows file names PM }
      if (i=length(st)) or (st[i+1]<>' ') then
      if (i=length(st)) or (st[i+1]<>' ') then
-{$endif win32}
+{$endif Windows}
       st[i]:='/';
       st[i]:='/';
-{$ifdef win32}
-{ for win32 we should convert e:\ into //e/ PM }
+{$ifdef Windows}
+{ for Windows we should convert e:\ into //e/ PM }
   if (length(st)>2) and (st[2]=':') and (st[3]='/') then
   if (length(st)>2) and (st[2]=':') and (st[3]='/') then
     st:=CygDrivePrefix+'/'+st[1]+copy(st,3,length(st));
     st:=CygDrivePrefix+'/'+st[1]+copy(st,3,length(st));
 { support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
 { support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
   for i:=Length(st) downto 1 do
   for i:=Length(st) downto 1 do
     if (st[i]=' ') and ((i=1) or (st[i-1]<>'\')) then
     if (st[i]=' ') and ((i=1) or (st[i-1]<>'\')) then
       st:=copy(st,1,i-1)+'\'+copy(st,i,length(st));
       st:=copy(st,1,i-1)+'\'+copy(st,i,length(st));
-{$endif win32}
+{$endif Windows}
 {$ifdef go32v2}
 {$ifdef go32v2}
 { for go32v2 we should convert //e/ back into e:/  PM }
 { for go32v2 we should convert //e/ back into e:/  PM }
   if (length(st)>3) and (st[1]='/') and (st[2]='/') and (st[4]='/') then
   if (length(st)>3) and (st[1]='/') and (st[2]='/') and (st[4]='/') then
@@ -500,13 +500,13 @@ begin
 {$ifdef Unix}
 {$ifdef Unix}
   OSFileName:=st;
   OSFileName:=st;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
  {$ifndef NODEBUG}
  {$ifndef NODEBUG}
-{ for win32 we should convert /cygdrive/e/ into e:\ PM }
+{ for Windows we should convert /cygdrive/e/ into e:\ PM }
   if pos(CygDrivePrefix+'/',st)=1 then
   if pos(CygDrivePrefix+'/',st)=1 then
     st:=st[Length(CygdrivePrefix)+2]+':\'+copy(st,length(CygdrivePrefix)+4,length(st));
     st:=st[Length(CygdrivePrefix)+2]+':\'+copy(st,length(CygdrivePrefix)+4,length(st));
  {$endif NODEBUG}
  {$endif NODEBUG}
-{$endif win32}
+{$endif Windows}
 { support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
 { support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
   for i:=Length(st) downto 2 do
   for i:=Length(st) downto 2 do
     if (st[i]=' ') and (st[i-1]='\') then
     if (st[i]=' ') and (st[i-1]='\') then
@@ -762,14 +762,14 @@ begin
   else
   else
     begin
     begin
 {$endif SUPPORT_REMOTE}
 {$endif SUPPORT_REMOTE}
-{$ifdef win32}
+{$ifdef Windows}
   { Run the debugge in another console }
   { Run the debugge in another console }
   if DebuggeeTTY<>'' then
   if DebuggeeTTY<>'' then
     Command('set new-console on')
     Command('set new-console on')
   else
   else
     Command('set new-console off');
     Command('set new-console off');
   NoSwitch:=DebuggeeTTY<>'';
   NoSwitch:=DebuggeeTTY<>'';
-{$endif win32}
+{$endif Windows}
 {$ifdef Unix}
 {$ifdef Unix}
   { Run the debuggee in another tty }
   { Run the debuggee in another tty }
   if DebuggeeTTY <> '' then
   if DebuggeeTTY <> '' then
@@ -1262,17 +1262,17 @@ begin
      end;
      end;
   { In case we have something that the compiler touched }
   { In case we have something that the compiler touched }
   AskToReloadAllModifiedFiles;
   AskToReloadAllModifiedFiles;
-{$ifdef win32}
+{$ifdef Windows}
   main_pid_valid:=false;
   main_pid_valid:=false;
-{$endif win32}
+{$endif Windows}
 end;
 end;
 
 
 
 
 procedure TDebugController.DoDebuggerScreen;
 procedure TDebugController.DoDebuggerScreen;
-{$ifdef win32}
+{$ifdef Windows}
   var
   var
    IdeMode : DWord;
    IdeMode : DWord;
-{$endif win32}
+{$endif Windows}
 begin
 begin
   if NoSwitch then
   if NoSwitch then
     begin
     begin
@@ -1284,7 +1284,7 @@ begin
       Message(Application,evBroadcast,cmDebuggerStopped,pointer(ptrint(RunCount)));
       Message(Application,evBroadcast,cmDebuggerStopped,pointer(ptrint(RunCount)));
       PopStatus;
       PopStatus;
     end;
     end;
-{$ifdef win32}
+{$ifdef Windows}
    if NoSwitch then
    if NoSwitch then
      begin
      begin
        { Ctrl-C as normal char }
        { Ctrl-C as normal char }
@@ -1293,16 +1293,16 @@ begin
        SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
        SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
      end;
      end;
    ChangeDebuggeeWindowTitleTo(Stopped_State);
    ChangeDebuggeeWindowTitleTo(Stopped_State);
-{$endif win32}
+{$endif Windows}
 end;
 end;
 
 
 
 
 procedure TDebugController.DoUserScreen;
 procedure TDebugController.DoUserScreen;
 
 
-{$ifdef win32}
+{$ifdef Windows}
   var
   var
    IdeMode : DWord;
    IdeMode : DWord;
-{$endif win32}
+{$endif Windows}
 begin
 begin
   Inc(RunCount);
   Inc(RunCount);
   if NoSwitch then
   if NoSwitch then
@@ -1322,7 +1322,7 @@ begin
       PushStatus(msg_runningprogram);
       PushStatus(msg_runningprogram);
       IDEApp.ShowUserScreen;
       IDEApp.ShowUserScreen;
     end;
     end;
-{$ifdef win32}
+{$ifdef Windows}
    if NoSwitch then
    if NoSwitch then
      begin
      begin
        { Ctrl-C as interrupt }
        { Ctrl-C as interrupt }
@@ -1331,7 +1331,7 @@ begin
        SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
        SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
      end;
      end;
    ChangeDebuggeeWindowTitleTo(Running_State);
    ChangeDebuggeeWindowTitleTo(Running_State);
-{$endif win32}
+{$endif Windows}
 end;
 end;
 
 
 {$endif NODEBUG}
 {$endif NODEBUG}
@@ -2070,7 +2070,7 @@ begin
   if W<>nil then
   if W<>nil then
     begin
     begin
       W^.Select;
       W^.Select;
-      W^.Editor^.TrackCursor(true);
+      W^.Editor^.TrackCursor(do_centre);
       W^.Editor^.SetLineFlagExclusive(lfHighlightRow,P^.Breakpoint^.Line);
       W^.Editor^.SetLineFlagExclusive(lfHighlightRow,P^.Breakpoint^.Line);
     end;
     end;
   if Assigned(Owner) then
   if Assigned(Owner) then

+ 15 - 14
ide/fpide.pas

@@ -288,9 +288,9 @@ begin
   if (StartupOptions and soHeapMonitor)=0 then HeapView^.Hide;
   if (StartupOptions and soHeapMonitor)=0 then HeapView^.Hide;
   Insert(HeapView);
   Insert(HeapView);
   Drivers.ShowMouse;
   Drivers.ShowMouse;
-{$ifdef win32}
-  // Win32ShowMouse;
-{$endif win32}
+{$ifdef Windows}
+  // WindowsShowMouse;
+{$endif Windows}
 end;
 end;
 
 
 procedure TIDEApp.InitDesktop;
 procedure TIDEApp.InitDesktop;
@@ -913,35 +913,35 @@ begin
 {$ifndef go32v2}
 {$ifndef go32v2}
   initvideo;
   initvideo;
 {$endif ndef go32v2}
 {$endif ndef go32v2}
-{$ifdef win32}
+{$ifdef Windows}
   { write the empty screen to dummy console handle }
   { write the empty screen to dummy console handle }
   UpdateScreen(true);
   UpdateScreen(true);
-{$endif ndef win32}
+{$endif ndef Windows}
   InitEvents;
   InitEvents;
   InitSysError;
   InitSysError;
   CurDirChanged;
   CurDirChanged;
-{$ifndef win32}
+{$ifndef Windows}
   Message(Application,evBroadcast,cmUpdate,nil);
   Message(Application,evBroadcast,cmUpdate,nil);
-{$endif win32}
-{$ifdef win32}
-  // Win32ShowMouse;
-{$endif win32}
+{$endif Windows}
+{$ifdef Windows}
+  // WindowsShowMouse;
+{$endif Windows}
 
 
   if Assigned(UserScreen) then
   if Assigned(UserScreen) then
     UserScreen^.SwitchBackToIDEScreen;
     UserScreen^.SwitchBackToIDEScreen;
-{$ifdef win32}
+{$ifdef Windows}
   { This message was sent when the VideoBuffer was smaller
   { This message was sent when the VideoBuffer was smaller
     than was the IdeApp thought => writes to random memory and random crashes... PM }
     than was the IdeApp thought => writes to random memory and random crashes... PM }
   Message(Application,evBroadcast,cmUpdate,nil);
   Message(Application,evBroadcast,cmUpdate,nil);
-{$endif win32}
+{$endif Windows}
 {$ifdef Unix}
 {$ifdef Unix}
   SetKnownKeys;
   SetKnownKeys;
 {$endif Unix}
 {$endif Unix}
-{$ifndef win32}
+{$ifndef Windows}
 {$ifndef go32v2}
 {$ifndef go32v2}
   UpdateScreen(true);
   UpdateScreen(true);
 {$endif go32v2}
 {$endif go32v2}
-{$endif win32}
+{$endif Windows}
 end;
 end;
 
 
 function TIDEApp.AutoSave: boolean;
 function TIDEApp.AutoSave: boolean;
@@ -1064,6 +1064,7 @@ begin
   UpdatePrimaryFile;
   UpdatePrimaryFile;
   UpdateINIFile;
   UpdateINIFile;
   Message(Application,evBroadcast,cmCommandSetChanged,nil);
   Message(Application,evBroadcast,cmCommandSetChanged,nil);
+  application^.redraw;
 end;
 end;
 
 
 procedure TIDEApp.SourceWindowClosed;
 procedure TIDEApp.SourceWindowClosed;

+ 1 - 1
ide/fpini.pas

@@ -499,7 +499,7 @@ begin
   { Desktop }
   { Desktop }
   DesktopFileFlags:=INIFile^.GetIntEntry(secPreferences,ieDesktopFlags,DesktopFileFlags);
   DesktopFileFlags:=INIFile^.GetIntEntry(secPreferences,ieDesktopFlags,DesktopFileFlags);
   { Debugger }
   { Debugger }
-  IniCenterDebuggerRow:=INIFile^.GetIntEntry(secPreferences,ieCenterDebuggerRow,1)<>0;
+  IniCenterDebuggerRow:=tcentre(INIFile^.GetIntEntry(secPreferences,ieCenterDebuggerRow,1));
   { Preferences }
   { Preferences }
   AutoSaveOptions:=INIFile^.GetIntEntry(secPreferences,ieAutoSave,AutoSaveOptions);
   AutoSaveOptions:=INIFile^.GetIntEntry(secPreferences,ieAutoSave,AutoSaveOptions);
   MiscOptions:=INIFile^.GetIntEntry(secPreferences,ieMiscOptions,MiscOptions);
   MiscOptions:=INIFile^.GetIntEntry(secPreferences,ieMiscOptions,MiscOptions);

+ 1 - 1
ide/fpmfile.inc

@@ -95,7 +95,7 @@ begin
          GetDir(DriveNumber,StoreDir2);
          GetDir(DriveNumber,StoreDir2);
 {$ifndef FPC}
 {$ifndef FPC}
          ChDir(Copy(FileDir,1,2));
          ChDir(Copy(FileDir,1,2));
-           { sets InOutRes in win32 PM }
+           { sets InOutRes in Windows PM }
 {$endif not FPC}
 {$endif not FPC}
        end;
        end;
      if (FileDir<>'') and ExistsDir(FileDir) then
      if (FileDir<>'') and ExistsDir(FileDir) then

+ 12 - 12
ide/fpmopts.inc

@@ -459,7 +459,7 @@ begin
     LibLinkerSwitches^.SetCurrSel(RB2^.Value);
     LibLinkerSwitches^.SetCurrSel(RB2^.Value);
     OtherLinkerSwitches^.SetBooleanItem(1,CB2^.Mark(0));
     OtherLinkerSwitches^.SetBooleanItem(1,CB2^.Mark(0));
     if LibLinkerSwitches^.GetCurrSelParam='X' then
     if LibLinkerSwitches^.GetCurrSelParam='X' then
-     if CompareText(TargetSwitches^.GetCurrSelParam,'win32')=0 then
+     if CompareText(TargetSwitches^.GetCurrSelParam,'Windows')=0 then
       if CompareText(AsmOutputSwitches^.GetCurrSelParam,'pecoff')<>0 then
       if CompareText(AsmOutputSwitches^.GetCurrSelParam,'pecoff')<>0 then
         if ConfirmBox(
         if ConfirmBox(
           FormatStrStr3(msg_xmustbesettoyforz_doyouwanttochangethis,
           FormatStrStr3(msg_xmustbesettoyforz_doyouwanttochangethis,
@@ -477,24 +477,24 @@ var R,R2,R3: TRect;
     D: PCenterDialog;
     D: PCenterDialog;
     RB,RB2 : PRadioButtons;
     RB,RB2 : PRadioButtons;
     CBStrip: PCheckBoxes;
     CBStrip: PCheckBoxes;
-{$ifdef win32}
+{$ifdef Windows}
     CB2: PCheckBoxes;
     CB2: PCheckBoxes;
-{$endif win32}
+{$endif Windows}
 {$ifdef Unix}
 {$ifdef Unix}
     IL: PEditorInputLine;
     IL: PEditorInputLine;
 {$endif Unix}
 {$endif Unix}
     L,I: longint;
     L,I: longint;
     Items: PSItem;
     Items: PSItem;
 const
 const
-{$ifdef win32}
+{$ifdef Windows}
   OtherFieldLines = 3;
   OtherFieldLines = 3;
-{$else not win32}
+{$else not Windows}
 {$ifdef Unix}
 {$ifdef Unix}
   OtherFieldLines = 3;
   OtherFieldLines = 3;
 {$else not Unix}
 {$else not Unix}
   OtherFieldLines = 0;
   OtherFieldLines = 0;
 {$endif Unix}
 {$endif Unix}
-{$endif win32}
+{$endif Windows}
 begin
 begin
   R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+1+2
   R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+1+2
       +ProfileInfoSwitches^.ItemCount+2+OtherFieldLines);
       +ProfileInfoSwitches^.ItemCount+2+OtherFieldLines);
@@ -534,7 +534,7 @@ begin
     R2.Move(0,-1); R2.B.Y:=R2.A.Y+1;
     R2.Move(0,-1); R2.B.Y:=R2.A.Y+1;
     Insert(New(PLabel, Init(R2, label_debugger_profileswitches, RB2)));
     Insert(New(PLabel, Init(R2, label_debugger_profileswitches, RB2)));
 
 
-{$ifdef win32}
+{$ifdef Windows}
     R2.Move(0,ProfileInfoSwitches^.ItemCount+3);
     R2.Move(0,ProfileInfoSwitches^.ItemCount+3);
     New(CB2,Init(R2,NewSItem(label_debugger_useanotherconsole, nil)));
     New(CB2,Init(R2,NewSItem(label_debugger_useanotherconsole, nil)));
     Insert(CB2);
     Insert(CB2);
@@ -545,7 +545,7 @@ begin
     CB2^.SetData(L);
     CB2^.SetData(L);
     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 Windows}
 {$ifdef Unix}
 {$ifdef Unix}
     R2.Move(0,ProfileInfoSwitches^.ItemCount+3);
     R2.Move(0,ProfileInfoSwitches^.ItemCount+3);
     New(IL, Init(R2, 255));
     New(IL, Init(R2, 255));
@@ -553,7 +553,7 @@ begin
     Insert(IL);
     Insert(IL);
     R2.Move(0,-1);
     R2.Move(0,-1);
     Insert(New(PLabel, Init(R2,label_debugger_useanothertty, IL)));
     Insert(New(PLabel, Init(R2,label_debugger_useanothertty, IL)));
-{$endif win32}
+{$endif Windows}
   end;
   end;
   InsertButtons(D);
   InsertButtons(D);
   RB^.Select;
   RB^.Select;
@@ -562,12 +562,12 @@ begin
     DebugInfoSwitches^.SetCurrSel(RB^.Value);
     DebugInfoSwitches^.SetCurrSel(RB^.Value);
     ProfileInfoSwitches^.SetCurrSel(RB2^.Value);
     ProfileInfoSwitches^.SetCurrSel(RB2^.Value);
     OtherLinkerSwitches^.SetBooleanItem(0,CBStrip^.Mark(0));
     OtherLinkerSwitches^.SetBooleanItem(0,CBStrip^.Mark(0));
-{$ifdef win32}
+{$ifdef Windows}
     if CB2^.value<>0 then
     if CB2^.value<>0 then
       DebuggeeTTY:='on'
       DebuggeeTTY:='on'
     else
     else
       DebuggeeTTY:='';
       DebuggeeTTY:='';
-{$endif win32}
+{$endif Windows}
 {$ifdef Unix}
 {$ifdef Unix}
     DebuggeeTTY:=IL^.Data^;
     DebuggeeTTY:=IL^.Data^;
 {$endif Unix}
 {$endif Unix}
@@ -1340,7 +1340,7 @@ begin
     HelpCtx:=hcMouse;
     HelpCtx:=hcMouse;
     GetExtent(R); R.Grow(-3,-2); inc(R.A.Y); R.B.Y:=R.A.Y+2;
     GetExtent(R); R.Grow(-3,-2); inc(R.A.Y); R.B.Y:=R.A.Y+2;
     New(RBkb, Init(R,
     New(RBkb, Init(R,
-      NewSItem('~B~orland convention (Shift+Del,Ctrl+Ins,Shift+Ins)',
+      NewSItem('~C~UA-91 convention (Shift+Del,Ctrl+Ins,Shift+Ins)',
       NewSItem('~M~icrosoft convention (Ctrl+X,Ctrl+C,Ctrl+V)',
       NewSItem('~M~icrosoft convention (Ctrl+X,Ctrl+C,Ctrl+V)',
       nil))));
       nil))));
     RBkb^.Press(integer(EditKeys));
     RBkb^.Press(integer(EditKeys));

+ 52 - 52
ide/fpredir.pas

@@ -33,7 +33,7 @@ Interface
 {$ifdef OS2}
 {$ifdef OS2}
 {$define shell_implemented}
 {$define shell_implemented}
 {$endif}
 {$endif}
-{$ifdef Win32}
+{$ifdef Windows}
 {$define implemented}
 {$define implemented}
 {$endif}
 {$endif}
 {$ifdef linux}
 {$ifdef linux}
@@ -96,9 +96,9 @@ Uses
 {$ifdef netware_clib}
 {$ifdef netware_clib}
   nwserv,
   nwserv,
 {$endif netware_clib}
 {$endif netware_clib}
-{$ifdef win32}
+{$ifdef Windows}
   windows,
   windows,
-{$endif win32}
+{$endif Windows}
 {$ifdef unix}
 {$ifdef unix}
   {$ifdef ver1_0}
   {$ifdef ver1_0}
     linux,
     linux,
@@ -188,13 +188,13 @@ end;
 
 
 {$ifdef TP}
 {$ifdef TP}
 
 
-{$ifndef win32}
+{$ifndef Windows}
 const
 const
   UnusedHandle    = -1;
   UnusedHandle    = -1;
   StdInputHandle  = 0;
   StdInputHandle  = 0;
   StdOutputHandle = 1;
   StdOutputHandle = 1;
   StdErrorHandle  = 2;
   StdErrorHandle  = 2;
-{$endif win32}
+{$endif Windows}
 
 
 Type
 Type
   PtrRec = packed record
   PtrRec = packed record
@@ -280,7 +280,7 @@ end;
 
 
 {$endif def go32v2}
 {$endif def go32v2}
 
 
-{$ifdef win32}
+{$ifdef Windows}
 Function fpclose(Handle : Longint) : boolean;
 Function fpclose(Handle : Longint) : boolean;
 begin
 begin
   { Do we need this ?? }
   { Do we need this ?? }
@@ -391,14 +391,14 @@ function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
     ChangeRedirOut:=True;
     ChangeRedirOut:=True;
     OutRedirDisabled:=False;
     OutRedirDisabled:=False;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     if SetStdHandle(Std_Output_Handle,FileRec(FOUT^).Handle) then
     if SetStdHandle(Std_Output_Handle,FileRec(FOUT^).Handle) then
-{$else not win32}
+{$else not Windows}
     TempHOut:=fpdup(StdOutputHandle);
     TempHOut:=fpdup(StdOutputHandle);
     fpdup2(FileRec(FOUT^).Handle,StdOutputHandle);
     fpdup2(FileRec(FOUT^).Handle,StdOutputHandle);
     if (TempHOut<>UnusedHandle) and
     if (TempHOut<>UnusedHandle) and
        (StdOutputHandle<>UnusedHandle) then
        (StdOutputHandle<>UnusedHandle) then
-{$endif not win32}
+{$endif not Windows}
       begin
       begin
          ChangeRedirOut:=True;
          ChangeRedirOut:=True;
          OutRedirDisabled:=False;
          OutRedirDisabled:=False;
@@ -424,14 +424,14 @@ function ChangeRedirIn(Const Redir : String) : Boolean;
     ChangeRedirIn:=True;
     ChangeRedirIn:=True;
     InRedirDisabled:=False;
     InRedirDisabled:=False;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     if SetStdHandle(Std_Input_Handle,FileRec(FIN^).Handle) then
     if SetStdHandle(Std_Input_Handle,FileRec(FIN^).Handle) then
-{$else not win32}
+{$else not Windows}
     TempHIn:=fpdup(StdInputHandle);
     TempHIn:=fpdup(StdInputHandle);
     fpdup2(FileRec(FIn^).Handle,StdInputHandle);
     fpdup2(FileRec(FIn^).Handle,StdInputHandle);
     if (TempHIn<>UnusedHandle) and
     if (TempHIn<>UnusedHandle) and
        (StdInputHandle<>UnusedHandle) then
        (StdInputHandle<>UnusedHandle) then
-{$endif not win32}
+{$endif not Windows}
       begin
       begin
          ChangeRedirIn:=True;
          ChangeRedirIn:=True;
          InRedirDisabled:=False;
          InRedirDisabled:=False;
@@ -461,14 +461,14 @@ function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolea
     ChangeRedirError:=True;
     ChangeRedirError:=True;
     ErrorRedirDisabled:=False;
     ErrorRedirDisabled:=False;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     if SetStdHandle(Std_Error_Handle,FileRec(FERR^).Handle) then
     if SetStdHandle(Std_Error_Handle,FileRec(FERR^).Handle) then
-{$else not win32}
+{$else not Windows}
     TempHError:=fpdup(StdErrorHandle);
     TempHError:=fpdup(StdErrorHandle);
     fpdup2(FileRec(FERR^).Handle,StdErrorHandle);
     fpdup2(FileRec(FERR^).Handle,StdErrorHandle);
     if (TempHError<>UnusedHandle) and
     if (TempHError<>UnusedHandle) and
        (StdErrorHandle<>UnusedHandle) then
        (StdErrorHandle<>UnusedHandle) then
-{$endif not win32}
+{$endif not Windows}
       begin
       begin
          ChangeRedirError:=True;
          ChangeRedirError:=True;
          ErrorRedirDisabled:=False;
          ErrorRedirDisabled:=False;
@@ -520,11 +520,11 @@ end;
     Handles^[StdOutputHandle]:=OldHandleOut;
     Handles^[StdOutputHandle]:=OldHandleOut;
     OldHandleOut:=StdOutputHandle;
     OldHandleOut:=StdOutputHandle;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Output_Handle,StdOutputHandle);
     SetStdHandle(Std_Output_Handle,StdOutputHandle);
-{$else not win32}
+{$else not Windows}
     fpdup2(TempHOut,StdOutputHandle);
     fpdup2(TempHOut,StdOutputHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif FPC}
 {$endif FPC}
     Close (FOUT^);
     Close (FOUT^);
     fpclose(TempHOut);
     fpclose(TempHOut);
@@ -541,11 +541,11 @@ end;
     Handles^[StdInputHandle]:=OldHandleIn;
     Handles^[StdInputHandle]:=OldHandleIn;
     OldHandleIn:=StdInputHandle;
     OldHandleIn:=StdInputHandle;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Input_Handle,StdInputHandle);
     SetStdHandle(Std_Input_Handle,StdInputHandle);
-{$else not win32}
+{$else not Windows}
     fpdup2(TempHIn,StdInputHandle);
     fpdup2(TempHIn,StdInputHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     Close (FIn^);
     Close (FIn^);
     fpclose(TempHIn);
     fpclose(TempHIn);
@@ -562,11 +562,11 @@ end;
 {$ifndef FPC}
 {$ifndef FPC}
     Handles^[StdInputHandle]:=OldHandleIn;
     Handles^[StdInputHandle]:=OldHandleIn;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Input_Handle,StdInputHandle);
     SetStdHandle(Std_Input_Handle,StdInputHandle);
-{$else not win32}
+{$else not Windows}
     fpdup2(TempHIn,StdInputHandle);
     fpdup2(TempHIn,StdInputHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     InRedirDisabled:=True;
     InRedirDisabled:=True;
   end;
   end;
@@ -582,11 +582,11 @@ end;
     Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
     Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
     Handles^[StdInputHandle]:=Handles^[FileRec (FIn^).Handle];
     Handles^[StdInputHandle]:=Handles^[FileRec (FIn^).Handle];
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Input_Handle,FileRec(FIn^).Handle);
     SetStdHandle(Std_Input_Handle,FileRec(FIn^).Handle);
-{$else not win32}
+{$else not Windows}
     fpdup2(FileRec(FIn^).Handle,StdInputHandle);
     fpdup2(FileRec(FIn^).Handle,StdInputHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     InRedirDisabled:=False;
     InRedirDisabled:=False;
   end;
   end;
@@ -601,11 +601,11 @@ end;
 {$ifndef FPC}
 {$ifndef FPC}
     Handles^[StdOutputHandle]:=OldHandleOut;
     Handles^[StdOutputHandle]:=OldHandleOut;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Output_Handle,StdOutputHandle);
     SetStdHandle(Std_Output_Handle,StdOutputHandle);
-{$else not win32}
+{$else not Windows}
     fpdup2(TempHOut,StdOutputHandle);
     fpdup2(TempHOut,StdOutputHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     OutRedirDisabled:=True;
     OutRedirDisabled:=True;
   end;
   end;
@@ -621,11 +621,11 @@ end;
     Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
     Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
     Handles^[StdOutputHandle]:=Handles^[FileRec (FOut^).Handle];
     Handles^[StdOutputHandle]:=Handles^[FileRec (FOut^).Handle];
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Output_Handle,FileRec(FOut^).Handle);
     SetStdHandle(Std_Output_Handle,FileRec(FOut^).Handle);
-{$else not win32}
+{$else not Windows}
     fpdup2(FileRec(FOut^).Handle,StdOutputHandle);
     fpdup2(FileRec(FOut^).Handle,StdOutputHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     OutRedirDisabled:=False;
     OutRedirDisabled:=False;
   end;
   end;
@@ -640,11 +640,11 @@ end;
     Handles^[StdErrorHandle]:=OldHandleError;
     Handles^[StdErrorHandle]:=OldHandleError;
     OldHandleError:=StdErrorHandle;
     OldHandleError:=StdErrorHandle;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Error_Handle,StdErrorHandle);
     SetStdHandle(Std_Error_Handle,StdErrorHandle);
-{$else not win32}
+{$else not Windows}
     fpdup2(TempHError,StdErrorHandle);
     fpdup2(TempHError,StdErrorHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     Close (FERR^);
     Close (FERR^);
     fpclose(TempHError);
     fpclose(TempHError);
@@ -661,11 +661,11 @@ end;
 {$ifndef FPC}
 {$ifndef FPC}
     Handles^[StdErrorHandle]:=OldHandleError;
     Handles^[StdErrorHandle]:=OldHandleError;
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Error_Handle,StdErrorHandle);
     SetStdHandle(Std_Error_Handle,StdErrorHandle);
-{$else not win32}
+{$else not Windows}
     {$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHError,StdErrorHandle);
     {$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHError,StdErrorHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     ErrorRedirDisabled:=True;
     ErrorRedirDisabled:=True;
   end;
   end;
@@ -681,11 +681,11 @@ end;
     Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
     Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
     Handles^[StdErrorHandle]:=Handles^[FileRec (FErr^).Handle];
     Handles^[StdErrorHandle]:=Handles^[FileRec (FErr^).Handle];
 {$else}
 {$else}
-{$ifdef win32}
+{$ifdef Windows}
     SetStdHandle(Std_Error_Handle,FileRec(FErr^).Handle);
     SetStdHandle(Std_Error_Handle,FileRec(FErr^).Handle);
-{$else not win32}
+{$else not Windows}
     {$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FERR^).Handle,StdErrorHandle);
     {$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FERR^).Handle,StdErrorHandle);
-{$endif not win32}
+{$endif not Windows}
 {$endif}
 {$endif}
     ErrorRedirDisabled:=False;
     ErrorRedirDisabled:=False;
   end;
   end;
@@ -693,10 +693,10 @@ end;
 {............................................................................}
 {............................................................................}
 
 
 function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
 function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
-{$ifdef win32}
+{$ifdef Windows}
 var
 var
   mode : word;
   mode : word;
-{$endif win32}
+{$endif Windows}
 Begin
 Begin
   RedirErrorOut:=0; RedirErrorIn:=0; RedirErrorError:=0;
   RedirErrorOut:=0; RedirErrorIn:=0; RedirErrorError:=0;
   ExecuteResult:=0;
   ExecuteResult:=0;
@@ -714,12 +714,12 @@ Begin
   ExecuteRedir:=(IOStatus=0) and (RedirErrorOut=0) and
   ExecuteRedir:=(IOStatus=0) and (RedirErrorOut=0) and
                 (RedirErrorIn=0) and (RedirErrorError=0) and
                 (RedirErrorIn=0) and (RedirErrorError=0) and
                 (ExecuteResult=0);
                 (ExecuteResult=0);
-{$ifdef win32}
+{$ifdef Windows}
   // reenable mouse events
   // reenable mouse events
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @mode);
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @mode);
   mode:=mode or ENABLE_MOUSE_INPUT;
   mode:=mode or ENABLE_MOUSE_INPUT;
   SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), mode);
   SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), mode);
-{$endif win32}
+{$endif Windows}
 End;
 End;
 
 
 {............................................................................}
 {............................................................................}
@@ -930,10 +930,10 @@ end;
 {............................................................................}
 {............................................................................}
 
 
   procedure DosExecute(ProgName, ComLine : String);
   procedure DosExecute(ProgName, ComLine : String);
-{$ifdef win32}
+{$ifdef Windows}
     var
     var
       StoreInherit : BOOL;
       StoreInherit : BOOL;
-{$endif win32}
+{$endif Windows}
 
 
   Begin
   Begin
 {$IfDef MsDos}
 {$IfDef MsDos}
@@ -950,10 +950,10 @@ end;
         ExecuteResult:=((-ExecuteResult) and $ff00) shr 8;
         ExecuteResult:=((-ExecuteResult) and $ff00) shr 8;
       end;
       end;
 {$else}
 {$else}
-  {$ifdef win32}
+  {$ifdef Windows}
     StoreInherit:=ExecInheritsHandles;
     StoreInherit:=ExecInheritsHandles;
     ExecInheritsHandles:=true;
     ExecInheritsHandles:=true;
-  {$endif win32}
+  {$endif Windows}
     DosError:=0;
     DosError:=0;
     If UseComSpec then
     If UseComSpec then
       Dos.Exec (Getenv('COMSPEC'),'/C '+MaybeQuoted(FixPath(progname))+' '+Comline)
       Dos.Exec (Getenv('COMSPEC'),'/C '+MaybeQuoted(FixPath(progname))+' '+Comline)
@@ -964,9 +964,9 @@ end;
         else
         else
           DosError:=2;
           DosError:=2;
       end;
       end;
-  {$ifdef win32}
+  {$ifdef Windows}
     ExecInheritsHandles:=StoreInherit;
     ExecInheritsHandles:=StoreInherit;
-  {$endif win32}
+  {$endif Windows}
     IOStatus:=DosError;
     IOStatus:=DosError;
     ExecuteResult:=DosExitCode;
     ExecuteResult:=DosExitCode;
 {$endif}
 {$endif}

+ 3 - 3
ide/fpregs.pas

@@ -20,9 +20,9 @@ end.
 {$else NODEBUG}
 {$else NODEBUG}
 interface
 interface
 uses
 uses
-{$ifdef win32}
+{$ifdef Windows}
   Windows,
   Windows,
-{$endif win32}
+{$endif Windows}
   Objects,Dialogs,Drivers,Views,
   Objects,Dialogs,Drivers,Views,
   FPViews;
   FPViews;
 
 
@@ -342,7 +342,7 @@ Const
                         rs.esp:=v
                         rs.esp:=v
                       else if reg='ebp' then
                       else if reg='ebp' then
                         rs.ebp:=v
                         rs.ebp:=v
-                      { under win32 flags are on a register named ps !! PM }
+                      { under Windows flags are on a register named ps !! PM }
                       else if (reg='eflags') or (reg='ps') then
                       else if (reg='eflags') or (reg='ps') then
                         rs.eflags:=v
                         rs.eflags:=v
                       else if reg='cs' then
                       else if reg='cs' then

+ 1 - 0
ide/fpstre.inc

@@ -810,6 +810,7 @@ const
       opt_objmethcallvalid = 'Object ~m~ethod call checking';
       opt_objmethcallvalid = 'Object ~m~ethod call checking';
       { Code generation }
       { Code generation }
       opt_pic = '~P~osition independend code';
       opt_pic = '~P~osition independend code';
+      opt_smart = '~C~reate smartlinkable units';
       { Code options }
       { Code options }
       opt_generatefastercode = 'Generate ~f~aster code';
       opt_generatefastercode = 'Generate ~f~aster code';
       opt_generatesmallercode = 'Generate s~m~aller code';
       opt_generatesmallercode = 'Generate s~m~aller code';

+ 20 - 1
ide/fpswitch.pas

@@ -1011,6 +1011,7 @@ begin
      AddBooleanItem(opt_overflowchecking,'o',idOverflowChecks);
      AddBooleanItem(opt_overflowchecking,'o',idOverflowChecks);
      AddBooleanItem(opt_objmethcallvalid,'R',idObjMethCallChecks);
      AddBooleanItem(opt_objmethcallvalid,'R',idObjMethCallChecks);
      AddBooleanItem(opt_pic,'g',idNone);
      AddBooleanItem(opt_pic,'g',idNone);
+     AddBooleanItem(opt_smart,'X',idNone);
    end;
    end;
   New(OptimizingGoalSwitches,InitSelect('O'));
   New(OptimizingGoalSwitches,InitSelect('O'));
   with OptimizingGoalSwitches^ do
   with OptimizingGoalSwitches^ do
@@ -1188,7 +1189,11 @@ begin
        { 2 MB heap }
        { 2 MB heap }
        MemorySwitches^.SetLongintItem(1,1024*1024*2);
        MemorySwitches^.SetLongintItem(1,1024*1024*2);
        { goto/lable allowed }
        { goto/lable allowed }
+       SyntaxSwitches^.SetBooleanItem(1,true);
+       { inline allowed }
        SyntaxSwitches^.SetBooleanItem(3,true);
        SyntaxSwitches^.SetBooleanItem(3,true);
+       { Exe size complaints are louder than speed complaints: Optimize for size by default. }
+       OptimizingGoalSwitches^.SetCurrSel(1);
        case i of
        case i of
           om_debug:
           om_debug:
             begin
             begin
@@ -1200,15 +1205,29 @@ begin
                CodegenSwitches^.SetBooleanItem(2,true);
                CodegenSwitches^.SetBooleanItem(2,true);
                { overflow checking }
                { overflow checking }
                CodegenSwitches^.SetBooleanItem(3,true);
                CodegenSwitches^.SetBooleanItem(3,true);
+               { method call checking }
+               CodegenSwitches^.SetBooleanItem(4,true);
+               { assertions on }
+               SyntaxSwitches^.SetBooleanItem(4,true);
             end;
             end;
           om_normal:
           om_normal:
             begin
             begin
+               {Register variables.}
+               OptimizationSwitches^.SetBooleanItem(0,true);
+               {Level 1 optimizations.}
                OptimizationSwitches^.SetBooleanItem(2,true);
                OptimizationSwitches^.SetBooleanItem(2,true);
             end;
             end;
           om_release:
           om_release:
             begin
             begin
-               OptimizationSwitches^.SetBooleanItem(2,true);
+               {Register variables.}
+               OptimizationSwitches^.SetBooleanItem(0,true);
+               {Level 2 optimizations.}
                OptimizationSwitches^.SetBooleanItem(3,true);
                OptimizationSwitches^.SetBooleanItem(3,true);
+               {Smart linking.}
+               LibLinkerSwitches^.SetCurrSel(3);
+               CodegenSwitches^.SetBooleanItem(6,true);
+               {Strip debug info}
+               OtherLinkerSwitches^.SetBooleanItem(0,true);
             end;
             end;
        end;
        end;
        { set appriopriate default target }
        { set appriopriate default target }

+ 30 - 30
ide/fpusrscr.pas

@@ -18,9 +18,9 @@ unit FPUsrScr;
 interface
 interface
 
 
 uses
 uses
-{$ifdef win32}
+{$ifdef Windows}
   windows,
   windows,
-{$endif win32}
+{$endif Windows}
 {$ifdef Unix}
 {$ifdef Unix}
   {$ifdef VER1_0}
   {$ifdef VER1_0}
     linux,
     linux,
@@ -194,9 +194,9 @@ type
     end;
     end;
 {$endif}
 {$endif}
 
 
-{$ifdef win32}
-    PWin32Screen = ^TWin32Screen;
-    TWin32Screen = object(TScreen)
+{$ifdef Windows}
+    PWindowsScreen = ^TWindowsScreen;
+    TWindowsScreen = object(TScreen)
       constructor Init;
       constructor Init;
       destructor  Done; virtual;
       destructor  Done; virtual;
     public
     public
@@ -975,10 +975,10 @@ end;
 {$endif}
 {$endif}
 
 
 {****************************************************************************
 {****************************************************************************
-                                 TWin32Screen
+                                 TWindowsScreen
 ****************************************************************************}
 ****************************************************************************}
 
 
-{$ifdef win32}
+{$ifdef Windows}
 
 
 procedure UpdateFileHandles;
 procedure UpdateFileHandles;
 begin
 begin
@@ -990,7 +990,7 @@ begin
   {TextRec(StdErr).Handle:=StdErrorHandle;}
   {TextRec(StdErr).Handle:=StdErrorHandle;}
 end;
 end;
 
 
-constructor TWin32Screen.Init;
+constructor TWindowsScreen.Init;
 var
 var
   SecurityAttr : Security_attributes;
   SecurityAttr : Security_attributes;
   BigWin : Coord;
   BigWin : Coord;
@@ -1016,9 +1016,9 @@ begin
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
   IdeMode:=ConsoleMode;
   IdeMode:=ConsoleMode;
 {$ifdef debug}
 {$ifdef debug}
-{define win32bigwin}
+{define Windowsbigwin}
 {$endif debug}
 {$endif debug}
-{$ifdef win32bigwin}
+{$ifdef Windowsbigwin}
   GetConsoleScreenBufferInfo(StartScreenBufferHandle,
   GetConsoleScreenBufferInfo(StartScreenBufferHandle,
     @ConsoleScreenBufferInfo);
     @ConsoleScreenBufferInfo);
   BigWin.X:=ConsoleScreenBufferInfo.dwSize.X;
   BigWin.X:=ConsoleScreenBufferInfo.dwSize.X;
@@ -1030,7 +1030,7 @@ begin
   res:=SetConsoleScreenBufferSize(StartScreenBufferHandle,BigWin);
   res:=SetConsoleScreenBufferSize(StartScreenBufferHandle,BigWin);
   if not res then
   if not res then
     error:=GetLastError;
     error:=GetLastError;
-{$endif win32bigwin}
+{$endif Windowsbigwin}
   GetConsoleScreenBufferInfo(StartScreenBufferHandle,
   GetConsoleScreenBufferInfo(StartScreenBufferHandle,
     @ConsoleScreenBufferInfo);
     @ConsoleScreenBufferInfo);
   { make sure that the IDE Screen Handle has the maximum display size
   { make sure that the IDE Screen Handle has the maximum display size
@@ -1046,7 +1046,7 @@ begin
   SwitchBackToIDEScreen;
   SwitchBackToIDEScreen;
 end;
 end;
 
 
-destructor TWin32Screen.Done;
+destructor TWindowsScreen.Done;
 begin
 begin
   { copy the Dos buffer content into the original ScreenBuffer
   { copy the Dos buffer content into the original ScreenBuffer
     which remains the startup std_output_handle PM }
     which remains the startup std_output_handle PM }
@@ -1060,7 +1060,7 @@ begin
   inherited Done;
   inherited Done;
 end;
 end;
 
 
-function TWin32Screen.GetWidth: integer;
+function TWindowsScreen.GetWidth: integer;
 var
 var
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
 begin
 begin
@@ -1069,7 +1069,7 @@ begin
   GetWidth:=ConsoleScreenBufferInfo.dwSize.X;
   GetWidth:=ConsoleScreenBufferInfo.dwSize.X;
 end;
 end;
 
 
-function TWin32Screen.GetHeight: integer;
+function TWindowsScreen.GetHeight: integer;
 var
 var
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
 begin
 begin
@@ -1078,7 +1078,7 @@ begin
   GetHeight:=ConsoleScreenBufferInfo.dwSize.Y;
   GetHeight:=ConsoleScreenBufferInfo.dwSize.Y;
 end;
 end;
 
 
-function TWin32Screen.CanScroll : boolean;
+function TWindowsScreen.CanScroll : boolean;
 var
 var
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   BufferLines : longint;
   BufferLines : longint;
@@ -1092,7 +1092,7 @@ begin
   CanScroll:=(BufferLines>WindowLines);
   CanScroll:=(BufferLines>WindowLines);
 end;
 end;
 
 
-function TWin32Screen.Scroll(i : integer) : integer;
+function TWindowsScreen.Scroll(i : integer) : integer;
 var
 var
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleWindow : Small_rect;
   ConsoleWindow : Small_rect;
@@ -1116,7 +1116,7 @@ begin
     Scroll:=0;
     Scroll:=0;
 end;
 end;
 
 
-procedure TWin32Screen.GetLine(Line: integer; var Text, Attr: string);
+procedure TWindowsScreen.GetLine(Line: integer; var Text, Attr: string);
 type
 type
   CharInfoArray = Array [0..255] of Char_Info;
   CharInfoArray = Array [0..255] of Char_Info;
 var
 var
@@ -1153,7 +1153,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TWin32Screen.GetCursorPos(var P: TPoint);
+procedure TWindowsScreen.GetCursorPos(var P: TPoint);
 var
 var
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
 begin
 begin
@@ -1163,7 +1163,7 @@ begin
   P.Y:=ConsoleScreenBufferInfo.dwCursorPosition.Y;
   P.Y:=ConsoleScreenBufferInfo.dwCursorPosition.Y;
 end;
 end;
 
 
-procedure TWin32Screen.BufferCopy(Src, Dest : THandle);
+procedure TWindowsScreen.BufferCopy(Src, Dest : THandle);
 type
 type
   CharInfoArray = Array [0..256*255-1] of Char_Info;
   CharInfoArray = Array [0..256*255-1] of Char_Info;
 var
 var
@@ -1243,7 +1243,7 @@ begin
   SetConsoleCursorPosition(Dest, ConsoleScreenBufferInfo.dwCursorPosition);
   SetConsoleCursorPosition(Dest, ConsoleScreenBufferInfo.dwCursorPosition);
 end;
 end;
 
 
-procedure TWin32Screen.Capture;
+procedure TWindowsScreen.Capture;
 begin
 begin
   {if StartScreenBufferHandle=IdeScreenBufferHandle then
   {if StartScreenBufferHandle=IdeScreenBufferHandle then
     BufferCopy(IDEScreenBufferHandle,DosScreenBufferHandle)
     BufferCopy(IDEScreenBufferHandle,DosScreenBufferHandle)
@@ -1252,14 +1252,14 @@ begin
   SaveConsoleScreen;
   SaveConsoleScreen;
 end;
 end;
 
 
-procedure TWin32Screen.Restore;
+procedure TWindowsScreen.Restore;
 begin
 begin
   SwitchToConsoleScreen;
   SwitchToConsoleScreen;
 end;
 end;
 
 
-{ dummy for win32 as the Buffer screen
+{ dummy for Windows as the Buffer screen
   do hold all the info }
   do hold all the info }
-procedure TWin32Screen.SaveIDEScreen;
+procedure TWindowsScreen.SaveIDEScreen;
 begin
 begin
   IdeScreenMode:=ScreenMode;
   IdeScreenMode:=ScreenMode;
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
@@ -1268,9 +1268,9 @@ begin
   UpdateFileHandles;
   UpdateFileHandles;
 end;
 end;
 
 
-{ dummy for win32 as the Buffer screen
+{ dummy for Windows as the Buffer screen
   do hold all the info }
   do hold all the info }
-procedure TWin32Screen.SaveConsoleScreen;
+procedure TWindowsScreen.SaveConsoleScreen;
 begin
 begin
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
   { set the dummy buffer as active already now PM }
   { set the dummy buffer as active already now PM }
@@ -1278,7 +1278,7 @@ begin
   UpdateFileHandles;
   UpdateFileHandles;
 end;
 end;
 
 
-procedure TWin32Screen.SwitchToConsoleScreen;
+procedure TWindowsScreen.SwitchToConsoleScreen;
 begin
 begin
   SetConsoleActiveScreenBuffer(DosScreenBufferHandle);
   SetConsoleActiveScreenBuffer(DosScreenBufferHandle);
   SetStdHandle(cardinal(Std_Output_Handle),DosScreenBufferHandle);
   SetStdHandle(cardinal(Std_Output_Handle),DosScreenBufferHandle);
@@ -1287,7 +1287,7 @@ begin
   IDEActive:=false;
   IDEActive:=false;
 end;
 end;
 
 
-procedure TWin32Screen.SwitchBackToIDEScreen;
+procedure TWindowsScreen.SwitchBackToIDEScreen;
 var
 var
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   ConsoleScreenBufferInfo : Console_screen_buffer_info;
   WindowPos : Small_rect;
   WindowPos : Small_rect;
@@ -1480,8 +1480,8 @@ begin
     UserScreen:=New(PLinuxScreen, Init);
     UserScreen:=New(PLinuxScreen, Init);
   {$else}
   {$else}
 
 
-    {$ifdef Win32}
-      UserScreen:=New(PWin32Screen, Init);
+    {$ifdef Windows}
+      UserScreen:=New(PWindowsScreen, Init);
     {$else}
     {$else}
       {$ifdef OS2}
       {$ifdef OS2}
         UserScreen:=New(POS2Screen, Init);
         UserScreen:=New(POS2Screen, Init);
@@ -1492,7 +1492,7 @@ begin
           UserScreen:=New(PScreen, Init);
           UserScreen:=New(PScreen, Init);
         {$endif netwlibc}
         {$endif netwlibc}
       {$endif OS2}
       {$endif OS2}
-    {$endif Win32}
+    {$endif Windows}
   {$endif Unix}
   {$endif Unix}
 {$endif Dos}
 {$endif Dos}
 end;
 end;

+ 1 - 1
ide/fpvars.pas

@@ -108,7 +108,7 @@ const ClipboardWindow  : PClipboardWindow = nil;
       AutoSaveOptions  : longint = asEnvironment+asDesktop;
       AutoSaveOptions  : longint = asEnvironment+asDesktop;
       MiscOptions      : longint = moChangeDirOnOpen+moCloseOnGotoSource;
       MiscOptions      : longint = moChangeDirOnOpen+moCloseOnGotoSource;
       EditorModified   : boolean = false;
       EditorModified   : boolean = false;
-      IniCenterDebuggerRow : boolean = true;
+      IniCenterDebuggerRow : tcentre = do_centre;
       SleepTimeOut     : longint = trunc(10*18.2);
       SleepTimeOut     : longint = trunc(10*18.2);
 {$ifdef USE_EXTERNAL_COMPILER}
 {$ifdef USE_EXTERNAL_COMPILER}
       UseExternalCompiler : boolean = true;
       UseExternalCompiler : boolean = true;

+ 4 - 4
ide/fpviews.pas

@@ -1347,7 +1347,7 @@ begin
       if JumpPos.X<>-1 then
       if JumpPos.X<>-1 then
       begin
       begin
         SetCurPtr(JumpPos.X,JumpPos.Y);
         SetCurPtr(JumpPos.X,JumpPos.Y);
-        TrackCursor(true);
+        TrackCursor(do_centre);
       end;
       end;
     end;
     end;
 end;
 end;
@@ -2577,7 +2577,7 @@ begin
       SetCurPtr(0,DisasLines^.IndexOf(PL));
       SetCurPtr(0,DisasLines^.IndexOf(PL));
       PL^.SetFlags(lfDebuggerRow);
       PL^.SetFlags(lfDebuggerRow);
       CurL:=PL;
       CurL:=PL;
-      TrackCursor(false);
+      TrackCursor(do_not_centre);
     end;
     end;
   GetCurrentLine:=PL;
   GetCurrentLine:=PL;
 end;
 end;
@@ -3009,7 +3009,7 @@ begin
   if W<>nil then
   if W<>nil then
     begin
     begin
       W^.Select;
       W^.Select;
-      W^.Editor^.TrackCursor(true);
+      W^.Editor^.TrackCursor(do_centre);
       W^.Editor^.SetLineFlagExclusive(lfHighlightRow,Row);
       W^.Editor^.SetLineFlagExclusive(lfHighlightRow,Row);
     end;
     end;
   if Assigned(Owner) then
   if Assigned(Owner) then
@@ -3758,7 +3758,7 @@ begin
        with W^.Editor^ do
        with W^.Editor^ do
        begin
        begin
          SetCurPtr(CurX,CurY);
          SetCurPtr(CurX,CurY);
-         TrackCursor(true);
+         TrackCursor(do_centre);
        end;
        end;
     W^.HelpCtx:=hcSourceWindow;
     W^.HelpCtx:=hcSourceWindow;
     Desktop^.Insert(W);
     Desktop^.Insert(W);

+ 4 - 2
ide/globdir.inc

@@ -70,11 +70,13 @@
   {$define HasSysMsgUnit}
   {$define HasSysMsgUnit}
 {$endif}
 {$endif}
 
 
-{$ifdef Win32}
+{$ifdef Windows}
   {$undef SUPPORTVESA}
   {$undef SUPPORTVESA}
   {$define SUPPORTREDIR}
   {$define SUPPORTREDIR}
   {$define WinClipSupported}
   {$define WinClipSupported}
-  {$define HasSignal}
+  {$ifdef win32}
+    {$define HasSignal}
+  {$endif}
   {$define FSCaseInsensitive}
   {$define FSCaseInsensitive}
   {$define HasSysMsgUnit}
   {$define HasSysMsgUnit}
 {$endif}
 {$endif}

+ 3 - 3
ide/readme.ide

@@ -105,9 +105,9 @@
  switches into Linux console mode and makes use of the
  switches into Linux console mode and makes use of the
  /dev/vcsa* devices to display the full character set. To
  /dev/vcsa* devices to display the full character set. To
  make use of this mode, you must use a VGA console font in
  make use of this mode, you must use a VGA console font in
- codepage 437, 850, 852 etc. encoding. If your distrib-
- ution uses /etc/sysconfig/console, these are good values
- to put into that file:
+ codepage 437, 850, 852 etc. encoding. If your distribution
+ uses /etc/sysconfig/console, these are good values to put
+ into that file:
 
 
  CONSOLE_FONT="cp850-8x16"
  CONSOLE_FONT="cp850-8x16"
  CONSOLE_SCREENMAP="8859-1_to_uni.trans"
  CONSOLE_SCREENMAP="8859-1_to_uni.trans"

+ 8 - 8
ide/wconsole.pas

@@ -32,9 +32,9 @@ interface
 {$ifdef UNIX}
 {$ifdef UNIX}
       TermIos
       TermIos
 {$endif UNIX}
 {$endif UNIX}
-{$ifdef Win32}
+{$ifdef Windows}
       dword
       dword
-{$endif Win32}
+{$endif Windows}
 {$ifdef go32v2}
 {$ifdef go32v2}
       longint
       longint
 {$endif go32v2}
 {$endif go32v2}
@@ -46,19 +46,19 @@ Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode);
 Procedure RestoreConsoleMode(const ConsoleMode : TConsoleMode);
 Procedure RestoreConsoleMode(const ConsoleMode : TConsoleMode);
 
 
 implementation
 implementation
-{$ifdef Win32}
+{$ifdef Windows}
   uses
   uses
     windows;
     windows;
-{$endif Win32}
+{$endif Windows}
 
 
 Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode);
 Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode);
 Begin
 Begin
 {$ifdef UNIX}
 {$ifdef UNIX}
   TCGetAttr(1,ConsoleMode);
   TCGetAttr(1,ConsoleMode);
 {$endif UNIX}
 {$endif UNIX}
-{$ifdef Win32}
+{$ifdef Windows}
   GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
   GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
-{$endif Win32}
+{$endif Windows}
 {$ifdef go32v2}
 {$ifdef go32v2}
   ConsoleMode:=0;
   ConsoleMode:=0;
 {$endif go32v2}
 {$endif go32v2}
@@ -72,9 +72,9 @@ Begin
 {$ifdef UNIX}
 {$ifdef UNIX}
   TCSetAttr(1,TCSANOW,ConsoleMode);
   TCSetAttr(1,TCSANOW,ConsoleMode);
 {$endif UNIX}
 {$endif UNIX}
-{$ifdef Win32}
+{$ifdef Windows}
   SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
   SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
-{$endif Win32}
+{$endif Windows}
 {$ifdef go32v2}
 {$ifdef go32v2}
 {$endif go32v2}
 {$endif go32v2}
 End;
 End;

+ 2 - 0
ide/wconsts.pas

@@ -10,6 +10,8 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$i globdir.inc}
 {$i globdir.inc}
+
+{$mode objfpc}
 unit wconsts;
 unit wconsts;
 
 
   interface
   interface

+ 15 - 15
ide/wconstse.inc

@@ -10,7 +10,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
-{$undef USERESSTRINGS} { this doesn't compile under FP!!! why? }
+{ $undef USERESSTRINGS} { this doesn't compile under FP!!! why? }
 
 
 {$ifdef USERESSTRINGS}
 {$ifdef USERESSTRINGS}
     resourcestring
     resourcestring
@@ -38,22 +38,22 @@
     label_find_entirescope = '~E~ntire scope';
     label_find_entirescope = '~E~ntire scope';
 
 
     dialog_replace = 'Replace';
     dialog_replace = 'Replace';
-    label_replace_texttofind = label_find_texttofind;
+    label_replace_texttofind = '~T~ext to find';
     label_replace_newtext = '    ~N~ew text';
     label_replace_newtext = '    ~N~ew text';
-    label_replace_options = label_find_options;
-    label_replace_casesensitive = label_find_casesensitive;
-    label_replace_useregexp = label_find_useregexp;
-    label_replace_wholewordsonly = label_find_wholewordsonly;
+    label_replace_options = 'Options';
+    label_replace_casesensitive = '~C~ase sensitive';
+    label_replace_useregexp = '~U~se regular expr.';
+    label_replace_wholewordsonly = '~W~hole words only';
     label_replace_promptonreplace = '~P~rompt on replace';
     label_replace_promptonreplace = '~P~rompt on replace';
-    label_replace_direction = label_find_direction;
-    label_replace_forward = label_find_forward;
-    label_replace_backward = label_find_backward;
-    label_replace_scope = label_find_scope;
-    label_replace_global = label_find_global;
-    label_replace_selectedtext = label_find_selectedtext;
-    label_replace_origin = label_find_origin;
-    label_replace_fromcursor = label_find_fromcursor;
-    label_replace_entirescope = label_find_entirescope;
+    label_replace_direction = 'Direction';
+    label_replace_forward = 'Forwar~d~';
+    label_replace_backward = '~B~ackward';
+    label_replace_scope = 'Scope';
+    label_replace_global = '~G~lobal';
+    label_replace_selectedtext = '~S~elected text';
+    label_replace_origin = 'Origin';
+    label_replace_fromcursor = '~F~rom cursor';
+    label_replace_entirescope = '~E~ntire scope';
     btn_replace_changeall = 'Change ~a~ll';
     btn_replace_changeall = 'Change ~a~ll';
 
 
     dialog_gotoline = 'Goto line';
     dialog_gotoline = 'Goto line';

+ 1 - 1
ide/wconstsh.inc

@@ -10,7 +10,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
-{$undef USERESSTRINGS} { this doesn't compile under FP!!! why? }
+{ $undef USERESSTRINGS} { this doesn't compile under FP!!! why? }
 
 
 {$ifdef USERESSTRINGS}
 {$ifdef USERESSTRINGS}
     resourcestring
     resourcestring

+ 88 - 59
ide/weditor.pas

@@ -203,7 +203,10 @@ const
       TAB      = #9;
       TAB      = #9;
       FindStrSize = 79;
       FindStrSize = 79;
 
 
+
 type
 type
+    Tcentre = (do_not_centre,do_centre);
+
     PCustomCodeEditor = ^TCustomCodeEditor;
     PCustomCodeEditor = ^TCustomCodeEditor;
     PEditorLineInfo = ^TEditorLineInfo;
     PEditorLineInfo = ^TEditorLineInfo;
     PFoldCollection = ^TFoldCollection;
     PFoldCollection = ^TFoldCollection;
@@ -506,7 +509,7 @@ type
       procedure   SetLineFlagExclusive(Flags: longint; LineNo: sw_integer);
       procedure   SetLineFlagExclusive(Flags: longint; LineNo: sw_integer);
       procedure   Update; virtual;
       procedure   Update; virtual;
       procedure   ScrollTo(X, Y: sw_Integer);
       procedure   ScrollTo(X, Y: sw_Integer);
-      procedure   TrackCursor(Center: boolean); virtual;
+      procedure   TrackCursor(centre:Tcentre); virtual;
       procedure   Lock; virtual;
       procedure   Lock; virtual;
       procedure   UnLock; virtual;
       procedure   UnLock; virtual;
     public
     public
@@ -966,6 +969,7 @@ begin
    RExpand:=S;
    RExpand:=S;
 end;
 end;
 
 
+{
 function upper(const s : string) : string;
 function upper(const s : string) : string;
 var
 var
   i  : Sw_word;
   i  : Sw_word;
@@ -977,7 +981,7 @@ begin
     upper[i]:=s[i];
     upper[i]:=s[i];
   upper[0]:=s[0];
   upper[0]:=s[0];
 end;
 end;
-
+}
 type TPosOfs = {$ifdef TP}longint{$endif}{$ifdef FPC}int64{$endif};
 type TPosOfs = {$ifdef TP}longint{$endif}{$ifdef FPC}int64{$endif};
 
 
 function PosToOfs(const X,Y: sw_integer): TPosOfs;
 function PosToOfs(const X,Y: sw_integer): TPosOfs;
@@ -1273,7 +1277,7 @@ end;
 
 
 function TCustomLine.GetText: string;
 function TCustomLine.GetText: string;
 begin
 begin
-  Abstract; GetText:='';
+  Abstract;GetText:='';
 end;
 end;
 
 
 procedure TCustomLine.SetText(const AText: string);
 procedure TCustomLine.SetText(const AText: string);
@@ -1485,7 +1489,9 @@ end;
 
 
 destructor TEditorLineInfo.Done;
 destructor TEditorLineInfo.Done;
 begin
 begin
-  if Format<>nil then DisposeStr(Format); Format:=nil;
+  if Format<>nil then
+    DisposeStr(Format);
+  Format:=nil;
   SetFold(nil);
   SetFold(nil);
   inherited Done;
   inherited Done;
 end;
 end;
@@ -1522,8 +1528,7 @@ var B: PEditorBinding;
     Count,I,Idx: sw_integer;
     Count,I,Idx: sw_integer;
     L: PCustomLine;
     L: PCustomLine;
 begin
 begin
-  if Assigned(AEditor)=false then Exit;
-
+  assert(Aeditor<>nil);
   New(B, Init(AEditor));
   New(B, Init(AEditor));
   Bindings^.Insert(B);
   Bindings^.Insert(B);
   Idx:=Bindings^.IndexOf(B);
   Idx:=Bindings^.IndexOf(B);
@@ -1543,6 +1548,7 @@ var B: PEditorBinding;
     Count,I: sw_integer;
     Count,I: sw_integer;
     L: PCustomLine;
     L: PCustomLine;
 begin
 begin
+  assert(Aeditor<>nil);
   B:=SearchBinding(AEditor);
   B:=SearchBinding(AEditor);
   if Assigned(B) then
   if Assigned(B) then
   begin
   begin
@@ -3044,7 +3050,7 @@ begin
       Inc(LineDelta);
       Inc(LineDelta);
       OK:=GetLineCount<MaxLineCount;
       OK:=GetLineCount<MaxLineCount;
     end;
     end;
-    if OK=false then EditorDialog(edTooManyLines,nil);
+    if not OK then EditorDialog(edTooManyLines,nil);
     { mainly to force eaMove insertion }
     { mainly to force eaMove insertion }
     if not IsClipboard then
     if not IsClipboard then
       SetCurPtr(EPos.X,EPos.Y);
       SetCurPtr(EPos.X,EPos.Y);
@@ -3240,7 +3246,7 @@ begin
   AdjustSelectionPos(CurPos.X,CurPos.Y,DeltaX,DeltaY);
   AdjustSelectionPos(CurPos.X,CurPos.Y,DeltaX,DeltaY);
 end;
 end;
 
 
-procedure TCustomCodeEditor.TrackCursor(Center: boolean);
+procedure TCustomCodeEditor.TrackCursor(centre:Tcentre);
 var D,CP: TPoint;
 var D,CP: TPoint;
 begin
 begin
   D:=Delta;
   D:=Delta;
@@ -3249,7 +3255,7 @@ begin
    if CP.Y>Delta.Y+Size.Y-1 then D.Y:=CP.Y-Size.Y+1;
    if CP.Y>Delta.Y+Size.Y-1 then D.Y:=CP.Y-Size.Y+1;
   if CP.X<Delta.X then D.X:=CP.X else
   if CP.X<Delta.X then D.X:=CP.X else
    if CP.X>Delta.X+Size.X-1 then D.X:=CP.X-Size.X+1;
    if CP.X>Delta.X+Size.X-1 then D.X:=CP.X-Size.X+1;
-  if {((Delta.X<>D.X) or (Delta.Y<>D.Y)) and }Center then
+  if {((Delta.X<>D.X) or (Delta.Y<>D.Y)) and }centre=do_centre then
   begin
   begin
      { loose centering for debugger PM }
      { loose centering for debugger PM }
      while (CP.Y-D.Y)<(Size.Y div 3) do Dec(D.Y);
      while (CP.Y-D.Y)<(Size.Y div 3) do Dec(D.Y);
@@ -3525,7 +3531,7 @@ begin
           cmWindowEnd   : WindowEnd;
           cmWindowEnd   : WindowEnd;
           cmNewLine     : begin
           cmNewLine     : begin
                             InsertNewLine;
                             InsertNewLine;
-                            TrackCursor(false);
+                            TrackCursor(do_not_centre);
                           end;
                           end;
           cmBreakLine   : BreakLine;
           cmBreakLine   : BreakLine;
           cmBackSpace   : BackSpace;
           cmBackSpace   : BackSpace;
@@ -4679,7 +4685,7 @@ begin
   if JumpPos.X<>-1 then
   if JumpPos.X<>-1 then
   begin
   begin
     SetCurPtr(JumpPos.X,JumpPos.Y);
     SetCurPtr(JumpPos.X,JumpPos.Y);
-    TrackCursor(true);
+    TrackCursor(do_centre);
   end;
   end;
 end;
 end;
 
 
@@ -5824,35 +5830,41 @@ end;
 {$endif WinClipSupported}
 {$endif WinClipSupported}
 
 
 function TCustomCodeEditor.ClipCopy: Boolean;
 function TCustomCodeEditor.ClipCopy: Boolean;
-var OK,ShowInfo: boolean;
+
+var ShowInfo,CanPaste: boolean;
+
 begin
 begin
   Lock;
   Lock;
   {AddGroupedAction(eaCopy);
   {AddGroupedAction(eaCopy);
    can we undo a copy ??
    can we undo a copy ??
    maybe as an Undo Paste in Clipboard !! }
    maybe as an Undo Paste in Clipboard !! }
-  OK:=Clipboard<>nil;
-  if OK then
-    ShowInfo:=SelEnd.Y-SelStart.Y>50
-  else
-    ShowInfo:=false;
-  if ShowInfo then
-    PushInfo(msg_copyingclipboard);
-  if OK then OK:=Clipboard^.InsertFrom(@Self);
-  if ShowInfo then
-    PopInfo;
-  ClipCopy:=OK;
+  clipcopy:=false;
+  showinfo:=false;
+  if (clipboard<>nil) and (clipboard<>@self) then
+    begin
+      ShowInfo:=SelEnd.Y-SelStart.Y>50;
+      if ShowInfo then
+        PushInfo(msg_copyingclipboard);
+      clipcopy:=Clipboard^.InsertFrom(@Self);
+      if ShowInfo then
+        PopInfo;
+      {Enable paste command.}
+      CanPaste:=((Clipboard^.SelStart.X<>Clipboard^.SelEnd.X) or
+                (Clipboard^.SelStart.Y<>Clipboard^.SelEnd.Y));
+      SetCmdState(FromClipCmds,CanPaste);
+    end;
   UnLock;
   UnLock;
 end;
 end;
 
 
 procedure TCustomCodeEditor.ClipCut;
 procedure TCustomCodeEditor.ClipCut;
 var
 var
-  ShowInfo : boolean;
+  ShowInfo,CanPaste : boolean;
 begin
 begin
   if IsReadOnly then Exit;
   if IsReadOnly then Exit;
   Lock;
   Lock;
   AddGroupedAction(eaCut);
   AddGroupedAction(eaCut);
   DontConsiderShiftState:=true;
   DontConsiderShiftState:=true;
-  if Clipboard<>nil then
+  if (clipboard<>nil) and (clipboard<>@self) then
    begin
    begin
      ShowInfo:=SelEnd.Y-SelStart.Y>50;
      ShowInfo:=SelEnd.Y-SelStart.Y>50;
      if ShowInfo then
      if ShowInfo then
@@ -5865,6 +5877,9 @@ begin
       end;
       end;
      if ShowInfo then
      if ShowInfo then
        PopInfo;
        PopInfo;
+     CanPaste:=((Clipboard^.SelStart.X<>Clipboard^.SelEnd.X) or
+               (Clipboard^.SelStart.Y<>Clipboard^.SelEnd.Y));
+     SetCmdState(FromClipCmds,CanPaste);
    end;
    end;
   CloseGroupedAction(eaCut);
   CloseGroupedAction(eaCut);
   UnLock;
   UnLock;
@@ -5916,7 +5931,7 @@ begin
     begin
     begin
       Lock;
       Lock;
       SetCurPtr(0,StrToInt(LineNo)-1);
       SetCurPtr(0,StrToInt(LineNo)-1);
-      TrackCursor(true);
+      TrackCursor(do_centre);
       UnLock;
       UnLock;
     end;
     end;
   end;
   end;
@@ -6155,7 +6170,7 @@ begin
    end
    end
   else
   else
    begin
    begin
-     IFindStr:=Upper(FindStr);
+     IFindStr:=upcase(FindStr);
      if SForward then
      if SForward then
       BMFMakeTable(IFindStr,bt)
       BMFMakeTable(IFindStr,bt)
      else
      else
@@ -6164,7 +6179,7 @@ begin
 
 
   inc(X,DX);
   inc(X,DX);
   CanExit:=false;
   CanExit:=false;
-  if (DoReplace=false) or ((Confirm=false) and (Owner<>nil)) then
+  if not DoReplace or (not Confirm and (Owner<>nil)) then
     Owner^.Lock;
     Owner^.Lock;
   if InArea(X,Y) then
   if InArea(X,Y) then
   repeat
   repeat
@@ -6208,28 +6223,26 @@ begin
        LeftOK:=(A.X<=0) or (not( (S[A.X] in AlphaChars) or (S[A.X] in NumberChars) ));
        LeftOK:=(A.X<=0) or (not( (S[A.X] in AlphaChars) or (S[A.X] in NumberChars) ));
        RightOK:=(B.X>=length(S)) or (not( (S[B.X+1] in AlphaChars) or (S[B.X+1] in NumberChars) ));
        RightOK:=(B.X>=length(S)) or (not( (S[B.X+1] in AlphaChars) or (S[B.X+1] in NumberChars) ));
        Found:=LeftOK and RightOK;
        Found:=LeftOK and RightOK;
-       if Found=false then
+       if not Found then
          begin
          begin
            CurDY:=0;
            CurDY:=0;
            X:=B.X+1;
            X:=B.X+1;
          end;
          end;
      end;
      end;
 
 
-    if Found then
-      Inc(FoundCount);
-
     if Found then
     if Found then
       begin
       begin
+        Inc(FoundCount);
         Lock;
         Lock;
         if SForward then
         if SForward then
          SetCurPtr(B.X,B.Y)
          SetCurPtr(B.X,B.Y)
         else
         else
          SetCurPtr(A.X,A.Y);
          SetCurPtr(A.X,A.Y);
-        TrackCursor(true);
+        TrackCursor(do_centre);
         SetHighlight(A,B);
         SetHighlight(A,B);
         UnLock;
         UnLock;
         CurDY:=0;
         CurDY:=0;
-        if (DoReplace=false) then
+        if not DoReplace then
           begin
           begin
             CanExit:=true;
             CanExit:=true;
             If SForward then
             If SForward then
@@ -6245,7 +6258,9 @@ begin
           end
           end
         else
         else
           begin
           begin
-            if Confirm=false then CanReplace:=true else
+            if not confirm then
+              CanReplace:=true
+            else
               begin
               begin
                 Re:=EditorDialog(edReplacePrompt,@CurPos);
                 Re:=EditorDialog(edReplacePrompt,@CurPos);
                 case Re of
                 case Re of
@@ -6371,36 +6386,49 @@ begin
   OldSStart:=SelStart;}
   OldSStart:=SelStart;}
   CurPos.X:=X;
   CurPos.X:=X;
   CurPos.Y:=Y;
   CurPos.Y:=Y;
-  TrackCursor(false);
+  TrackCursor(do_not_centre);
   if not IsLineVisible(CurPos.Y) then
   if not IsLineVisible(CurPos.Y) then
   begin
   begin
     F:=GetLineFold(CurPos.Y);
     F:=GetLineFold(CurPos.Y);
     if Assigned(F) then
     if Assigned(F) then
       F^.Collapse(false);
       F^.Collapse(false);
   end;
   end;
-  if (NoSelect=false) and (ShouldExtend) then
-  begin
-    CheckSels;
-    Extended:=false;
-    if PointOfs(OldPos)=PointOfs(SelStart) then
-      begin SetSelection(CurPos,SelEnd); Extended:=true; end;
-    CheckSels;
-    if Extended=false then
-     if PointOfs(OldPos)=PointOfs(SelEnd) then
-       begin
-         if ValidBlock=false then
-           SetSelection(CurPos,CurPos);
-         SetSelection(SelStart,CurPos); Extended:=true;
-       end;
-    CheckSels;
-    if (Extended=false) then
-       if PointOfs(OldPos)<=PointOfs(CurPos)
-     then begin SetSelection(OldPos,CurPos); Extended:=true; end
-     else begin SetSelection(CurPos,OldPos); Extended:=true; end;
-    DrawView;
-  end else
-   if not IsFlagSet(efPersistentBlocks) then
-      begin HideSelect; DrawView; end;
+  if not NoSelect and ShouldExtend then
+    begin
+      CheckSels;
+      Extended:=false;
+      if PointOfs(OldPos)=PointOfs(SelStart) then
+        begin
+          SetSelection(CurPos,SelEnd);
+          Extended:=true;
+        end;
+      CheckSels;
+      if Extended=false then
+       if PointOfs(OldPos)=PointOfs(SelEnd) then
+         begin
+           if not ValidBlock then
+             SetSelection(CurPos,CurPos);
+           SetSelection(SelStart,CurPos); Extended:=true;
+         end;
+      CheckSels;
+      if not Extended then
+         if PointOfs(OldPos)<=PointOfs(CurPos) then
+           begin
+             SetSelection(OldPos,CurPos);
+             Extended:=true;
+           end
+         else
+           begin
+             SetSelection(CurPos,OldPos);
+             Extended:=true;
+           end;
+      DrawView;
+    end
+  else if not IsFlagSet(efPersistentBlocks) then
+      begin
+        HideSelect;
+        DrawView;
+      end;
 {  if PointOfs(SelStart)=PointOfs(SelEnd) then
 {  if PointOfs(SelStart)=PointOfs(SelEnd) then
      SetSelection(CurPos,CurPos);}
      SetSelection(CurPos,CurPos);}
   if (GetFlags and (efHighlightColumn+efHighlightRow))<>0 then
   if (GetFlags and (efHighlightColumn+efHighlightRow))<>0 then
@@ -6737,6 +6765,7 @@ end;
 destructor TEditorAction.done;
 destructor TEditorAction.done;
 begin
 begin
   DisposeStr(Text);
   DisposeStr(Text);
+  inherited done;
 end;
 end;
 
 
 
 

+ 5 - 5
ide/whelp.pas

@@ -18,11 +18,11 @@ unit WHelp;
 interface
 interface
 
 
 uses
 uses
-{$ifdef Win32}
+{$ifdef Windows}
    { placed here to avoid TRect to be found in windows unit
    { placed here to avoid TRect to be found in windows unit
-     for win32 target whereas its found in objects unit for other targets PM }
+     for Windows target whereas its found in objects unit for other targets PM }
      windows,
      windows,
-{$endif Win32}
+{$endif Windows}
      Objects,
      Objects,
      WUtils;
      WUtils;
 
 
@@ -318,11 +318,11 @@ Function GetDosTicks:longint; { returns ticks at 18.2 Hz, just like DOS }
     {$endif}
     {$endif}
   end;
   end;
 {$endif Unix}
 {$endif Unix}
-{$ifdef Win32}
+{$ifdef Windows}
   begin
   begin
     GetDosTicks:=(Windows.GetTickCount*5484) div 100;
     GetDosTicks:=(Windows.GetTickCount*5484) div 100;
   end;
   end;
-{$endif Win32}
+{$endif Windows}
 {$ifdef go32v2}
 {$ifdef go32v2}
   begin
   begin
     GetDosTicks:=MemL[$40:$6c];
     GetDosTicks:=MemL[$40:$6c];

+ 23 - 11
ide/whlpview.pas

@@ -936,7 +936,7 @@ begin
   begin
   begin
     GetLinkBounds(Link,R);
     GetLinkBounds(Link,R);
     SetCurPtr(R.A.X,R.A.Y);
     SetCurPtr(R.A.X,R.A.Y);
-    TrackCursor(true);
+    TrackCursor(do_centre);
     {St:=GetLinkTarget(Link);
     {St:=GetLinkTarget(Link);
     If St<>'' then
     If St<>'' then
       SetTitle('Help '+St);}
       SetTitle('Help '+St);}
@@ -999,7 +999,7 @@ begin
       ISwitchToTopic(FileID_,Context_,false);
       ISwitchToTopic(FileID_,Context_,false);
       ScrollTo(Delta_.X,Delta_.Y);
       ScrollTo(Delta_.X,Delta_.Y);
       SetCurPtr(CurPos_.X,CurPos_.Y);
       SetCurPtr(CurPos_.X,CurPos_.Y);
-      TrackCursor(false);
+      TrackCursor(do_not_centre);
       if CurLink<>CurLink_ then SetCurLink(CurLink_);
       if CurLink<>CurLink_ then SetCurLink(CurLink_);
     end;
     end;
     DrawView;
     DrawView;
@@ -1026,8 +1026,10 @@ begin
           IndexHelpTopic:=HelpTopic;
           IndexHelpTopic:=HelpTopic;
      end;
      end;
  end;
  end;
-  if Owner<>nil then Owner^.Lock;
-  SetCurPtr(0,0); TrackCursor(false);
+  if Owner<>nil then
+    Owner^.Lock;
+  SetCurPtr(0,0);
+  TrackCursor(do_not_centre);
   RenderTopic;
   RenderTopic;
   BuildTopicWordList;
   BuildTopicWordList;
   Lookup('');
   Lookup('');
@@ -1105,7 +1107,7 @@ begin
       GetLinkBounds(P^.Index,R);
       GetLinkBounds(P^.Index,R);
       SetCurPtr(R.A.X+(I-1)+length(Lookupword),R.A.Y);
       SetCurPtr(R.A.X+(I-1)+length(Lookupword),R.A.Y);
       CurLink:=P^.Index; DrawView;
       CurLink:=P^.Index; DrawView;
-      TrackCursor(true);
+      TrackCursor(do_centre);
       if Owner<>nil then Owner^.UnLock;
       if Owner<>nil then Owner^.UnLock;
     end;
     end;
   end;
   end;
@@ -1160,7 +1162,7 @@ begin
             PrevTopic;
             PrevTopic;
         else DontClear:=true;
         else DontClear:=true;
         end;
         end;
-        if DontClear=false then ClearEvent(Event);
+        if not DontClear then ClearEvent(Event);
       end;
       end;
     evKeyDown :
     evKeyDown :
       begin
       begin
@@ -1169,7 +1171,11 @@ begin
           kbTab :
           kbTab :
             SelectNextLink(true);
             SelectNextLink(true);
           kbShiftTab :
           kbShiftTab :
-            begin NoSelect:=true; SelectNextLink(false); NoSelect:=false; end;
+            begin
+              NoSelect:=true;
+              SelectNextLink(false);
+              NoSelect:=false;
+            end;
           kbEnter :
           kbEnter :
             if CurLink<>-1 then
             if CurLink<>-1 then
               SelectLink(CurLink);
               SelectLink(CurLink);
@@ -1179,12 +1185,18 @@ begin
         else
         else
           case Event.CharCode of
           case Event.CharCode of
              #32..#255 :
              #32..#255 :
-               begin NoSelect:=true; Lookup(LookupWord+Event.CharCode); NoSelect:=false; end;
-          else DontClear:=true;
+               begin
+                 NoSelect:=true;
+                 Lookup(LookupWord+Event.CharCode);
+                 NoSelect:=false;
+               end;
+          else
+            DontClear:=true;
           end;
           end;
         end;
         end;
-        TrackCursor(false);
-        if DontClear=false then ClearEvent(Event);
+        TrackCursor(do_not_centre);
+        if not DontClear then
+          ClearEvent(Event);
       end;
       end;
   end;
   end;
   inherited HandleEvent(Event);
   inherited HandleEvent(Event);

+ 12 - 12
ide/winclip.pas

@@ -41,10 +41,10 @@ implementation
     dos;
     dos;
 {$endif DOS}
 {$endif DOS}
 
 
-{$ifdef win32}
+{$ifdef Windows}
   uses
   uses
     strings,windows;
     strings,windows;
-{$endif win32}
+{$endif Windows}
 
 
 {$ifdef DOS}
 {$ifdef DOS}
 function WinClipboardSupported : boolean;
 function WinClipboardSupported : boolean;
@@ -94,7 +94,7 @@ begin
 end;
 end;
 {$endif DOS}
 {$endif DOS}
 
 
-{$ifdef win32}
+{$ifdef Windows}
 function WinClipboardSupported : boolean;
 function WinClipboardSupported : boolean;
 begin
 begin
   WinClipboardSupported:=true;
   WinClipboardSupported:=true;
@@ -127,7 +127,7 @@ begin
   else
   else
     InternGetDataSize:=0;
     InternGetDataSize:=0;
 end;
 end;
-{$endif win32}
+{$endif Windows}
 
 
 
 
 function GetTextWinClipboardSize : longint;
 function GetTextWinClipboardSize : longint;
@@ -143,10 +143,10 @@ var
   r : Registers;
   r : Registers;
   M : MemPtr;
   M : MemPtr;
 {$endif DOS}
 {$endif DOS}
-{$ifdef win32}
+{$ifdef Windows}
   h : HGlobal;
   h : HGlobal;
   pp : pchar;
   pp : pchar;
-{$endif win32}
+{$endif Windows}
 begin
 begin
   p:=nil;
   p:=nil;
   GetTextWinClipBoardData:=False;
   GetTextWinClipBoardData:=False;
@@ -169,7 +169,7 @@ begin
   RealIntr($2F,r);
   RealIntr($2F,r);
   GetTextWinClipBoardData:=(r.ax<>0);
   GetTextWinClipBoardData:=(r.ax<>0);
 {$endif DOS}
 {$endif DOS}
-{$ifdef win32}
+{$ifdef Windows}
   h:=GetClipboardData(CF_OEMTEXT);
   h:=GetClipboardData(CF_OEMTEXT);
   if h<>0 then
   if h<>0 then
     begin
     begin
@@ -180,7 +180,7 @@ begin
       GlobalUnlock(h);
       GlobalUnlock(h);
     end;
     end;
   GetTextWinClipBoardData:=h<>0;
   GetTextWinClipBoardData:=h<>0;
-{$endif win32}
+{$endif Windows}
   CloseWinClipBoard;
   CloseWinClipBoard;
 {$ifdef DOS}
 {$ifdef DOS}
   M.MoveDataFrom(l,P^);
   M.MoveDataFrom(l,P^);
@@ -194,11 +194,11 @@ var
   r : Registers;
   r : Registers;
   M : MemPtr;
   M : MemPtr;
 {$endif DOS}
 {$endif DOS}
-{$ifdef win32}
+{$ifdef Windows}
   h : HGlobal;
   h : HGlobal;
   pp : pchar;
   pp : pchar;
   res : boolean;
   res : boolean;
-{$endif win32}
+{$endif Windows}
 begin
 begin
   SetTextWinClipBoardData:=False;
   SetTextWinClipBoardData:=False;
   if (l=0) or (l>65520) then
   if (l=0) or (l>65520) then
@@ -226,7 +226,7 @@ begin
   RealIntr($2F,r);
   RealIntr($2F,r);
   FreeDosMem(M);
   FreeDosMem(M);
 {$endif DOS}
 {$endif DOS}
-{$ifdef win32}
+{$ifdef Windows}
   h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
   h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
   pp:=pchar(GlobalLock(h));
   pp:=pchar(GlobalLock(h));
   move(p^,pp^,l+1);
   move(p^,pp^,l+1);
@@ -238,7 +238,7 @@ begin
   SetClipboardData(CF_TEXT,h);
   SetClipboardData(CF_TEXT,h);
   GlobalUnlock(h);
   GlobalUnlock(h);
   SetTextWinClipBoardData:=res;
   SetTextWinClipBoardData:=res;
-{$endif win32}
+{$endif Windows}
   CloseWinClipBoard;
   CloseWinClipBoard;
 end;
 end;
 
 

+ 1 - 1
ide/windebug.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal Integrated Development Environment
     This file is part of the Free Pascal Integrated Development Environment
     Copyright (c) 2000 by Pierre Muller
     Copyright (c) 2000 by Pierre Muller
 
 
-    Win32 specific debugger routines for the IDE
+    Windows specific debugger routines for the IDE
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.

+ 6 - 6
ide/wutils.pas

@@ -20,9 +20,9 @@ interface
 
 
 
 
 uses
 uses
-{$ifdef win32}
+{$ifdef Windows}
   windows,
   windows,
-{$endif win32}
+{$endif Windows}
 {$ifdef netwlibc}
 {$ifdef netwlibc}
   libc,
   libc,
 {$else}
 {$else}
@@ -563,7 +563,7 @@ begin
 end;
 end;
 
 
 function GetShortName(const n:string):string;
 function GetShortName(const n:string):string;
-{$ifdef win32}
+{$ifdef Windows}
 var
 var
   hs,hs2 : string;
   hs,hs2 : string;
   i : longint;
   i : longint;
@@ -574,7 +574,7 @@ var
 {$endif}
 {$endif}
 begin
 begin
   GetShortName:=n;
   GetShortName:=n;
-{$ifdef win32}
+{$ifdef Windows}
   hs:=n+#0;
   hs:=n+#0;
   i:=Windows.GetShortPathName(@hs[1],@hs2[1],high(hs2));
   i:=Windows.GetShortPathName(@hs[1],@hs2[1],high(hs2));
   if (i>0) and (i<=high(hs2)) then
   if (i>0) and (i<=high(hs2)) then
@@ -591,7 +591,7 @@ begin
 end;
 end;
 
 
 function GetLongName(const n:string):string;
 function GetLongName(const n:string):string;
-{$ifdef win32}
+{$ifdef Windows}
 var
 var
   hs : string;
   hs : string;
   hs2 : Array [0..255] of char;
   hs2 : Array [0..255] of char;
@@ -604,7 +604,7 @@ var
 {$endif}
 {$endif}
 begin
 begin
   GetLongName:=n;
   GetLongName:=n;
-{$ifdef win32}
+{$ifdef Windows}
   hs:=n+#0;
   hs:=n+#0;
   i:=Windows.GetFullPathName(@hs[1],256,hs2,j);
   i:=Windows.GetFullPathName(@hs[1],256,hs2,j);
   if (i>0) and (i<=high(hs)) then
   if (i>0) and (i<=high(hs)) then