瀏覽代碼

* Undo last wrong commit

git-svn-id: trunk@6118 -
pierre 18 年之前
父節點
當前提交
87c0a048e5
共有 13 個文件被更改,包括 117 次插入198 次删除
  1. 35 1
      ide/compiler/Makefile
  2. 56 56
      ide/cvsdiff.tdf
  3. 2 19
      ide/fpcatch.pas
  4. 4 15
      ide/fpcompil.pas
  5. 2 3
      ide/fpcygwin.pas
  6. 1 1
      ide/fpide.pas
  7. 4 7
      ide/fpredir.pas
  8. 3 58
      ide/fpusrscr.pas
  9. 2 2
      ide/globdir.inc
  10. 0 16
      ide/test.pas
  11. 3 16
      ide/wconsole.pas
  12. 1 2
      ide/whtmlhlp.pas
  13. 4 2
      ide/wutils.pas

+ 35 - 1
ide/compiler/Makefile

@@ -2,7 +2,7 @@
 # Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/18]
 #
 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 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 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-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -306,6 +306,9 @@ endif
 ifeq ($(FULL_TARGET),i386-embedded)
 override TARGET_UNITS+=compunit
 endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_UNITS+=compunit
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_UNITS+=compunit
 endif
@@ -393,6 +396,9 @@ endif
 ifeq ($(FULL_TARGET),arm-embedded)
 override TARGET_UNITS+=compunit
 endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_UNITS+=compunit
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=compunit
 endif
@@ -454,6 +460,9 @@ endif
 ifeq ($(FULL_TARGET),i386-embedded)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_OPTIONS+=-Ur -dNOCATCH
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
@@ -541,6 +550,9 @@ endif
 ifeq ($(FULL_TARGET),arm-embedded)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_OPTIONS+=-Ur -dNOCATCH
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
@@ -601,6 +613,9 @@ endif
 ifeq ($(FULL_TARGET),i386-embedded)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
@@ -688,6 +703,9 @@ endif
 ifeq ($(FULL_TARGET),arm-embedded)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
@@ -748,6 +766,9 @@ endif
 ifeq ($(FULL_TARGET),i386-embedded)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
@@ -835,6 +856,9 @@ endif
 ifeq ($(FULL_TARGET),arm-embedded)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
