summaryrefslogtreecommitdiff
path: root/contrib/soundex/soundex.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/soundex/soundex.c')
-rw-r--r--contrib/soundex/soundex.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/contrib/soundex/soundex.c b/contrib/soundex/soundex.c
index df0c8366b9..8fe73054ca 100644
--- a/contrib/soundex/soundex.c
+++ b/contrib/soundex/soundex.c
@@ -2,23 +2,21 @@
/* soundex.c */
/*****************************************************************************/
+#include <ctype.h>
#include <string.h>
#include <stdio.h>
+
#include "postgres.h" /* for char16, etc. */
+
#include "utils/palloc.h" /* for palloc */
-#include "libpq-fe.h" /* for TUPLE */
-#include <stdio.h>
-#include <ctype.h>
-/* prototype for soundex function */
+/* prototypes for soundex functions */
+text *text_soundex(text *t);
char *soundex(char *instr, char *outstr);
text *
text_soundex(text *t)
{
- /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
- char *table = "01230120022455012623010202";
- int count = 0;
text *new_t;
char outstr[6 + 1]; /* max length of soundex is 6 */
@@ -49,7 +47,8 @@ text_soundex(text *t)
char *
soundex(char *instr, char *outstr)
-{ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
+{
+ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
char *table = "01230120022455012623010202";
int count = 0;