33 *
44 * Copyright (c) 2000-2003, PostgreSQL Global Development Group
55 *
6- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.95 2003/12/01 22:08:01 momjian Exp $
6+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.96 2003/12/01 22:14:40 momjian Exp $
77 */
88
99/*----------------------------------------------------------------------
4949#ifdef USE_READLINE
5050
5151#include <ctype.h>
52- #ifdef USE_ASSERT_CHECKING
53- #include <assert.h>
54- #endif
5552#include "libpq-fe.h"
5653#include "pqexpbuffer.h"
5754#include "common.h"
@@ -1345,7 +1342,6 @@ psql_completion(char *text, int start, int end)
13451342}
13461343}
13471344
1348-
13491345/*
13501346 * If we still don't have anything to match we have to fabricate some
13511347 * sort of default list. If we were to just return NULL, readline
@@ -1360,7 +1356,6 @@ psql_completion(char *text, int start, int end)
13601356#endif
13611357}
13621358
1363-
13641359/* free storage */
13651360free (prev_wd );
13661361free (prev2_wd );
@@ -1382,7 +1377,7 @@ psql_completion(char *text, int start, int end)
13821377 directly but through the readline interface.
13831378 The return value is expected to be the full completion of the text, going
13841379 through a list each time, or NULL if there are no more matches. The string
1385- will be free()'dbe readline, so you must run it through strdup() or
1380+ will be free()'dby readline, so you must run it through strdup() or
13861381 something of that sort.
13871382*/
13881383
@@ -1637,9 +1632,7 @@ complete_from_list(const char *text, int state)
16371632const char * item ;
16381633
16391634/* need to have a list */
1640- #ifdef USE_ASSERT_CHECKING
1641- assert (completion_charpp );
1642- #endif
1635+ psql_assert (completion_charpp );
16431636
16441637/* Initialization */
16451638if (state == 0 )
@@ -1693,9 +1686,7 @@ complete_from_const(const char *text, int state)
16931686(void )text ;/* We don't care about what was entered
16941687 * already. */
16951688
1696- #ifdef USE_ASSERT_CHECKING
1697- assert (completion_charp );
1698- #endif
1689+ psql_assert (completion_charp );
16991690if (state == 0 )
17001691return xstrdup (completion_charp );
17011692else
@@ -1809,7 +1800,7 @@ previous_word(int point, int skip)
18091800
18101801/*
18111802 * Surround a string with single quotes. This works for both SQL and
1812- * psql internal. Currentlydisable because it is reported not to
1803+ * psql internal. Currentlydisabled because it is reported not to
18131804 * cooperate with certain versions of readline.
18141805 */
18151806static char *