diff options
Diffstat (limited to 'ncurses/tinfo/home_terminfo.c')
-rw-r--r-- | ncurses/tinfo/home_terminfo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ncurses/tinfo/home_terminfo.c b/ncurses/tinfo/home_terminfo.c index e77f71c..7e626df 100644 --- a/ncurses/tinfo/home_terminfo.c +++ b/ncurses/tinfo/home_terminfo.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2012,2016 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 * @@ -37,7 +38,7 @@ #include <curses.priv.h> #include <tic.h> -MODULE_ID("$Id: home_terminfo.c,v 1.15 2012/10/27 21:49:14 tom Exp $") +MODULE_ID("$Id: home_terminfo.c,v 1.17 2020/02/02 23:34:34 tom Exp $") /* ncurses extension...fall back on user's private directory */ @@ -48,10 +49,11 @@ _nc_home_terminfo(void) { char *result = 0; #if USE_HOME_TERMINFO - char *home; - if (use_terminfo_vars()) { + if (MyBuffer == 0) { + char *home; + if ((home = getenv("HOME")) != 0) { size_t want = (strlen(home) + sizeof(PRIVATE_INFO)); TYPE_MALLOC(char, want, MyBuffer); |