Commit 97bf9238 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix minor bugs with printing null bytes

* minibuf.c (read_minibuf_noninteractive):
* xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
Work even if the Lisp string contains a null byte.
parent 3ca37be9
2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
 
Fix minor bugs with printing null bytes
* minibuf.c (read_minibuf_noninteractive):
* xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
Work even if the Lisp string contains a null byte.
Port to hypothetical case where Qnil is nonzero
* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
......
......@@ -217,7 +217,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
suppress_echo_on_tty (fileno (stdin));
}
fprintf (stdout, "%s", SDATA (prompt));
fwrite (SDATA (prompt), 1, SBYTES (prompt), stdout);
fflush (stdout);
val = Qnil;
......
......@@ -18815,7 +18815,7 @@ usage: (trace-to-stderr STRING &rest OBJECTS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
Lisp_Object s = Fformat (nargs, args);
fprintf (stderr, "%s", SDATA (s));
fwrite (SDATA (s), 1, SBYTES (s), stderr);
return Qnil;
}
 
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment