On Fri, 17 May 2002 11:13:09 +0200 (MET DST), Doodle wrote:

>
>On Thu, 16 May 2002, Yuri Prokushev wrote:
>
>> But we have two problems. Syntax difference. FPC doesn't have APIENTRI, 
>> doesn't have imports. Also problems with CSTRING type. As I know FPC
>> doesn't support this type. May be this is same as ANSISTRING. Some check
>> required.
>
>I've checked these:
>
>"APIENTRY" can be search&replace'd to "cdecl; external".
>
>CSTRING[x] is a bit more tricky. At some places, it can be replaced with
>array[0..x] of char, and in some places (mostly at function parameters)
>they have to be changed to pchar, and the function will need small
>modifications. Unfortunately, this is not a nice and compatible solution.
But CSTRING not present in other compilers (except GPC). I changing cstring[x] to 
array [0..x] of char and all cstring to pchar. For OS/2 API its ok, but not for other 
functions. 
This is less of more compatible with other borland-like compilers.

>According to the documentation, FPC do support ansistrings.
Yes.

>About imports in FPC, something like "external 'PMWIN' index 220;"
>compiled successfully. I don't know if it works, but compiled.
Not so easy. IMPORTS module must be removed and replaced by classic interface 
declarations (with APIENTRY or cdels becouse same). And IMPORTS must be 
moved to implementation part. Of couse with APIENTRY -> cdecl; external replacement.

>Ok, so what do you think that some (for example me ;)) can work on
>changing the Sibyl rtl to compile with FPC, and meanwhile the others can
>use the SPC? Or is it a dead-end?
Ghm :) I already port some units to fpc (with spc support). My primary target is FORMS 
unit. This is the major unit for sibyl recompilation. But for this requred classes and 
sysutils modules. Classes uses sysutils. For sysutils requred pmhelp. But pmhelp uses 
apphandle function wich defined in system unit. But fpc system unit doesn't contain 
this or equal function :( This is problem number one. Second problem is exceptions. My 
current hack is incorrect (in bsedos.pas). SysException must be rewrited as child 
of fpc root exception class.

I commit changes soon (may be today). I stop my work until 23 May (because I have 
examination), so some (for example you ;)) can work with rtl without work duplicating.

And no, this is not dead-end. RTL can be easely contributed to FPC team (of couse, 
some small modifications required to be compatible with fcl). All work must be based 
on at least fpc system unit.

I know about future problems with sibyl applications. Some rework will be required for 
migration to OpenSibyl (At least for application wich uses imports, APIENTRY, 
CSTRING, C style comments (/*) and some other things).

PS: I'm not sure, but we can have problems with 16-bit function calls for console apps.


-----------
To unsubscribe yourself from this list, send the following message
to [EMAIL PROTECTED]

     unsubscribe sibyl
     end

Reply via email to