Sfoglia il codice sorgente

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 anni fa
parent
commit
21b73ec525
2 ha cambiato i file con 12 aggiunte e 21 eliminazioni
  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
 
-uses
+uses 
   Dos,Objects,Drivers,
   FVConsts,
   Version,
@@ -233,7 +233,8 @@ function strtopalette(S: string): string;
 {Converts a string in palette string format, i.e #$41#$42#$43 or
 #65#66#67 to an actual format.}
 
-var i,p,x,len:byte;
+var i: integer;
+    p,x,len:byte;
     code:integer;
 
 begin
@@ -361,6 +362,7 @@ var INIFile: PINIFile;
     OK: boolean;
     ts : TSwitchMode;
     W: word;
+    crcv:cardinal;
 begin
   OK:=ExistsFile(IniFileName);
   if OK then
@@ -431,10 +433,12 @@ begin
   CtrlMouseAction:=INIFile^.GetIntEntry(secMouse,ieCtrlClickAction,CtrlMouseAction);
   {Keyboard}
   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;
-    $b20b87b3: {crc32 for 'BORLAND'}
+    $4DF4784C
+       : {crc32 for 'BORLAND'}
       EditKeys:=ekm_borland;
     else
       EditKeys:=ekm_default;

+ 3 - 16
rtl/unix/sysutils.pp

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