3
3
*
4
4
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
5
5
*
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 $
7
7
*/
8
8
9
9
/*----------------------------------------------------------------------
49
49
#ifdef USE_READLINE
50
50
51
51
#include <ctype.h>
52
- #ifdef USE_ASSERT_CHECKING
53
- #include <assert.h>
54
- #endif
55
52
#include "libpq-fe.h"
56
53
#include "pqexpbuffer.h"
57
54
#include "common.h"
@@ -1345,7 +1342,6 @@ psql_completion(char *text, int start, int end)
1345
1342
}
1346
1343
}
1347
1344
1348
-
1349
1345
/*
1350
1346
* If we still don't have anything to match we have to fabricate some
1351
1347
* sort of default list. If we were to just return NULL, readline
@@ -1360,7 +1356,6 @@ psql_completion(char *text, int start, int end)
1360
1356
#endif
1361
1357
}
1362
1358
1363
-
1364
1359
/* free storage */
1365
1360
free (prev_wd );
1366
1361
free (prev2_wd );
@@ -1382,7 +1377,7 @@ psql_completion(char *text, int start, int end)
1382
1377
directly but through the readline interface.
1383
1378
The return value is expected to be the full completion of the text, going
1384
1379
through a list each time, or NULL if there are no more matches. The string
1385
- will be free()'d be readline, so you must run it through strdup() or
1380
+ will be free()'d by readline, so you must run it through strdup() or
1386
1381
something of that sort.
1387
1382
*/
1388
1383
@@ -1637,9 +1632,7 @@ complete_from_list(const char *text, int state)
1637
1632
const char * item ;
1638
1633
1639
1634
/* need to have a list */
1640
- #ifdef USE_ASSERT_CHECKING
1641
- assert (completion_charpp );
1642
- #endif
1635
+ psql_assert (completion_charpp );
1643
1636
1644
1637
/* Initialization */
1645
1638
if (state == 0 )
@@ -1693,9 +1686,7 @@ complete_from_const(const char *text, int state)
1693
1686
(void ) text ; /* We don't care about what was entered
1694
1687
* already. */
1695
1688
1696
- #ifdef USE_ASSERT_CHECKING
1697
- assert (completion_charp );
1698
- #endif
1689
+ psql_assert (completion_charp );
1699
1690
if (state == 0 )
1700
1691
return xstrdup (completion_charp );
1701
1692
else
@@ -1809,7 +1800,7 @@ previous_word(int point, int skip)
1809
1800
1810
1801
/*
1811
1802
* Surround a string with single quotes. This works for both SQL and
1812
- * psql internal. Currently disable because it is reported not to
1803
+ * psql internal. Currently disabled because it is reported not to
1813
1804
* cooperate with certain versions of readline.
1814
1805
*/
1815
1806
static char *
0 commit comments