texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Perl's cc


From: Gavin Smith
Subject: Re: Using Perl's cc
Date: Sun, 5 Jul 2015 15:50:01 +0100

On 5 July 2015 at 15:30, Eli Zaretskii <address@hidden> wrote:
> On second thought, and after reading xspara.c, I take back what I
> wrote above.  Moving to wchar_t will be probably hard, and is not
> really needed, as the number of functions xspara.c calls that need to
> support UTF-8 is very small, and can be easily implemented for
> Windows.  The only one that is non-trivial is wcwidth, but we can use
> Markus Kuhn's implementation (which might be a good idea for other
> platforms as well, since I don't believe many non-glibc platforms will
> have an implementation that supports the entire Unicode range).
>
> So where do you want me to put the Windows implementations of mbrtowc,
> mbrlen, iswspace, iswupper, and wcwidth?  Should I make a separate C
> file and #include it in xspara.c, like we do with pcterm.c?

It would be nice to be able to fall back to using alternative
functions on other platforms as well, so I'd suggest not making it
Windows-specific. If the code isn't very long, it would probably be
better to put it in xspara.c; if it's a lot of code, it would be
better in a different file. Use your best judgement.

Do you think the choice of which functions should be used can be made
at run-time, possibly in addition to a choice at build-time? For
example, if switching to a UTF-8 locale fails?

There's two big hurdles to running the extension module: one is
building it, which it looks like you will manage to do; but the other
is loading it from a running Perl instance, and I still don't know if
that will succeed. I did eventually get both to work on the OpenCSW
test machines for Solaris 10
(https://buildfarm.opencsw.org/buildbot/waterfall?category=texinfo),
so it is promising that it worked on a system other than my own, but I
would have to see it work on many more systems before I was confident
it was reliable, especially on a system like Windows.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]