X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Flread.c;fp=src%2Flread.c;h=3e714690fa7677d095db2e98ee5535a7461ad8c5;hb=f4abc8f59f61bab882e44b9364e1ab533b1c17d5;hp=807c07b12bad2f87b22add97afe5634e6056e5bd;hpb=c08241d5e831cf6d9b7f9d25ac8e487fa905995b;p=chise%2Fxemacs-chise.git- diff --git a/src/lread.c b/src/lread.c index 807c07b..3e71469 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1815,6 +1815,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 @@ -2198,8 +2217,8 @@ read_structure (Lisp_Object readcharfun) static Lisp_Object read_compiled_function (Lisp_Object readcharfun, - int terminator); -static Lisp_Object read_vector (Lisp_Object readcharfun, int terminator); + Emchar terminator); +static Lisp_Object read_vector (Lisp_Object readcharfun, Emchar terminator); /* Get the next character; filter out whitespace and comments */