@@ -1167,6 +1191,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
@@ -1639,6 +1667,9 @@ endif
 ifeq ($(FULL_TARGET),i386-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1726,6 +1757,9 @@ endif
 ifeq ($(FULL_TARGET),arm-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 56 - 56
ide/cvsdiff.tdf

@@ -1,56 +1,56 @@
-[Main]
-Title="CVS Diff"
-Size=(56,15)
-CommandLine="diff %c% %revision% %filename%"
-Default="filename"
-
-[filename]
-Type=InputLine
-Origin=(2,3)
-Size=(52,1)
-Value=$EDNAME
-
-[label1]
-Type=Label
-Origin=(2,2)
-Size=(52,1)
-Text="~F~ile(s) to diff"
-Link="filename"
-
-[revision]
-Type=InputLine
-Origin=(2,5)
-Size=(52,1)
-Value=
-
-[label2]
-Type=Label
-Origin=(2,4)
-Size=(52,1)
-Text="to specific ~r~evision"
-Link="revision"
-
-[c]
-Type=CheckBox
-Name="~C~ontext diff"
-Origin=(2,6)
-Size=(25,1)
-Default=On
-On="-c"
-
-[b]
-Type=CheckBox
-Name="~I~gnore blank changes"
-Origin=(2,7)
-Size=(25,1)
-Default=On
-On="-b"
-
-[u]
-Type=CheckBox
-Name="~U~nified diff"
-Origin=(2,8)
-Size=(25,1)
-Default=Off
-On="-u"
-
+[Main]
+Title="CVS Commit"
+Size=(56,15)
+CommandLine="diff %c% %revision% %filename%"
+Default="filename"
+
+[filename]
+Type=InputLine
+Origin=(2,3)
+Size=(52,1)
+Value=$EDNAME
+
+[label1]
+Type=Label
+Origin=(2,2)
+Size=(52,1)
+Text="~F~ile(s) to diff"
+Link="filename"
+
+[revision]
+Type=InputLine
+Origin=(2,5)
+Size=(52,1)
+Value=
+
+[label2]
+Type=Label
+Origin=(2,4)
+Size=(52,1)
+Text="to specific ~r~evision"
+Link="revision"
+
+[c]
+Type=CheckBox
+Name="~C~ontext diff"
+Origin=(2,6)
+Size=(25,1)
+Default=On
+On="-c"
+
+[b]
+Type=CheckBox
+Name="~I~gnore blank changes"
+Origin=(2,7)
+Size=(25,1)
+Default=On
+On="-b"
+
+[u]
+Type=CheckBox
+Name="~U~nified diff"
+Origin=(2,8)
+Size=(25,1)
+Default=Off
+On="-u"
+

+ 2 - 19
ide/fpcatch.pas

@@ -224,27 +224,10 @@ begin
     exit;
 {$ifdef Windows}
   if GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @Mode) then
-    begin
-{$ifdef DEBUG}
-      Writeln(stderr,'Starting value of ConsoleMode is $',hexstr(Mode,8));
-{$endif DEBUG}
-      SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)),
-        (Mode or ENABLE_MOUSE_INPUT) and not ENABLE_PROCESSED_INPUT);
-{$ifdef DEBUG}
-    end
-  else
-    begin
-      Writeln(stderr,'Call to GetConsoleMode failed, GetLastError=',
-        GetLastError);
-{$endif DEBUG}
-    end;
+    SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), (Mode or ENABLE_MOUSE_INPUT) and not ENABLE_PROCESSED_INPUT);
 {$endif Windows}
 {$ifdef go32v2}
-  {
-    I think that it was an error to put that here PM
-    djgpp_set_ctrl_c(false);
-    at least since that this is now handled in fpusrscr.pas unit
-  }
+  djgpp_set_ctrl_c(false);
 {$endif go32v2}
 {$ifdef HasSignal}
 {$ifndef TP}

+ 4 - 15
ide/fpcompil.pas

@@ -220,8 +220,7 @@ const
 
 procedure ParseUserScreen;
 var
-  Y,YMax : longint;
-  LEvent : TEvent;
+  y : longint;
   Text,Attr : String;
   DisplayCompilerWindow : boolean;
   cc: integer;
@@ -233,7 +232,7 @@ var
         if pos('  $',Text)=1 then
           begin
             AText:=Text;
-            Delete(Text,1,11);
+            Delete(Text,1,10);
             While pos(' ',Text)=1 do
               Delete(Text,1,1);
             if pos('of ',Text)>0 then
@@ -252,7 +251,7 @@ var
               end
             else
               row:=0;
