diff options
author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2008-11-29 16:27:25 +0000 |
---|---|---|
committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2008-11-29 16:27:25 +0000 |
commit | b9899415eedf066358f1598fa157a0f5d9964251 (patch) | |
tree | 9656209d3135d4b3d6cd8445a51d58fca8aa04c5 | |
parent | 7de78e4d9d283963ab93b2ba8bc7a6b8b7e53bd3 (diff) | |
download | fpc-b9899415eedf066358f1598fa157a0f5d9964251.tar.gz |
Merged revisions 12130,12238,12255 via svnmerge from
svn+ssh://marco@svn.freepascal.org/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: http://svn.freepascal.org/svn/fpc/branches/fixes_2_2@12275 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | ide/fpini.pas | 14 | ||||
-rw-r--r-- | rtl/unix/sysutils.pp | 19 |
2 files changed, 12 insertions, 21 deletions
diff --git a/ide/fpini.pas b/ide/fpini.pas index 5a9c43d64e..8d3038540b 100644 --- a/ide/fpini.pas +++ b/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; diff --git a/rtl/unix/sysutils.pp b/rtl/unix/sysutils.pp index 0db686f8f7..a92c69d698 100644 --- a/rtl/unix/sysutils.pp +++ b/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 |