summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-04-16 12:57:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-04-16 12:57:32 -0400
commit1c54b93a8cf959a826dfabd6cae55dce255df2f5 (patch)
tree479423a21be2fbdb69f0c72b42b8495c56e2b242 /contrib
parente9f451accbde17d106ac6a92c8877992d4410629 (diff)
downloadpostgresql-1c54b93a8cf959a826dfabd6cae55dce255df2f5.tar.gz
Avoid using non-ASCII commentary in daitch_mokotoff.c.
Commit d6b5dee42 failed to suppress that warning from MSVC, so let's just get rid of all non-ASCII glyphs in the comments. The comment for iso8859_1_to_ascii_upper[] is not essential, and the other cases can be handled by spelling out the Unicode character names. (I'm now really in the dark as to why MSVC doesn't complain about predicate.c's comment. But whatever.) Discussion: https://postgr.es/m/1546512.1681495035@sss.pgh.pa.us
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fuzzystrmatch/daitch_mokotoff.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/contrib/fuzzystrmatch/daitch_mokotoff.c b/contrib/fuzzystrmatch/daitch_mokotoff.c
index a61bbfa68f..162e32c115 100644
--- a/contrib/fuzzystrmatch/daitch_mokotoff.c
+++ b/contrib/fuzzystrmatch/daitch_mokotoff.c
@@ -111,9 +111,6 @@ static const dm_codes end_codes[2] =
/* Mapping from ISO8859-1 to upper-case ASCII, covering the range 0x60..0xFF. */
static const char iso8859_1_to_ascii_upper[] =
-/*
-"`abcdefghijklmnopqrstuvwxyz{|}~ ¡.....various odd symbols.....¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ*ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö/øùúûüýþÿ"
-*/
"`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~ ! ?AAAAAAECEEEEIIIIDNOOOOO*OUUUUYDSAAAAAAECEEEEIIIIDNOOOOO/OUUUUYDY";
/* Internal C implementation */
@@ -413,7 +410,7 @@ read_char(const unsigned char *str, int *ix)
/* Convert. */
if (c >= (unsigned char) '[' && c <= (unsigned char) ']')
{
- /* ASCII characters [, \, and ] are reserved for Ą, Ę, and Ţ/Ț. */
+ /* ASCII characters [, \, and ] are reserved for conversions below. */
return na;
}
else if (c < 0x60)
@@ -431,19 +428,16 @@ read_char(const unsigned char *str, int *ix)
/* Conversion of non-ASCII characters in the coding chart. */
switch (c)
{
- case 0x0104:
- case 0x0105:
- /* Ą/ą */
+ case 0x0104: /* LATIN CAPITAL LETTER A WITH OGONEK */
+ case 0x0105: /* LATIN SMALL LETTER A WITH OGONEK */
return '[';
- case 0x0118:
- case 0x0119:
- /* Ę/ę */
+ case 0x0118: /* LATIN CAPITAL LETTER E WITH OGONEK */
+ case 0x0119: /* LATIN SMALL LETTER E WITH OGONEK */
return '\\';
- case 0x0162:
- case 0x0163:
- case 0x021A:
- case 0x021B:
- /* Ţ/ţ or Ț/ț */
+ case 0x0162: /* LATIN CAPITAL LETTER T WITH CEDILLA */
+ case 0x0163: /* LATIN SMALL LETTER T WITH CEDILLA */
+ case 0x021A: /* LATIN CAPITAL LETTER T WITH COMMA BELOW */
+ case 0x021B: /* LATIN SMALL LETTER T WITH COMMA BELOW */
return ']';
default:
return na;