X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Flread.c;h=4bb1bcdb98106f711d306830f99f48d76e218fbe;hb=0680bf5c284a73aaa6e267c4b0f1363d2cb48739;hp=481f6647c6cbb6b0b51939ea0df9477f61aafe19;hpb=976b002b16336930724ae22476014583ad022e7d;p=chise%2Fxemacs-chise.git- diff --git a/src/lread.c b/src/lread.c index 481f664..4bb1bcd 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1821,6 +1821,25 @@ read_escape (Lisp_Object readcharfun) } return i; } + case 'u': + { + REGISTER Emchar i = 0; + REGISTER int count = 0; + while (++count <= 6) + { + c = readchar (readcharfun); + /* Remember, can't use isdigit(), isalpha() etc. on Emchars */ + if (c >= '0' && c <= '9') i = (i << 4) + (c - '0'); + else if (c >= 'a' && c <= 'f') i = (i << 4) + (c - 'a') + 10; + else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10; + else + { + unreadchar (readcharfun, c); + break; + } + } + return i; + } #ifdef MULE /* #### need some way of reading an extended character with