Browse Source

Merged revisions 12130,12238,12255 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r12130 | marco | 2008-11-16 20:56:22 +0100 (Sun, 16 Nov 2008) | 2 lines

* Fix rangecheck problem, IDE now starts up after being compiled with -CROriot
........
r12238 | marco | 2008-11-27 00:08:17 +0100 (Thu, 27 Nov 2008) | 2 lines

* removed some old 1.0.x ->2.0.x transitional code (executeprocess)
........
r12255 | marco | 2008-11-27 21:54:41 +0100 (Thu, 27 Nov 2008) | 3 lines

* fix for 0012697. crcs were used using a unit from the compiler.
Maybe polynomals were changed there since this was originally implemented
........

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

marco 17 years ago
parent
commit
21b73ec525
2 changed files with 12 additions and 21 deletions
  1. 9 5
      ide/fpini.pas
  2. 3 16
      rtl/unix/sysutils.pp

+ 9 - 5
ide/fpini.pas

@@ -31,7 +31,7 @@ procedure SetPrinterDevice(const Device: string);
 
 
 implementation
 implementation
 
 
-uses
+uses 
   Dos,Objects,Drivers,
   Dos,Objects,Drivers,
   FVConsts,
   FVConsts,
   Version,
   Version,
@@ -233,7 +233,8 @@ function strtopalette(S: string): string;
 {Converts a string in palette string format, i.e #$41#$42#$43 or
 {Converts a string in palette string format, i.e #$41#$42#$43 or
 #65#66#67 to an actual format.}
 #65#66#67 to an actual format.}
 
 
-var i,p,x,len:byte;
+var i: integer;
+    p,x,len:byte;
     code:integer;
     code:integer;
 
 
 begin
 begin
@@ -361,6 +362,7 @@ var INIFile: PINIFile;
     OK: boolean;
     OK: boolean;
     ts : TSwitchMode;
     ts : TSwitchMode;
     W: word;
     W: word;
+    crcv:cardinal;
 begin
 begin
   OK:=ExistsFile(IniFileName);
   OK:=ExistsFile(IniFileName);
   if OK then
   if OK then
@@ -431,10 +433,12 @@ begin
   CtrlMouseAction:=INIFile^.GetIntEntry(secMouse,ieCtrlClickAction,CtrlMouseAction);
   CtrlMouseAction:=INIFile^.GetIntEntry(secMouse,ieCtrlClickAction,CtrlMouseAction);
   {Keyboard}
   {Keyboard}
   S:=upcase(INIFile^.GetEntry(secKeyboard,ieEditKeys,''));
   S:=upcase(INIFile^.GetEntry(secKeyboard,ieEditKeys,''));
-  case UpdateCrc32(0,s[1],Length(s)) of
-    $86a4c898: {crc32 for 'MICROSOFT'}
+  crcv := UpdateCrc32(0,s[1],Length(s)) ;
+  case crcv of
+    $795B3767  : {crc32 for 'MICROSOFT'}
       EditKeys:=ekm_microsoft;
       EditKeys:=ekm_microsoft;
-    $b20b87b3: {crc32 for 'BORLAND'}
+    $4DF4784C
+       : {crc32 for 'BORLAND'}
       EditKeys:=ekm_borland;
       EditKeys:=ekm_borland;
     else
     else
       EditKeys:=ekm_default;
       EditKeys:=ekm_default;

+ 3 - 16
rtl/unix/sysutils.pp

@@ -860,7 +860,6 @@ begin
 end;
 end;
 
 
 
 
-{$define FPC_USE_FPEXEC}  // leave the old code under IFDEF for a while.
 function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString):integer;
 function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString):integer;
 var
 var
   pid    : longint;
   pid    : longint;
@@ -873,7 +872,8 @@ Begin
     so that long filenames will always be accepted. But don't
     so that long filenames will always be accepted. But don't
     do it if there are already double quotes!
     do it if there are already double quotes!
   }
   }
-  {$ifdef FPC_USE_FPEXEC}       // Only place we still parse
+
+   // Only place we still parse
    cmdline2:=nil;
    cmdline2:=nil;
    if Comline<>'' Then
    if Comline<>'' Then
      begin
      begin
@@ -890,14 +890,7 @@ Begin
        cmdline2^:=pchar(Path);
        cmdline2^:=pchar(Path);
        cmdline2[1]:=nil;
        cmdline2[1]:=nil;
      end;
      end;
-  {$else}
-  if Pos ('"', Path) = 0 then
-    CommandLine := '"' + Path + '"'
-  else
-    CommandLine := Path;
-  if ComLine <> '' then
-    CommandLine := Commandline + ' ' + ComLine;
-  {$endif}
+
   {$ifdef USE_VFORK}
   {$ifdef USE_VFORK}
   pid:=fpvFork;
   pid:=fpvFork;
   {$else USE_VFORK}
   {$else USE_VFORK}
@@ -906,11 +899,7 @@ Begin
   if pid=0 then
   if pid=0 then
    begin
    begin
    {The child does the actual exec, and then exits}
    {The child does the actual exec, and then exits}
-    {$ifdef FPC_USE_FPEXEC}
       fpexecv(pchar(pointer(Path)),Cmdline2);
       fpexecv(pchar(pointer(Path)),Cmdline2);
-    {$else}
-      Execl(CommandLine);
-    {$endif}
      { If the execve fails, we return an exitvalue of 127, to let it be known}
      { If the execve fails, we return an exitvalue of 127, to let it be known}
      fpExit(127);
      fpExit(127);
    end
    end
@@ -925,10 +914,8 @@ Begin
   { We're in the parent, let's wait. }
   { We're in the parent, let's wait. }
   result:=WaitProcess(pid); // WaitPid and result-convert
   result:=WaitProcess(pid); // WaitPid and result-convert
 
 
-  {$ifdef FPC_USE_FPEXEC}
   if Comline<>'' Then
   if Comline<>'' Then
     freemem(cmdline2);
     freemem(cmdline2);
-  {$endif}
 
 
   if (result<0) or (result=127) then
   if (result<0) or (result=127) then
     begin
     begin