From 4606059c19e71ee441cf2386f1d224b8af125b4f Mon Sep 17 00:00:00 2001 From: "Steffen (Daode) Nurpmeso" Date: Fri, 14 Jul 2017 22:52:37 +0200 Subject: [PATCH] termcap.c, tty.c: Some does not's --- termcap.c | 8 +++++--- tty.c | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/termcap.c b/termcap.c index e92301b4..a1f15d6d 100644 --- a/termcap.c +++ b/termcap.c @@ -128,7 +128,7 @@ struct a_termcap_g{ n_CTA(sizeof a_termcap_namedat <= UI16_MAX, "Termcap command and query name data exceed storage datatype"); n_CTA(a_TERMCAP_ENT_MAX1 == n_NELEM(a_termcap_control), - "Control array doesn't match command/query array to be controlled"); + "Control array does not match command/query array to be controlled"); static struct a_termcap_g *a_termcap_g; @@ -738,11 +738,13 @@ n_termcap_cmd(enum n_termcap_cmd cmd, ssize_t a1, ssize_t a2){ else if((tep += cmd)->te_flags == 0 || (tep->te_flags & a_TERMCAP_F_NOENT)) rv = TRUM1; else if(!(tep->te_flags & a_TERMCAP_F_ALTERN)){ - char const *cp = a_termcap_g->tg_dat.s_dat + tep->te_off; + char const *cp; assert((tep->te_flags & a_TERMCAP_F_TYPE_MASK) == n_TERMCAP_CAPTYPE_STRING); + cp = &a_termcap_g->tg_dat.s_dat[tep->te_off]; + #ifdef HAVE_TERMCAP if(tep->te_flags & (a_TERMCAP_F_ARG_IDX1 | a_TERMCAP_F_ARG_IDX2)){ if(n_psonce & n_PSO_TERMCAP_DISABLE){ @@ -775,7 +777,7 @@ n_termcap_cmd(enum n_termcap_cmd cmd, ssize_t a1, ssize_t a2){ goto jleave; # endif } -#endif +#endif /* HAVE_TERMCAP */ for(;;){ #ifdef HAVE_TERMCAP diff --git a/tty.c b/tty.c index 84eff7b9..c71c0874 100644 --- a/tty.c +++ b/tty.c @@ -1525,7 +1525,7 @@ jpaint: phy_cur += cw; } - /* Write something position marker alike if it doesn't fit on screen */ + /* Write something position marker alike if it does not fit on screen */ if((f & a_HAVE_POSITION) && ((f & (a_LEFT_MIN | a_RIGHT_MAX)) != (a_LEFT_MIN | a_RIGHT_MAX) || ((f & a_HAVE_PROMPT) && !(f & a_SHOW_PROMPT)))){ @@ -3184,7 +3184,7 @@ jelen: /* A termcap(5)/terminfo(5) identifier? */ if(ep->cnv_len > 1 && ep->cnv_dat[0] == ':'){ i = --ep->cnv_len, ++ep->cnv_dat; -# ifndef HAVE_TERMCAP +# if 0 /* ndef HAVE_TERMCAP xxx User can, via *termcap*! */ if(n_poption & n_PO_D_V) n_err(_("`%s': no termcap(5)/terminfo(5) support: %s: %s\n"), tbpcp->tbpc_cmd, ep->seq_dat, tbpcp->tbpc_in_seq); @@ -3243,7 +3243,7 @@ jeempty: * struct{si32_t buf_len_iscap; si32_t cap_len; char buf[]+NUL;} */ n_LCTAV(n_ISPOW2(a_TTY_BIND_CAPEXP_ROUNDUP)); n_LCTA(a_TTY_BIND_CAPEXP_ROUNDUP >= sizeof(wc_t), - "Aligning on this constant doesn't properly align wc_t"); + "Aligning on this constant does not properly align wc_t"); i &= SI32_MAX; i *= sizeof(wc_t); i += sizeof(si32_t); @@ -3442,7 +3442,7 @@ a_tty_bind_resolve(struct a_tty_bind_ctx *tbcp){ break; }else if(isfirst && !cntrlchar(*tv.tv_data.tvd_string)){ if(n_poption & n_PO_D_V) - n_err(_("`bind': capability expansion doesn't start with " + n_err(_("`bind': capability expansion does not start with " "control: %s: %s\n"), capname, tbcp->tbc_seq); tbcp->tbc_flags |= a_TTY_BIND_DEFUNCT; break; -- 2.11.4.GIT