-            CompilerMessageWindow^.AddMessage(V_Fatal or v_lineinfo,AText
+            CompilerMessageWindow^.AddMessage(V_Fatal,AText
                   ,ModuleName,row,1);
             DisplayCompilerWindow:=true;
           end;
@@ -283,21 +282,11 @@ begin
   if not assigned(UserScreen) then
     exit;
   DisplayCompilerWindow:=false;
-  YMax:=UserScreen^.GetHeight;
   PushStatus('Parsing User Screen');
   CompilerMessageWindow^.Lock;
-  for Y:=0 to YMax do
+  for Y:=0 to UserScreen^.GetHeight do
     begin
       UserScreen^.GetLine(Y,Text,Attr);
-      if (y mod 10) = 0 then
-        begin
-          CompilerMessageWindow^.Unlock;
-          SetStatus('Parsing User Screen line '+IntToStr(y)+'/'+IntToStr(YMax));
-          CompilerMessageWindow^.Lock;
-        end;
-      GetKeyEvent(LEvent);
-      if (LEvent.What=evKeyDown) and (LEvent.KeyCode=kbEsc) then
-        break;
       SearchBackTrace;
       InsertInMessages(' Fatal:',v_Fatal or v_lineinfo,true);
       InsertInMessages(' Error:',v_Error or v_lineinfo,true);

+ 2 - 3
ide/fpcygwin.pas

@@ -67,7 +67,7 @@ begin
     GetCygwinFullName:='cygwin1.dll';
 end;
 
-initialization
+begin
   ModuleH:=GetModuleHandle('cygwin1');
   GetMem(CygwinFullName,MAX_PATH+1);
   GetModuleFileName(ModuleH,CygwinFullName,MAX_PATH+1);
@@ -81,6 +81,5 @@ initialization
         FileInfo:=PFileInfo^;
     end;
   FreeMem(InfoData,size);
-finalization
-  FreeMem(CygwinFullName,MAX_PATH+1);
+  {FreeMem(CygwinFullName,MAX_PATH+1);}
 end.

+ 1 - 1
ide/fpide.pas

@@ -1326,7 +1326,7 @@ begin
              cmHelpContents  : HelpContents;
              cmHelpIndex     : HelpHelpIndex;
              cmHelpDebug     : HelpDebugInfos;
-             cmHelpTopicSearch: HelpTopicSearch;
+{             cmHelpTopicSearch: HelpTopicSearch;}
              cmHelpPrevTopic : HelpPrevTopic;
              cmHelpUsingHelp : HelpUsingHelp;
              cmHelpFiles     : HelpFiles;

+ 4 - 7
ide/fpredir.pas

@@ -695,12 +695,9 @@ end;
 function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
 {$ifdef Windows}
 var
-  mode,modebefore : word;
+  mode : word;
 {$endif Windows}
 Begin
-{$ifdef Windows}
-  GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @modebefore);
-{$endif Windows}
   RedirErrorOut:=0; RedirErrorIn:=0; RedirErrorError:=0;
   ExecuteResult:=0;
   IOStatus:=0;
@@ -718,10 +715,10 @@ Begin
                 (RedirErrorIn=0) and (RedirErrorError=0) and
                 (ExecuteResult=0);
 {$ifdef Windows}
-  // restore previous mode
+  // reenable mouse events
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @mode);
-  //mode:=mode or ENABLE_MOUSE_INPUT;
-  SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), modebefore);
+  mode:=mode or ENABLE_MOUSE_INPUT;
+  SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), mode);
 {$endif Windows}
 End;
 

+ 3 - 58
ide/fpusrscr.pas

@@ -222,10 +222,6 @@ type
       ConsoleMode,IdeMode      : Dword;
       IdeScreenMode : TVideoMode;
       procedure BufferCopy(src,dest : THandle);
-{$ifdef debug}
-      procedure Complain(St : string);
-      Procedure SetConsoleMode(FH : Handle;Mode : DWord);
-{$endif debug}
     end;
 {$endif}
 
@@ -986,12 +982,8 @@ end;
 
 { Seems to be missing in windows unit PM }
 const
-  ENABLE_INSERT_MODE     = $20;
+  ENABLE_INSERT_MODE = $20;
   ENABLE_QUICK_EDIT_MODE = $40;
-  ENABLE_EXTENDED_FLAGS  = $80;
-  ENABLE_AUTO_POSITION   = $100;
-
-
 
 procedure UpdateFileHandles;
 begin
@@ -1029,7 +1021,6 @@ begin
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
   IdeMode:=ConsoleMode;
 {$ifdef debug}
-  Complain('Starting ConsoleMode is $'+hexstr(ConsoleMode,8));
 {define Windowsbigwin}
 {$endif debug}
 {$ifdef Windowsbigwin}
@@ -1274,17 +1265,9 @@ end;
 { dummy for Windows as the Buffer screen
   do hold all the info }
 procedure TWindowsScreen.SaveIDEScreen;
