Merge r21-4-13-chise-0_21-pre1.
[chise/xemacs-chise.git-] / src / lread.c
index 807c07b..3e71469 100644 (file)
@@ -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)
 
 \f
 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 */