]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/infocmp.c
ncurses 5.6 - patch 20071117
[ncurses.git] / progs / infocmp.c
index f463f7e8ec06794d8239038999d4ef8931dc21fa..9b74ba00d542485780cb11d2e4b0ddefcf8a4606 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <dump_entry.h>
 
-MODULE_ID("$Id: infocmp.c,v 1.93 2007/08/12 13:53:44 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.94 2007/11/17 23:34:26 tom Exp $")
 
 #define L_CURL "{"
 #define R_CURL "}"
@@ -1492,9 +1492,14 @@ main(int argc, char *argv[])
 
            if (directory) {
 #if USE_DATABASE
-               (void) sprintf(tfile[termcount], "%s/%c/%s",
+#if MIXEDCASE_FILENAMES
+#define LEAF_FMT "%c"
+#else
+#define LEAF_FMT "%02x"
+#endif
+               (void) sprintf(tfile[termcount], "%s/" LEAF_FMT "/%s",
                               directory,
-                              *argv[optind], argv[optind]);
+                              UChar(*argv[optind]), argv[optind]);
                if (itrace)
                    (void) fprintf(stderr,
                                   "%s: reading entry %s from file %s\n",