-var
-  NowIdeMode : Dword;
 begin
   IdeScreenMode:=ScreenMode;
-  GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @NowIdeMode);
-{$ifdef debug}
-  Complain('IDE ConsoleMode is $'+hexstr(NowIdeMode,8));
-  if NowIdeMode<>IdeMode then
-    Complain('is not equal to IDEMode  $'+hexstr(IdeMode,8));
-{$endif debug}
-  IdeMode:=NowIdeMode;
+  GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
   { set the dummy buffer as active already now PM }
   SetStdHandle(cardinal(Std_Output_Handle),DummyScreenBufferHandle);
   UpdateFileHandles;
@@ -1295,9 +1278,6 @@ end;
 procedure TWindowsScreen.SaveConsoleScreen;
 begin
   GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @ConsoleMode);
-{$ifdef debug}
-  Complain('ConsoleMode now is $'+hexstr(ConsoleMode,8));
-{$endif debug}
   { set the dummy buffer as active already now PM }
   SetStdHandle(cardinal(Std_Output_Handle),DummyScreenBufferHandle);
   UpdateFileHandles;
@@ -1327,9 +1307,7 @@ begin
   { Needed to force InitSystemMsg to use the right console handle }
   DoneEvents;
   InitEvents;
-  IdeMode:=({IdeMode or }ENABLE_MOUSE_INPUT or
-                   ENABLE_WINDOW_INPUT or
-                   ENABLE_EXTENDED_FLAGS)
+  IdeMode:=(IdeMode or ENABLE_MOUSE_INPUT or ENABLE_WINDOW_INPUT)
            and not (ENABLE_PROCESSED_INPUT or
                     ENABLE_LINE_INPUT or
                     ENABLE_ECHO_INPUT or
@@ -1362,39 +1340,6 @@ begin
   IDEActive:=true;
 end;
 
-{$ifdef debug}
-
-procedure TWindowsScreen.Complain(St : string);
-begin
-  if IDEActive then
-    DebugMessage('',St,0,0)
-  else
-    Writeln(stderr,St);
-end;
-
-procedure TWindowsScreen.SetConsoleMode(FH : Handle;Mode: DWord);
-var
-  Test: DWord;
-begin
-  If not Windows.SetConsoleMode(FH,Mode) then
-    begin
-      Complain('SetConsoleMode call failed GetLastError='+IntToStr(GetLastError));
-    end
-  else
-    begin
-      if not GetConsoleMode(FH,Test) then
-        begin
-          Complain('GetConsoleMode call failed GetLastError='+IntToStr(GetLastError));
-        end
-      else if (Test<>Mode) then
-        begin
-          Complain('GetConsoleMode result '+IntToStr(Test)+' <> '+
-            IntToStr(Mode));
-        end;
-    end;
-end;
-{$endif DEBUG}
-
 {$endif}
 
 {****************************************************************************

+ 2 - 2
ide/globdir.inc

@@ -32,9 +32,9 @@
   {$define HasSignal}
   {$define FSCaseInsensitive}
   {$define HasSysMsgUnit}
-  {$ifdef EXTDEBUG}
+  {$ifdef DEBUG}
     {$define USE_GRAPH_SWITCH}
-  {$endif EXTDEBUG}
+  {$endif DEBUG}
 {$endif}
 
 {$ifdef Linux}

+ 0 - 16
ide/test.pas

@@ -88,7 +88,6 @@ var Hello : word;
     Pointer2: PObj;
     ClassVar1: TClass;
     ClassVar2: TClass2;
-    ClassClass: Class of TObject;
     Obj1: TObj;
     Obj2: TObj2;
     CharArray : Array[1..2000] of char;
@@ -131,17 +130,6 @@ begin
   X:=7;
 end;
 
-procedure TestOverload;
-begin
-  Writeln('Procedure without argument called');
-end;
-
-procedure TestOverload(arg : string);
-begin
-  Writeln('Procedure with one argument called');
-  Writeln('argument is ',arg);
-end;
-
 function Func1(x,z : word; var y : boolean; const r: TRecord): shortint;
 
 var loc : string;
@@ -193,8 +181,6 @@ BEGIN
       SingleArrayArray[i,j]:=i*j;
 
   ClassVar1:=TClass2.create;
-
-  ClassClass:=TClass2.ClassType;
   Obj1.Init;
   pointer2:=@Obj1;
   Writeln('Obj1.Z=',Obj1.Z);
@@ -207,8 +193,6 @@ BEGIN
   Writeln('ParamCount = ',ParamCount);
   For i:=0 to paramcount do
    writeln('Paramstr(',i,') = '+Paramstr(i));
-  TestOverload;
-  TestOverload('Test');
   writeln(IsOdd(3));
   writeln(Func1(5,5,Bool,T));
   new(X);

+ 3 - 16
ide/wconsole.pas

@@ -48,13 +48,8 @@ Procedure RestoreConsoleMode(const ConsoleMode : TConsoleMode);
 implementation
 {$ifdef Windows}
   uses
-    wutils,
     windows;
 {$endif Windows}
-{$ifdef GO32V2}
-  uses
-    Dpmiexcp;
-{$endif GO32V2}
 
 Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode);
 Begin
@@ -62,15 +57,10 @@ Begin
   TCGetAttr(1,ConsoleMode);
 {$endif UNIX}
 {$ifdef Windows}
-  if not GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode) then
-    DebugMessage('','Call to GetConsoleMode failed, GetLastError='+
-        IntToStr(GetLastError),0,0);
+  GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
 {$endif Windows}
 {$ifdef go32v2}
