]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/dump_entry.c
ncurses 6.3 - patch 20220416
[ncurses.git] / progs / dump_entry.c
index dda1b681956a48390cb9413b3b05dd85c603b61f..664df32b382e3583b529f4691f3d3ad8609ca212 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2022 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -40,7 +40,7 @@
 #include <termsort.h>          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.186 2021/04/18 11:33:08 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.190 2022/01/22 21:23:58 tom Exp $")
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
@@ -85,7 +85,7 @@ static int indent = 8;
 /* cover various ports and variants of terminfo */
 #define V_ALLCAPS      0       /* all capabilities (SVr4, XSI, ncurses) */
 #define V_SVR1         1       /* SVR1, Ultrix */
-#define V_HPUX         2       /* HP/UX */
+#define V_HPUX         2       /* HP-UX */
 #define V_AIX          3       /* AIX */
 #define V_BSD          4       /* BSD */
 
@@ -549,7 +549,7 @@ fill_spaces(const char *src)
        if (pass) {
            result[d] = '\0';
        } else {
-           result = malloc(need + 1);
+           result = calloc(need + 1, sizeof(char));
            if (result == 0)
                failed("fill_spaces");
        }
@@ -859,7 +859,6 @@ fmt_complex(TERMTYPE2 *tterm, const char *capability, char *src, int level)
                indent_DYN(&tmpbuf, level + 1);
                strncpy_DYN(&tmpbuf, "%", (size_t) 1);
            }
-           params = FALSE;
            percent = FALSE;
            break;
        case ' ':
@@ -1564,7 +1563,7 @@ dump_entry(TERMTYPE2 *tterm,
        }
        if (FMT_ENTRY() > critlen) {
            /*
-            * We pick on sgr because it's a nice long string capability that
+            * We pick on sgr because it is a nice long string capability that
             * is really just an optimization hack.  Another good candidate is
             * acsc since it is both long and unused by BSD termcap.
             */