aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tinfo/write_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/write_entry.c')
-rw-r--r--contrib/ncurses/ncurses/tinfo/write_entry.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/write_entry.c b/contrib/ncurses/ncurses/tinfo/write_entry.c
index 12aedd6e565c..af4b4fda2a3a 100644
--- a/contrib/ncurses/ncurses/tinfo/write_entry.c
+++ b/contrib/ncurses/ncurses/tinfo/write_entry.c
@@ -52,7 +52,7 @@
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.52 2000/03/11 12:23:42 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.53 2000/10/04 02:32:14 tom Exp $")
static int total_written;
@@ -116,10 +116,12 @@ _nc_set_writedir(char *dir)
const char *destination;
char actual[PATH_MAX];
+ if (dir == 0
+ && use_terminfo_vars())
+ dir = getenv("TERMINFO");
+
if (dir != 0)
(void) _nc_tic_dir(dir);
- else if (getenv("TERMINFO") != NULL)
- (void) _nc_tic_dir(getenv("TERMINFO"));
destination = _nc_tic_dir(0);
if (make_directory(destination) < 0) {