Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / src / lread.c
index b8d88bb..3e71469 100644 (file)
@@ -984,7 +984,7 @@ locate_file_map_suffixes (Lisp_Object filename, Lisp_Object suffixes,
       while (1)
        {
          char *esuffix = (char *) strchr (nsuffix, ':');
-         int lsuffix = esuffix ? esuffix - nsuffix : strlen (nsuffix);
+         int lsuffix = esuffix ? esuffix - nsuffix : (int) strlen (nsuffix);
 
          /* Concatenate path element/specified name with the suffix.  */
          strncpy (fn + fn_len, nsuffix, lsuffix);
@@ -1186,7 +1186,7 @@ can be used if the internal tables grow too large, or when dumping.
 
    MODE nonnegative means don't open the files,
    just look for one for which access(file,MODE) succeeds.  In this case,
-   returns 1 on success.
+   returns a nonnegative value on success.  On failure, returns -1.
 
    If STOREPTR is nonzero, it points to a slot where the name of
    the file actually found should be stored as a Lisp string.
@@ -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 */