aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-10-03 19:50:21 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-10-03 19:50:21 +0000
commit831e78e0c4cc6b83d3096ea483a49c4dc2a3e867 (patch)
tree941e45a0905e4f3ad9d4e92b4f29180f58800fb2 /src
parent1b7332fbabe6359b9bdb3d0417279223002622ea (diff)
downloadpostgresql-831e78e0c4cc6b83d3096ea483a49c4dc2a3e867.tar.gz
postgresql-831e78e0c4cc6b83d3096ea483a49c4dc2a3e867.zip
Better coding of readline tests
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/input.h4
-rw-r--r--src/bin/psql/tab-complete.c14
-rw-r--r--src/include/config.h.in11
3 files changed, 8 insertions, 21 deletions
diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h
index 557179113b9..69387989faa 100644
--- a/src/bin/psql/input.h
+++ b/src/bin/psql/input.h
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.10 2000/04/12 17:16:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.11 2000/10/03 19:50:20 petere Exp $
*/
#ifndef INPUT_H
#define INPUT_H
@@ -24,7 +24,7 @@
#endif
#endif
-#if defined(HAVE_LIBHISTORY) || (defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_IN_READLINE))
+#if defined(HAVE_HISTORY_FUNCTIONS)
#if defined(HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
#define USE_HISTORY 1
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 0e9cb2d3765..e7e329cfa8f 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.20 2000/06/25 14:25:51 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.21 2000/10/03 19:50:20 petere Exp $
*/
/*----------------------------------------------------------------------
@@ -60,7 +60,7 @@
#include "common.h"
#include "settings.h"
-#if defined(HAVE_FILENAME_COMPLETION_FUNCTION) && !defined(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
+#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
char *filename_completion_function(char *, int);
#endif
@@ -699,17 +699,7 @@ psql_completion(char *text, int start, int end)
strcmp(prev_wd, "\\w") == 0 || strcmp(prev_wd, "\\write") == 0
)
{
-#ifdef HAVE_FILENAME_COMPLETION_FUNCTION
matches = completion_matches(text, filename_completion_function);
-#else
-
- /*
- * This will probably have the same effect, but you never know
- * what the heck some readline incarnation out there is going to
- * do.
- */
- matches = NULL;
-#endif
}
diff --git a/src/include/config.h.in b/src/include/config.h.in
index bb53769b004..412db86ac28 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: config.h.in,v 1.139 2000/10/03 03:11:23 momjian Exp $
+ * $Id: config.h.in,v 1.140 2000/10/03 19:50:21 petere Exp $
*/
#ifndef CONFIG_H
@@ -384,8 +384,8 @@
/* Define if you have the stricmp function. */
#undef HAVE_STRICMP
-/* Set to 1 if you have libreadline and it includes history functions */
-#undef HAVE_HISTORY_IN_READLINE
+/* Set to 1 if you have history functions (either in libhistory or libreadline) */
+#undef HAVE_HISTORY_FUNCTIONS
/* Set to 1 if you have <pwd.h> */
#undef HAVE_PWD_H
@@ -547,10 +547,7 @@ extern void srandom(unsigned int seed);
/* Set to 1 if your libreadline defines rl_completion_append_character */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
-/* Set to 1 if your libreadline has filename_completion_function */
-#undef HAVE_FILENAME_COMPLETION_FUNCTION
-
-/* Set to 1 if your readline headers actually declare the above */
+/* Set to 1 if filename_completion_function is declared in the readline header */
#undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
/* Set to 1 if you have getopt_long() (GNU long options) */