aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-01-19 20:28:51 -0800
committerPaul Eggert2015-01-19 20:29:26 -0800
commit97bf923892a781b71442562510c9ef8492eb1dfe (patch)
tree26b7237240c3cd002389809841dce2642c5f0fe3 /src
parent3ca37be9e754ca7e593736a31f0124722011d900 (diff)
downloademacs-97bf923892a781b71442562510c9ef8492eb1dfe.tar.gz
emacs-97bf923892a781b71442562510c9ef8492eb1dfe.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/minibuf.c2
-rw-r--r--src/xdisp.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b77f00c21c5..ad7780fbca7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12015-01-20 Paul Eggert <eggert@cs.ucla.edu> 12015-01-20 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix minor bugs with printing null bytes
4 * minibuf.c (read_minibuf_noninteractive):
5 * xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
6 Work even if the Lisp string contains a null byte.
7
3 Port to hypothetical case where Qnil is nonzero 8 Port to hypothetical case where Qnil is nonzero
4 * alloc.c (allocate_pseudovector): 9 * alloc.c (allocate_pseudovector):
5 * callint.c (Fcall_interactively): 10 * callint.c (Fcall_interactively):
diff --git a/src/minibuf.c b/src/minibuf.c
index 07f489258e1..0d6e2c79813 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -217,7 +217,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
217 suppress_echo_on_tty (fileno (stdin)); 217 suppress_echo_on_tty (fileno (stdin));
218 } 218 }
219 219
220 fprintf (stdout, "%s", SDATA (prompt)); 220 fwrite (SDATA (prompt), 1, SBYTES (prompt), stdout);
221 fflush (stdout); 221 fflush (stdout);
222 222
223 val = Qnil; 223 val = Qnil;
diff --git a/src/xdisp.c b/src/xdisp.c
index 8d53274fd7b..9abaeb0d777 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18815,7 +18815,7 @@ usage: (trace-to-stderr STRING &rest OBJECTS) */)
18815 (ptrdiff_t nargs, Lisp_Object *args) 18815 (ptrdiff_t nargs, Lisp_Object *args)
18816{ 18816{
18817 Lisp_Object s = Fformat (nargs, args); 18817 Lisp_Object s = Fformat (nargs, args);
18818 fprintf (stderr, "%s", SDATA (s)); 18818 fwrite (SDATA (s), 1, SBYTES (s), stderr);
18819 return Qnil; 18819 return Qnil;
18820} 18820}
18821 18821