]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/tty_update.c
ncurses 6.2 - patch 20200523
[ncurses.git] / ncurses / tty / tty_update.c
index 350f743c118e7a5c3f425e260153b7e798542081..d57f23f10ef4431b845b2706de78316506559bb5 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
+ * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -84,7 +85,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.303 2019/06/01 23:42:36 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.307 2020/05/23 19:10:35 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -116,14 +117,14 @@ static int ClrBottom(SCREEN *, int total);
 static void ClearScreen(SCREEN *, NCURSES_CH_T blank);
 static void ClrUpdate(SCREEN *);
 static void DelChar(SCREEN *, int count);
-static void InsStr(SCREEN *, NCURSES_CH_T * line, int count);
+static void InsStr(SCREEN *, NCURSES_CH_T *line, int count);
 static void TransformLine(SCREEN *, int const lineno);
 #else
 static int ClrBottom(int total);
 static void ClearScreen(NCURSES_CH_T blank);
 static void ClrUpdate(void);
 static void DelChar(int count);
-static void InsStr(NCURSES_CH_T * line, int count);
+static void InsStr(NCURSES_CH_T *line, int count);
 static void TransformLine(int const lineno);
 #endif
 
@@ -210,7 +211,7 @@ GoTo(NCURSES_SP_DCLx int const row, int const col)
 }
 
 #if !NCURSES_WCWIDTH_GRAPHICS
-#define is_wacs_value(ch) (_nc_wacs_width(ch) == 1 && (wcwidth)(ch) > 1)
+#define is_wacs_value(ch) (_nc_wacs_width(ch) == 1 && wcwidth(ch) > 1)
 #endif /* !NCURSES_WCWIDTH_GRAPHICS */
 
 static NCURSES_INLINE void
@@ -566,7 +567,7 @@ can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch)
  * This code is optimized using ech and rep.
  */
 static int
-EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num)
+EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T *ntext, int num)
 {
     int i;
 
@@ -619,6 +620,9 @@ EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num)
                    return 1;   /* cursor stays in the middle */
                }
            } else if (repeat_char != 0 &&
+#if BSD_TPUTS
+                      !isdigit(UChar(CharOf(ntext0))) &&
+#endif
 #if USE_WIDEC_SUPPORT
                       (!SP_PARM->_screen_unicode &&
                        (CharOf(ntext0) < ((AttrOf(ntext0) & A_ALTCHARSET)
@@ -678,8 +682,8 @@ EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num)
  */
 static int
 PutRange(NCURSES_SP_DCLx
-        const NCURSES_CH_T * otext,
-        const NCURSES_CH_T * ntext,
+        const NCURSES_CH_T *otext,
+        const NCURSES_CH_T *ntext,
         int row,
         int first, int last)
 {
@@ -1700,7 +1704,7 @@ ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank)
 */
 
 static void
-InsStr(NCURSES_SP_DCLx NCURSES_CH_T * line, int count)
+InsStr(NCURSES_SP_DCLx NCURSES_CH_T *line, int count)
 {
     TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called",
                      (void *) SP_PARM,