changeset 10568:275f62e27ee2

(printchar, strout): Use message_log_maybe_newline. Leave all of the newline bookkeeping to message_dolog.
author Karl Heuer <kwzh@gnu.org>
date Fri, 27 Jan 1995 19:30:46 +0000
parents 65c5552c16cb
children fa604ffe7e3f
files src/print.c
diffstat 1 files changed, 2 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/print.c	Fri Jan 27 19:27:07 1995 +0000
+++ b/src/print.c	Fri Jan 27 19:30:46 1995 +0000
@@ -70,11 +70,6 @@
 
 extern int noninteractive_need_newline;
 
-/* Nonzero means print newline to message log before next message.
-   Defined in xdisp.c */
-
-extern int message_log_need_newline;
-
 #ifdef MAX_PRINT_CHARS
 static int print_chars;
 static int max_print;
@@ -212,9 +207,7 @@
       if (echo_area_glyphs != FRAME_MESSAGE_BUF (mini_frame)
 	  || !message_buf_print)
 	{
-	  if (message_log_need_newline)
-	    message_dolog ("", 0, 1);
-	  message_log_need_newline = 0;
+	  message_log_maybe_newline ();
 	  echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame);
 	  printbufidx = 0;
 	  echo_area_glyphs_length = 0;
@@ -222,7 +215,6 @@
 	}
 
       message_dolog (&ch, 1, 0);
-      message_log_need_newline = 1;
       if (printbufidx < FRAME_WIDTH (mini_frame) - 1)
 	FRAME_MESSAGE_BUF (mini_frame)[printbufidx++] = ch;
       FRAME_MESSAGE_BUF (mini_frame)[printbufidx] = 0;
@@ -274,9 +266,7 @@
       if (echo_area_glyphs != FRAME_MESSAGE_BUF (mini_frame)
 	  || !message_buf_print)
 	{
-	  if (message_log_need_newline)
-	    message_dolog ("", 0, 1);
-	  message_log_need_newline = 0;
+	  message_log_maybe_newline ();
 	  echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame);
 	  printbufidx = 0;
 	  echo_area_glyphs_length = 0;
@@ -284,7 +274,6 @@
 	}
 
       message_dolog (ptr, i, 0);
-      message_log_need_newline = 1;
       if (i > FRAME_WIDTH (mini_frame) - printbufidx - 1)
 	i = FRAME_WIDTH (mini_frame) - printbufidx - 1;
       bcopy (ptr, &FRAME_MESSAGE_BUF (mini_frame) [printbufidx], i);