Mule-ization of Carbon work

Ben Wing ben at 666.com
Tue Feb 22 18:34:05 EST 2005


> It's of course already done for text drawing and cut-and-paste in 
> redisplay-carbon.c and select-carbon.c.  The coding system 
> used on Mac 
> OS X is Qcarbon_unicode, defined in intl-carbon.c.  The macro 
> TO_EXTERNAL_FORMAT was used for external encoding (is that OK?).

Yes, that is totally fine.

> Some places that need changes are menus, font names, toolbar 
> help text, 
> and frame titles.  Again I don't think this is hard to do.  I'll 
> probably write a function or macro that uses 
> NEW_LISP_STRING_TO_EXTERNAL to convert Lisp_String to CFStringRef (OS 
> X's unicode string representation).

Sounds good.  All of the macros end up accomplishing the same thing.  The
only difference between NEW_LISP_STRING_TO_EXTERNAL and the ones based on
TO_EXTERNAL_FORMAT is that the former actually return an alloca()ed string
while the latter require a temporary variable. (Originally I wanted
everything to work like the NEW_* macros, but there turned out to be serious
bugs in the GCC of that era on x86 computers with handling alloca() within
function calls -- thankfully they are now fixed.  What I do now, and should
have done then had I thought of it, was to insert a check in `configure' for
broken alloca() within function calls and use the portable alloca()
replacement in alloca.c.)

Btw you'd have to write a macro, not a function, because of the use of
alloca().

ben





More information about the XEmacs-Beta mailing list