diff options
author | Gerd Moellmann <[email protected]> | 1999-09-15 12:58:40 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 1999-09-15 12:58:40 +0000 |
commit | b0f61f15254553b1a177059254d2ed3c7bafd9d4 (patch) | |
tree | 68c1e3c9546588cc6f6d6925727d69bf81088ed1 /src/term.c | |
parent | 63fbf4ff16e0d80fca7721a975824c2fa2f8e161 (diff) |
(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.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/term.c b/src/term.c index 89c0892cb3..80e4902881 100644 --- a/src/term.c +++ b/src/term.c @@ -38,6 +38,10 @@ Boston, MA 02111-1307, USA. */ #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 @@ static void tty_hide_cursor P_ ((void)); #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 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed) /* 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 @@ turn_off_face (f, face_id) int face_id; { struct face *face = FACE_FROM_ID (f, face_id); - Lisp_Object entry; xassert (face != NULL); |