]> git.pld-linux.org Git - packages/postgresql.git/blame - postgresql-readline.patch
- release 7
[packages/postgresql.git] / postgresql-readline.patch
CommitLineData
74abfaac
AM
1diff -urN postgresql-7.1.org/configure.in postgresql-7.1/configure.in
2--- postgresql-7.1.org/configure.in Wed Apr 18 13:29:38 2001
3+++ postgresql-7.1/configure.in Wed Apr 18 13:32:55 2001
4@@ -903,7 +903,7 @@
5 else
6 _readline_header='xxx'
7 fi
8-AC_EGREP_HEADER([filename_completion_function], [$_readline_header],
9+AC_EGREP_HEADER([rl_filename_completion_function], [$_readline_header],
10 [AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
11 AC_MSG_RESULT(yes)],
12 [AC_MSG_RESULT(no)])
13diff -urN postgresql-7.1.org/src/bin/psql/tab-complete.c postgresql-7.1/src/bin/psql/tab-complete.c
14--- postgresql-7.1.org/src/bin/psql/tab-complete.c Wed Apr 18 13:29:38 2001
15+++ postgresql-7.1/src/bin/psql/tab-complete.c Wed Apr 18 13:30:35 2001
16@@ -61,7 +61,7 @@
46d20c3d
AF
17 #include "settings.h"
18
74abfaac 19 #ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
46d20c3d 20-char *filename_completion_function(char *, int);
46d20c3d
AF
21+char *rl_filename_completion_function(char *, int);
22
23 #endif
24
74abfaac 25@@ -72,9 +72,9 @@
46d20c3d
AF
26 /* Forward declaration of functions */
27 static char **psql_completion(char *text, int start, int end);
28 static char *create_command_generator(char *text, int state);
29-static char *complete_from_query(char *text, int state);
30-static char *complete_from_const(char *text, int state);
31-static char *complete_from_list(char *text, int state);
32+static char *complete_from_query(const char *text, int state);
33+static char *complete_from_const(const char *text, int state);
34+static char *complete_from_list(const char *text, int state);
35
36 static PGresult *exec_query(char *query);
37 char *quote_file_name(char *text, int match_type, char *quote_pointer);
74abfaac 38@@ -162,13 +162,13 @@
f01418e5
AF
39 4) The list of attributes to the given table.
40 */
41 #define COMPLETE_WITH_QUERY(query) \
42-do { completion_charp = query; matches = completion_matches(text, complete_from_query); } while(0)
43+do { completion_charp = query; matches = rl_completion_matches(text, complete_from_query); } while(0)
44 #define COMPLETE_WITH_LIST(list) \
45-do { completion_charpp = list; matches = completion_matches(text, complete_from_list); } while(0)
46+do { completion_charpp = list; matches = rl_completion_matches(text, complete_from_list); } while(0)
47 #define COMPLETE_WITH_CONST(string) \
48-do { completion_charp = string; matches = completion_matches(text, complete_from_const); } while(0)
49+do { completion_charp = string; matches = rl_completion_matches(text, complete_from_const); } while(0)
50 #define COMPLETE_WITH_ATTR(table) \
51-do {completion_charp = Query_for_list_of_attributes; completion_info_charp = table; matches = completion_matches(text, complete_from_query); } while(0)
52+do {completion_charp = Query_for_list_of_attributes; completion_info_charp = table; matches = rl_completion_matches(text, complete_from_query); } while(0)
53
54
55 /* The completion function. Acc. to readline spec this gets passed the text
74abfaac 56@@ -298,7 +298,7 @@
f01418e5
AF
57 /* CREATE or DROP */
58 /* complete with something you can create or drop */
59 else if (strcasecmp(prev_wd, "CREATE") == 0 || strcasecmp(prev_wd, "DROP") == 0)
60- matches = completion_matches(text, create_command_generator);
61+ matches = rl_completion_matches(text, create_command_generator);
62
63 /* ALTER */
74abfaac
AM
64 /* complete with what you can alter (TABLE, GROUP, USER) */
65@@ -731,7 +731,7 @@
66 strcmp(prev_wd, "\\s") == 0 ||
46d20c3d 67 strcmp(prev_wd, "\\w") == 0 || strcmp(prev_wd, "\\write") == 0
f01418e5 68 )
f01418e5 69- matches = completion_matches(text, filename_completion_function);
74abfaac 70+ matches = completion_matches(text, rl_filename_completion_function);
f01418e5 71
74abfaac
AM
72
73 /*
74@@ -829,7 +829,7 @@
a2b557e1
AF
75 etc.
76 */
77 static char *
78-complete_from_query(char *text, int state)
79+complete_from_query(const char *text, int state)
80 {
81 static int list_index,
82 string_length;
74abfaac 83@@ -877,7 +877,7 @@
a2b557e1
AF
84 SQL words that can appear at certain spot.
85 */
86 static char *
87-complete_from_list(char *text, int state)
88+complete_from_list(const char *text, int state)
89 {
90 static int string_length,
91 list_index;
74abfaac 92@@ -911,7 +911,7 @@
a2b557e1
AF
93 The string to be passed must be in completion_charp.
94 */
95 static char *
96-complete_from_const(char *text, int state)
97+complete_from_const(const char *text, int state)
98 {
99 (void) text; /* We don't care about what was entered
100 * already. */
This page took 0.086361 seconds and 4 git commands to generate.