Re: Modifying the Euphoria interpreter

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
> 
> CChris wrote:
> 
> <snip>
> 
> > Ok, I found some time to check it out.
> > Protecting the open_dll() statement by an "if platform()=" test enables a
> > program containing it to run both under exw and ex, both under Windows and
> > in a DOS box. So I assume this protection will be enough, although I'll
> > perform a test with the newly built interpreters just to be sure.
> 
> What is the reason for integrating open_dll() into the interpreter?
> 
> Regards,
>    Juergen

You may wish to check http://www.listfilter.com/EUforum/m14385.html for a
detailed report.

I initially considered using direct translation, not involving any API call.
After all, it is only a matter of character recoding, which can be done using
a simple lookup table.

I quickly backed off considering that there are a few OEM and Windows code
pages to cater for, each with its own 128-255 range mapping. It looked
far more straightforward and reliable to ask the system for a proper
translation.
The bottom line is: since there is a Windows only issue which some Windows
dll handles, the most sensible thing to do is to use it, hence an open_dll()
call in the interpreter, as well as a c_func(). The call won't occur on other
platforms.

If similar issues arise under Linux/BSD, can anyone tell me about it, so that
the fix could be extended to these cases?

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu