]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/tic.c
ncurses 6.1 - patch 20200118
[ncurses.git] / progs / tic.c
index 2f3b5877b1557f464d5bf6328d0a9726fd7000a2..c66a4ef4cdb93e97e82c8d2752c52043589193a6 100644 (file)
@@ -48,7 +48,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.278 2019/07/27 22:44:21 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.281 2019/11/09 18:51:36 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -218,7 +218,8 @@ write_it(ENTRY * ep)
            while ((ch = *t++) != 0) {
                *d++ = (char) ch;
                if (ch == '\\') {
-                   *d++ = *t++;
+                   if ((*d++ = *t++) == '\0')
+                       break;
                } else if ((ch == '%')
                           && (*t == L_BRACE)) {
                    char *v = 0;
@@ -2938,6 +2939,7 @@ check_termtype(TERMTYPE2 *tp, bool literal)
      * These are probably both or none.
      */
     PAIRED(parm_index, parm_rindex);
+    PAIRED(parm_ich, parm_dch);
 
     /*
      * These may be mismatched because the terminal description relies on
@@ -3054,7 +3056,7 @@ check_termtype(TERMTYPE2 *tp, bool literal)
      * ncurses handles it.
      */
     if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode))
-       && PRESENT(parm_ich)) {
+       && PRESENT(insert_character)) {
        _nc_warning("non-curses applications may be confused by ich1 with smir/rmir");
     }