+/*
+ * The remaining type-definitions and macros are used only internally by the
+ * ncurses utilities.
+ */
+#ifdef NCURSES_INTERNALS
+
+/*
+ * see db_iterator.c - this enumeration lists the places searched for a
+ * terminal description and defines the order in which they are searched.
+ */
+typedef enum {
+ dbdTIC = 0, /* special, used by tic when writing entry */
+#if NCURSES_USE_DATABASE
+ dbdEnvOnce, /* the $TERMINFO environment variable */
+ dbdHome, /* $HOME/.terminfo */
+ dbdEnvList, /* the $TERMINFO_DIRS environment variable */
+ dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
+ dbdCfgOnce, /* the compiled-in TERMINFO value */
+#endif
+#if NCURSES_USE_TERMCAP
+ dbdEnvOnce2, /* the $TERMCAP environment variable */
+ dbdEnvList2, /* the $TERMPATH environment variable */
+ dbdCfgList2, /* the compiled-in TERMPATH */
+#endif
+ dbdLAST
+} DBDIRS;
+
+#define MAX_USES 32
+#define MAX_CROSSLINKS 16
+
+typedef struct entry ENTRY;
+
+typedef struct {
+ char *name;
+ ENTRY *link;
+ long line;
+} ENTRY_USES;
+
+struct entry {
+ TERMTYPE2 tterm;
+ unsigned nuses;
+ ENTRY_USES uses[MAX_USES];
+ int ncrosslinks;
+ ENTRY *crosslinks[MAX_CROSSLINKS];
+ long cstart;
+ long cend;
+ long startline;
+ ENTRY *next;
+ ENTRY *last;
+};
+