]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/infocmp.c
ncurses 6.4 - patch 20231001
[ncurses.git] / progs / infocmp.c
index 0ee0b958bd1c902567b3e4553358b88dc7ab4490..ec5e07650dd43e1bf766e3e164e8d0a0ba77b1ed 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020-2021,2022 Thomas E. Dickey                                *
+ * Copyright 2020-2022,2023 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -43,7 +43,7 @@
 
 #include <dump_entry.h>
 
-MODULE_ID("$Id: infocmp.c,v 1.153 2022/03/05 16:15:48 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.157 2023/05/27 20:13:10 tom Exp $")
 
 #define MAX_STRING     1024    /* maximum formatted string */
 
@@ -158,7 +158,7 @@ no_numeric(int value)
 }
 
 static bool
-no_string(char *value)
+no_string(const char *const value)
 {
     bool result = (value == ABSENT_STRING);
     if (!strcmp(s_absent, s_cancel))
@@ -905,7 +905,6 @@ analyze_string(const char *name, const char *cap, TERMTYPE2 *tp)
                       sizeof(buf2));
            _nc_STRNCPY(buf3, sp + csi, len);
            buf3[len] = '\0';
-           len += (size_t) csi + 1;
 
            expansion = lookup_params(std_modes, buf2, buf3);
        }
@@ -926,7 +925,6 @@ analyze_string(const char *name, const char *cap, TERMTYPE2 *tp)
                       sizeof(buf2));
            _nc_STRNCPY(buf3, sp + csi + 1, len);
            buf3[len] = '\0';
-           len += (size_t) csi + 2;
 
            expansion = lookup_params(private_modes, buf2, buf3);
        }
@@ -1727,7 +1725,7 @@ main(int argc, char *argv[])
 
        case 'v':
            itrace = (unsigned) optarg_to_number();
-           set_trace_level(itrace);
+           use_verbosity(itrace);
            break;
 
        case 'W':