#1 2014-10-25 12:12:50

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

SynProject and Delphi XE2

Hi Arnaud,
Why SynProject does not compile on Unicode Delphi (on the D2007 does not have a problem)?.
Errors begin from:

function PCharToHex32(p: PAnsiChar; d: ppChar): cardinal;
var v0,v1: cardinal;
begin
  result := 0;
  if p<>nil then begin
    while p^=' ' do inc(p);
    repeat
      v0 := Hex2Dec[p[0]];
      if v0=255 then break; // not in '0'..'9','a'..'f'
      v1 := Hex2Dec[p[1]];
      inc(p);
      if v1=255 then begin
        result := (result shl 4)+v0; // only one char left
        break;
      end;
      v0 := v0 shl 4;
      result := result shl 8;
      inc(v0,v1);
      inc(p);
      inc(result,v0);
    until false;
  end;
  if d<>nil then
    d^ := p;   // <<=============================
end;

Michal

Offline

Board footer

Powered by FluxBB