]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/infocmp.c
ncurses 5.9 - patch 20130525
[ncurses.git] / progs / infocmp.c
index 6311a0896e12fa3471e56b1967264fe1d0eac85e..449270efa96f16e092ac042a1adcf6f1f0a35c82 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 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            *
@@ -42,7 +42,7 @@
 
 #include <dump_entry.h>
 
-MODULE_ID("$Id: infocmp.c,v 1.122 2012/10/27 19:50:50 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.125 2013/05/25 20:13:24 tom Exp $")
 
 #define L_CURL "{"
 #define R_CURL "}"
@@ -1165,6 +1165,7 @@ usage(void)
        ,"  -R subset (see manpage)"
        ,"  -T    eliminate size limits (test)"
        ,"  -U    eliminate post-processing of entries"
+       ,"  -D    print database locations"
        ,"  -V    print version"
 #if NCURSES_XNAMES
        ,"  -a    with -F, list commented-out caps"
@@ -1220,7 +1221,7 @@ any_initializer(const char *fmt, const char *type)
        need = (strlen(entries->tterm.term_names)
                + strlen(type)
                + strlen(fmt));
-       initializer = (char *) malloc(need);
+       initializer = (char *) malloc(need + 1);
        if (initializer == 0)
            failed("any_initializer");
     }
@@ -1744,7 +1745,7 @@ main(int argc, char *argv[])
            tname[termcount] = argv[optind];
 
            if (directory) {
-#if USE_DATABASE
+#if NCURSES_USE_DATABASE
 #if MIXEDCASE_FILENAMES
 #define LEAF_FMT "%c"
 #else