X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Flread.c;h=4618487725b1aabccb8dde9efd519becd711e6ed;hb=4f14f955e64fbf24dd2f85fc22c2976c5aad47a0;hp=4a995ba12203b0550dc3785cd82d2afe38270b8e;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git- diff --git a/src/lread.c b/src/lread.c index 4a995ba..4618487 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 */ @@ -2501,15 +2520,15 @@ retry: case '+': case '-': { - Lisp_Object fexp, obj, tem; + Lisp_Object feature_exp, obj, tem; struct gcpro gcpro1, gcpro2; - fexp = read0(readcharfun); + feature_exp = read0(readcharfun); obj = read0(readcharfun); /* the call to `featurep' may GC. */ - GCPRO2 (fexp, obj); - tem = call1 (Qfeaturep, fexp); + GCPRO2 (feature_exp, obj); + tem = call1 (Qfeaturep, feature_exp); UNGCPRO; if (c == '+' && NILP(tem)) goto retry;