[LyX/2.4.x] Cleanup MathMLStream

Enrico Forestieri forenr at lyx.org
Tue Jul 23 09:51:26 UTC 2024


On Mon, Jul 22, 2024 at 11:34:31PM +0200, Jean-Marc Lasgouttes wrote:
>
>What are typically those systems?

The platforms for which sizeof(wchar_t) == 2 (such as cygwin and mingw) 
or for which HAVE_WCHAR_T is not defined (possibly FreeBSD and others).

>I can introduce a MathML::put(c) method. It is important that 
>everything goes through MathML so that we can add out hooks here. 
>Direct access to underlying stream is not good.
>
>Currently (not my doing), MathStream has the operators
>MathMLStream & operator<<(MathMLStream &, char);
>MathMLStream & operator<<(MathMLStream &, char_type);
>
>Do you mean that these two should go and be replaced by put() methods? 
>What is the portable solution?

No, what I mean is that for the above systems we have the following typedef:
namespace lyx { typedef std::uint32_t char_type; }
so that if you have
   char_type var = 'a';
   os << var;
you will get "97" and not "a".

-- 
Enrico


More information about the lyx-devel mailing list