-  if djgpp_set_ctrl_c(false) then
-    ConsoleMode:=1
-  else
-    ConsoleMode:=0;
+  ConsoleMode:=0;
 {$endif go32v2}
 {$ifdef netware}
   ConsoleMode:=0;
@@ -83,12 +73,9 @@ Begin
   TCSetAttr(1,TCSANOW,ConsoleMode);
 {$endif UNIX}
 {$ifdef Windows}
-  if not SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode) then
-    DebugMessage('','Call to SetConsoleMode failed, GetLastError='+
-        IntToStr(GetLastError),0,0);
+  SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),ConsoleMode);
 {$endif Windows}
 {$ifdef go32v2}
-  djgpp_set_ctrl_c((ConsoleMode and 1)<>0);
 {$endif go32v2}
 End;
 

+ 1 - 2
ide/whtmlhlp.pas

@@ -1331,8 +1331,7 @@ begin
             DebugMessage(Name,Link+' not found',1,1);
 {$endif DEBUG}
         end;
-      if HTMLFile<>nil then
-        Dispose(HTMLFile, Done);
+      if HTMLFile<>nil then Dispose(HTMLFile, Done);
       if BookMark='' then
         T^.StartNamedMark:=0
       else

+ 4 - 2
ide/wutils.pas

@@ -200,14 +200,14 @@ const LastStrToIntResult : integer = 0;
 
 procedure RegisterWUtils;
 
+{$ifdef DEBUG}
 Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : sw_word);
 type
   TDebugMessage = procedure(AFileName, AText : string; ALine, APos : sw_word);
 
 Const
   DebugMessage : TDebugMessage = @WUtilsDebugMessage;
-
-
+{$endif DEBUG}
 implementation
 
 uses
@@ -1350,11 +1350,13 @@ begin
 {$endif}
 end;
 
+{$ifdef DEBUG}
 Procedure WUtilsDebugMessage(AFileName, AText : string; ALine, APos : sw_word);
 begin
   writeln(stderr,AFileName,' (',ALine,',',APos,') ',AText);
 end;
 
+{$endif DEBUG}
 BEGIN
   Randomize;
 END.