changeset 25727:46fe79182b54

(OUTPUT_IF, OUTPUT1_IF): Use do-while. (encode_terminal_code): Remove unused variables. (turn_off_face): Ditto. (toplevel): Include termcap.h if HAVE_TERMCAP_H.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 15 Sep 1999 12:58:40 +0000
parents 9bfb1496cdd8
children 342027dc53c2
files src/term.c
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c	Wed Sep 15 12:58:37 1999 +0000
+++ b/src/term.c	Wed Sep 15 12:58:40 1999 +0000
@@ -38,6 +38,10 @@
 #include "dispextern.h"
 #include "window.h"
 
+#ifdef HAVE_TERMCAP_H
+#include <termcap.h>
+#endif
+
 #include "cm.h"
 #ifdef HAVE_X_WINDOWS
 #include "xterm.h"
@@ -56,14 +60,14 @@
 #define OUTPUT1(a) tputs (a, 1, cmputc)
 #define OUTPUTL(a, lines) tputs (a, lines, cmputc)
 
-#define OUTPUT_IF(a)						\
-     if (a)							\
-       tputs (a, (int) (FRAME_HEIGHT (XFRAME (selected_frame))	\
-			- curY), cmputc);			\
-     else							\
-       (void) 0
+#define OUTPUT_IF(a)							\
+     do {								\
+       if (a)								\
+         tputs (a, (int) (FRAME_HEIGHT (XFRAME (selected_frame))	\
+			  - curY), cmputc);				\
+     } while (0)
      
-#define OUTPUT1_IF(a) if (a) tputs (a, 1, cmputc); else (void) 0
+#define OUTPUT1_IF(a) do { if (a) tputs (a, 1, cmputc); } while (0)
 
 /* Function to use to ring the bell.  */
 
@@ -940,8 +944,6 @@
       /* We must skip glyphs to be padded for a wide character.  */
       if (! CHAR_GLYPH_PADDING_P (*src))
 	{
-	  struct frame *sf = XFRAME (selected_frame);
-	  
 	  c = src->u.ch.code;
 	  if (! GLYPH_CHAR_VALID_P (c))
 	    {
@@ -1995,7 +1997,6 @@
      int face_id;
 {
   struct face *face = FACE_FROM_ID (f, face_id);
-  Lisp_Object entry;
 
   xassert (face != NULL);