update.
[chise/xemacs-chise.git-] / src / lread.c
index 08c6c79..ecd9ee0 100644 (file)
@@ -903,17 +903,18 @@ locate_file_find_directory_hash_table (Lisp_Object directory)
    nil, a list, or a string (for backward compatibility), with the
    following semantics:
 
-   a) nil    - no suffix, just search for file name intact (semantically
-               different from "empty suffix list")
+   a) nil    - no suffix, just search for file name intact
+               (semantically different from "empty suffix list", which
+               would be meaningless.)
    b) list   - list of suffixes to append to file name.  Each of these
                must be a string.
    c) string - colon-separated suffixes to append to file name (backward
                compatibility).
 
-   All of this got hairy, so I decided to use write a mapper.  Calling
-   a function for each suffix shouldn't slow things down, since
-   locate_file is rarely call with enough suffixes for it to make a
-   difference.  */
+   All of this got hairy, so I decided to use a mapper.  Calling a
+   function for each suffix shouldn't slow things down, since
+   locate_file is rarely called with enough suffixes for funcalls to
+   make any difference.  */
 
 /* Map FUN over SUFFIXES, as described above.  FUN will be called with a
    char * containing the current file name, and ARG.  Mapping stops when
@@ -1814,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
@@ -2035,6 +2055,7 @@ read_bit_vector (Lisp_Object readcharfun)
 {
   unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char);
   Emchar c;
+  Lisp_Object val;
 
   while (1)
     {
@@ -2047,8 +2068,12 @@ read_bit_vector (Lisp_Object readcharfun)
   if (c >= 0)
     unreadchar (readcharfun, c);
 
-  return make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0),
-                                          Dynarr_length (dyn));
+  val = make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0),
+                                         Dynarr_length (dyn));
+
+  Dynarr_free (dyn);
+
+  return val;
 }
 
 \f
@@ -2996,7 +3021,7 @@ read_vector (Lisp_Object readcharfun,
        i < len;
        i++, p++)
   {
-    struct Lisp_Cons *otem = XCONS (tem);
+    Lisp_Cons *otem = XCONS (tem);
     tem = Fcar (tem);
     *p = tem;
     tem = otem->cdr;
@@ -3028,7 +3053,7 @@ read_compiled_function (Lisp_Object readcharfun, Emchar terminator)
 
   for (iii = 0; CONSP (stuff); iii++)
     {
-      struct Lisp_Cons *victim = XCONS (stuff);
+      Lisp_Cons *victim = XCONS (stuff);
       make_byte_code_args[iii] = Fcar (stuff);
       if ((purify_flag || load_force_doc_strings)
           && CONSP (make_byte_code_args[iii])