Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce36151

Browse files
committed
Make dmetaphone.c safe for pgindent and fussy compilers. Still to do: make it properly encoding aware w.r.t. chars U+00C7 and U+00D1.
1 parentd208fcd commitce36151

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎contrib/fuzzystrmatch/dmetaphone.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This is a port of the Double Metaphone algorithm for use in PostgreSQL.
33
*
4-
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/dmetaphone.c,v 1.13 2009/06/11 14:48:51 momjian Exp $
4+
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/dmetaphone.c,v 1.14 2010/04/05 02:46:20 adunstan Exp $
55
*
66
* Double Metaphone computes 2 "sounds like" strings - a primary and an
77
* alternate. In most cases they are the same, but for foreign names
@@ -461,7 +461,7 @@ DoubleMetaphone(char *str, char **codes)
461461
current+=1;
462462
break;
463463

464-
case'Ç':
464+
case'\xc7':/* C with cedilla */
465465
MetaphAdd(primary,"S");
466466
MetaphAdd(secondary,"S");
467467
current+=1;
@@ -1037,7 +1037,7 @@ DoubleMetaphone(char *str, char **codes)
10371037
MetaphAdd(secondary,"N");
10381038
break;
10391039

1040-
case'Ñ':
1040+
case'\xd1':/* N with tilde */
10411041
current+=1;
10421042
MetaphAdd(primary,"N");
10431043
MetaphAdd(secondary,"N");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp