ncurses 6.1 - patch 20181117
[ncurses.git] / progs / toe.c
index 5abb46de1ea90875b9256a63e1ab79b298309933..7b9f79ad6d8d55717ffb821b557fde1278be4e60 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2017,2018 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            *
@@ -44,7 +44,7 @@
 #include <hashed_db.h>
 #endif
 
-MODULE_ID("$Id: toe.c,v 1.77 2017/12/23 19:23:40 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.78 2018/11/17 22:41:46 tom Exp $")
 
 #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
 
@@ -497,8 +497,8 @@ typelist(int eargc, char *eargv[],
                }
            }
        }
-#endif
-#endif
+#endif /* USE_HASHED_DB */
+#endif /* NCURSES_USE_DATABASE */
 #if NCURSES_USE_TERMCAP
 #if HAVE_BSD_CGETENT
        {
@@ -700,6 +700,8 @@ main(int argc, char *argv[])
 
            _nc_first_db(&state, &offset);
            while ((path = _nc_next_db(&state, &offset)) != 0) {
+               if (quick_prefix(path))
+                   continue;
                if (pass) {
                    eargv[count] = strmalloc(path);
                }
@@ -725,7 +727,8 @@ main(int argc, char *argv[])
            failed("eargv");
        _nc_first_db(&state, &offset);
        if ((path = _nc_next_db(&state, &offset)) != 0) {
-           eargv[count++] = strmalloc(path);
+           if (!quick_prefix(path))
+               eargv[count++] = strmalloc(path);
        }
 
        code = typelist((int) count, eargv, header, hook);