From 333d886418447f61611c90c4811c0e5451b57967 Mon Sep 17 00:00:00 2001 From: tomo Date: Sat, 9 Dec 2000 09:09:48 +0000 Subject: [PATCH] (vars_of_emacs): Convert XEMACS_CODENAME to internal representation in MULE. --- src/emacs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/emacs.c b/src/emacs.c index 980c2fb..90179ea 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -3397,7 +3397,34 @@ Codename of this version of Emacs (a string). #ifndef XEMACS_CODENAME #define XEMACS_CODENAME "Noname" #endif +#ifdef MULE + { + char dest[129]; + char src[64] = XEMACS_CODENAME; + unsigned char* sp = (unsigned char*)src; + int i = 0, chr; + + while ( (chr = *sp++) && (i < 128) ) + { + if (chr <= 0x7F) + dest[i++] = chr; + else + { +#ifdef UTF2000 + dest[i++] = (chr >> 6) | 0xC0; + dest[i++] = (chr & 0x3F) | 0x80; +#else + dest[i++] = LEADING_BYTE_LATIN_ISO8859_1; + dest[i++] = chr; +#endif + } + } + dest[i] = 0; + Vxemacs_codename = build_string (dest); + } +#else Vxemacs_codename = build_string (XEMACS_CODENAME); +#endif /* Lisp variables which contain command line flags. -- 1.7.10.4