Re: [fpc-devel] Patch, font rendering on Arm-Linux devices.

2008-03-03 Thread Bernd Mueller

Bernd Mueller wrote:
(very unexpected) result of this benchmark is, that a version with 
leaving the TStroke-Record packed, is about 13 % faster than the 
original patch. I am going to send a new patch soon.


unfortunately this one is about 10 % slower on X86. So, I am going to 
leave this to the experts here.


Regards, Bernd.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] systemh.inc(592, 2) Fatal: Can't open include file currh.inc

2008-03-03 Thread ik
Hello,

I'm trying to compile the latest revision (10436) and I'm having the
above error.
After quick search (find ./ -name currh.inc) I saw that the file
really does not exists.

Ido
-- 
http://ik.homelinux.org/
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode resourcestrings

2008-03-03 Thread Anton Kavalenka

Florian Klaempfl wrote:

Martin Schreiber schrieb:
  

On Sunday 02 March 2008 18.48:01 Daniƫl Mantione wrote:


Op Sun, 2 Mar 2008, schreef Florian Klaempfl:
  

What did I wrong?
  

I'am not sure how this could be made working just a remark: -Fcutf8
influences _only_ the interpretation of string constants when converting
them to unicode.


Right. Try to compile the (utf-8 encoded) file without specifying a code
page, this should result in the constants ending up in the resourcestring
without processing.

  

And now the widestring constants are broken, see attachment...



Did you utf-8 decode the string constants?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

  

Inside our projects there are lots of WIdeStrings handling.

For Delphi/Kylix we use the following dirty hack (somewhat reworked 
routine from Borland RTL):

This one is Widows implementation,
There is also linux implementation

function LoadResStringW(const pRec: PResStringRec): WideString;
var
 hInst:cardinal;
 Buffer: array [0..1023] of char;
begin
 if pRec = nil then Exit;

 if pRec^.Identifier  64*1024 then
 begin
   hInst:=FindResourceHInstance(pRec^.Module^);
   // try wide
   if LoadStringW(hInst,pRec^.Identifier, @Buffer, SizeOf(Buffer))0 then
 Result:=PWideChar(@Buffer)
   else // try narrow
   if LoadString(hInst,pRec^.Identifier, @Buffer, SizeOf(Buffer))0 then
 Result:=PChar(@Buffer)
   else
 Result:='-lost-';
 end
 else
   Result := PWideChar(pRec^.Identifier);
end;

To get the wide string from resource string by its identifier, we go the 
following:


resourcestring
 sWideStringID='Some string';

var
   mw:WideString;

mw:=LoadresStringW(@sWideStringID)

Under FPC there is special implementation, but dirty hack does not work 
all the time, since there is hard to determine - where was the resource 
string
was implicitly decoded to current codepage. PRestringRec is boralnd 
specific, under FPC it is PAnsiString;


function LoadResStringW(const pRec: PResStringRec): WideString;inline;
begin
 if pRec=nil then
 Result:=''
 else
 begin
   {$ifdef LINUX}
   Result:=PAnsiString(pRec)^;
   {$else}
   {$ifdef WindowsUnicodeSupport}
   Result:=UTF8Decode(PAnsiString(pRec)^);
   {$else}
   Result:=PAnsiString(pRec)^;
   {$endif}
   {$endif}
 end;
end;
{$ENDIF} // end platform-compiler dependent string loader


Please help -
How to implement that dirty hack.


Best regards,
Anton Kavalenka
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] systemh.inc(592, 2) Fatal: Can't open include file currh.inc

2008-03-03 Thread Inoussa OUEDRAOGO
  I'm trying to compile the latest revision (10436) and I'm having the
  above error.
  After quick search (find ./ -name currh.inc) I saw that the file
  really does not exists.

Same here on WinXP.

-- 
Inoussa O.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] systemh.inc(592, 2) Fatal: Can't open include file currh.inc

2008-03-03 Thread Jonas Maebe


On 03 Mar 2008, at 12:40, ik wrote:


I'm trying to compile the latest revision (10436) and I'm having the
above error.


Someone forgot to commit a file yesterday. He will fix it tonight when  
gets home from work.



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Re: compiler syntax bug : Fatal: Syntax error, ) expected but ( found

2008-03-03 Thread Inoussa OUEDRAOGO
  I 'm about to file a bug report and would like to have a confirmation.
  The compiler conplains( see the code below ) :
   Fatal: Syntax error, ) expected but ( found
  It compiles under Delphi ( D7 ). I tried with mode delphi and mode
  objfpc and still got the
  same syntax error ( WinXP fpc 2.2.1 19/11/2007 ).


Test with the 2.3.1 r.10439 and the error is still there.
Reported  here http://bugs.freepascal.org/view.php?id=10933

-- 
Inoussa O.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] systemh.inc(592, 2) Fatal: Can't open include file currh.inc

2008-03-03 Thread Inoussa OUEDRAOGO
2008/3/3, Jonas Maebe [EMAIL PROTECTED]:

  On 03 Mar 2008, at 12:40, ik wrote:

   I'm trying to compile the latest revision (10436) and I'm having the
   above error.


 Someone forgot to commit a file yesterday. He will fix it tonight when
  gets home from work.

It does works.

Thanks.

-- 
Inoussa O.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel