[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a22fdc9: Minor cleanup of last change
From: |
Eli Zaretskii |
Subject: |
master a22fdc9: Minor cleanup of last change |
Date: |
Fri, 18 Sep 2020 04:43:22 -0400 (EDT) |
branch: master
commit a22fdc962003b9f46fe839a37d64d80427bec850
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Minor cleanup of last change
* src/termchar.h (struct tty_display_info):
* src/term.c (turn_on_face, tty_capable_p): Reformat new code.
---
src/term.c | 23 ++++++++++++++++-------
src/termchar.h | 3 ++-
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/term.c b/src/term.c
index 22035f4..3f52858 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1931,7 +1931,8 @@ turn_on_face (struct frame *f, int face_id)
if (face->tty_underline_p && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE))
OUTPUT1_IF (tty, tty->TS_enter_underline_mode);
- if (face->tty_strike_through_p && MAY_USE_WITH_COLORS_P (tty,
NC_STRIKE_THROUGH))
+ if (face->tty_strike_through_p
+ && MAY_USE_WITH_COLORS_P (tty, NC_STRIKE_THROUGH))
OUTPUT1_IF (tty, tty->TS_enter_strike_through_mode);
if (tty->TN_max_colors > 0)
@@ -2010,12 +2011,20 @@ tty_capable_p (struct tty_display_info *tty, unsigned
int caps)
if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit)))
\
return 0;
- TTY_CAPABLE_P_TRY (tty, TTY_CAP_INVERSE, tty->TS_standout_mode,
NC_REVERSE);
- TTY_CAPABLE_P_TRY (tty, TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode,
NC_UNDERLINE);
- TTY_CAPABLE_P_TRY (tty, TTY_CAP_BOLD,
tty->TS_enter_bold_mode, NC_BOLD);
- TTY_CAPABLE_P_TRY (tty, TTY_CAP_DIM, tty->TS_enter_dim_mode,
NC_DIM);
- TTY_CAPABLE_P_TRY (tty, TTY_CAP_ITALIC, tty->TS_enter_italic_mode,
NC_ITALIC);
- TTY_CAPABLE_P_TRY (tty, TTY_CAP_STRIKE_THROUGH,
tty->TS_enter_strike_through_mode, NC_STRIKE_THROUGH);
+ TTY_CAPABLE_P_TRY (tty,
+ TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE);
+ TTY_CAPABLE_P_TRY (tty,
+ TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode,
+ NC_UNDERLINE);
+ TTY_CAPABLE_P_TRY (tty,
+ TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD);
+ TTY_CAPABLE_P_TRY (tty,
+ TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM);
+ TTY_CAPABLE_P_TRY (tty,
+ TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC);
+ TTY_CAPABLE_P_TRY (tty,
+ TTY_CAP_STRIKE_THROUGH, tty->TS_enter_strike_through_mode,
+ NC_STRIKE_THROUGH);
/* We can do it! */
return 1;
diff --git a/src/termchar.h b/src/termchar.h
index a8b3051..c967e7d 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -136,7 +136,8 @@ struct tty_display_info
const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */
const char *TS_exit_underline_mode; /* "us" -- start underlining. */
const char *TS_enter_underline_mode; /* "ue" -- end underlining. */
- const char *TS_enter_strike_through_mode; /* "smxx" -- turn on
strike-through mode. */
+ const char *TS_enter_strike_through_mode; /* "smxx" -- turn on strike-through
+ mode. */
/* "as"/"ae" -- start/end alternate character set. Not really
supported, yet. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a22fdc9: Minor cleanup of last change,
Eli Zaretskii <=