X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Flread.c;h=eebde6693b2a5ba5a136a18bef1d0c237bcf831e;hb=2811f51e2dc942e4db58ea2236d17c1338de7f29;hp=c36153efb088941df2b3975be903c58ef12a0593;hpb=3e447015251ce6dcde843cbed10d9033d5538622;p=chise%2Fxemacs-chise.git- diff --git a/src/lread.c b/src/lread.c index c36153e..eebde66 100644 --- a/src/lread.c +++ b/src/lread.c @@ -259,9 +259,9 @@ readchar (Lisp_Object readcharfun) #ifdef DEBUG_XEMACS /* testing Mule */ static int testing_mule = 0; /* Change via debugger */ if (testing_mule) { - if (c >= 0x20 && c <= 0x7E) fprintf (stderr, "%c", c); - else if (c == '\n') fprintf (stderr, "\\n\n"); - else fprintf (stderr, "\\%o ", c); + if (c >= 0x20 && c <= 0x7E) stderr_out ("%c", c); + else if (c == '\n') stderr_out ("\\n\n"); + else stderr_out ("\\%o ", c); } #endif return c; @@ -983,7 +983,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 : strlen (nsuffix); /* Concatenate path element/specified name with the suffix. */ strncpy (fn + fn_len, nsuffix, lsuffix); @@ -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