diff options
Diffstat (limited to 'src/bin/psql/input.c')
-rw-r--r-- | src/bin/psql/input.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 326f91ef679..d1ad9dd6158 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/input.c,v 1.34 2004/01/25 03:07:22 neilc Exp $ + * $PostgreSQL: pgsql/src/bin/psql/input.c,v 1.35 2004/08/18 02:59:11 momjian Exp $ */ #include "postgres_fe.h" #include "input.h" @@ -171,7 +171,7 @@ initializeInput(int flags) #ifdef USE_READLINE if (flags & 1) { - const char *home; + char home[MAXPGPATH]; useReadline = true; initialize_readline(); @@ -180,8 +180,7 @@ initializeInput(int flags) if (GetVariable(pset.vars, "HISTSIZE") == NULL) SetVariable(pset.vars, "HISTSIZE", "500"); using_history(); - home = getenv("HOME"); - if (home) + if (get_home_path(home)) { char *psql_history; @@ -231,10 +230,9 @@ finishInput(int exitstatus, void *arg) #ifdef USE_READLINE if (useHistory) { - char *home; + char home[MAXPGPATH]; - home = getenv("HOME"); - if (home) + if (get_home_path(home)) { char *psql_history; int hist_size; |