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);
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.
return tem;
}
+Lisp_Object
+read_from_c_string (const unsigned char* str, size_t size)
+{
+ Lisp_Object tem;
+ Lisp_Object lispstream = Qnil;
+ struct gcpro gcpro1;
+
+#ifdef COMPILED_FUNCTION_ANNOTATION_HACK
+ Vcurrent_compiled_function_annotation = Qnil;
+#endif
+ GCPRO1 (lispstream);
+ lispstream = make_fixed_buffer_input_stream (str, size);
+
+ Vread_objects = Qnil;
+
+ tem = read0 (lispstream);
+ Lstream_delete (XLSTREAM (lispstream));
+ UNGCPRO;
+ return tem;
+}
\f
#ifdef LISP_BACKQUOTES
}
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
else if (sizeof (long) == sizeof (EMACS_INT))
number = atol (read_buffer);
else
- abort ();
+ ABORT ();
return make_int (number);
}
#else
\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 */
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;