X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Femacs.c;h=90179ea42bf070a5e771a0ee0b5bb7a971863fe7;hb=b72024be0ea9f3018c978c7e63d241452ab74671;hp=980c2fb0e2d8ce932ccfb9d8b1a8dc87696df0fe;hpb=b10ee70be2e0ce31599b05e9d58f83fc92141de0;p=chise%2Fxemacs-chise.git- 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.