Jesús Reyes A. wrote:

----- Original Message ----- From: "Armin Diehl" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, June 10, 2006 5:04 PM
Subject: Re: [lazarus] sample for help using ipro - Patch


The attached patch fixes some problems in IpUtils.pas when running under
linux. This patch do not change any files of my previous patch means
both are needed. The sample now works under linux too.



Hi Armin,

I forgot to tell you about this in my last message, sorry. Regarding turbopower_ipro, we are trying to follow a [untold] rule: wrap all changes with {$IFDEF IP_LAZARUS}{$ENDIF} compiler conditionals.


Ok, i will change that and provide a new patch (or should i send the new patch as one including my previous one)
About your last patch, I think it would not work in fpc 2.0.2 because of two things: one WINDOWS is not defined by the 2.0.2 compiler, however MSWINDOWS is and two: under Windows (FPC2.0.2) TRegistry has a bug, it just doesn't work, the problem is that even when one set Reg.RootKey that's not used, something like this hack needs to be done to work around the problem (in 2.0.X and 2.1.1 this problem is fixed).

{$IFDEF VER2_0_2}
type
 MyReg=Class(TRegistry);
{$ENDIF}
...
Reg.RootKey:= THE_ROOT_KEY;
{$IFDEF VER2_0_2}
MyReg(Reg).SetCurrentKey(Reg.RootKey);
{$ENDIF}
...


Ok, will check that with 2.0.2
One final question: why the change in ProcessChar procedure in the IpParseURL function?, the change doesn't seems to follow the algorithm described at the function start, what's wrong?.

The problem is the path separator under linux. The slash part detected the beginning of a path with \ so the path of file:///usr/one/two was parsed as "one/to" instead of "/usr/one/two". My change ignores only 2 slashes, the rest will go into the path. Here you see the original one, all slashes were ignored.

psSchemeSlashes: begin
      case P^ of
        '/': { ignore };
        '.', '\': begin { start of a local path }

Jesus Reyes A.

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.yahoo.com.mx/
_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to